{"version":3,"file":"ccip-CRxIf4Go.mjs","names":["version","BaseError","version","BaseError","BaseError","BaseError","BaseError","BaseError","docsPath","docsPath","assertSize","Bytes.size","Bytes.SizeOverflowError","assertStartOffset","Bytes.SliceOffsetOutOfBoundsError","assertEndOffset","pad","Bytes.SizeExceedsPaddingSizeError","Hex.size","Hex.SizeOverflowError","Hex.SliceOffsetOutOfBoundsError","Hex.SizeExceedsPaddingSizeError","encoder","from","Hex.padRight","internal.charCodeToBase16","Errors.BaseError","fromString","padRight","internal.pad","size","slice","toBigInt","Hex.fromBytes","Hex.toBigInt","toNumber","Hex.toNumber","internal.trim","Json.stringify","SizeOverflowError","SliceOffsetOutOfBoundsError","SizeExceedsPaddingSizeError","internal.pad","Errors.BaseError","Json.stringify","toRpc","Hex.fromNumber","Hex.fromNumber","Withdrawal.toRpc","docsPath","BaseError","BlockOverrides.toRpc","slice","docsPath","BaseError","stringify","concat","stringify"],"sources":["../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/version.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/errors.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/errors/signature.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/errors/struct.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/runtime/cache.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/runtime/utils.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/runtime/structs.js","../../../node_modules/.pnpm/abitype@1.2.3_typescript@6.0.2_zod@4.3.6/node_modules/abitype/dist/esm/human-readable/parseAbi.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeFunctionData.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/stateOverride.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddressEqual.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/version.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/internal/errors.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/Errors.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/internal/bytes.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/internal/hex.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/Json.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/Bytes.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/Hex.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/Withdrawal.js","../../../node_modules/.pnpm/ox@0.14.7_typescript@6.0.2_zod@4.3.6/node_modules/ox/_esm/core/BlockOverrides.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/constants/abis.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/constants/contract.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/constants/contracts.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeDeployData.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/chain/getChainContractAddress.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/promise/withResolvers.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/promise/createBatchScheduler.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/actions/public/call.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/abi/decodeFunctionData.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeErrorResult.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/errors/ccip.js","../../../node_modules/.pnpm/viem@2.47.6_typescript@6.0.2_zod@4.3.6/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["export const version = '1.2.3';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nexport class BaseError extends Error {\n    constructor(shortMessage, args = {}) {\n        const details = args.cause instanceof BaseError\n            ? args.cause.details\n            : args.cause?.message\n                ? args.cause.message\n                : args.details;\n        const docsPath = args.cause instanceof BaseError\n            ? args.cause.docsPath || args.docsPath\n            : args.docsPath;\n        const message = [\n            shortMessage || 'An error occurred.',\n            '',\n            ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n            ...(docsPath ? [`Docs: https://abitype.dev${docsPath}`] : []),\n            ...(details ? [`Details: ${details}`] : []),\n            `Version: abitype@${version}`,\n        ].join('\\n');\n        super(message);\n        Object.defineProperty(this, \"details\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"docsPath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"metaMessages\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"shortMessage\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'AbiTypeError'\n        });\n        if (args.cause)\n            this.cause = args.cause;\n        this.details = details;\n        this.docsPath = docsPath;\n        this.metaMessages = args.metaMessages;\n        this.shortMessage = shortMessage;\n    }\n}\n//# sourceMappingURL=errors.js.map","import { execTyped } from '../../regex.js';\n// https://regexr.com/7gmok\nconst errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isErrorSignature(signature) {\n    return errorSignatureRegex.test(signature);\n}\nexport function execErrorSignature(signature) {\n    return execTyped(errorSignatureRegex, signature);\n}\n// https://regexr.com/7gmoq\nconst eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isEventSignature(signature) {\n    return eventSignatureRegex.test(signature);\n}\nexport function execEventSignature(signature) {\n    return execTyped(eventSignatureRegex, signature);\n}\n// https://regexr.com/7gmot\nconst functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?<returns>.*?)\\))?$/;\nexport function isFunctionSignature(signature) {\n    return functionSignatureRegex.test(signature);\n}\nexport function execFunctionSignature(signature) {\n    return execTyped(functionSignatureRegex, signature);\n}\n// https://regexr.com/7gmp3\nconst structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?<properties>.*?)\\}$/;\nexport function isStructSignature(signature) {\n    return structSignatureRegex.test(signature);\n}\nexport function execStructSignature(signature) {\n    return execTyped(structSignatureRegex, signature);\n}\n// https://regexr.com/78u01\nconst constructorSignatureRegex = /^constructor\\((?<parameters>.*?)\\)(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isConstructorSignature(signature) {\n    return constructorSignatureRegex.test(signature);\n}\nexport function execConstructorSignature(signature) {\n    return execTyped(constructorSignatureRegex, signature);\n}\n// https://regexr.com/7srtn\nconst fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isFallbackSignature(signature) {\n    return fallbackSignatureRegex.test(signature);\n}\nexport function execFallbackSignature(signature) {\n    return execTyped(fallbackSignatureRegex, signature);\n}\n// https://regexr.com/78u1k\nconst receiveSignatureRegex = /^receive\\(\\) external payable$/;\nexport function isReceiveSignature(signature) {\n    return receiveSignatureRegex.test(signature);\n}\nexport const modifiers = new Set([\n    'memory',\n    'indexed',\n    'storage',\n    'calldata',\n]);\nexport const eventModifiers = new Set(['indexed']);\nexport const functionModifiers = new Set([\n    'calldata',\n    'memory',\n    'storage',\n]);\n//# sourceMappingURL=signatures.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiItemError extends BaseError {\n    constructor({ signature }) {\n        super('Failed to parse ABI item.', {\n            details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n            docsPath: '/api/human#parseabiitem-1',\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidAbiItemError'\n        });\n    }\n}\nexport class UnknownTypeError extends BaseError {\n    constructor({ type }) {\n        super('Unknown type.', {\n            metaMessages: [\n                `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`,\n            ],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'UnknownTypeError'\n        });\n    }\n}\nexport class UnknownSolidityTypeError extends BaseError {\n    constructor({ type }) {\n        super('Unknown type.', {\n            metaMessages: [`Type \"${type}\" is not a valid ABI type.`],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'UnknownSolidityTypeError'\n        });\n    }\n}\n//# sourceMappingURL=abiItem.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiParameterError extends BaseError {\n    constructor({ param }) {\n        super('Failed to parse ABI parameter.', {\n            details: `parseAbiParameter(${JSON.stringify(param, null, 2)})`,\n            docsPath: '/api/human#parseabiparameter-1',\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidAbiParameterError'\n        });\n    }\n}\nexport class InvalidAbiParametersError extends BaseError {\n    constructor({ params }) {\n        super('Failed to parse ABI parameters.', {\n            details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n            docsPath: '/api/human#parseabiparameters-1',\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidAbiParametersError'\n        });\n    }\n}\nexport class InvalidParameterError extends BaseError {\n    constructor({ param }) {\n        super('Invalid ABI parameter.', {\n            details: param,\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidParameterError'\n        });\n    }\n}\nexport class SolidityProtectedKeywordError extends BaseError {\n    constructor({ param, name }) {\n        super('Invalid ABI parameter.', {\n            details: param,\n            metaMessages: [\n                `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`,\n            ],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'SolidityProtectedKeywordError'\n        });\n    }\n}\nexport class InvalidModifierError extends BaseError {\n    constructor({ param, type, modifier, }) {\n        super('Invalid ABI parameter.', {\n            details: param,\n            metaMessages: [\n                `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n            ],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidModifierError'\n        });\n    }\n}\nexport class InvalidFunctionModifierError extends BaseError {\n    constructor({ param, type, modifier, }) {\n        super('Invalid ABI parameter.', {\n            details: param,\n            metaMessages: [\n                `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n                `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`,\n            ],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidFunctionModifierError'\n        });\n    }\n}\nexport class InvalidAbiTypeParameterError extends BaseError {\n    constructor({ abiParameter, }) {\n        super('Invalid ABI parameter.', {\n            details: JSON.stringify(abiParameter, null, 2),\n            metaMessages: ['ABI parameter type is invalid.'],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidAbiTypeParameterError'\n        });\n    }\n}\n//# sourceMappingURL=abiParameter.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidSignatureError extends BaseError {\n    constructor({ signature, type, }) {\n        super(`Invalid ${type} signature.`, {\n            details: signature,\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidSignatureError'\n        });\n    }\n}\nexport class UnknownSignatureError extends BaseError {\n    constructor({ signature }) {\n        super('Unknown signature.', {\n            details: signature,\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'UnknownSignatureError'\n        });\n    }\n}\nexport class InvalidStructSignatureError extends BaseError {\n    constructor({ signature }) {\n        super('Invalid struct signature.', {\n            details: signature,\n            metaMessages: ['No properties exist.'],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidStructSignatureError'\n        });\n    }\n}\n//# sourceMappingURL=signature.js.map","import { BaseError } from '../../errors.js';\nexport class CircularReferenceError extends BaseError {\n    constructor({ type }) {\n        super('Circular reference detected.', {\n            metaMessages: [`Struct \"${type}\" is a circular reference.`],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'CircularReferenceError'\n        });\n    }\n}\n//# sourceMappingURL=struct.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidParenthesisError extends BaseError {\n    constructor({ current, depth }) {\n        super('Unbalanced parentheses.', {\n            metaMessages: [\n                `\"${current.trim()}\" has too many ${depth > 0 ? 'opening' : 'closing'} parentheses.`,\n            ],\n            details: `Depth \"${depth}\"`,\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'InvalidParenthesisError'\n        });\n    }\n}\n//# sourceMappingURL=splitParameters.js.map","/**\n * Gets {@link parameterCache} cache key namespaced by {@link type} and {@link structs}. This prevents parameters from being accessible to types that don't allow them (e.g. `string indexed foo` not allowed outside of `type: 'event'`) and ensures different struct definitions with the same name are cached separately.\n * @param param ABI parameter string\n * @param type ABI parameter type\n * @param structs Struct definitions to include in cache key\n * @returns Cache key for {@link parameterCache}\n */\nexport function getParameterCacheKey(param, type, structs) {\n    let structKey = '';\n    if (structs)\n        for (const struct of Object.entries(structs)) {\n            if (!struct)\n                continue;\n            let propertyKey = '';\n            for (const property of struct[1]) {\n                propertyKey += `[${property.type}${property.name ? `:${property.name}` : ''}]`;\n            }\n            structKey += `(${struct[0]}{${propertyKey}})`;\n        }\n    if (type)\n        return `${type}:${param}${structKey}`;\n    return `${param}${structKey}`;\n}\n/**\n * Basic cache seeded with common ABI parameter strings.\n *\n * **Note: When seeding more parameters, make sure you benchmark performance. The current number is the ideal balance between performance and having an already existing cache.**\n */\nexport const parameterCache = new Map([\n    // Unnamed\n    ['address', { type: 'address' }],\n    ['bool', { type: 'bool' }],\n    ['bytes', { type: 'bytes' }],\n    ['bytes32', { type: 'bytes32' }],\n    ['int', { type: 'int256' }],\n    ['int256', { type: 'int256' }],\n    ['string', { type: 'string' }],\n    ['uint', { type: 'uint256' }],\n    ['uint8', { type: 'uint8' }],\n    ['uint16', { type: 'uint16' }],\n    ['uint24', { type: 'uint24' }],\n    ['uint32', { type: 'uint32' }],\n    ['uint64', { type: 'uint64' }],\n    ['uint96', { type: 'uint96' }],\n    ['uint112', { type: 'uint112' }],\n    ['uint160', { type: 'uint160' }],\n    ['uint192', { type: 'uint192' }],\n    ['uint256', { type: 'uint256' }],\n    // Named\n    ['address owner', { type: 'address', name: 'owner' }],\n    ['address to', { type: 'address', name: 'to' }],\n    ['bool approved', { type: 'bool', name: 'approved' }],\n    ['bytes _data', { type: 'bytes', name: '_data' }],\n    ['bytes data', { type: 'bytes', name: 'data' }],\n    ['bytes signature', { type: 'bytes', name: 'signature' }],\n    ['bytes32 hash', { type: 'bytes32', name: 'hash' }],\n    ['bytes32 r', { type: 'bytes32', name: 'r' }],\n    ['bytes32 root', { type: 'bytes32', name: 'root' }],\n    ['bytes32 s', { type: 'bytes32', name: 's' }],\n    ['string name', { type: 'string', name: 'name' }],\n    ['string symbol', { type: 'string', name: 'symbol' }],\n    ['string tokenURI', { type: 'string', name: 'tokenURI' }],\n    ['uint tokenId', { type: 'uint256', name: 'tokenId' }],\n    ['uint8 v', { type: 'uint8', name: 'v' }],\n    ['uint256 balance', { type: 'uint256', name: 'balance' }],\n    ['uint256 tokenId', { type: 'uint256', name: 'tokenId' }],\n    ['uint256 value', { type: 'uint256', name: 'value' }],\n    // Indexed\n    [\n        'event:address indexed from',\n        { type: 'address', name: 'from', indexed: true },\n    ],\n    ['event:address indexed to', { type: 'address', name: 'to', indexed: true }],\n    [\n        'event:uint indexed tokenId',\n        { type: 'uint256', name: 'tokenId', indexed: true },\n    ],\n    [\n        'event:uint256 indexed tokenId',\n        { type: 'uint256', name: 'tokenId', indexed: true },\n    ],\n]);\n//# sourceMappingURL=cache.js.map","import { bytesRegex, execTyped, integerRegex, isTupleRegex, } from '../../regex.js';\nimport { UnknownSolidityTypeError } from '../errors/abiItem.js';\nimport { InvalidFunctionModifierError, InvalidModifierError, InvalidParameterError, SolidityProtectedKeywordError, } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, UnknownSignatureError, } from '../errors/signature.js';\nimport { InvalidParenthesisError } from '../errors/splitParameters.js';\nimport { getParameterCacheKey, parameterCache } from './cache.js';\nimport { eventModifiers, execConstructorSignature, execErrorSignature, execEventSignature, execFallbackSignature, execFunctionSignature, functionModifiers, isConstructorSignature, isErrorSignature, isEventSignature, isFallbackSignature, isFunctionSignature, isReceiveSignature, } from './signatures.js';\nexport function parseSignature(signature, structs = {}) {\n    if (isFunctionSignature(signature))\n        return parseFunctionSignature(signature, structs);\n    if (isEventSignature(signature))\n        return parseEventSignature(signature, structs);\n    if (isErrorSignature(signature))\n        return parseErrorSignature(signature, structs);\n    if (isConstructorSignature(signature))\n        return parseConstructorSignature(signature, structs);\n    if (isFallbackSignature(signature))\n        return parseFallbackSignature(signature);\n    if (isReceiveSignature(signature))\n        return {\n            type: 'receive',\n            stateMutability: 'payable',\n        };\n    throw new UnknownSignatureError({ signature });\n}\nexport function parseFunctionSignature(signature, structs = {}) {\n    const match = execFunctionSignature(signature);\n    if (!match)\n        throw new InvalidSignatureError({ signature, type: 'function' });\n    const inputParams = splitParameters(match.parameters);\n    const inputs = [];\n    const inputLength = inputParams.length;\n    for (let i = 0; i < inputLength; i++) {\n        inputs.push(parseAbiParameter(inputParams[i], {\n            modifiers: functionModifiers,\n            structs,\n            type: 'function',\n        }));\n    }\n    const outputs = [];\n    if (match.returns) {\n        const outputParams = splitParameters(match.returns);\n        const outputLength = outputParams.length;\n        for (let i = 0; i < outputLength; i++) {\n            outputs.push(parseAbiParameter(outputParams[i], {\n                modifiers: functionModifiers,\n                structs,\n                type: 'function',\n            }));\n        }\n    }\n    return {\n        name: match.name,\n        type: 'function',\n        stateMutability: match.stateMutability ?? 'nonpayable',\n        inputs,\n        outputs,\n    };\n}\nexport function parseEventSignature(signature, structs = {}) {\n    const match = execEventSignature(signature);\n    if (!match)\n        throw new InvalidSignatureError({ signature, type: 'event' });\n    const params = splitParameters(match.parameters);\n    const abiParameters = [];\n    const length = params.length;\n    for (let i = 0; i < length; i++)\n        abiParameters.push(parseAbiParameter(params[i], {\n            modifiers: eventModifiers,\n            structs,\n            type: 'event',\n        }));\n    return { name: match.name, type: 'event', inputs: abiParameters };\n}\nexport function parseErrorSignature(signature, structs = {}) {\n    const match = execErrorSignature(signature);\n    if (!match)\n        throw new InvalidSignatureError({ signature, type: 'error' });\n    const params = splitParameters(match.parameters);\n    const abiParameters = [];\n    const length = params.length;\n    for (let i = 0; i < length; i++)\n        abiParameters.push(parseAbiParameter(params[i], { structs, type: 'error' }));\n    return { name: match.name, type: 'error', inputs: abiParameters };\n}\nexport function parseConstructorSignature(signature, structs = {}) {\n    const match = execConstructorSignature(signature);\n    if (!match)\n        throw new InvalidSignatureError({ signature, type: 'constructor' });\n    const params = splitParameters(match.parameters);\n    const abiParameters = [];\n    const length = params.length;\n    for (let i = 0; i < length; i++)\n        abiParameters.push(parseAbiParameter(params[i], { structs, type: 'constructor' }));\n    return {\n        type: 'constructor',\n        stateMutability: match.stateMutability ?? 'nonpayable',\n        inputs: abiParameters,\n    };\n}\nexport function parseFallbackSignature(signature) {\n    const match = execFallbackSignature(signature);\n    if (!match)\n        throw new InvalidSignatureError({ signature, type: 'fallback' });\n    return {\n        type: 'fallback',\n        stateMutability: match.stateMutability ?? 'nonpayable',\n    };\n}\nconst abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst abiParameterWithTupleRegex = /^\\((?<type>.+?)\\)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst dynamicIntegerRegex = /^u?int$/;\nexport function parseAbiParameter(param, options) {\n    // optional namespace cache by `type`\n    const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n    if (parameterCache.has(parameterCacheKey))\n        return parameterCache.get(parameterCacheKey);\n    const isTuple = isTupleRegex.test(param);\n    const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n    if (!match)\n        throw new InvalidParameterError({ param });\n    if (match.name && isSolidityKeyword(match.name))\n        throw new SolidityProtectedKeywordError({ param, name: match.name });\n    const name = match.name ? { name: match.name } : {};\n    const indexed = match.modifier === 'indexed' ? { indexed: true } : {};\n    const structs = options?.structs ?? {};\n    let type;\n    let components = {};\n    if (isTuple) {\n        type = 'tuple';\n        const params = splitParameters(match.type);\n        const components_ = [];\n        const length = params.length;\n        for (let i = 0; i < length; i++) {\n            // remove `modifiers` from `options` to prevent from being added to tuple components\n            components_.push(parseAbiParameter(params[i], { structs }));\n        }\n        components = { components: components_ };\n    }\n    else if (match.type in structs) {\n        type = 'tuple';\n        components = { components: structs[match.type] };\n    }\n    else if (dynamicIntegerRegex.test(match.type)) {\n        type = `${match.type}256`;\n    }\n    else if (match.type === 'address payable') {\n        type = 'address';\n    }\n    else {\n        type = match.type;\n        if (!(options?.type === 'struct') && !isSolidityType(type))\n            throw new UnknownSolidityTypeError({ type });\n    }\n    if (match.modifier) {\n        // Check if modifier exists, but is not allowed (e.g. `indexed` in `functionModifiers`)\n        if (!options?.modifiers?.has?.(match.modifier))\n            throw new InvalidModifierError({\n                param,\n                type: options?.type,\n                modifier: match.modifier,\n            });\n        // Check if resolved `type` is valid if there is a function modifier\n        if (functionModifiers.has(match.modifier) &&\n            !isValidDataLocation(type, !!match.array))\n            throw new InvalidFunctionModifierError({\n                param,\n                type: options?.type,\n                modifier: match.modifier,\n            });\n    }\n    const abiParameter = {\n        type: `${type}${match.array ?? ''}`,\n        ...name,\n        ...indexed,\n        ...components,\n    };\n    parameterCache.set(parameterCacheKey, abiParameter);\n    return abiParameter;\n}\n// s/o latika for this\nexport function splitParameters(params, result = [], current = '', depth = 0) {\n    const length = params.trim().length;\n    // biome-ignore lint/correctness/noUnreachable: recursive\n    for (let i = 0; i < length; i++) {\n        const char = params[i];\n        const tail = params.slice(i + 1);\n        switch (char) {\n            case ',':\n                return depth === 0\n                    ? splitParameters(tail, [...result, current.trim()])\n                    : splitParameters(tail, result, `${current}${char}`, depth);\n            case '(':\n                return splitParameters(tail, result, `${current}${char}`, depth + 1);\n            case ')':\n                return splitParameters(tail, result, `${current}${char}`, depth - 1);\n            default:\n                return splitParameters(tail, result, `${current}${char}`, depth);\n        }\n    }\n    if (current === '')\n        return result;\n    if (depth !== 0)\n        throw new InvalidParenthesisError({ current, depth });\n    result.push(current.trim());\n    return result;\n}\nexport function isSolidityType(type) {\n    return (type === 'address' ||\n        type === 'bool' ||\n        type === 'function' ||\n        type === 'string' ||\n        bytesRegex.test(type) ||\n        integerRegex.test(type));\n}\nconst protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n/** @internal */\nexport function isSolidityKeyword(name) {\n    return (name === 'address' ||\n        name === 'bool' ||\n        name === 'function' ||\n        name === 'string' ||\n        name === 'tuple' ||\n        bytesRegex.test(name) ||\n        integerRegex.test(name) ||\n        protectedKeywordsRegex.test(name));\n}\n/** @internal */\nexport function isValidDataLocation(type, isArray) {\n    return isArray || type === 'bytes' || type === 'string' || type === 'tuple';\n}\n//# sourceMappingURL=utils.js.map","import { execTyped, isTupleRegex } from '../../regex.js';\nimport { UnknownTypeError } from '../errors/abiItem.js';\nimport { InvalidAbiTypeParameterError } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, InvalidStructSignatureError, } from '../errors/signature.js';\nimport { CircularReferenceError } from '../errors/struct.js';\nimport { execStructSignature, isStructSignature } from './signatures.js';\nimport { isSolidityType, parseAbiParameter } from './utils.js';\nexport function parseStructs(signatures) {\n    // Create \"shallow\" version of each struct (and filter out non-structs or invalid structs)\n    const shallowStructs = {};\n    const signaturesLength = signatures.length;\n    for (let i = 0; i < signaturesLength; i++) {\n        const signature = signatures[i];\n        if (!isStructSignature(signature))\n            continue;\n        const match = execStructSignature(signature);\n        if (!match)\n            throw new InvalidSignatureError({ signature, type: 'struct' });\n        const properties = match.properties.split(';');\n        const components = [];\n        const propertiesLength = properties.length;\n        for (let k = 0; k < propertiesLength; k++) {\n            const property = properties[k];\n            const trimmed = property.trim();\n            if (!trimmed)\n                continue;\n            const abiParameter = parseAbiParameter(trimmed, {\n                type: 'struct',\n            });\n            components.push(abiParameter);\n        }\n        if (!components.length)\n            throw new InvalidStructSignatureError({ signature });\n        shallowStructs[match.name] = components;\n    }\n    // Resolve nested structs inside each parameter\n    const resolvedStructs = {};\n    const entries = Object.entries(shallowStructs);\n    const entriesLength = entries.length;\n    for (let i = 0; i < entriesLength; i++) {\n        const [name, parameters] = entries[i];\n        resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n    }\n    return resolvedStructs;\n}\nconst typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\\[\\d*?\\])+?)?$/;\nfunction resolveStructs(abiParameters = [], structs = {}, ancestors = new Set()) {\n    const components = [];\n    const length = abiParameters.length;\n    for (let i = 0; i < length; i++) {\n        const abiParameter = abiParameters[i];\n        const isTuple = isTupleRegex.test(abiParameter.type);\n        if (isTuple)\n            components.push(abiParameter);\n        else {\n            const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n            if (!match?.type)\n                throw new InvalidAbiTypeParameterError({ abiParameter });\n            const { array, type } = match;\n            if (type in structs) {\n                if (ancestors.has(type))\n                    throw new CircularReferenceError({ type });\n                components.push({\n                    ...abiParameter,\n                    type: `tuple${array ?? ''}`,\n                    components: resolveStructs(structs[type], structs, new Set([...ancestors, type])),\n                });\n            }\n            else {\n                if (isSolidityType(type))\n                    components.push(abiParameter);\n                else\n                    throw new UnknownTypeError({ type });\n            }\n        }\n    }\n    return components;\n}\n//# sourceMappingURL=structs.js.map","import { isStructSignature } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { parseSignature } from './runtime/utils.js';\n/**\n * Parses human-readable ABI into JSON {@link Abi}\n *\n * @param signatures - Human-Readable ABI\n * @returns Parsed {@link Abi}\n *\n * @example\n * const abi = parseAbi([\n *   //  ^? const abi: readonly [{ name: \"balanceOf\"; type: \"function\"; stateMutability:...\n *   'function balanceOf(address owner) view returns (uint256)',\n *   'event Transfer(address indexed from, address indexed to, uint256 amount)',\n * ])\n */\nexport function parseAbi(signatures) {\n    const structs = parseStructs(signatures);\n    const abi = [];\n    const length = signatures.length;\n    for (let i = 0; i < length; i++) {\n        const signature = signatures[i];\n        if (isStructSignature(signature))\n            continue;\n        abi.push(parseSignature(signature, structs));\n    }\n    return abi;\n}\n//# sourceMappingURL=parseAbi.js.map","import { AbiFunctionNotFoundError, } from '../../errors/abi.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeFunctionData';\nexport function prepareEncodeFunctionData(parameters) {\n    const { abi, args, functionName } = parameters;\n    let abiItem = abi[0];\n    if (functionName) {\n        const item = getAbiItem({\n            abi,\n            args,\n            name: functionName,\n        });\n        if (!item)\n            throw new AbiFunctionNotFoundError(functionName, { docsPath });\n        abiItem = item;\n    }\n    if (abiItem.type !== 'function')\n        throw new AbiFunctionNotFoundError(undefined, { docsPath });\n    return {\n        abi: [abiItem],\n        functionName: toFunctionSelector(formatAbiItem(abiItem)),\n    };\n}\n//# sourceMappingURL=prepareEncodeFunctionData.js.map","import { concatHex } from '../data/concat.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { prepareEncodeFunctionData } from './prepareEncodeFunctionData.js';\nexport function encodeFunctionData(parameters) {\n    const { args } = parameters;\n    const { abi, functionName } = (() => {\n        if (parameters.abi.length === 1 &&\n            parameters.functionName?.startsWith('0x'))\n            return parameters;\n        return prepareEncodeFunctionData(parameters);\n    })();\n    const abiItem = abi[0];\n    const signature = functionName;\n    const data = 'inputs' in abiItem && abiItem.inputs\n        ? encodeAbiParameters(abiItem.inputs, args ?? [])\n        : undefined;\n    return concatHex([signature, data ?? '0x']);\n}\n//# sourceMappingURL=encodeFunctionData.js.map","import { InvalidAddressError, } from '../errors/address.js';\nimport { InvalidBytesLengthError, } from '../errors/data.js';\nimport { AccountStateConflictError, StateAssignmentConflictError, } from '../errors/stateOverride.js';\nimport { isAddress } from './address/isAddress.js';\nimport { numberToHex } from './encoding/toHex.js';\n/** @internal */\nexport function serializeStateMapping(stateMapping) {\n    if (!stateMapping || stateMapping.length === 0)\n        return undefined;\n    return stateMapping.reduce((acc, { slot, value }) => {\n        if (slot.length !== 66)\n            throw new InvalidBytesLengthError({\n                size: slot.length,\n                targetSize: 66,\n                type: 'hex',\n            });\n        if (value.length !== 66)\n            throw new InvalidBytesLengthError({\n                size: value.length,\n                targetSize: 66,\n                type: 'hex',\n            });\n        acc[slot] = value;\n        return acc;\n    }, {});\n}\n/** @internal */\nexport function serializeAccountStateOverride(parameters) {\n    const { balance, nonce, state, stateDiff, code } = parameters;\n    const rpcAccountStateOverride = {};\n    if (code !== undefined)\n        rpcAccountStateOverride.code = code;\n    if (balance !== undefined)\n        rpcAccountStateOverride.balance = numberToHex(balance);\n    if (nonce !== undefined)\n        rpcAccountStateOverride.nonce = numberToHex(nonce);\n    if (state !== undefined)\n        rpcAccountStateOverride.state = serializeStateMapping(state);\n    if (stateDiff !== undefined) {\n        if (rpcAccountStateOverride.state)\n            throw new StateAssignmentConflictError();\n        rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n    }\n    return rpcAccountStateOverride;\n}\n/** @internal */\nexport function serializeStateOverride(parameters) {\n    if (!parameters)\n        return undefined;\n    const rpcStateOverride = {};\n    for (const { address, ...accountState } of parameters) {\n        if (!isAddress(address, { strict: false }))\n            throw new InvalidAddressError({ address });\n        if (rpcStateOverride[address])\n            throw new AccountStateConflictError({ address: address });\n        rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n    }\n    return rpcStateOverride;\n}\n//# sourceMappingURL=stateOverride.js.map","import { InvalidAddressError, } from '../../errors/address.js';\nimport { isAddress } from './isAddress.js';\nexport function isAddressEqual(a, b) {\n    if (!isAddress(a, { strict: false }))\n        throw new InvalidAddressError({ address: a });\n    if (!isAddress(b, { strict: false }))\n        throw new InvalidAddressError({ address: b });\n    return a.toLowerCase() === b.toLowerCase();\n}\n//# sourceMappingURL=isAddressEqual.js.map","import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, } from '../../errors/abi.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/decodeFunctionResult';\nexport function decodeFunctionResult(parameters) {\n    const { abi, args, functionName, data } = parameters;\n    let abiItem = abi[0];\n    if (functionName) {\n        const item = getAbiItem({ abi, args, name: functionName });\n        if (!item)\n            throw new AbiFunctionNotFoundError(functionName, { docsPath });\n        abiItem = item;\n    }\n    if (abiItem.type !== 'function')\n        throw new AbiFunctionNotFoundError(undefined, { docsPath });\n    if (!abiItem.outputs)\n        throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath });\n    const values = decodeAbiParameters(abiItem.outputs, data);\n    if (values && values.length > 1)\n        return values;\n    if (values && values.length === 1)\n        return values[0];\n    return undefined;\n}\n//# sourceMappingURL=decodeFunctionResult.js.map","/** @internal */\nexport const version = '0.1.1';\n//# sourceMappingURL=version.js.map","import { version } from '../version.js';\n/** @internal */\nexport function getUrl(url) {\n    return url;\n}\n/** @internal */\nexport function getVersion() {\n    return version;\n}\n/** @internal */\nexport function prettyPrint(args) {\n    if (!args)\n        return '';\n    const entries = Object.entries(args)\n        .map(([key, value]) => {\n        if (value === undefined || value === false)\n            return null;\n        return [key, value];\n    })\n        .filter(Boolean);\n    const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n    return entries\n        .map(([key, value]) => `  ${`${key}:`.padEnd(maxLength + 1)}  ${value}`)\n        .join('\\n');\n}\n//# sourceMappingURL=errors.js.map","import { getVersion } from './internal/errors.js';\n/**\n * Base error class inherited by all errors thrown by ox.\n *\n * @example\n * ```ts\n * import { Errors } from 'ox'\n * throw new Errors.BaseError('An error occurred')\n * ```\n */\nexport class BaseError extends Error {\n    static setStaticOptions(options) {\n        BaseError.prototype.docsOrigin = options.docsOrigin;\n        BaseError.prototype.showVersion = options.showVersion;\n        BaseError.prototype.version = options.version;\n    }\n    constructor(shortMessage, options = {}) {\n        const details = (() => {\n            if (options.cause instanceof BaseError) {\n                if (options.cause.details)\n                    return options.cause.details;\n                if (options.cause.shortMessage)\n                    return options.cause.shortMessage;\n            }\n            if (options.cause &&\n                'details' in options.cause &&\n                typeof options.cause.details === 'string')\n                return options.cause.details;\n            if (options.cause?.message)\n                return options.cause.message;\n            return options.details;\n        })();\n        const docsPath = (() => {\n            if (options.cause instanceof BaseError)\n                return options.cause.docsPath || options.docsPath;\n            return options.docsPath;\n        })();\n        const docsBaseUrl = options.docsOrigin ?? BaseError.prototype.docsOrigin;\n        const docs = `${docsBaseUrl}${docsPath ?? ''}`;\n        const showVersion = Boolean(options.version ?? BaseError.prototype.showVersion);\n        const version = options.version ?? BaseError.prototype.version;\n        const message = [\n            shortMessage || 'An error occurred.',\n            ...(options.metaMessages ? ['', ...options.metaMessages] : []),\n            ...(details || docsPath || showVersion\n                ? [\n                    '',\n                    details ? `Details: ${details}` : undefined,\n                    docsPath ? `See: ${docs}` : undefined,\n                    showVersion ? `Version: ${version}` : undefined,\n                ]\n                : []),\n        ]\n            .filter((x) => typeof x === 'string')\n            .join('\\n');\n        super(message, options.cause ? { cause: options.cause } : undefined);\n        Object.defineProperty(this, \"details\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"docs\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"docsOrigin\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"docsPath\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"shortMessage\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"showVersion\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"version\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"cause\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'BaseError'\n        });\n        this.cause = options.cause;\n        this.details = details;\n        this.docs = docs;\n        this.docsOrigin = docsBaseUrl;\n        this.docsPath = docsPath;\n        this.shortMessage = shortMessage;\n        this.showVersion = showVersion;\n        this.version = version;\n    }\n    walk(fn) {\n        return walk(this, fn);\n    }\n}\nObject.defineProperty(BaseError, \"defaultStaticOptions\", {\n    enumerable: true,\n    configurable: true,\n    writable: true,\n    value: {\n        docsOrigin: 'https://oxlib.sh',\n        showVersion: false,\n        version: `ox@${getVersion()}`,\n    }\n});\n(() => {\n    BaseError.setStaticOptions(BaseError.defaultStaticOptions);\n})();\n/** @internal */\nfunction walk(err, fn) {\n    if (fn?.(err))\n        return err;\n    if (err && typeof err === 'object' && 'cause' in err && err.cause)\n        return walk(err.cause, fn);\n    return fn ? null : err;\n}\n//# sourceMappingURL=Errors.js.map","import * as Bytes from '../Bytes.js';\n/** @internal */\nexport function assertSize(bytes, size_) {\n    if (Bytes.size(bytes) > size_)\n        throw new Bytes.SizeOverflowError({\n            givenSize: Bytes.size(bytes),\n            maxSize: size_,\n        });\n}\n/** @internal */\nexport function assertStartOffset(value, start) {\n    if (typeof start === 'number' && start > 0 && start > Bytes.size(value) - 1)\n        throw new Bytes.SliceOffsetOutOfBoundsError({\n            offset: start,\n            position: 'start',\n            size: Bytes.size(value),\n        });\n}\n/** @internal */\nexport function assertEndOffset(value, start, end) {\n    if (typeof start === 'number' &&\n        typeof end === 'number' &&\n        Bytes.size(value) !== end - start) {\n        throw new Bytes.SliceOffsetOutOfBoundsError({\n            offset: end,\n            position: 'end',\n            size: Bytes.size(value),\n        });\n    }\n}\n/** @internal */\nexport const charCodeMap = {\n    zero: 48,\n    nine: 57,\n    A: 65,\n    F: 70,\n    a: 97,\n    f: 102,\n};\n/** @internal */\nexport function charCodeToBase16(char) {\n    if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n        return char - charCodeMap.zero;\n    if (char >= charCodeMap.A && char <= charCodeMap.F)\n        return char - (charCodeMap.A - 10);\n    if (char >= charCodeMap.a && char <= charCodeMap.f)\n        return char - (charCodeMap.a - 10);\n    return undefined;\n}\n/** @internal */\nexport function pad(bytes, options = {}) {\n    const { dir, size = 32 } = options;\n    if (size === 0)\n        return bytes;\n    if (bytes.length > size)\n        throw new Bytes.SizeExceedsPaddingSizeError({\n            size: bytes.length,\n            targetSize: size,\n            type: 'Bytes',\n        });\n    const paddedBytes = new Uint8Array(size);\n    for (let i = 0; i < size; i++) {\n        const padEnd = dir === 'right';\n        paddedBytes[padEnd ? i : size - i - 1] =\n            bytes[padEnd ? i : bytes.length - i - 1];\n    }\n    return paddedBytes;\n}\n/** @internal */\nexport function trim(value, options = {}) {\n    const { dir = 'left' } = options;\n    let data = value;\n    let sliceLength = 0;\n    for (let i = 0; i < data.length - 1; i++) {\n        if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n            sliceLength++;\n        else\n            break;\n    }\n    data =\n        dir === 'left'\n            ? data.slice(sliceLength)\n            : data.slice(0, data.length - sliceLength);\n    return data;\n}\n//# sourceMappingURL=bytes.js.map","import * as Hex from '../Hex.js';\n/** @internal */\nexport function assertSize(hex, size_) {\n    if (Hex.size(hex) > size_)\n        throw new Hex.SizeOverflowError({\n            givenSize: Hex.size(hex),\n            maxSize: size_,\n        });\n}\n/** @internal */\nexport function assertStartOffset(value, start) {\n    if (typeof start === 'number' && start > 0 && start > Hex.size(value) - 1)\n        throw new Hex.SliceOffsetOutOfBoundsError({\n            offset: start,\n            position: 'start',\n            size: Hex.size(value),\n        });\n}\n/** @internal */\nexport function assertEndOffset(value, start, end) {\n    if (typeof start === 'number' &&\n        typeof end === 'number' &&\n        Hex.size(value) !== end - start) {\n        throw new Hex.SliceOffsetOutOfBoundsError({\n            offset: end,\n            position: 'end',\n            size: Hex.size(value),\n        });\n    }\n}\n/** @internal */\nexport function pad(hex_, options = {}) {\n    const { dir, size = 32 } = options;\n    if (size === 0)\n        return hex_;\n    const hex = hex_.replace('0x', '');\n    if (hex.length > size * 2)\n        throw new Hex.SizeExceedsPaddingSizeError({\n            size: Math.ceil(hex.length / 2),\n            targetSize: size,\n            type: 'Hex',\n        });\n    return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](size * 2, '0')}`;\n}\n/** @internal */\nexport function trim(value, options = {}) {\n    const { dir = 'left' } = options;\n    let data = value.replace('0x', '');\n    let sliceLength = 0;\n    for (let i = 0; i < data.length - 1; i++) {\n        if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n            sliceLength++;\n        else\n            break;\n    }\n    data =\n        dir === 'left'\n            ? data.slice(sliceLength)\n            : data.slice(0, data.length - sliceLength);\n    if (data === '0')\n        return '0x';\n    if (dir === 'right' && data.length % 2 === 1)\n        return `0x${data}0`;\n    return `0x${data}`;\n}\n//# sourceMappingURL=hex.js.map","const bigIntSuffix = '#__bigint';\n/**\n * Serializes a value to a canonical JSON string as defined by\n * [RFC 8785 (JSON Canonicalization Scheme)](https://www.rfc-editor.org/rfc/rfc8785).\n *\n * - Object keys are sorted recursively by UTF-16 code unit comparison.\n * - Primitives are serialized per ECMAScript rules (no trailing zeros on numbers, etc.).\n * - No whitespace is inserted.\n *\n * @example\n * ```ts twoslash\n * import { Json } from 'ox'\n *\n * const json = Json.canonicalize({ b: 2, a: 1 })\n * // @log: '{\"a\":1,\"b\":2}'\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Json } from 'ox'\n *\n * const json = Json.canonicalize({ z: [3, { y: 1, x: 2 }], a: 'hello' })\n * // @log: '{\"a\":\"hello\",\"z\":[3,{\"x\":2,\"y\":1}]}'\n * ```\n *\n * @param value - The value to canonicalize.\n * @returns The canonical JSON string.\n */\nexport function canonicalize(value) {\n    if (value === null || typeof value === 'boolean' || typeof value === 'string')\n        return JSON.stringify(value);\n    if (typeof value === 'number') {\n        if (!Number.isFinite(value))\n            throw new TypeError('Cannot canonicalize non-finite number');\n        return Object.is(value, -0) ? '0' : JSON.stringify(value);\n    }\n    if (typeof value === 'bigint')\n        throw new TypeError('Cannot canonicalize bigint');\n    if (Array.isArray(value))\n        return `[${value.map((item) => canonicalize(item)).join(',')}]`;\n    if (typeof value === 'object') {\n        const entries = Object.keys(value)\n            .sort()\n            .reduce((acc, key) => {\n            const v = value[key];\n            if (v !== undefined)\n                acc.push(`${JSON.stringify(key)}:${canonicalize(v)}`);\n            return acc;\n        }, []);\n        return `{${entries.join(',')}}`;\n    }\n    return undefined;\n}\n/**\n * Parses a JSON string, with support for `bigint`.\n *\n * @example\n * ```ts twoslash\n * import { Json } from 'ox'\n *\n * const json = Json.parse('{\"foo\":\"bar\",\"baz\":\"69420694206942069420694206942069420694206942069420#__bigint\"}')\n * // @log: {\n * // @log:   foo: 'bar',\n * // @log:   baz: 69420694206942069420694206942069420694206942069420n\n * // @log: }\n * ```\n *\n * @param string - The value to parse.\n * @param reviver - A function that transforms the results.\n * @returns The parsed value.\n */\nexport function parse(string, reviver) {\n    return JSON.parse(string, (key, value_) => {\n        const value = value_;\n        if (typeof value === 'string' && value.endsWith(bigIntSuffix))\n            return BigInt(value.slice(0, -bigIntSuffix.length));\n        return typeof reviver === 'function' ? reviver(key, value) : value;\n    });\n}\n/**\n * Stringifies a value to its JSON representation, with support for `bigint`.\n *\n * @example\n * ```ts twoslash\n * import { Json } from 'ox'\n *\n * const json = Json.stringify({\n *   foo: 'bar',\n *   baz: 69420694206942069420694206942069420694206942069420n,\n * })\n * // @log: '{\"foo\":\"bar\",\"baz\":\"69420694206942069420694206942069420694206942069420#__bigint\"}'\n * ```\n *\n * @param value - The value to stringify.\n * @param replacer - A function that transforms the results. It is passed the key and value of the property, and must return the value to be used in the JSON string. If this function returns `undefined`, the property is not included in the resulting JSON string.\n * @param space - A string or number that determines the indentation of the JSON string. If it is a number, it indicates the number of spaces to use as indentation; if it is a string (e.g. `'\\t'`), it uses the string as the indentation character.\n * @returns The JSON string.\n */\nexport function stringify(value, replacer, space) {\n    return JSON.stringify(value, (key, value) => {\n        if (typeof replacer === 'function')\n            return replacer(key, value);\n        if (typeof value === 'bigint')\n            return value.toString() + bigIntSuffix;\n        return value;\n    }, space);\n}\n//# sourceMappingURL=Json.js.map","import { equalBytes } from '@noble/curves/abstract/utils';\nimport * as Errors from './Errors.js';\nimport * as Hex from './Hex.js';\nimport * as internal from './internal/bytes.js';\nimport * as internal_hex from './internal/hex.js';\nimport * as Json from './Json.js';\nconst decoder = /*#__PURE__*/ new TextDecoder();\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Asserts if the given value is {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.assert('abc')\n * // @error: Bytes.InvalidBytesTypeError:\n * // @error: Value `\"abc\"` of type `string` is an invalid Bytes value.\n * // @error: Bytes values must be of type `Uint8Array`.\n * ```\n *\n * @param value - Value to assert.\n */\nexport function assert(value) {\n    if (value instanceof Uint8Array)\n        return;\n    if (!value)\n        throw new InvalidBytesTypeError(value);\n    if (typeof value !== 'object')\n        throw new InvalidBytesTypeError(value);\n    if (!('BYTES_PER_ELEMENT' in value))\n        throw new InvalidBytesTypeError(value);\n    if (value.BYTES_PER_ELEMENT !== 1 || value.constructor.name !== 'Uint8Array')\n        throw new InvalidBytesTypeError(value);\n}\n/**\n * Concatenates two or more {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const bytes = Bytes.concat(\n *   Bytes.from([1]),\n *   Bytes.from([69]),\n *   Bytes.from([420, 69]),\n * )\n * // @log: Uint8Array [ 1, 69, 420, 69 ]\n * ```\n *\n * @param values - Values to concatenate.\n * @returns Concatenated {@link ox#Bytes.Bytes}.\n */\nexport function concat(...values) {\n    let length = 0;\n    for (const arr of values) {\n        length += arr.length;\n    }\n    const result = new Uint8Array(length);\n    for (let i = 0, index = 0; i < values.length; i++) {\n        const arr = values[i];\n        result.set(arr, index);\n        index += arr.length;\n    }\n    return result;\n}\n/**\n * Instantiates a {@link ox#Bytes.Bytes} value from a `Uint8Array`, a hex string, or an array of unsigned 8-bit integers.\n *\n * :::tip\n *\n * To instantiate from a **Boolean**, **String**, or **Number**, use one of the following:\n *\n * - `Bytes.fromBoolean`\n *\n * - `Bytes.fromString`\n *\n * - `Bytes.fromNumber`\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.from([255, 124, 5, 4])\n * // @log: Uint8Array([255, 124, 5, 4])\n *\n * const data = Bytes.from('0xdeadbeef')\n * // @log: Uint8Array([222, 173, 190, 239])\n * ```\n *\n * @param value - Value to convert.\n * @returns A {@link ox#Bytes.Bytes} instance.\n */\nexport function from(value) {\n    if (value instanceof Uint8Array)\n        return value;\n    if (typeof value === 'string')\n        return fromHex(value);\n    return fromArray(value);\n}\n/**\n * Converts an array of unsigned 8-bit integers into {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromArray([255, 124, 5, 4])\n * // @log: Uint8Array([255, 124, 5, 4])\n * ```\n *\n * @param value - Value to convert.\n * @returns A {@link ox#Bytes.Bytes} instance.\n */\nexport function fromArray(value) {\n    return value instanceof Uint8Array ? value : new Uint8Array(value);\n}\n/**\n * Encodes a boolean value into {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromBoolean(true)\n * // @log: Uint8Array([1])\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromBoolean(true, { size: 32 })\n * // @log: Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])\n * ```\n *\n * @param value - Boolean value to encode.\n * @param options - Encoding options.\n * @returns Encoded {@link ox#Bytes.Bytes}.\n */\nexport function fromBoolean(value, options = {}) {\n    const { size } = options;\n    const bytes = new Uint8Array(1);\n    bytes[0] = Number(value);\n    if (typeof size === 'number') {\n        internal.assertSize(bytes, size);\n        return padLeft(bytes, size);\n    }\n    return bytes;\n}\n/**\n * Encodes a {@link ox#Hex.Hex} value into {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromHex('0x48656c6c6f20776f726c6421')\n * // @log: Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromHex('0x48656c6c6f20776f726c6421', { size: 32 })\n * // @log: Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n * ```\n *\n * @param value - {@link ox#Hex.Hex} value to encode.\n * @param options - Encoding options.\n * @returns Encoded {@link ox#Bytes.Bytes}.\n */\nexport function fromHex(value, options = {}) {\n    const { size } = options;\n    let hex = value;\n    if (size) {\n        internal_hex.assertSize(value, size);\n        hex = Hex.padRight(value, size);\n    }\n    let hexString = hex.slice(2);\n    if (hexString.length % 2)\n        hexString = `0${hexString}`;\n    const length = hexString.length / 2;\n    const bytes = new Uint8Array(length);\n    for (let index = 0, j = 0; index < length; index++) {\n        const nibbleLeft = internal.charCodeToBase16(hexString.charCodeAt(j++));\n        const nibbleRight = internal.charCodeToBase16(hexString.charCodeAt(j++));\n        if (nibbleLeft === undefined || nibbleRight === undefined) {\n            throw new Errors.BaseError(`Invalid byte sequence (\"${hexString[j - 2]}${hexString[j - 1]}\" in \"${hexString}\").`);\n        }\n        bytes[index] = (nibbleLeft << 4) | nibbleRight;\n    }\n    return bytes;\n}\n/**\n * Encodes a number value into {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromNumber(420)\n * // @log: Uint8Array([1, 164])\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromNumber(420, { size: 4 })\n * // @log: Uint8Array([0, 0, 1, 164])\n * ```\n *\n * @param value - Number value to encode.\n * @param options - Encoding options.\n * @returns Encoded {@link ox#Bytes.Bytes}.\n */\nexport function fromNumber(value, options) {\n    const hex = Hex.fromNumber(value, options);\n    return fromHex(hex);\n}\n/**\n * Encodes a string into {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromString('Hello world!')\n * // @log: Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.fromString('Hello world!', { size: 32 })\n * // @log: Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n * ```\n *\n * @param value - String to encode.\n * @param options - Encoding options.\n * @returns Encoded {@link ox#Bytes.Bytes}.\n */\nexport function fromString(value, options = {}) {\n    const { size } = options;\n    const bytes = encoder.encode(value);\n    if (typeof size === 'number') {\n        internal.assertSize(bytes, size);\n        return padRight(bytes, size);\n    }\n    return bytes;\n}\n/**\n * Checks if two {@link ox#Bytes.Bytes} values are equal.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.isEqual(Bytes.from([1]), Bytes.from([1]))\n * // @log: true\n *\n * Bytes.isEqual(Bytes.from([1]), Bytes.from([2]))\n * // @log: false\n * ```\n *\n * @param bytesA - First {@link ox#Bytes.Bytes} value.\n * @param bytesB - Second {@link ox#Bytes.Bytes} value.\n * @returns `true` if the two values are equal, otherwise `false`.\n */\nexport function isEqual(bytesA, bytesB) {\n    return equalBytes(bytesA, bytesB);\n}\n/**\n * Pads a {@link ox#Bytes.Bytes} value to the left with zero bytes until it reaches the given `size` (default: 32 bytes).\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.padLeft(Bytes.from([1]), 4)\n * // @log: Uint8Array([0, 0, 0, 1])\n * ```\n *\n * @param value - {@link ox#Bytes.Bytes} value to pad.\n * @param size - Size to pad the {@link ox#Bytes.Bytes} value to.\n * @returns Padded {@link ox#Bytes.Bytes} value.\n */\nexport function padLeft(value, size) {\n    return internal.pad(value, { dir: 'left', size });\n}\n/**\n * Pads a {@link ox#Bytes.Bytes} value to the right with zero bytes until it reaches the given `size` (default: 32 bytes).\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.padRight(Bytes.from([1]), 4)\n * // @log: Uint8Array([1, 0, 0, 0])\n * ```\n *\n * @param value - {@link ox#Bytes.Bytes} value to pad.\n * @param size - Size to pad the {@link ox#Bytes.Bytes} value to.\n * @returns Padded {@link ox#Bytes.Bytes} value.\n */\nexport function padRight(value, size) {\n    return internal.pad(value, { dir: 'right', size });\n}\n/**\n * Generates random {@link ox#Bytes.Bytes} of the specified length.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const bytes = Bytes.random(32)\n * // @log: Uint8Array([... x32])\n * ```\n *\n * @param length - Length of the random {@link ox#Bytes.Bytes} to generate.\n * @returns Random {@link ox#Bytes.Bytes} of the specified length.\n */\nexport function random(length) {\n    return crypto.getRandomValues(new Uint8Array(length));\n}\n/**\n * Retrieves the size of a {@link ox#Bytes.Bytes} value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.size(Bytes.from([1, 2, 3, 4]))\n * // @log: 4\n * ```\n *\n * @param value - {@link ox#Bytes.Bytes} value.\n * @returns Size of the {@link ox#Bytes.Bytes} value.\n */\nexport function size(value) {\n    return value.length;\n}\n/**\n * Returns a section of a {@link ox#Bytes.Bytes} value given a start/end bytes offset.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.slice(\n *   Bytes.from([1, 2, 3, 4, 5, 6, 7, 8, 9]),\n *   1,\n *   4,\n * )\n * // @log: Uint8Array([2, 3, 4])\n * ```\n *\n * @param value - The {@link ox#Bytes.Bytes} value.\n * @param start - Start offset.\n * @param end - End offset.\n * @param options - Slice options.\n * @returns Sliced {@link ox#Bytes.Bytes} value.\n */\nexport function slice(value, start, end, options = {}) {\n    const { strict } = options;\n    internal.assertStartOffset(value, start);\n    const value_ = value.slice(start, end);\n    if (strict)\n        internal.assertEndOffset(value_, start, end);\n    return value_;\n}\n/**\n * Decodes a {@link ox#Bytes.Bytes} into a bigint.\n *\n * @example\n * ```ts\n * import { Bytes } from 'ox'\n *\n * Bytes.toBigInt(Bytes.from([1, 164]))\n * // @log: 420n\n * ```\n *\n * @param bytes - The {@link ox#Bytes.Bytes} to decode.\n * @param options - Decoding options.\n * @returns Decoded bigint.\n */\nexport function toBigInt(bytes, options = {}) {\n    const { size } = options;\n    if (typeof size !== 'undefined')\n        internal.assertSize(bytes, size);\n    const hex = Hex.fromBytes(bytes, options);\n    return Hex.toBigInt(hex, options);\n}\n/**\n * Decodes a {@link ox#Bytes.Bytes} into a boolean.\n *\n * @example\n * ```ts\n * import { Bytes } from 'ox'\n *\n * Bytes.toBoolean(Bytes.from([1]))\n * // @log: true\n * ```\n *\n * @param bytes - The {@link ox#Bytes.Bytes} to decode.\n * @param options - Decoding options.\n * @returns Decoded boolean.\n */\nexport function toBoolean(bytes, options = {}) {\n    const { size } = options;\n    let bytes_ = bytes;\n    if (typeof size !== 'undefined') {\n        internal.assertSize(bytes_, size);\n        bytes_ = trimLeft(bytes_);\n    }\n    if (bytes_.length > 1 || bytes_[0] > 1)\n        throw new InvalidBytesBooleanError(bytes_);\n    return Boolean(bytes_[0]);\n}\n/**\n * Encodes a {@link ox#Bytes.Bytes} value into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.toHex(Bytes.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // '0x48656c6c6f20576f726c6421'\n * ```\n *\n * @param value - The {@link ox#Bytes.Bytes} to decode.\n * @param options - Options.\n * @returns Decoded {@link ox#Hex.Hex} value.\n */\nexport function toHex(value, options = {}) {\n    return Hex.fromBytes(value, options);\n}\n/**\n * Decodes a {@link ox#Bytes.Bytes} into a number.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.toNumber(Bytes.from([1, 164]))\n * // @log: 420\n * ```\n */\nexport function toNumber(bytes, options = {}) {\n    const { size } = options;\n    if (typeof size !== 'undefined')\n        internal.assertSize(bytes, size);\n    const hex = Hex.fromBytes(bytes, options);\n    return Hex.toNumber(hex, options);\n}\n/**\n * Decodes a {@link ox#Bytes.Bytes} into a string.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * const data = Bytes.toString(Bytes.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // @log: 'Hello world'\n * ```\n *\n * @param bytes - The {@link ox#Bytes.Bytes} to decode.\n * @param options - Options.\n * @returns Decoded string.\n */\nexport function toString(bytes, options = {}) {\n    const { size } = options;\n    let bytes_ = bytes;\n    if (typeof size !== 'undefined') {\n        internal.assertSize(bytes_, size);\n        bytes_ = trimRight(bytes_);\n    }\n    return decoder.decode(bytes_);\n}\n/**\n * Trims leading zeros from a {@link ox#Bytes.Bytes} value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.trimLeft(Bytes.from([0, 0, 0, 0, 1, 2, 3]))\n * // @log: Uint8Array([1, 2, 3])\n * ```\n *\n * @param value - {@link ox#Bytes.Bytes} value.\n * @returns Trimmed {@link ox#Bytes.Bytes} value.\n */\nexport function trimLeft(value) {\n    return internal.trim(value, { dir: 'left' });\n}\n/**\n * Trims trailing zeros from a {@link ox#Bytes.Bytes} value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.trimRight(Bytes.from([1, 2, 3, 0, 0, 0, 0]))\n * // @log: Uint8Array([1, 2, 3])\n * ```\n *\n * @param value - {@link ox#Bytes.Bytes} value.\n * @returns Trimmed {@link ox#Bytes.Bytes} value.\n */\nexport function trimRight(value) {\n    return internal.trim(value, { dir: 'right' });\n}\n/**\n * Checks if the given value is {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.validate('0x')\n * // @log: false\n *\n * Bytes.validate(Bytes.from([1, 2, 3]))\n * // @log: true\n * ```\n *\n * @param value - Value to check.\n * @returns `true` if the value is {@link ox#Bytes.Bytes}, otherwise `false`.\n */\nexport function validate(value) {\n    try {\n        assert(value);\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\n/**\n * Thrown when the bytes value cannot be represented as a boolean.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.toBoolean(Bytes.from([5]))\n * // @error: Bytes.InvalidBytesBooleanError: Bytes value `[5]` is not a valid boolean.\n * // @error: The bytes array must contain a single byte of either a `0` or `1` value.\n * ```\n */\nexport class InvalidBytesBooleanError extends Errors.BaseError {\n    constructor(bytes) {\n        super(`Bytes value \\`${bytes}\\` is not a valid boolean.`, {\n            metaMessages: [\n                'The bytes array must contain a single byte of either a `0` or `1` value.',\n            ],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Bytes.InvalidBytesBooleanError'\n        });\n    }\n}\n/**\n * Thrown when a value cannot be converted to bytes.\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Bytes } from 'ox'\n *\n * Bytes.from('foo')\n * // @error: Bytes.InvalidBytesTypeError: Value `foo` of type `string` is an invalid Bytes value.\n * ```\n */\nexport class InvalidBytesTypeError extends Errors.BaseError {\n    constructor(value) {\n        super(`Value \\`${typeof value === 'object' ? Json.stringify(value) : value}\\` of type \\`${typeof value}\\` is an invalid Bytes value.`, {\n            metaMessages: ['Bytes values must be of type `Bytes`.'],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Bytes.InvalidBytesTypeError'\n        });\n    }\n}\n/**\n * Thrown when a size exceeds the maximum allowed size.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.fromString('Hello World!', { size: 8 })\n * // @error: Bytes.SizeOverflowError: Size cannot exceed `8` bytes. Given size: `12` bytes.\n * ```\n */\nexport class SizeOverflowError extends Errors.BaseError {\n    constructor({ givenSize, maxSize }) {\n        super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Bytes.SizeOverflowError'\n        });\n    }\n}\n/**\n * Thrown when a slice offset is out-of-bounds.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.slice(Bytes.from([1, 2, 3]), 4)\n * // @error: Bytes.SliceOffsetOutOfBoundsError: Slice starting at offset `4` is out-of-bounds (size: `3`).\n * ```\n */\nexport class SliceOffsetOutOfBoundsError extends Errors.BaseError {\n    constructor({ offset, position, size, }) {\n        super(`Slice ${position === 'start' ? 'starting' : 'ending'} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size}\\`).`);\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Bytes.SliceOffsetOutOfBoundsError'\n        });\n    }\n}\n/**\n * Thrown when a the padding size exceeds the maximum allowed size.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.padLeft(Bytes.fromString('Hello World!'), 8)\n * // @error: [Bytes.SizeExceedsPaddingSizeError: Bytes size (`12`) exceeds padding size (`8`).\n * ```\n */\nexport class SizeExceedsPaddingSizeError extends Errors.BaseError {\n    constructor({ size, targetSize, type, }) {\n        super(`${type.charAt(0).toUpperCase()}${type\n            .slice(1)\n            .toLowerCase()} size (\\`${size}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Bytes.SizeExceedsPaddingSizeError'\n        });\n    }\n}\n//# sourceMappingURL=Bytes.js.map","import { equalBytes } from '@noble/curves/abstract/utils';\nimport * as Bytes from './Bytes.js';\nimport * as Errors from './Errors.js';\nimport * as internal_bytes from './internal/bytes.js';\nimport * as internal from './internal/hex.js';\nimport * as Json from './Json.js';\nconst encoder = /*#__PURE__*/ new TextEncoder();\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\n/**\n * Asserts if the given value is {@link ox#Hex.Hex}.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.assert('abc')\n * // @error: InvalidHexValueTypeError:\n * // @error: Value `\"abc\"` of type `string` is an invalid hex type.\n * // @error: Hex types must be represented as `\"0x\\${string}\"`.\n * ```\n *\n * @param value - The value to assert.\n * @param options - Options.\n */\nexport function assert(value, options = {}) {\n    const { strict = false } = options;\n    if (!value)\n        throw new InvalidHexTypeError(value);\n    if (typeof value !== 'string')\n        throw new InvalidHexTypeError(value);\n    if (strict) {\n        if (!/^0x[0-9a-fA-F]*$/.test(value))\n            throw new InvalidHexValueError(value);\n    }\n    if (!value.startsWith('0x'))\n        throw new InvalidHexValueError(value);\n}\n/**\n * Concatenates two or more {@link ox#Hex.Hex}.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.concat('0x123', '0x456')\n * // @log: '0x123456'\n * ```\n *\n * @param values - The {@link ox#Hex.Hex} values to concatenate.\n * @returns The concatenated {@link ox#Hex.Hex} value.\n */\nexport function concat(...values) {\n    return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}`;\n}\n/**\n * Instantiates a {@link ox#Hex.Hex} value from a hex string or {@link ox#Bytes.Bytes} value.\n *\n * :::tip\n *\n * To instantiate from a **Boolean**, **String**, or **Number**, use one of the following:\n *\n * - `Hex.fromBoolean`\n *\n * - `Hex.fromString`\n *\n * - `Hex.fromNumber`\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Hex } from 'ox'\n *\n * Hex.from('0x48656c6c6f20576f726c6421')\n * // @log: '0x48656c6c6f20576f726c6421'\n *\n * Hex.from(Bytes.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // @log: '0x48656c6c6f20576f726c6421'\n * ```\n *\n * @param value - The {@link ox#Bytes.Bytes} value to encode.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function from(value) {\n    if (value instanceof Uint8Array)\n        return fromBytes(value);\n    if (Array.isArray(value))\n        return fromBytes(new Uint8Array(value));\n    return value;\n}\n/**\n * Encodes a boolean into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromBoolean(true)\n * // @log: '0x1'\n *\n * Hex.fromBoolean(false)\n * // @log: '0x0'\n *\n * Hex.fromBoolean(true, { size: 32 })\n * // @log: '0x0000000000000000000000000000000000000000000000000000000000000001'\n * ```\n *\n * @param value - The boolean value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromBoolean(value, options = {}) {\n    const hex = `0x${Number(value)}`;\n    if (typeof options.size === 'number') {\n        internal.assertSize(hex, options.size);\n        return padLeft(hex, options.size);\n    }\n    return hex;\n}\n/**\n * Encodes a {@link ox#Bytes.Bytes} value into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Hex } from 'ox'\n *\n * Hex.fromBytes(Bytes.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // @log: '0x48656c6c6f20576f726c6421'\n * ```\n *\n * @param value - The {@link ox#Bytes.Bytes} value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromBytes(value, options = {}) {\n    let string = '';\n    for (let i = 0; i < value.length; i++)\n        string += hexes[value[i]];\n    const hex = `0x${string}`;\n    if (typeof options.size === 'number') {\n        internal.assertSize(hex, options.size);\n        return padRight(hex, options.size);\n    }\n    return hex;\n}\n/**\n * Encodes a number or bigint into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromNumber(420)\n * // @log: '0x1a4'\n *\n * Hex.fromNumber(420, { size: 32 })\n * // @log: '0x00000000000000000000000000000000000000000000000000000000000001a4'\n * ```\n *\n * @param value - The number or bigint value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromNumber(value, options = {}) {\n    const { signed, size } = options;\n    const value_ = BigInt(value);\n    let maxValue;\n    if (size) {\n        if (signed)\n            maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n        else\n            maxValue = 2n ** (BigInt(size) * 8n) - 1n;\n    }\n    else if (typeof value === 'number') {\n        maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n    }\n    const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0;\n    if ((maxValue && value_ > maxValue) || value_ < minValue) {\n        const suffix = typeof value === 'bigint' ? 'n' : '';\n        throw new IntegerOutOfRangeError({\n            max: maxValue ? `${maxValue}${suffix}` : undefined,\n            min: `${minValue}${suffix}`,\n            signed,\n            size,\n            value: `${value}${suffix}`,\n        });\n    }\n    const stringValue = (signed && value_ < 0 ? BigInt.asUintN(size * 8, BigInt(value_)) : value_).toString(16);\n    const hex = `0x${stringValue}`;\n    if (size)\n        return padLeft(hex, size);\n    return hex;\n}\n/**\n * Encodes a string into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n * Hex.fromString('Hello World!')\n * // '0x48656c6c6f20576f726c6421'\n *\n * Hex.fromString('Hello World!', { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n * ```\n *\n * @param value - The string value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromString(value, options = {}) {\n    return fromBytes(encoder.encode(value), options);\n}\n/**\n * Checks if two {@link ox#Hex.Hex} values are equal.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.isEqual('0xdeadbeef', '0xdeadbeef')\n * // @log: true\n *\n * Hex.isEqual('0xda', '0xba')\n * // @log: false\n * ```\n *\n * @param hexA - The first {@link ox#Hex.Hex} value.\n * @param hexB - The second {@link ox#Hex.Hex} value.\n * @returns `true` if the two {@link ox#Hex.Hex} values are equal, `false` otherwise.\n */\nexport function isEqual(hexA, hexB) {\n    return equalBytes(Bytes.fromHex(hexA), Bytes.fromHex(hexB));\n}\n/**\n * Pads a {@link ox#Hex.Hex} value to the left with zero bytes until it reaches the given `size` (default: 32 bytes).\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.padLeft('0x1234', 4)\n * // @log: '0x00001234'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to pad.\n * @param size - The size (in bytes) of the output hex value.\n * @returns The padded {@link ox#Hex.Hex} value.\n */\nexport function padLeft(value, size) {\n    return internal.pad(value, { dir: 'left', size });\n}\n/**\n * Pads a {@link ox#Hex.Hex} value to the right with zero bytes until it reaches the given `size` (default: 32 bytes).\n *\n * @example\n * ```ts\n * import { Hex } from 'ox'\n *\n * Hex.padRight('0x1234', 4)\n * // @log: '0x12340000'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to pad.\n * @param size - The size (in bytes) of the output hex value.\n * @returns The padded {@link ox#Hex.Hex} value.\n */\nexport function padRight(value, size) {\n    return internal.pad(value, { dir: 'right', size });\n}\n/**\n * Generates a random {@link ox#Hex.Hex} value of the specified length.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * const hex = Hex.random(32)\n * // @log: '0x...'\n * ```\n *\n * @returns Random {@link ox#Hex.Hex} value.\n */\nexport function random(length) {\n    return fromBytes(Bytes.random(length));\n}\n/**\n * Returns a section of a {@link ox#Bytes.Bytes} value given a start/end bytes offset.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.slice('0x0123456789', 1, 4)\n * // @log: '0x234567'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to slice.\n * @param start - The start offset (in bytes).\n * @param end - The end offset (in bytes).\n * @param options - Options.\n * @returns The sliced {@link ox#Hex.Hex} value.\n */\nexport function slice(value, start, end, options = {}) {\n    const { strict } = options;\n    internal.assertStartOffset(value, start);\n    const value_ = `0x${value\n        .replace('0x', '')\n        .slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n    if (strict)\n        internal.assertEndOffset(value_, start, end);\n    return value_;\n}\n/**\n * Retrieves the size of a {@link ox#Hex.Hex} value (in bytes).\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.size('0xdeadbeef')\n * // @log: 4\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to get the size of.\n * @returns The size of the {@link ox#Hex.Hex} value (in bytes).\n */\nexport function size(value) {\n    return Math.ceil((value.length - 2) / 2);\n}\n/**\n * Trims leading zeros from a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.trimLeft('0x00000000deadbeef')\n * // @log: '0xdeadbeef'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to trim.\n * @returns The trimmed {@link ox#Hex.Hex} value.\n */\nexport function trimLeft(value) {\n    return internal.trim(value, { dir: 'left' });\n}\n/**\n * Trims trailing zeros from a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.trimRight('0xdeadbeef00000000')\n * // @log: '0xdeadbeef'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to trim.\n * @returns The trimmed {@link ox#Hex.Hex} value.\n */\nexport function trimRight(value) {\n    return internal.trim(value, { dir: 'right' });\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a BigInt.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toBigInt('0x1a4')\n * // @log: 420n\n *\n * Hex.toBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // @log: 420n\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded BigInt.\n */\nexport function toBigInt(hex, options = {}) {\n    const { signed } = options;\n    if (options.size)\n        internal.assertSize(hex, options.size);\n    const value = BigInt(hex);\n    if (!signed)\n        return value;\n    const size = (hex.length - 2) / 2;\n    const max_unsigned = (1n << (BigInt(size) * 8n)) - 1n;\n    const max_signed = max_unsigned >> 1n;\n    if (value <= max_signed)\n        return value;\n    return value - max_unsigned - 1n;\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a boolean.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toBoolean('0x01')\n * // @log: true\n *\n * Hex.toBoolean('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })\n * // @log: true\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded boolean.\n */\nexport function toBoolean(hex, options = {}) {\n    if (options.size)\n        internal.assertSize(hex, options.size);\n    const hex_ = trimLeft(hex);\n    if (hex_ === '0x')\n        return false;\n    if (hex_ === '0x1')\n        return true;\n    throw new InvalidHexBooleanError(hex);\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * const data = Hex.toBytes('0x48656c6c6f20776f726c6421')\n * // @log: Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded {@link ox#Bytes.Bytes}.\n */\nexport function toBytes(hex, options = {}) {\n    return Bytes.fromHex(hex, options);\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a number.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toNumber('0x1a4')\n * // @log: 420\n *\n * Hex.toNumber('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // @log: 420\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded number.\n */\nexport function toNumber(hex, options = {}) {\n    const { signed, size } = options;\n    if (!signed && !size)\n        return Number(hex);\n    return Number(toBigInt(hex, options));\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a string.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toString('0x48656c6c6f20576f726c6421')\n * // @log: 'Hello world!'\n *\n * Hex.toString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n *  size: 32,\n * })\n * // @log: 'Hello world'\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded string.\n */\nexport function toString(hex, options = {}) {\n    const { size } = options;\n    let bytes = Bytes.fromHex(hex);\n    if (size) {\n        internal_bytes.assertSize(bytes, size);\n        bytes = Bytes.trimRight(bytes);\n    }\n    return new TextDecoder().decode(bytes);\n}\n/**\n * Checks if the given value is {@link ox#Hex.Hex}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Hex } from 'ox'\n *\n * Hex.validate('0xdeadbeef')\n * // @log: true\n *\n * Hex.validate(Bytes.from([1, 2, 3]))\n * // @log: false\n * ```\n *\n * @param value - The value to check.\n * @param options - Options.\n * @returns `true` if the value is a {@link ox#Hex.Hex}, `false` otherwise.\n */\nexport function validate(value, options = {}) {\n    const { strict = false } = options;\n    try {\n        assert(value, { strict });\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\n/**\n * Thrown when the provided integer is out of range, and cannot be represented as a hex value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromNumber(420182738912731283712937129)\n * // @error: Hex.IntegerOutOfRangeError: Number \\`4.2018273891273126e+26\\` is not in safe unsigned integer range (`0` to `9007199254740991`)\n * ```\n */\nexport class IntegerOutOfRangeError extends Errors.BaseError {\n    constructor({ max, min, signed, size, value, }) {\n        super(`Number \\`${value}\\` is not in safe${size ? ` ${size * 8}-bit` : ''}${signed ? ' signed' : ' unsigned'} integer range ${max ? `(\\`${min}\\` to \\`${max}\\`)` : `(above \\`${min}\\`)`}`);\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.IntegerOutOfRangeError'\n        });\n    }\n}\n/**\n * Thrown when the provided hex value cannot be represented as a boolean.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toBoolean('0xa')\n * // @error: Hex.InvalidHexBooleanError: Hex value `\"0xa\"` is not a valid boolean.\n * // @error: The hex value must be `\"0x0\"` (false) or `\"0x1\"` (true).\n * ```\n */\nexport class InvalidHexBooleanError extends Errors.BaseError {\n    constructor(hex) {\n        super(`Hex value \\`\"${hex}\"\\` is not a valid boolean.`, {\n            metaMessages: [\n                'The hex value must be `\"0x0\"` (false) or `\"0x1\"` (true).',\n            ],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.InvalidHexBooleanError'\n        });\n    }\n}\n/**\n * Thrown when the provided value is not a valid hex type.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.assert(1)\n * // @error: Hex.InvalidHexTypeError: Value `1` of type `number` is an invalid hex type.\n * ```\n */\nexport class InvalidHexTypeError extends Errors.BaseError {\n    constructor(value) {\n        super(`Value \\`${typeof value === 'object' ? Json.stringify(value) : value}\\` of type \\`${typeof value}\\` is an invalid hex type.`, {\n            metaMessages: ['Hex types must be represented as `\"0x${string}\"`.'],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.InvalidHexTypeError'\n        });\n    }\n}\n/**\n * Thrown when the provided hex value is invalid.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.assert('0x0123456789abcdefg')\n * // @error: Hex.InvalidHexValueError: Value `0x0123456789abcdefg` is an invalid hex value.\n * // @error: Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).\n * ```\n */\nexport class InvalidHexValueError extends Errors.BaseError {\n    constructor(value) {\n        super(`Value \\`${value}\\` is an invalid hex value.`, {\n            metaMessages: [\n                'Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).',\n            ],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.InvalidHexValueError'\n        });\n    }\n}\n/**\n * Thrown when the provided hex value is an odd length.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.fromHex('0xabcde')\n * // @error: Hex.InvalidLengthError: Hex value `\"0xabcde\"` is an odd length (5 nibbles).\n * ```\n */\nexport class InvalidLengthError extends Errors.BaseError {\n    constructor(value) {\n        super(`Hex value \\`\"${value}\"\\` is an odd length (${value.length - 2} nibbles).`, {\n            metaMessages: ['It must be an even length.'],\n        });\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.InvalidLengthError'\n        });\n    }\n}\n/**\n * Thrown when the size of the value exceeds the expected max size.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromString('Hello World!', { size: 8 })\n * // @error: Hex.SizeOverflowError: Size cannot exceed `8` bytes. Given size: `12` bytes.\n * ```\n */\nexport class SizeOverflowError extends Errors.BaseError {\n    constructor({ givenSize, maxSize }) {\n        super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.SizeOverflowError'\n        });\n    }\n}\n/**\n * Thrown when the slice offset exceeds the bounds of the value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.slice('0x0123456789', 6)\n * // @error: Hex.SliceOffsetOutOfBoundsError: Slice starting at offset `6` is out-of-bounds (size: `5`).\n * ```\n */\nexport class SliceOffsetOutOfBoundsError extends Errors.BaseError {\n    constructor({ offset, position, size, }) {\n        super(`Slice ${position === 'start' ? 'starting' : 'ending'} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size}\\`).`);\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.SliceOffsetOutOfBoundsError'\n        });\n    }\n}\n/**\n * Thrown when the size of the value exceeds the pad size.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.padLeft('0x1a4e12a45a21323123aaa87a897a897a898a6567a578a867a98778a667a85a875a87a6a787a65a675a6a9', 32)\n * // @error: Hex.SizeExceedsPaddingSizeError: Hex size (`43`) exceeds padding size (`32`).\n * ```\n */\nexport class SizeExceedsPaddingSizeError extends Errors.BaseError {\n    constructor({ size, targetSize, type, }) {\n        super(`${type.charAt(0).toUpperCase()}${type\n            .slice(1)\n            .toLowerCase()} size (\\`${size}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n        Object.defineProperty(this, \"name\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: 'Hex.SizeExceedsPaddingSizeError'\n        });\n    }\n}\n//# sourceMappingURL=Hex.js.map","import * as Hex from './Hex.js';\n/**\n * Converts a {@link ox#Withdrawal.Rpc} to an {@link ox#Withdrawal.Withdrawal}.\n *\n * @example\n * ```ts twoslash\n * import { Withdrawal } from 'ox'\n *\n * const withdrawal = Withdrawal.fromRpc({\n *   address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n *   amount: '0x620323',\n *   index: '0x0',\n *   validatorIndex: '0x1',\n * })\n * // @log: {\n * // @log:   address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n * // @log:   amount: 6423331n,\n * // @log:   index: 0,\n * // @log:   validatorIndex: 1\n * // @log: }\n * ```\n *\n * @param withdrawal - The RPC withdrawal to convert.\n * @returns An instantiated {@link ox#Withdrawal.Withdrawal}.\n */\nexport function fromRpc(withdrawal) {\n    return {\n        ...withdrawal,\n        amount: BigInt(withdrawal.amount),\n        index: Number(withdrawal.index),\n        validatorIndex: Number(withdrawal.validatorIndex),\n    };\n}\n/**\n * Converts a {@link ox#Withdrawal.Withdrawal} to an {@link ox#Withdrawal.Rpc}.\n *\n * @example\n * ```ts twoslash\n * import { Withdrawal } from 'ox'\n *\n * const withdrawal = Withdrawal.toRpc({\n *   address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n *   amount: 6423331n,\n *   index: 0,\n *   validatorIndex: 1,\n * })\n * // @log: {\n * // @log:   address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n * // @log:   amount: '0x620323',\n * // @log:   index: '0x0',\n * // @log:   validatorIndex: '0x1',\n * // @log: }\n * ```\n *\n * @param withdrawal - The Withdrawal to convert.\n * @returns An RPC Withdrawal.\n */\nexport function toRpc(withdrawal) {\n    return {\n        address: withdrawal.address,\n        amount: Hex.fromNumber(withdrawal.amount),\n        index: Hex.fromNumber(withdrawal.index),\n        validatorIndex: Hex.fromNumber(withdrawal.validatorIndex),\n    };\n}\n//# sourceMappingURL=Withdrawal.js.map","import * as Hex from './Hex.js';\nimport * as Withdrawal from './Withdrawal.js';\n/**\n * Converts an {@link ox#BlockOverrides.Rpc} to an {@link ox#BlockOverrides.BlockOverrides}.\n *\n * @example\n * ```ts twoslash\n * import { BlockOverrides } from 'ox'\n *\n * const blockOverrides = BlockOverrides.fromRpc({\n *   baseFeePerGas: '0x1',\n *   blobBaseFee: '0x2',\n *   feeRecipient: '0x0000000000000000000000000000000000000000',\n *   gasLimit: '0x4',\n *   number: '0x5',\n *   prevRandao: '0x6',\n *   time: '0x1234567890',\n *   withdrawals: [\n *     {\n *       address: '0x0000000000000000000000000000000000000000',\n *       amount: '0x1',\n *       index: '0x0',\n *       validatorIndex: '0x1',\n *     },\n *   ],\n * })\n * ```\n *\n * @param rpcBlockOverrides - The RPC block overrides to convert.\n * @returns An instantiated {@link ox#BlockOverrides.BlockOverrides}.\n */\nexport function fromRpc(rpcBlockOverrides) {\n    return {\n        ...(rpcBlockOverrides.baseFeePerGas && {\n            baseFeePerGas: BigInt(rpcBlockOverrides.baseFeePerGas),\n        }),\n        ...(rpcBlockOverrides.blobBaseFee && {\n            blobBaseFee: BigInt(rpcBlockOverrides.blobBaseFee),\n        }),\n        ...(rpcBlockOverrides.feeRecipient && {\n            feeRecipient: rpcBlockOverrides.feeRecipient,\n        }),\n        ...(rpcBlockOverrides.gasLimit && {\n            gasLimit: BigInt(rpcBlockOverrides.gasLimit),\n        }),\n        ...(rpcBlockOverrides.number && {\n            number: BigInt(rpcBlockOverrides.number),\n        }),\n        ...(rpcBlockOverrides.prevRandao && {\n            prevRandao: BigInt(rpcBlockOverrides.prevRandao),\n        }),\n        ...(rpcBlockOverrides.time && {\n            time: BigInt(rpcBlockOverrides.time),\n        }),\n        ...(rpcBlockOverrides.withdrawals && {\n            withdrawals: rpcBlockOverrides.withdrawals.map(Withdrawal.fromRpc),\n        }),\n    };\n}\n/**\n * Converts an {@link ox#BlockOverrides.BlockOverrides} to an {@link ox#BlockOverrides.Rpc}.\n *\n * @example\n * ```ts twoslash\n * import { BlockOverrides } from 'ox'\n *\n * const blockOverrides = BlockOverrides.toRpc({\n *   baseFeePerGas: 1n,\n *   blobBaseFee: 2n,\n *   feeRecipient: '0x0000000000000000000000000000000000000000',\n *   gasLimit: 4n,\n *   number: 5n,\n *   prevRandao: 6n,\n *   time: 78187493520n,\n *   withdrawals: [\n *     {\n *       address: '0x0000000000000000000000000000000000000000',\n *       amount: 1n,\n *       index: 0,\n *       validatorIndex: 1,\n *     },\n *   ],\n * })\n * ```\n *\n * @param blockOverrides - The block overrides to convert.\n * @returns An instantiated {@link ox#BlockOverrides.Rpc}.\n */\nexport function toRpc(blockOverrides) {\n    return {\n        ...(typeof blockOverrides.baseFeePerGas === 'bigint' && {\n            baseFeePerGas: Hex.fromNumber(blockOverrides.baseFeePerGas),\n        }),\n        ...(typeof blockOverrides.blobBaseFee === 'bigint' && {\n            blobBaseFee: Hex.fromNumber(blockOverrides.blobBaseFee),\n        }),\n        ...(typeof blockOverrides.feeRecipient === 'string' && {\n            feeRecipient: blockOverrides.feeRecipient,\n        }),\n        ...(typeof blockOverrides.gasLimit === 'bigint' && {\n            gasLimit: Hex.fromNumber(blockOverrides.gasLimit),\n        }),\n        ...(typeof blockOverrides.number === 'bigint' && {\n            number: Hex.fromNumber(blockOverrides.number),\n        }),\n        ...(typeof blockOverrides.prevRandao === 'bigint' && {\n            prevRandao: Hex.fromNumber(blockOverrides.prevRandao),\n        }),\n        ...(typeof blockOverrides.time === 'bigint' && {\n            time: Hex.fromNumber(blockOverrides.time),\n        }),\n        ...(blockOverrides.withdrawals && {\n            withdrawals: blockOverrides.withdrawals.map(Withdrawal.toRpc),\n        }),\n    };\n}\n//# sourceMappingURL=BlockOverrides.js.map","/* [Multicall3](https://github.com/mds1/multicall) */\nexport const multicall3Abi = [\n    {\n        inputs: [\n            {\n                components: [\n                    {\n                        name: 'target',\n                        type: 'address',\n                    },\n                    {\n                        name: 'allowFailure',\n                        type: 'bool',\n                    },\n                    {\n                        name: 'callData',\n                        type: 'bytes',\n                    },\n                ],\n                name: 'calls',\n                type: 'tuple[]',\n            },\n        ],\n        name: 'aggregate3',\n        outputs: [\n            {\n                components: [\n                    {\n                        name: 'success',\n                        type: 'bool',\n                    },\n                    {\n                        name: 'returnData',\n                        type: 'bytes',\n                    },\n                ],\n                name: 'returnData',\n                type: 'tuple[]',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'addr',\n                type: 'address',\n            },\n        ],\n        name: 'getEthBalance',\n        outputs: [\n            {\n                name: 'balance',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [],\n        name: 'getCurrentBlockTimestamp',\n        outputs: [\n            {\n                internalType: 'uint256',\n                name: 'timestamp',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n];\nexport const batchGatewayAbi = [\n    {\n        name: 'query',\n        type: 'function',\n        stateMutability: 'view',\n        inputs: [\n            {\n                type: 'tuple[]',\n                name: 'queries',\n                components: [\n                    {\n                        type: 'address',\n                        name: 'sender',\n                    },\n                    {\n                        type: 'string[]',\n                        name: 'urls',\n                    },\n                    {\n                        type: 'bytes',\n                        name: 'data',\n                    },\n                ],\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool[]',\n                name: 'failures',\n            },\n            {\n                type: 'bytes[]',\n                name: 'responses',\n            },\n        ],\n    },\n    {\n        name: 'HttpError',\n        type: 'error',\n        inputs: [\n            {\n                type: 'uint16',\n                name: 'status',\n            },\n            {\n                type: 'string',\n                name: 'message',\n            },\n        ],\n    },\n];\nconst universalResolverErrors = [\n    {\n        inputs: [\n            {\n                name: 'dns',\n                type: 'bytes',\n            },\n        ],\n        name: 'DNSDecodingFailed',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                name: 'ens',\n                type: 'string',\n            },\n        ],\n        name: 'DNSEncodingFailed',\n        type: 'error',\n    },\n    {\n        inputs: [],\n        name: 'EmptyAddress',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                name: 'status',\n                type: 'uint16',\n            },\n            {\n                name: 'message',\n                type: 'string',\n            },\n        ],\n        name: 'HttpError',\n        type: 'error',\n    },\n    {\n        inputs: [],\n        name: 'InvalidBatchGatewayResponse',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                name: 'errorData',\n                type: 'bytes',\n            },\n        ],\n        name: 'ResolverError',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                name: 'name',\n                type: 'bytes',\n            },\n            {\n                name: 'resolver',\n                type: 'address',\n            },\n        ],\n        name: 'ResolverNotContract',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                name: 'name',\n                type: 'bytes',\n            },\n        ],\n        name: 'ResolverNotFound',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                name: 'primary',\n                type: 'string',\n            },\n            {\n                name: 'primaryAddress',\n                type: 'bytes',\n            },\n        ],\n        name: 'ReverseAddressMismatch',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes4',\n                name: 'selector',\n                type: 'bytes4',\n            },\n        ],\n        name: 'UnsupportedResolverProfile',\n        type: 'error',\n    },\n];\nexport const universalResolverResolveAbi = [\n    ...universalResolverErrors,\n    {\n        name: 'resolveWithGateways',\n        type: 'function',\n        stateMutability: 'view',\n        inputs: [\n            { name: 'name', type: 'bytes' },\n            { name: 'data', type: 'bytes' },\n            { name: 'gateways', type: 'string[]' },\n        ],\n        outputs: [\n            { name: '', type: 'bytes' },\n            { name: 'address', type: 'address' },\n        ],\n    },\n];\nexport const universalResolverReverseAbi = [\n    ...universalResolverErrors,\n    {\n        name: 'reverseWithGateways',\n        type: 'function',\n        stateMutability: 'view',\n        inputs: [\n            { type: 'bytes', name: 'reverseName' },\n            { type: 'uint256', name: 'coinType' },\n            { type: 'string[]', name: 'gateways' },\n        ],\n        outputs: [\n            { type: 'string', name: 'resolvedName' },\n            { type: 'address', name: 'resolver' },\n            { type: 'address', name: 'reverseResolver' },\n        ],\n    },\n];\nexport const textResolverAbi = [\n    {\n        name: 'text',\n        type: 'function',\n        stateMutability: 'view',\n        inputs: [\n            { name: 'name', type: 'bytes32' },\n            { name: 'key', type: 'string' },\n        ],\n        outputs: [{ name: '', type: 'string' }],\n    },\n];\nexport const addressResolverAbi = [\n    {\n        name: 'addr',\n        type: 'function',\n        stateMutability: 'view',\n        inputs: [{ name: 'name', type: 'bytes32' }],\n        outputs: [{ name: '', type: 'address' }],\n    },\n    {\n        name: 'addr',\n        type: 'function',\n        stateMutability: 'view',\n        inputs: [\n            { name: 'name', type: 'bytes32' },\n            { name: 'coinType', type: 'uint256' },\n        ],\n        outputs: [{ name: '', type: 'bytes' }],\n    },\n];\n// ERC-1271\n// isValidSignature(bytes32 hash, bytes signature) → bytes4 magicValue\n/** @internal */\nexport const erc1271Abi = [\n    {\n        name: 'isValidSignature',\n        type: 'function',\n        stateMutability: 'view',\n        inputs: [\n            { name: 'hash', type: 'bytes32' },\n            { name: 'signature', type: 'bytes' },\n        ],\n        outputs: [{ name: '', type: 'bytes4' }],\n    },\n];\n// ERC-6492 - universal deployless signature validator contract\n// constructor(address _signer, bytes32 _hash, bytes _signature) → bytes4 returnValue\n// returnValue is either 0x1 (valid) or 0x0 (invalid)\nexport const erc6492SignatureValidatorAbi = [\n    {\n        inputs: [\n            {\n                name: '_signer',\n                type: 'address',\n            },\n            {\n                name: '_hash',\n                type: 'bytes32',\n            },\n            {\n                name: '_signature',\n                type: 'bytes',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'constructor',\n    },\n    {\n        inputs: [\n            {\n                name: '_signer',\n                type: 'address',\n            },\n            {\n                name: '_hash',\n                type: 'bytes32',\n            },\n            {\n                name: '_signature',\n                type: 'bytes',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n        name: 'isValidSig',\n    },\n];\n/** [ERC-20 Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20) */\nexport const erc20Abi = [\n    {\n        type: 'event',\n        name: 'Approval',\n        inputs: [\n            {\n                indexed: true,\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'value',\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'event',\n        name: 'Transfer',\n        inputs: [\n            {\n                indexed: true,\n                name: 'from',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'to',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'value',\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'allowance',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                name: 'spender',\n                type: 'address',\n            },\n        ],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'approve',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'balanceOf',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'account',\n                type: 'address',\n            },\n        ],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'decimals',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'uint8',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'name',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'string',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'symbol',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'string',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'totalSupply',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'transfer',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'recipient',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'transferFrom',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'sender',\n                type: 'address',\n            },\n            {\n                name: 'recipient',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n    },\n];\n/**\n * [bytes32-flavored ERC-20](https://docs.makerdao.com/smart-contract-modules/mkr-module#4.-gotchas-potential-source-of-user-error)\n * for tokens (ie. Maker) that use bytes32 instead of string.\n */\nexport const erc20Abi_bytes32 = [\n    {\n        type: 'event',\n        name: 'Approval',\n        inputs: [\n            {\n                indexed: true,\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'value',\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'event',\n        name: 'Transfer',\n        inputs: [\n            {\n                indexed: true,\n                name: 'from',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'to',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'value',\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'allowance',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                name: 'spender',\n                type: 'address',\n            },\n        ],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'approve',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'balanceOf',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'account',\n                type: 'address',\n            },\n        ],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'decimals',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'uint8',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'name',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'bytes32',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'symbol',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'bytes32',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'totalSupply',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'transfer',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'recipient',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'transferFrom',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'sender',\n                type: 'address',\n            },\n            {\n                name: 'recipient',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n    },\n];\n/** [ERC-1155 Multi Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-1155) */\nexport const erc1155Abi = [\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'sender',\n                type: 'address',\n            },\n            {\n                internalType: 'uint256',\n                name: 'balance',\n                type: 'uint256',\n            },\n            {\n                internalType: 'uint256',\n                name: 'needed',\n                type: 'uint256',\n            },\n            {\n                internalType: 'uint256',\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n        name: 'ERC1155InsufficientBalance',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'approver',\n                type: 'address',\n            },\n        ],\n        name: 'ERC1155InvalidApprover',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'uint256',\n                name: 'idsLength',\n                type: 'uint256',\n            },\n            {\n                internalType: 'uint256',\n                name: 'valuesLength',\n                type: 'uint256',\n            },\n        ],\n        name: 'ERC1155InvalidArrayLength',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n        ],\n        name: 'ERC1155InvalidOperator',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'receiver',\n                type: 'address',\n            },\n        ],\n        name: 'ERC1155InvalidReceiver',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'sender',\n                type: 'address',\n            },\n        ],\n        name: 'ERC1155InvalidSender',\n        type: 'error',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                internalType: 'address',\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n        name: 'ERC1155MissingApprovalForAll',\n        type: 'error',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'account',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                internalType: 'bool',\n                name: 'approved',\n                type: 'bool',\n            },\n        ],\n        name: 'ApprovalForAll',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'from',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'to',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                internalType: 'uint256[]',\n                name: 'ids',\n                type: 'uint256[]',\n            },\n            {\n                indexed: false,\n                internalType: 'uint256[]',\n                name: 'values',\n                type: 'uint256[]',\n            },\n        ],\n        name: 'TransferBatch',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'from',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                internalType: 'address',\n                name: 'to',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                internalType: 'uint256',\n                name: 'id',\n                type: 'uint256',\n            },\n            {\n                indexed: false,\n                internalType: 'uint256',\n                name: 'value',\n                type: 'uint256',\n            },\n        ],\n        name: 'TransferSingle',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: 'string',\n                name: 'value',\n                type: 'string',\n            },\n            {\n                indexed: true,\n                internalType: 'uint256',\n                name: 'id',\n                type: 'uint256',\n            },\n        ],\n        name: 'URI',\n        type: 'event',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'account',\n                type: 'address',\n            },\n            {\n                internalType: 'uint256',\n                name: 'id',\n                type: 'uint256',\n            },\n        ],\n        name: 'balanceOf',\n        outputs: [\n            {\n                internalType: 'uint256',\n                name: '',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address[]',\n                name: 'accounts',\n                type: 'address[]',\n            },\n            {\n                internalType: 'uint256[]',\n                name: 'ids',\n                type: 'uint256[]',\n            },\n        ],\n        name: 'balanceOfBatch',\n        outputs: [\n            {\n                internalType: 'uint256[]',\n                name: '',\n                type: 'uint256[]',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'account',\n                type: 'address',\n            },\n            {\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n        ],\n        name: 'isApprovedForAll',\n        outputs: [\n            {\n                internalType: 'bool',\n                name: '',\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'from',\n                type: 'address',\n            },\n            {\n                internalType: 'address',\n                name: 'to',\n                type: 'address',\n            },\n            {\n                internalType: 'uint256[]',\n                name: 'ids',\n                type: 'uint256[]',\n            },\n            {\n                internalType: 'uint256[]',\n                name: 'values',\n                type: 'uint256[]',\n            },\n            {\n                internalType: 'bytes',\n                name: 'data',\n                type: 'bytes',\n            },\n        ],\n        name: 'safeBatchTransferFrom',\n        outputs: [],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'from',\n                type: 'address',\n            },\n            {\n                internalType: 'address',\n                name: 'to',\n                type: 'address',\n            },\n            {\n                internalType: 'uint256',\n                name: 'id',\n                type: 'uint256',\n            },\n            {\n                internalType: 'uint256',\n                name: 'value',\n                type: 'uint256',\n            },\n            {\n                internalType: 'bytes',\n                name: 'data',\n                type: 'bytes',\n            },\n        ],\n        name: 'safeTransferFrom',\n        outputs: [],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'address',\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                internalType: 'bool',\n                name: 'approved',\n                type: 'bool',\n            },\n        ],\n        name: 'setApprovalForAll',\n        outputs: [],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'bytes4',\n                name: 'interfaceId',\n                type: 'bytes4',\n            },\n        ],\n        name: 'supportsInterface',\n        outputs: [\n            {\n                internalType: 'bool',\n                name: '',\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                internalType: 'uint256',\n                name: '',\n                type: 'uint256',\n            },\n        ],\n        name: 'uri',\n        outputs: [\n            {\n                internalType: 'string',\n                name: '',\n                type: 'string',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n];\n/** [ERC-721 Non-Fungible Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-721) */\nexport const erc721Abi = [\n    {\n        type: 'event',\n        name: 'Approval',\n        inputs: [\n            {\n                indexed: true,\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'event',\n        name: 'ApprovalForAll',\n        inputs: [\n            {\n                indexed: true,\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'approved',\n                type: 'bool',\n            },\n        ],\n    },\n    {\n        type: 'event',\n        name: 'Transfer',\n        inputs: [\n            {\n                indexed: true,\n                name: 'from',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'to',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'approve',\n        stateMutability: 'payable',\n        inputs: [\n            {\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n        outputs: [],\n    },\n    {\n        type: 'function',\n        name: 'balanceOf',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'account',\n                type: 'address',\n            },\n        ],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'getApproved',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'address',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'isApprovedForAll',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                name: 'operator',\n                type: 'address',\n            },\n        ],\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'name',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'string',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'ownerOf',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'safeTransferFrom',\n        stateMutability: 'payable',\n        inputs: [\n            {\n                name: 'from',\n                type: 'address',\n            },\n            {\n                name: 'to',\n                type: 'address',\n            },\n            {\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n        outputs: [],\n    },\n    {\n        type: 'function',\n        name: 'safeTransferFrom',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'from',\n                type: 'address',\n            },\n            {\n                name: 'to',\n                type: 'address',\n            },\n            {\n                name: 'id',\n                type: 'uint256',\n            },\n            {\n                name: 'data',\n                type: 'bytes',\n            },\n        ],\n        outputs: [],\n    },\n    {\n        type: 'function',\n        name: 'setApprovalForAll',\n        stateMutability: 'nonpayable',\n        inputs: [\n            {\n                name: 'operator',\n                type: 'address',\n            },\n            {\n                name: 'approved',\n                type: 'bool',\n            },\n        ],\n        outputs: [],\n    },\n    {\n        type: 'function',\n        name: 'symbol',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'string',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'tokenByIndex',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'index',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'tokenByIndex',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                name: 'index',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'tokenURI',\n        stateMutability: 'view',\n        inputs: [\n            {\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n        outputs: [\n            {\n                type: 'string',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'totalSupply',\n        stateMutability: 'view',\n        inputs: [],\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n    },\n    {\n        type: 'function',\n        name: 'transferFrom',\n        stateMutability: 'payable',\n        inputs: [\n            {\n                name: 'sender',\n                type: 'address',\n            },\n            {\n                name: 'recipient',\n                type: 'address',\n            },\n            {\n                name: 'tokenId',\n                type: 'uint256',\n            },\n        ],\n        outputs: [],\n    },\n];\n/** [ERC-4626 Tokenized Vaults Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626) */\nexport const erc4626Abi = [\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'value',\n                type: 'uint256',\n            },\n        ],\n        name: 'Approval',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: 'sender',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'receiver',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'assets',\n                type: 'uint256',\n            },\n            {\n                indexed: false,\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        name: 'Deposit',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: 'from',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'to',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'value',\n                type: 'uint256',\n            },\n        ],\n        name: 'Transfer',\n        type: 'event',\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: 'sender',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'receiver',\n                type: 'address',\n            },\n            {\n                indexed: true,\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                indexed: false,\n                name: 'assets',\n                type: 'uint256',\n            },\n            {\n                indexed: false,\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        name: 'Withdraw',\n        type: 'event',\n    },\n    {\n        inputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n            {\n                name: 'spender',\n                type: 'address',\n            },\n        ],\n        name: 'allowance',\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'spender',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        name: 'approve',\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [],\n        name: 'asset',\n        outputs: [\n            {\n                name: 'assetTokenAddress',\n                type: 'address',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'account',\n                type: 'address',\n            },\n        ],\n        name: 'balanceOf',\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        name: 'convertToAssets',\n        outputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        name: 'convertToShares',\n        outputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n            {\n                name: 'receiver',\n                type: 'address',\n            },\n        ],\n        name: 'deposit',\n        outputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'caller',\n                type: 'address',\n            },\n        ],\n        name: 'maxDeposit',\n        outputs: [\n            {\n                name: 'maxAssets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'caller',\n                type: 'address',\n            },\n        ],\n        name: 'maxMint',\n        outputs: [\n            {\n                name: 'maxShares',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n        name: 'maxRedeem',\n        outputs: [\n            {\n                name: 'maxShares',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n        name: 'maxWithdraw',\n        outputs: [\n            {\n                name: 'maxAssets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n            {\n                name: 'receiver',\n                type: 'address',\n            },\n        ],\n        name: 'mint',\n        outputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        name: 'previewDeposit',\n        outputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        name: 'previewMint',\n        outputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        name: 'previewRedeem',\n        outputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        name: 'previewWithdraw',\n        outputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n            {\n                name: 'receiver',\n                type: 'address',\n            },\n            {\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n        name: 'redeem',\n        outputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [],\n        name: 'totalAssets',\n        outputs: [\n            {\n                name: 'totalManagedAssets',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [],\n        name: 'totalSupply',\n        outputs: [\n            {\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'view',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'to',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        name: 'transfer',\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'from',\n                type: 'address',\n            },\n            {\n                name: 'to',\n                type: 'address',\n            },\n            {\n                name: 'amount',\n                type: 'uint256',\n            },\n        ],\n        name: 'transferFrom',\n        outputs: [\n            {\n                type: 'bool',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n    {\n        inputs: [\n            {\n                name: 'assets',\n                type: 'uint256',\n            },\n            {\n                name: 'receiver',\n                type: 'address',\n            },\n            {\n                name: 'owner',\n                type: 'address',\n            },\n        ],\n        name: 'withdraw',\n        outputs: [\n            {\n                name: 'shares',\n                type: 'uint256',\n            },\n        ],\n        stateMutability: 'nonpayable',\n        type: 'function',\n    },\n];\n//# sourceMappingURL=abis.js.map","export const aggregate3Signature = '0x82ad56cb';\n//# sourceMappingURL=contract.js.map","export const deploylessCallViaBytecodeBytecode = '0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe';\nexport const deploylessCallViaFactoryBytecode = '0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe';\nexport const erc6492SignatureValidatorByteCode = '0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572';\nexport const multicall3Bytecode = '0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033';\n//# sourceMappingURL=contracts.js.map","import { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, } from '../../errors/abi.js';\nimport { concatHex } from '../data/concat.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nconst docsPath = '/docs/contract/encodeDeployData';\nexport function encodeDeployData(parameters) {\n    const { abi, args, bytecode } = parameters;\n    if (!args || args.length === 0)\n        return bytecode;\n    const description = abi.find((x) => 'type' in x && x.type === 'constructor');\n    if (!description)\n        throw new AbiConstructorNotFoundError({ docsPath });\n    if (!('inputs' in description))\n        throw new AbiConstructorParamsNotFoundError({ docsPath });\n    if (!description.inputs || description.inputs.length === 0)\n        throw new AbiConstructorParamsNotFoundError({ docsPath });\n    const data = encodeAbiParameters(description.inputs, args);\n    return concatHex([bytecode, data]);\n}\n//# sourceMappingURL=encodeDeployData.js.map","import { ChainDoesNotSupportContract, } from '../../errors/chain.js';\nexport function getChainContractAddress({ blockNumber, chain, contract: name, }) {\n    const contract = chain?.contracts?.[name];\n    if (!contract)\n        throw new ChainDoesNotSupportContract({\n            chain,\n            contract: { name },\n        });\n    if (blockNumber &&\n        contract.blockCreated &&\n        contract.blockCreated > blockNumber)\n        throw new ChainDoesNotSupportContract({\n            blockNumber,\n            chain,\n            contract: {\n                name,\n                blockCreated: contract.blockCreated,\n            },\n        });\n    return contract.address;\n}\n//# sourceMappingURL=getChainContractAddress.js.map","/** @internal */\nexport function withResolvers() {\n    let resolve = () => undefined;\n    let reject = () => undefined;\n    const promise = new Promise((resolve_, reject_) => {\n        resolve = resolve_;\n        reject = reject_;\n    });\n    return { promise, resolve, reject };\n}\n//# sourceMappingURL=withResolvers.js.map","import { withResolvers } from './withResolvers.js';\nconst schedulerCache = /*#__PURE__*/ new Map();\n/** @internal */\nexport function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort, }) {\n    const exec = async () => {\n        const scheduler = getScheduler();\n        flush();\n        const args = scheduler.map(({ args }) => args);\n        if (args.length === 0)\n            return;\n        fn(args)\n            .then((data) => {\n            if (sort && Array.isArray(data))\n                data.sort(sort);\n            for (let i = 0; i < scheduler.length; i++) {\n                const { resolve } = scheduler[i];\n                resolve?.([data[i], data]);\n            }\n        })\n            .catch((err) => {\n            for (let i = 0; i < scheduler.length; i++) {\n                const { reject } = scheduler[i];\n                reject?.(err);\n            }\n        });\n    };\n    const flush = () => schedulerCache.delete(id);\n    const getBatchedArgs = () => getScheduler().map(({ args }) => args);\n    const getScheduler = () => schedulerCache.get(id) || [];\n    const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);\n    return {\n        flush,\n        async schedule(args) {\n            const { promise, resolve, reject } = withResolvers();\n            const split = shouldSplitBatch?.([...getBatchedArgs(), args]);\n            if (split)\n                exec();\n            const hasActiveScheduler = getScheduler().length > 0;\n            if (hasActiveScheduler) {\n                setScheduler({ args, resolve, reject });\n                return promise;\n            }\n            setScheduler({ args, resolve, reject });\n            setTimeout(exec, wait);\n            return promise;\n        },\n    };\n}\n//# sourceMappingURL=createBatchScheduler.js.map","import { parseAbi } from 'abitype';\nimport * as BlockOverrides from 'ox/BlockOverrides';\nimport { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { multicall3Abi } from '../../constants/abis.js';\nimport { aggregate3Signature } from '../../constants/contract.js';\nimport { deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, multicall3Bytecode, } from '../../constants/contracts.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ChainDoesNotSupportContract, ClientChainNotConfiguredError, } from '../../errors/chain.js';\nimport { CounterfactualDeploymentFailedError, RawContractError, } from '../../errors/contract.js';\nimport { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeDeployData, } from '../../utils/abi/encodeDeployData.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress, } from '../../utils/chain/getChainContractAddress.js';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\nimport { getCallError, } from '../../utils/errors/getCallError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { createBatchScheduler, } from '../../utils/promise/createBatchScheduler.js';\nimport { serializeStateOverride, } from '../../utils/stateOverride.js';\nimport { assertRequest } from '../../utils/transaction/assertRequest.js';\n/**\n * Executes a new message call immediately without submitting a transaction to the network.\n *\n * - Docs: https://viem.sh/docs/actions/public/call\n * - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call)\n *\n * @param client - Client to use\n * @param parameters - {@link CallParameters}\n * @returns The call data. {@link CallReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { call } from 'viem/public'\n *\n * const client = createPublicClient({\n *   chain: mainnet,\n *   transport: http(),\n * })\n * const data = await call(client, {\n *   account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n *   data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n *   to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * })\n */\nexport async function call(client, args) {\n    const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? 'latest', accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;\n    const account = account_ ? parseAccount(account_) : undefined;\n    if (code && (factory || factoryData))\n        throw new BaseError('Cannot provide both `code` & `factory`/`factoryData` as parameters.');\n    if (code && to)\n        throw new BaseError('Cannot provide both `code` & `to` as parameters.');\n    // Check if the call is deployless via bytecode.\n    const deploylessCallViaBytecode = code && data_;\n    // Check if the call is deployless via a factory.\n    const deploylessCallViaFactory = factory && factoryData && to && data_;\n    const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;\n    const data = (() => {\n        if (deploylessCallViaBytecode)\n            return toDeploylessCallViaBytecodeData({\n                code,\n                data: data_,\n            });\n        if (deploylessCallViaFactory)\n            return toDeploylessCallViaFactoryData({\n                data: data_,\n                factory,\n                factoryData,\n                to,\n            });\n        return data_;\n    })();\n    try {\n        assertRequest(args);\n        const blockNumberHex = typeof blockNumber === 'bigint' ? numberToHex(blockNumber) : undefined;\n        const block = blockNumberHex || blockTag;\n        const rpcBlockOverrides = blockOverrides\n            ? BlockOverrides.toRpc(blockOverrides)\n            : undefined;\n        const rpcStateOverride = serializeStateOverride(stateOverride);\n        const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n        const format = chainFormat || formatTransactionRequest;\n        const request = format({\n            // Pick out extra data that might exist on the chain's transaction request type.\n            ...extract(rest, { format: chainFormat }),\n            accessList,\n            account,\n            authorizationList,\n            blobs,\n            data,\n            gas,\n            gasPrice,\n            maxFeePerBlobGas,\n            maxFeePerGas,\n            maxPriorityFeePerGas,\n            nonce,\n            to: deploylessCall ? undefined : to,\n            value,\n        }, 'call');\n        if (batch &&\n            shouldPerformMulticall({ request }) &&\n            !rpcStateOverride &&\n            !rpcBlockOverrides) {\n            try {\n                return await scheduleMulticall(client, {\n                    ...request,\n                    blockNumber,\n                    blockTag,\n                });\n            }\n            catch (err) {\n                if (!(err instanceof ClientChainNotConfiguredError) &&\n                    !(err instanceof ChainDoesNotSupportContract))\n                    throw err;\n            }\n        }\n        const params = (() => {\n            const base = [\n                request,\n                block,\n            ];\n            if (rpcStateOverride && rpcBlockOverrides)\n                return [...base, rpcStateOverride, rpcBlockOverrides];\n            if (rpcStateOverride)\n                return [...base, rpcStateOverride];\n            if (rpcBlockOverrides)\n                return [...base, {}, rpcBlockOverrides];\n            return base;\n        })();\n        const response = await client.request({\n            method: 'eth_call',\n            params,\n        });\n        if (response === '0x')\n            return { data: undefined };\n        return { data: response };\n    }\n    catch (err) {\n        const data = getRevertErrorData(err);\n        // Check for CCIP-Read offchain lookup signature.\n        const { offchainLookup, offchainLookupSignature } = await import('../../utils/ccip.js');\n        if (client.ccipRead !== false &&\n            data?.slice(0, 10) === offchainLookupSignature &&\n            to)\n            return { data: await offchainLookup(client, { data, to }) };\n        // Check for counterfactual deployment error.\n        if (deploylessCall && data?.slice(0, 10) === '0x101bb98d')\n            throw new CounterfactualDeploymentFailedError({ factory });\n        throw getCallError(err, {\n            ...args,\n            account,\n            chain: client.chain,\n        });\n    }\n}\n// We only want to perform a scheduled multicall if:\n// - The request has calldata,\n// - The request has a target address,\n// - The target address is not already the aggregate3 signature,\n// - The request has no other properties (`nonce`, `gas`, etc cannot be sent with a multicall).\nfunction shouldPerformMulticall({ request }) {\n    const { data, to, ...request_ } = request;\n    if (!data)\n        return false;\n    if (data.startsWith(aggregate3Signature))\n        return false;\n    if (!to)\n        return false;\n    if (Object.values(request_).filter((x) => typeof x !== 'undefined').length > 0)\n        return false;\n    return true;\n}\nasync function scheduleMulticall(client, args) {\n    const { batchSize = 1024, deployless = false, wait = 0, } = typeof client.batch?.multicall === 'object' ? client.batch.multicall : {};\n    const { blockNumber, blockTag = client.experimental_blockTag ?? 'latest', data, to, } = args;\n    const multicallAddress = (() => {\n        if (deployless)\n            return null;\n        if (args.multicallAddress)\n            return args.multicallAddress;\n        if (client.chain) {\n            return getChainContractAddress({\n                blockNumber,\n                chain: client.chain,\n                contract: 'multicall3',\n            });\n        }\n        throw new ClientChainNotConfiguredError();\n    })();\n    const blockNumberHex = typeof blockNumber === 'bigint' ? numberToHex(blockNumber) : undefined;\n    const block = blockNumberHex || blockTag;\n    const { schedule } = createBatchScheduler({\n        id: `${client.uid}.${block}`,\n        wait,\n        shouldSplitBatch(args) {\n            const size = args.reduce((size, { data }) => size + (data.length - 2), 0);\n            return size > batchSize * 2;\n        },\n        fn: async (requests) => {\n            const calls = requests.map((request) => ({\n                allowFailure: true,\n                callData: request.data,\n                target: request.to,\n            }));\n            const calldata = encodeFunctionData({\n                abi: multicall3Abi,\n                args: [calls],\n                functionName: 'aggregate3',\n            });\n            const data = await client.request({\n                method: 'eth_call',\n                params: [\n                    {\n                        ...(multicallAddress === null\n                            ? {\n                                data: toDeploylessCallViaBytecodeData({\n                                    code: multicall3Bytecode,\n                                    data: calldata,\n                                }),\n                            }\n                            : { to: multicallAddress, data: calldata }),\n                    },\n                    block,\n                ],\n            });\n            return decodeFunctionResult({\n                abi: multicall3Abi,\n                args: [calls],\n                functionName: 'aggregate3',\n                data: data || '0x',\n            });\n        },\n    });\n    const [{ returnData, success }] = await schedule({ data, to });\n    if (!success)\n        throw new RawContractError({ data: returnData });\n    if (returnData === '0x')\n        return { data: undefined };\n    return { data: returnData };\n}\nfunction toDeploylessCallViaBytecodeData(parameters) {\n    const { code, data } = parameters;\n    return encodeDeployData({\n        abi: parseAbi(['constructor(bytes, bytes)']),\n        bytecode: deploylessCallViaBytecodeBytecode,\n        args: [code, data],\n    });\n}\nfunction toDeploylessCallViaFactoryData(parameters) {\n    const { data, factory, factoryData, to } = parameters;\n    return encodeDeployData({\n        abi: parseAbi(['constructor(address, bytes, address, bytes)']),\n        bytecode: deploylessCallViaFactoryBytecode,\n        args: [to, data, factory, factoryData],\n    });\n}\n/** @internal */\nexport function getRevertErrorData(err) {\n    if (!(err instanceof BaseError))\n        return undefined;\n    const error = err.walk();\n    return typeof error?.data === 'object' ? error.data?.data : error.data;\n}\n//# sourceMappingURL=call.js.map","import { AbiFunctionSignatureNotFoundError } from '../../errors/abi.js';\nimport { slice } from '../data/slice.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nexport function decodeFunctionData(parameters) {\n    const { abi, data } = parameters;\n    const signature = slice(data, 0, 4);\n    const description = abi.find((x) => x.type === 'function' &&\n        signature === toFunctionSelector(formatAbiItem(x)));\n    if (!description)\n        throw new AbiFunctionSignatureNotFoundError(signature, {\n            docsPath: '/docs/contract/decodeFunctionData',\n        });\n    return {\n        functionName: description.name,\n        args: ('inputs' in description &&\n            description.inputs &&\n            description.inputs.length > 0\n            ? decodeAbiParameters(description.inputs, slice(data, 4))\n            : undefined),\n    };\n}\n//# sourceMappingURL=decodeFunctionData.js.map","import { AbiErrorInputsNotFoundError, AbiErrorNotFoundError, } from '../../errors/abi.js';\nimport { concatHex } from '../data/concat.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeErrorResult';\nexport function encodeErrorResult(parameters) {\n    const { abi, errorName, args } = parameters;\n    let abiItem = abi[0];\n    if (errorName) {\n        const item = getAbiItem({ abi, args, name: errorName });\n        if (!item)\n            throw new AbiErrorNotFoundError(errorName, { docsPath });\n        abiItem = item;\n    }\n    if (abiItem.type !== 'error')\n        throw new AbiErrorNotFoundError(undefined, { docsPath });\n    const definition = formatAbiItem(abiItem);\n    const signature = toFunctionSelector(definition);\n    let data = '0x';\n    if (args && args.length > 0) {\n        if (!abiItem.inputs)\n            throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath });\n        data = encodeAbiParameters(abiItem.inputs, args);\n    }\n    return concatHex([signature, data]);\n}\n//# sourceMappingURL=encodeErrorResult.js.map","import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, InvalidArrayError, } from '../../errors/abi.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeFunctionResult';\nexport function encodeFunctionResult(parameters) {\n    const { abi, functionName, result } = parameters;\n    let abiItem = abi[0];\n    if (functionName) {\n        const item = getAbiItem({ abi, name: functionName });\n        if (!item)\n            throw new AbiFunctionNotFoundError(functionName, { docsPath });\n        abiItem = item;\n    }\n    if (abiItem.type !== 'function')\n        throw new AbiFunctionNotFoundError(undefined, { docsPath });\n    if (!abiItem.outputs)\n        throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath });\n    const values = (() => {\n        if (abiItem.outputs.length === 0)\n            return [];\n        if (abiItem.outputs.length === 1)\n            return [result];\n        if (Array.isArray(result))\n            return result;\n        throw new InvalidArrayError(result);\n    })();\n    return encodeAbiParameters(abiItem.outputs, values);\n}\n//# sourceMappingURL=encodeFunctionResult.js.map","import { batchGatewayAbi } from '../../constants/abis.js';\nimport { solidityError } from '../../constants/solidity.js';\nimport { decodeFunctionData } from '../abi/decodeFunctionData.js';\nimport { encodeErrorResult } from '../abi/encodeErrorResult.js';\nimport { encodeFunctionResult } from '../abi/encodeFunctionResult.js';\nexport const localBatchGatewayUrl = 'x-batch-gateway:true';\nexport async function localBatchGatewayRequest(parameters) {\n    const { data, ccipRequest } = parameters;\n    const { args: [queries], } = decodeFunctionData({ abi: batchGatewayAbi, data });\n    const failures = [];\n    const responses = [];\n    await Promise.all(queries.map(async (query, i) => {\n        try {\n            responses[i] = query.urls.includes(localBatchGatewayUrl)\n                ? await localBatchGatewayRequest({ data: query.data, ccipRequest })\n                : await ccipRequest(query);\n            failures[i] = false;\n        }\n        catch (err) {\n            failures[i] = true;\n            responses[i] = encodeError(err);\n        }\n    }));\n    return encodeFunctionResult({\n        abi: batchGatewayAbi,\n        functionName: 'query',\n        result: [failures, responses],\n    });\n}\nfunction encodeError(error) {\n    if (error.name === 'HttpRequestError' && error.status)\n        return encodeErrorResult({\n            abi: batchGatewayAbi,\n            errorName: 'HttpError',\n            args: [error.status, error.shortMessage],\n        });\n    return encodeErrorResult({\n        abi: [solidityError],\n        errorName: 'Error',\n        args: ['shortMessage' in error ? error.shortMessage : error.message],\n    });\n}\n//# sourceMappingURL=localBatchGatewayRequest.js.map","import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n    constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n        super(cause.shortMessage ||\n            'An error occurred while fetching for an offchain result.', {\n            cause,\n            metaMessages: [\n                ...(cause.metaMessages || []),\n                cause.metaMessages?.length ? '' : [],\n                'Offchain Gateway Call:',\n                urls && [\n                    '  Gateway URL(s):',\n                    ...urls.map((url) => `    ${getUrl(url)}`),\n                ],\n                `  Sender: ${sender}`,\n                `  Data: ${data}`,\n                `  Callback selector: ${callbackSelector}`,\n                `  Extra data: ${extraData}`,\n            ].flat(),\n            name: 'OffchainLookupError',\n        });\n    }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n    constructor({ result, url }) {\n        super('Offchain gateway response is malformed. Response data must be a hex value.', {\n            metaMessages: [\n                `Gateway URL: ${getUrl(url)}`,\n                `Response: ${stringify(result)}`,\n            ],\n            name: 'OffchainLookupResponseMalformedError',\n        });\n    }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n    constructor({ sender, to }) {\n        super('Reverted sender address does not match target contract address (`to`).', {\n            metaMessages: [\n                `Contract address: ${to}`,\n                `OffchainLookup sender address: ${sender}`,\n            ],\n            name: 'OffchainLookupSenderMismatchError',\n        });\n    }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { localBatchGatewayRequest, localBatchGatewayUrl, } from './ens/localBatchGatewayRequest.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n    name: 'OffchainLookup',\n    type: 'error',\n    inputs: [\n        {\n            name: 'sender',\n            type: 'address',\n        },\n        {\n            name: 'urls',\n            type: 'string[]',\n        },\n        {\n            name: 'callData',\n            type: 'bytes',\n        },\n        {\n            name: 'callbackFunction',\n            type: 'bytes4',\n        },\n        {\n            name: 'extraData',\n            type: 'bytes',\n        },\n    ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n    const { args } = decodeErrorResult({\n        data,\n        abi: [offchainLookupAbiItem],\n    });\n    const [sender, urls, callData, callbackSelector, extraData] = args;\n    const { ccipRead } = client;\n    const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n        ? ccipRead.request\n        : ccipRequest;\n    try {\n        if (!isAddressEqual(to, sender))\n            throw new OffchainLookupSenderMismatchError({ sender, to });\n        const result = urls.includes(localBatchGatewayUrl)\n            ? await localBatchGatewayRequest({\n                data: callData,\n                ccipRequest: ccipRequest_,\n            })\n            : await ccipRequest_({ data: callData, sender, urls });\n        const { data: data_ } = await call(client, {\n            blockNumber,\n            blockTag,\n            data: concat([\n                callbackSelector,\n                encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n            ]),\n            to,\n        });\n        return data_;\n    }\n    catch (err) {\n        throw new OffchainLookupError({\n            callbackSelector,\n            cause: err,\n            data,\n            extraData,\n            sender,\n            urls,\n        });\n    }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n    let error = new Error('An unknown error occurred.');\n    for (let i = 0; i < urls.length; i++) {\n        const url = urls[i];\n        const method = url.includes('{data}') ? 'GET' : 'POST';\n        const body = method === 'POST' ? { data, sender } : undefined;\n        const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n        try {\n            const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n                body: JSON.stringify(body),\n                headers,\n                method,\n            });\n            let result;\n            if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n                result = (await response.json()).data;\n            }\n            else {\n                result = (await response.text());\n            }\n            if (!response.ok) {\n                error = new HttpRequestError({\n                    body,\n                    details: result?.error\n                        ? stringify(result.error)\n                        : response.statusText,\n                    headers: response.headers,\n                    status: response.status,\n                    url,\n                });\n                continue;\n            }\n            if (!isHex(result)) {\n                error = new OffchainLookupResponseMalformedError({\n                    result,\n                    url,\n                });\n                continue;\n            }\n            return result;\n        }\n        catch (err) {\n            error = new HttpRequestError({\n                body,\n                details: err.message,\n                url,\n            });\n        }\n    }\n    throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"mappings":";;;;AAAA,MAAaA,YAAU;;;ACCvB,IAAaC,cAAb,MAAaA,oBAAkB,MAAM;CACjC,YAAY,cAAc,OAAO,EAAE,EAAE;EACjC,MAAM,UAAU,KAAK,iBAAiBA,cAChC,KAAK,MAAM,UACX,KAAK,OAAO,UACR,KAAK,MAAM,UACX,KAAK;EACf,MAAM,WAAW,KAAK,iBAAiBA,cACjC,KAAK,MAAM,YAAY,KAAK,WAC5B,KAAK;EACX,MAAM,UAAU;GACZ,gBAAgB;GAChB;GACA,GAAI,KAAK,eAAe,CAAC,GAAG,KAAK,cAAc,GAAG,GAAG,EAAE;GACvD,GAAI,WAAW,CAAC,4BAA4B,WAAW,GAAG,EAAE;GAC5D,GAAI,UAAU,CAAC,YAAY,UAAU,GAAG,EAAE;GAC1C,oBAAoBC;GACvB,CAAC,KAAK,KAAK;AACZ,QAAM,QAAQ;AACd,SAAO,eAAe,MAAM,WAAW;GACnC,Y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gBAAgB;CACzB;EACI,QAAQ,CACJ;GACI,YAAY;IACR;KACI,MAAM;KACN,MAAM;KACT;IACD;KACI,MAAM;KACN,MAAM;KACT;IACD;KACI,MAAM;KACN,MAAM;KACT;IACJ;GACD,MAAM;GACN,MAAM;GACT,CACJ;EACD,MAAM;EACN,SAAS,CACL;GACI,YAAY,CACR;IACI,MAAM;IACN,MAAM;IACT,EACD;IACI,MAAM;IACN,MAAM;IACT,CACJ;GACD,MAAM;GACN,MAAM;GACT,CACJ;EACD,iBAAiB;EACjB,MAAM;EACT;CACD;EACI,QAAQ,CACJ;GACI,MAAM;GACN,MAAM;GACT,CACJ;EACD,MAAM;EACN,SAAS,CACL;GACI,MAAM;GACN,MAAM;GACT,CACJ;EACD,iBAAiB;EACjB,MAAM;EACT;CACD;EACI,QAAQ,EAAE;EACV,MAAM;EACN,SAAS,CACL;GACI,cAAc;GACd,MAAM;GACN,MAAM;GACT,CACJ;EACD,iBAAiB;EACjB,MAAM;EACT;CACJ;AACD,MAAa,kBAAkB,CAC3B;CACI,MAAM;CACN,MAAM;CACN,iBAAiB;CACjB,QAAQ,CACJ;EACI,MAAM;EACN,MAAM;EACN,YAAY;GACR;IACI,MAAM;IACN,MAAM;IACT;GACD;IACI,MAAM;IACN,MAAM;IACT;GACD;IACI,MAAM;IACN,MAAM;IACT;GACJ;EACJ,CACJ;CACD,SAAS,CACL;EACI,MAAM;EACN,MAAM;EACT,EACD;EACI,MAAM;EACN,MAAM;EACT,CACJ;CACJ,EACD;CACI,MAAM;CACN,MAAM;CACN,QAAQ,CACJ;EACI,MAAM;EACN,MAAM;EACT,EACD;EACI,MAAM;EACN,MAAM;EACT,CACJ;CACJ,CACJ;AACD,MAAM,0BAA0B;CAC5B;EACI,QAAQ,CACJ;GACI,MAAM;GACN,MAAM;GACT,CACJ;EACD,MAAM;EACN,MAAM;EACT;CACD;EACI,QAAQ,CACJ;GACI,MAAM;GACN,MAAM;GACT,CACJ;EACD,MAAM;EACN,MAAM;EACT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EACI,MAAM,QACT,CACJ;CACD,iBAAiB;CACjB,MAAM;CACN,MAAM;CACT,CACJ;;AAED,MAAa,WAAW;CACpB;EACI,MAAM;EACN,MAAM;EACN,QAAQ;GACJ;IACI,SAAS;IACT,MAAM;IACN,MAAM;IACT;GACD;IACI,SAAS;IACT,MAAM;IACN,MAAM;IACT;GACD;IACI,SAAS;IACT,MAAM;IACN,MAAM;IACT;GACJ;EACJ;CACD;EACI,MAAM;EACN,MAAM;EACN,QAAQ;GACJ;IACI,SAAS;IACT,MAAM;IACN,MAAM;IACT;GACD;IACI,SAAS;IACT,MAAM;IACN,MAAM;IACT;GACD;IACI,SAAS;IACT,MAAM;IACN,MAAM;IACT;GACJ;EACJ;CACD;EACI,MAAM;EACN,MAAM;EACN,iBAAiB;EACjB,QAAQ,CACJ;GACI,MAAM;GACN,MAAM;GACT,EACD;GACI,MAAM;GACN,MAAM;GACT,CACJ;EACD,SAAS,CACL,EACI,MAAM,WACT,CACJ;EACJ;CACD;EACI,MAAM;EACN,MAAM;EACN,iBAAiB;EACjB,QAAQ,CACJ;GACI,MAAM;GACN,MAAM;GACT,EACD;GACI,MAAM;GACN,MAAM;GACT,CACJ;EACD,SAAS,CACL,EACI,MAAM,QACT,CACJ;EACJ;CACD;EACI,MAAM;EACN,MAAM;EACN,iBAAiB;EACjB,QAAQ,CACJ;GACI,MAAM;GACN,MAAM;GACT,CACJ;EACD,SAAS,CACL,EACI,MAAM,WACT,CACJ;EACJ;CACD;EACI,MAAM;EACN,MAAM;EACN,iBAAiB;EACjB,QAAQ,EAAE;EACV,SAAS,CACL,EACI,MAAM,SACT,CACJ;EACJ;CACD;EACI,MAAM;EACN,MAAM;EACN,iBAAiB;EACjB,QAAQ,EAAE;EACV,SAAS,CACL,EACI,MAAM,UACT,CACJ;EACJ;CACD;EACI,MAAM;EACN,MAAM;EACN,iBAAiB;EACjB,QAAQ,EAAE;EACV,SAAS,CACL,EACI,MAAM,UACT,CACJ;EACJ;CACD;EACI,MAAM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