import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js";
import { createAssertEquals } from 'typia';
export const assertEncodedAnchorExternalEnvelopeV1 = (() => { const _io0 = (input, _exceptionable = true) => 1 === input.v && ("object" === typeof input.a && null !== input.a && false === Array.isArray(input.a) && _io1(input.a, true && _exceptionable)) && (undefined === input.b || "object" === typeof input.b && null !== input.b && _io5(input.b, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
    if (["v", "a", "b"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return false;
})); const _io1 = (input, _exceptionable = true) => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "object" === typeof value && null !== value && _iu0(value, true && _exceptionable);
}); const _io2 = (input, _exceptionable = true) => "string" === typeof input.t && (1 === Object.keys(input).length || Object.keys(input).every(key => {
    if (["t"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return false;
})); const _io3 = (input, _exceptionable = true) => "string" === typeof input.p && (1 === Object.keys(input).length || Object.keys(input).every(key => {
    if (["p"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return false;
})); const _io4 = (input, _exceptionable = true) => "string" === typeof input.d && (1 === Object.keys(input).length || Object.keys(input).every(key => {
    if (["d"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return false;
})); const _io5 = (input, _exceptionable = true) => "string" === typeof input.p && "number" === typeof input.o && (2 === Object.keys(input).length || Object.keys(input).every(key => {
    if (["p", "o"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return false;
})); const _iu0 = (input, _exceptionable = true) => (() => {
    if (undefined !== input.t)
        return _io2(input, true && _exceptionable);
    else if (undefined !== input.p)
        return _io3(input, true && _exceptionable);
    else if (undefined !== input.d)
        return _io4(input, true && _exceptionable);
    else
        return false;
})(); const _ao0 = (input, _path, _exceptionable = true) => (1 === input.v || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".v",
    expected: "1",
    value: input.v
}, _errorFactory)) && (("object" === typeof input.a && null !== input.a && false === Array.isArray(input.a) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".a",
    expected: "__type",
    value: input.a
}, _errorFactory)) && _ao1(input.a, _path + ".a", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".a",
    expected: "__type",
    value: input.a
}, _errorFactory)) && (undefined === input.b || ("object" === typeof input.b && null !== input.b || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".b",
    expected: "(EncodedAnchorExternalBindingV1 | undefined)",
    value: input.b
}, _errorFactory)) && _ao5(input.b, _path + ".b", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".b",
    expected: "(EncodedAnchorExternalBindingV1 | undefined)",
    value: input.b
}, _errorFactory)) && (2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
    if (["v", "a", "b"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "createAssertEquals",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "undefined",
        value: value
    }, _errorFactory);
}))); const _ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return ("object" === typeof value && null !== value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "createAssertEquals",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "(__type.o1 | __type.o2 | __type.o3)",
        value: value
    }, _errorFactory)) && _au0(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "createAssertEquals",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "(__type.o1 | __type.o2 | __type.o3)",
        value: value
    }, _errorFactory);
}); const _ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.t || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".t",
    expected: "string",
    value: input.t
}, _errorFactory)) && (1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
    if (["t"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "createAssertEquals",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "undefined",
        value: value
    }, _errorFactory);
}))); const _ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.p || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".p",
    expected: "string",
    value: input.p
}, _errorFactory)) && (1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
    if (["p"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "createAssertEquals",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "undefined",
        value: value
    }, _errorFactory);
}))); const _ao4 = (input, _path, _exceptionable = true) => ("string" === typeof input.d || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".d",
    expected: "string",
    value: input.d
}, _errorFactory)) && (1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
    if (["d"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "createAssertEquals",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "undefined",
        value: value
    }, _errorFactory);
}))); const _ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.p || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".p",
    expected: "string",
    value: input.p
}, _errorFactory)) && ("number" === typeof input.o || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssertEquals",
    path: _path + ".o",
    expected: "number",
    value: input.o
}, _errorFactory)) && (2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).every(key => {
    if (["p", "o"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "createAssertEquals",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "undefined",
        value: value
    }, _errorFactory);
}))); const _au0 = (input, _path, _exceptionable = true) => (() => {
    if (undefined !== input.t)
        return _ao2(input, _path, true && _exceptionable);
    else if (undefined !== input.p)
        return _ao3(input, _path, true && _exceptionable);
    else if (undefined !== input.d)
        return _ao4(input, _path, true && _exceptionable);
    else
        return __typia_transform__assertGuard._assertGuard(_exceptionable, {
            method: "createAssertEquals",
            path: _path,
            expected: "(__type.o1 | __type.o2 | __type.o3)",
            value: input
        }, _errorFactory);
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true); let _errorFactory; return (input, errorFactory) => {
    if (false === __is(input)) {
        _errorFactory = errorFactory;
        ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
            method: "createAssertEquals",
            path: _path + "",
            expected: "EncodedAnchorExternalEnvelopeV1",
            value: input
        }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
            method: "createAssertEquals",
            path: _path + "",
            expected: "EncodedAnchorExternalEnvelopeV1",
            value: input
        }, _errorFactory))(input, "$input", true);
    }
    return input;
}; })();
//# sourceMappingURL=anchor-external.generated.js.map