import * as __typia_transform__isTypeUint64 from "typia/lib/internal/_isTypeUint64";
import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard";
import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString";
import * as __typia_transform__randomPattern from "typia/lib/internal/_randomPattern";
import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger";
import * as __typia_transform__randomPick from "typia/lib/internal/_randomPick";
import * as __typia_transform__randomString from "typia/lib/internal/_randomString";
import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray";
import * as __typia_transform__randomNumber from "typia/lib/internal/_randomNumber";
import * as __typia_transform__jsonStringifyString from "typia/lib/internal/_jsonStringifyString";
import * as __typia_transform__jsonStringifyNumber from "typia/lib/internal/_jsonStringifyNumber";
import * as __typia_transform__throwTypeGuardError from "typia/lib/internal/_throwTypeGuardError";
import typia from 'typia';
export const assertBlock = (() => { const _io0 = input => "string" === typeof input.id && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) && ("string" === typeof input.file && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file)) && ("string" === typeof input.location && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && __typia_transform__isTypeUint64._isTypeUint64(input.offset))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && __typia_transform__isTypeUint64._isTypeUint64(input.size))) && (null === input.hash || "string" === typeof input.hash && RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && __typia_transform__isTypeUint64._isTypeUint64(input.btime))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && _io1(elem)) || "object" === typeof input.error && null !== input.error && _io1(input.error)))); const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value;
}); const _io3 = input => true; const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".id",
    expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
    value: input.id
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".id",
    expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
    value: input.id
}, _errorFactory)) && ("string" === typeof input.file && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".file",
    expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
    value: input.file
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".file",
    expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
    value: input.file
}, _errorFactory)) && ("string" === typeof input.location && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".location",
    expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
    value: input.location
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".location",
    expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
    value: input.location
}, _errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".offset",
    expected: "number & Minimum<0>",
    value: input.offset
}, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.offset) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".offset",
    expected: "number & Type<\"uint64\">",
    value: input.offset
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".offset",
    expected: "(number & Minimum<0> & Type<\"uint64\">)",
    value: input.offset
}, _errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".size",
    expected: "number & Minimum<0>",
    value: input.size
}, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.size) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".size",
    expected: "number & Type<\"uint64\">",
    value: input.size
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".size",
    expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
    value: input.size
}, _errorFactory)) && (null === input.hash || "string" === typeof input.hash && (RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".hash",
    expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
    value: input.hash
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".hash",
    expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
    value: input.hash
}, _errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".btime",
    expected: "number & Minimum<0>",
    value: input.btime
}, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.btime) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".btime",
    expected: "number & Type<\"uint64\">",
    value: input.btime
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".btime",
    expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
    value: input.btime
}, _errorFactory)) && (null === input.path || "string" === typeof input.path || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".path",
    expected: "(null | string)",
    value: input.path
}, _errorFactory)) && ((undefined !== input.error || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".error",
    expected: "(Array<NxtError> | NxtError | null)",
    value: input.error
}, _errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".error[" + _index3 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) && _ao1(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".error[" + _index3 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) || "object" === typeof input.error && null !== input.error && _ao1(input.error, _path + ".error", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".error",
    expected: "(Array<NxtError> | NxtError | null)",
    value: input.error
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".error",
    expected: "(Array<NxtError> | NxtError | null)",
    value: input.error
}, _errorFactory))); const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".message",
    expected: "string",
    value: input.message
}, _errorFactory)) && (undefined === input.type || "string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".type",
    expected: "(string | undefined)",
    value: input.type
}, _errorFactory)) && (undefined === input.code || "string" === typeof input.code || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".code",
    expected: "(string | undefined)",
    value: input.code
}, _errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".exitCode",
    expected: "(number | undefined)",
    value: input.exitCode
}, _errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".signalCode",
    expected: "(number | undefined)",
    value: input.signalCode
}, _errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".statusCode",
    expected: "(number | undefined)",
    value: input.statusCode
}, _errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".headers",
    expected: "(Record<string, string> | undefined)",
    value: input.headers
}, _errorFactory)) && _ao2(input.headers, _path + ".headers", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".headers",
    expected: "(Record<string, string> | undefined)",
    value: input.headers
}, _errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".data",
    expected: "(object | undefined)",
    value: input.data
}, _errorFactory)) && _ao3(input.data, _path + ".data", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".data",
    expected: "(object | undefined)",
    value: input.data
}, _errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".cause",
    expected: "(NxtError | null | undefined)",
    value: input.cause
}, _errorFactory)) && _ao1(input.cause, _path + ".cause", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".cause",
    expected: "(NxtError | null | undefined)",
    value: input.cause
}, _errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".errors",
    expected: "(Array<NxtError> | null | undefined)",
    value: input.errors
}, _errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".errors[" + _index4 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) && _ao1(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".errors[" + _index4 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".errors",
    expected: "(Array<NxtError> | null | undefined)",
    value: input.errors
}, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "typia.createAssert",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "string",
        value: value
    }, _errorFactory);
}); const _ao3 = (input, _path, _exceptionable = true) => true; const __is = input => "object" === typeof input && null !== input && _io0(input); 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: "typia.createAssert",
            path: _path + "",
            expected: "Block",
            value: input
        }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "",
            expected: "Block",
            value: input
        }, _errorFactory))(input, "$input", true);
    }
    return input;
}; })();
export const isBlock = (() => { const _io0 = input => "string" === typeof input.id && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) && ("string" === typeof input.file && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file)) && ("string" === typeof input.location && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && __typia_transform__isTypeUint64._isTypeUint64(input.offset))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && __typia_transform__isTypeUint64._isTypeUint64(input.size))) && (null === input.hash || "string" === typeof input.hash && RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && __typia_transform__isTypeUint64._isTypeUint64(input.btime))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && _io1(elem)) || "object" === typeof input.error && null !== input.error && _io1(input.error)))); const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value;
}); const _io3 = input => true; return input => "object" === typeof input && null !== input && _io0(input); })();
export const randomBlock = (() => { const _ro0 = (_recursive = false, _depth = 0) => ({
    id: (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$")),
    file: (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$")),
    location: (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$")),
    offset: (_generator?.integer ?? __typia_transform__randomInteger._randomInteger)({
        type: "integer",
        minimum: 0
    }),
    size: __typia_transform__randomPick._randomPick([
        () => null,
        () => (_generator?.integer ?? __typia_transform__randomInteger._randomInteger)({
            type: "integer",
            minimum: 0
        })
    ])(),
    hash: __typia_transform__randomPick._randomPick([
        () => null,
        () => (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^([A-Fa-f0-9]{32})?$"))
    ])(),
    btime: __typia_transform__randomPick._randomPick([
        () => null,
        () => (_generator?.integer ?? __typia_transform__randomInteger._randomInteger)({
            type: "integer",
            minimum: 0
        })
    ])(),
    path: __typia_transform__randomPick._randomPick([
        () => null,
        () => (_generator?.string ?? __typia_transform__randomString._randomString)({
            type: "string"
        })
    ])(),
    error: __typia_transform__randomPick._randomPick([
        () => null,
        () => (_generator?.array ?? __typia_transform__randomArray._randomArray)({
            type: "array",
            element: () => _ro1(_recursive, _recursive ? 1 + _depth : _depth)
        }),
        () => _ro1(_recursive, _recursive ? 1 + _depth : _depth)
    ])()
}); const _ro1 = (_recursive = true, _depth = 0) => ({
    message: (_generator?.string ?? __typia_transform__randomString._randomString)({
        type: "string"
    }),
    type: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => (_generator?.string ?? __typia_transform__randomString._randomString)({
            type: "string"
        })
    ])(),
    code: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => (_generator?.string ?? __typia_transform__randomString._randomString)({
            type: "string"
        })
    ])(),
    exitCode: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({
            type: "number"
        })
    ])(),
    signalCode: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({
            type: "number"
        })
    ])(),
    statusCode: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({
            type: "number"
        })
    ])(),
    headers: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => _ro2(true, _recursive ? 1 + _depth : _depth)
    ])(),
    data: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => _ro3(true, _recursive ? 1 + _depth : _depth)
    ])(),
    cause: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => null,
        () => _ro1(true, _recursive ? 1 + _depth : _depth)
    ])(),
    errors: __typia_transform__randomPick._randomPick([
        () => undefined,
        () => null,
        () => 5 >= _depth ? (_generator?.array ?? __typia_transform__randomArray._randomArray)({
            type: "array",
            element: () => _ro1(true, _recursive ? 1 + _depth : _depth)
        }) : []
    ])()
}); const _ro2 = (_recursive = false, _depth = 0) => ({
    ...Object.fromEntries((_generator?.array ?? __typia_transform__randomArray._randomArray)({
        type: "array",
        element: () => [
            (_generator?.string ?? __typia_transform__randomString._randomString)({
                type: "string"
            }),
            (_generator?.string ?? __typia_transform__randomString._randomString)({
                type: "string"
            })
        ]
    }))
}); const _ro3 = (_recursive = false, _depth = 0) => ({}); let _generator; return generator => {
    _generator = generator;
    return _ro0();
}; })();
export const stringifyBlock = (() => { const _so0 = input => `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"file":${__typia_transform__jsonStringifyString._jsonStringifyString(input.file)},"location":${__typia_transform__jsonStringifyString._jsonStringifyString(input.location)},"offset":${String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.offset))},"size":${null !== input.size ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.size)) : "null"},"hash":${null !== input.hash ? __typia_transform__jsonStringifyString._jsonStringifyString(input.hash) : "null"},"btime":${null !== input.btime ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.btime)) : "null"},"path":${null !== input.path ? __typia_transform__jsonStringifyString._jsonStringifyString(input.path) : "null"},"error":${null !== input.error ? (() => {
    if (Array.isArray(input.error))
        return `[${input.error.map(elem => _so1(elem)).join(",")}]`;
    if ("object" === typeof input.error && null !== input.error)
        return _so1(input.error);
    __typia_transform__throwTypeGuardError._throwTypeGuardError({
        method: "typia.json.createStringify",
        expected: "(Array<NxtError> | NxtError | null)",
        value: input.error
    });
})() : "null"}}`; const _so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? __typia_transform__jsonStringifyString._jsonStringifyString(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? __typia_transform__jsonStringifyString._jsonStringifyString(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.exitCode)) : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.signalCode)) : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.statusCode)) : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? _so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? _so3(input.data) : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? _so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => _so1(elem)).join(",")}]` : "null" : undefined},`}"message":${__typia_transform__jsonStringifyString._jsonStringifyString(input.message)}}`; const _so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
    return ""; return `${JSON.stringify(key)}:${__typia_transform__jsonStringifyString._jsonStringifyString(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so3 = input => "{}"; const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value;
}); const _io3 = input => true; return input => _so0(input); })();
export const stringifyBlocks = (() => { const _so0 = input => `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"file":${__typia_transform__jsonStringifyString._jsonStringifyString(input.file)},"location":${__typia_transform__jsonStringifyString._jsonStringifyString(input.location)},"offset":${String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.offset))},"size":${null !== input.size ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.size)) : "null"},"hash":${null !== input.hash ? __typia_transform__jsonStringifyString._jsonStringifyString(input.hash) : "null"},"btime":${null !== input.btime ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.btime)) : "null"},"path":${null !== input.path ? __typia_transform__jsonStringifyString._jsonStringifyString(input.path) : "null"},"error":${null !== input.error ? (() => {
    if (Array.isArray(input.error))
        return `[${input.error.map(elem => _so1(elem)).join(",")}]`;
    if ("object" === typeof input.error && null !== input.error)
        return _so1(input.error);
    __typia_transform__throwTypeGuardError._throwTypeGuardError({
        method: "typia.json.createStringify",
        expected: "(Array<NxtError> | NxtError | null)",
        value: input.error
    });
})() : "null"}}`; const _so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? __typia_transform__jsonStringifyString._jsonStringifyString(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? __typia_transform__jsonStringifyString._jsonStringifyString(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.exitCode)) : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.signalCode)) : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? String(__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.statusCode)) : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? _so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? _so3(input.data) : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? _so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => _so1(elem)).join(",")}]` : "null" : undefined},`}"message":${__typia_transform__jsonStringifyString._jsonStringifyString(input.message)}}`; const _so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
    return ""; return `${JSON.stringify(key)}:${__typia_transform__jsonStringifyString._jsonStringifyString(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so3 = input => "{}"; const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value;
}); const _io3 = input => true; return input => `[${input.map(elem => _so0(elem)).join(",")}]`; })();
export const assertGuardBlock = (() => { const _io0 = input => "string" === typeof input.id && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) && ("string" === typeof input.file && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file)) && ("string" === typeof input.location && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && __typia_transform__isTypeUint64._isTypeUint64(input.offset))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && __typia_transform__isTypeUint64._isTypeUint64(input.size))) && (null === input.hash || "string" === typeof input.hash && RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && __typia_transform__isTypeUint64._isTypeUint64(input.btime))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && _io1(elem)) || "object" === typeof input.error && null !== input.error && _io1(input.error)))); const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value;
}); const _io3 = input => true; const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".id",
    expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
    value: input.id
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".id",
    expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
    value: input.id
}, _errorFactory)) && ("string" === typeof input.file && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".file",
    expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
    value: input.file
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".file",
    expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
    value: input.file
}, _errorFactory)) && ("string" === typeof input.location && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".location",
    expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
    value: input.location
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".location",
    expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
    value: input.location
}, _errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".offset",
    expected: "number & Minimum<0>",
    value: input.offset
}, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.offset) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".offset",
    expected: "number & Type<\"uint64\">",
    value: input.offset
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".offset",
    expected: "(number & Minimum<0> & Type<\"uint64\">)",
    value: input.offset
}, _errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".size",
    expected: "number & Minimum<0>",
    value: input.size
}, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.size) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".size",
    expected: "number & Type<\"uint64\">",
    value: input.size
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".size",
    expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
    value: input.size
}, _errorFactory)) && (null === input.hash || "string" === typeof input.hash && (RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".hash",
    expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
    value: input.hash
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".hash",
    expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
    value: input.hash
}, _errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".btime",
    expected: "number & Minimum<0>",
    value: input.btime
}, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.btime) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".btime",
    expected: "number & Type<\"uint64\">",
    value: input.btime
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".btime",
    expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
    value: input.btime
}, _errorFactory)) && (null === input.path || "string" === typeof input.path || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".path",
    expected: "(null | string)",
    value: input.path
}, _errorFactory)) && ((undefined !== input.error || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".error",
    expected: "(Array<NxtError> | NxtError | null)",
    value: input.error
}, _errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".error[" + _index3 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) && _ao1(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".error[" + _index3 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) || "object" === typeof input.error && null !== input.error && _ao1(input.error, _path + ".error", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".error",
    expected: "(Array<NxtError> | NxtError | null)",
    value: input.error
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".error",
    expected: "(Array<NxtError> | NxtError | null)",
    value: input.error
}, _errorFactory))); const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".message",
    expected: "string",
    value: input.message
}, _errorFactory)) && (undefined === input.type || "string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".type",
    expected: "(string | undefined)",
    value: input.type
}, _errorFactory)) && (undefined === input.code || "string" === typeof input.code || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".code",
    expected: "(string | undefined)",
    value: input.code
}, _errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".exitCode",
    expected: "(number | undefined)",
    value: input.exitCode
}, _errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".signalCode",
    expected: "(number | undefined)",
    value: input.signalCode
}, _errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".statusCode",
    expected: "(number | undefined)",
    value: input.statusCode
}, _errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".headers",
    expected: "(Record<string, string> | undefined)",
    value: input.headers
}, _errorFactory)) && _ao2(input.headers, _path + ".headers", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".headers",
    expected: "(Record<string, string> | undefined)",
    value: input.headers
}, _errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".data",
    expected: "(object | undefined)",
    value: input.data
}, _errorFactory)) && _ao3(input.data, _path + ".data", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".data",
    expected: "(object | undefined)",
    value: input.data
}, _errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".cause",
    expected: "(NxtError | null | undefined)",
    value: input.cause
}, _errorFactory)) && _ao1(input.cause, _path + ".cause", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".cause",
    expected: "(NxtError | null | undefined)",
    value: input.cause
}, _errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".errors",
    expected: "(Array<NxtError> | null | undefined)",
    value: input.errors
}, _errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".errors[" + _index4 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) && _ao1(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".errors[" + _index4 + "]",
    expected: "NxtError",
    value: elem
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssertGuard",
    path: _path + ".errors",
    expected: "(Array<NxtError> | null | undefined)",
    value: input.errors
}, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
    const value = input[key];
    if (undefined === value)
        return true;
    return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
        method: "typia.createAssertGuard",
        path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
        expected: "string",
        value: value
    }, _errorFactory);
}); const _ao3 = (input, _path, _exceptionable = true) => true; const __is = input => "object" === typeof input && null !== input && _io0(input); 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: "typia.createAssertGuard",
            path: _path + "",
            expected: "Block",
            value: input
        }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssertGuard",
            path: _path + "",
            expected: "Block",
            value: input
        }, _errorFactory))(input, "$input", true);
    }
}; })();
