1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,525696,e=>{"use strict";let t=BigInt(0),r=BigInt(1);function n(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function i(e){if(!n(e))throw Error("Uint8Array expected")}function a(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?t:BigInt("0x"+e)}let s="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(e){if(i(e),s)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t}function l(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function c(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(s)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=l(e.charCodeAt(i)),a=l(e.charCodeAt(i+1));if(void 0===r||void 0===a)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+a}return n}function d(e,t){return c(e.toString(16).padStart(2*t,"0"))}function p(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];i(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}let f=e=>"bigint"==typeof e&&t<=e;function y(e,t,r){return f(e)&&f(t)&&f(r)&&t<=e&&e<r}let m=e=>new Uint8Array(e),g={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||n(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};e.s(["aInRange",0,function(e,t,r,n){if(!y(t,r,n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)},"abool",0,function(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)},"abytes",0,i,"bitLen",0,function(e){let n;for(n=0;e>t;e>>=r,n+=1);return n},"bitMask",0,e=>(r<<BigInt(e))-r,"bytesToHex",0,u,"bytesToNumberBE",0,function(e){return a(u(e))},"bytesToNumberLE",0,function(e){return i(e),a(u(Uint8Array.from(e).reverse()))},"concatBytes",0,p,"createHmacDrbg",0,function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=m(e),i=m(e),a=0,s=()=>{n.fill(1),i.fill(0),a=0},o=(...e)=>r(i,n,...e),u=(e=m(0))=>{let t;if(i=o((t=[0],Uint8Array.from(t)),e),n=o(),0!==e.length){let t;i=o((t=[1],Uint8Array.from(t)),e),n=o()}},l=()=>{if(a++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=o()).slice();r.push(t),e+=n.length}return p(...r)};return(e,t)=>{let r;for(s(),u(e);!(r=t(l()));)u();return s(),r}},"ensureBytes",0,function(e,t,r){let i;if("string"==typeof t)try{i=c(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(n(t))i=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let a=i.length;if("number"==typeof r&&a!==r)throw Error(e+" of length "+r+" expected, got "+a);return i},"equalBytes",0,function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},"hexToBytes",0,c,"inRange",0,y,"isBytes",0,n,"memoized",0,function(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let a=e(r,...n);return t.set(r,a),a}},"numberToBytesBE",0,d,"numberToBytesLE",0,function(e,t){return d(e,t).reverse()},"numberToHexUnpadded",0,function(e){let t=e.toString(16);return 1&t.length?"0"+t:t},"utf8ToBytes",0,function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))},"validateObject",0,function(e,t,r={}){let n=(t,r,n)=>{let i=g[r];if("function"!=typeof i)throw Error("invalid validator function");let a=e[t];if((!n||void 0!==a)&&!i(a,e))throw Error("param "+String(t)+" is invali
1d. Expected "+r+", got "+a)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}])},222925,155155,e=>{"use strict";class t extends Error{constructor(e,r={}){const n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof t&&r.cause.docsPath||r.docsPath;super([e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],"Version: [email protected]"].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}}e.s(["BaseError",0,t],155155),e.s(["InvalidAbiItemError",0,class extends t{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}},"UnknownSolidityTypeError",0,class extends t{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}},"UnknownTypeError",0,class extends t{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}],222925)},617214,499896,e=>{"use strict";var t=e.i(514113);let r=/^tuple(?<array>(\[(\d*)\])*)$/;function n(e){let n="",i=e.length;for(let a=0;a<i;a++)n+=function e(n){let i=n.type;if(r.test(n.type)&&"components"in n){i="(";let a=n.components.length;for(let t=0;t<a;t++)i+=e(n.components[t]),t<a-1&&(i+=", ");let s=(0,t.execTyped)(r,n.type);return i+=`)${s?.array||""}`,e({...n,type:i})}return("indexed"in n&&n.indexed&&(i=`${i} indexed`),n.name)?`${i} ${n.name}`:i}(e[a]),a!==i-1&&(n+=", ");return n}e.s(["formatAbiParameters",0,n],499896),e.s(["formatAbiItem",0,function(e){return"function"===e.type?`function ${e.name}(${n(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${n(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${n(e.inputs)})`:"error"===e.type?`error ${e.name}(${n(e.inputs)})`:"constructor"===e.type?`constructor(${n(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?`fallback() external${"payable"===e.stateMutability?" payable":""}`:"receive() external payable"}],617214)},64855,e=>{"use strict";var t=e.i(514113);let r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,n=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/,i=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/,a=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/,s=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/,o=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/,u=/^receive\(\) external payable$/,l=new Set(["memory","indexed","storage","calldata"]),c=new Set(["indexed"]),d=new Set(["calldata","memory","storage"]);e.s(["eventModifiers",0,c,"execConstructorSignature",0,function(e){return(0,t.execTyped)(s,e)},"execErrorSignature",0,function(e){return(0,t.execTyped)(r,e)},"execEventSignature",0,function(e){return(0,t.execTyped)(n,e)},"execFallbackSignature",0,function(e){return(0,t.execTyped)(o,e)},"execFunctionSignature",0,function(e){return(0,t.execTyped)(i,e)},"execStructSignature",0,function(e){return(0,t.execTyped)(a,e)},"functionModifiers",0,d,"isConstructorSignature",0,function(e){return s.test(e)},"isErrorSignature",0,function(e){return r.test(e)},"isEventSignature",0,function(e){return n.test(e)},"isFallbackSignature",0,function(e){return o.test(e)},"isFunctionSignature",0,function(e){return i.test(e)},"isReceiveSignature",0,function(e){return u.test(e)},"isStructSignature",0,function(e){return a.test(e)},"modifiers",0,l])},548387,629341,62265,e=>{"use strict";var t=e.i(514113),r=e.i(222925),n=e.i(155155);n.BaseError;class i extends n.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class a extends n.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class s extends n.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class o extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class u extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class l extends n.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invali
1d."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}e.s(["InvalidAbiParametersError",0,i,"InvalidAbiTypeParameterError",0,l,"InvalidFunctionModifierError",0,u,"InvalidModifierError",0,o,"InvalidParameterError",0,a,"SolidityProtectedKeywordError",0,s],629341);var c=n;class d extends c.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class p extends c.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class f extends c.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}var y=n;class m extends y.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}var g=e.i(64855),b=n;class h extends b.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let w=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),v=/^(?<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$_]*))?$/,E=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,x=/^u?int$/;function A(e,n){var i,l;let c,d=function(e,t,r){let n="";if(r)for(let e of Object.entries(r)){if(!e)continue;let t="";for(let r of e[1])t+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${e[0]}{${t}})`}return t?`${t}:${e}${n}`:`${e}${n}`}(e,n?.type,n?.structs);if(w.has(d))return w.get(d);let p=t.isTupleRegex.test(e),f=(0,t.execTyped)(p?E:v,e);if(!f)throw new a({param:e});if(f.name&&("address"===(i=f.name)||"bool"===i||"function"===i||"string"===i||"tuple"===i||t.bytesRegex.test(i)||t.integerRegex.test(i)||S.test(i)))throw new s({param:e,name:f.name});let y=f.name?{name:f.name}:{},m="indexed"===f.modifier?{indexed:!0}:{},b=n?.structs??{},h={};if(p){c="tuple";let e=$(f.type),t=[],r=e.length;for(let n=0;n<r;n++)t.push(A(e[n],{structs:b}));h={components:t}}else if(f.type in b)c="tuple",h={components:b[f.type]};else if(x.test(f.type))c=`${f.type}256`;else if("address payable"===f.type)c="address";else if(c=f.type,n?.type!=="struct"&&!I(c))throw new r.UnknownSolidityTypeError({type:c});if(f.modifier){if(!n?.modifiers?.has?.(f.modifier))throw new o({param:e,type:n?.type,modifier:f.modifier});if(g.functionModifiers.has(f.modifier)&&(l=c,!f.array&&"bytes"!==l&&"string"!==l&&"tuple"!==l))throw new u({param:e,type:n?.type,modifier:f.modifier})}let P={type:`${c}${f.array??""}`,...y,...m,...h};return w.set(d,P),P}function $(e,t=[],r="",n=0){let i=e.trim().length;for(let a=0;a<i;a++){let i=e[a],s=e.slice(a+1);switch(i){case",":return 0===n?$(s,[...t,r.trim()]):$(s,t,`${r}${i}`,n);case"(":return $(s,t,`${r}${i}`,n+1);case")":return $(s,t,`${r}${i}`,n-1);default:return $(s,t,`${r}${i}`,n)}}if(""===r)return t;if(0!==n)throw new h({current:r,depth:n});return t.push(r.trim()),t}function I(e){return"address"===e||"bool"===e||"function"===e||"string"===e||t.bytesRegex.test(e)||t.integerRegex.test(e)}let S=/^(?: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)$/;e.s(["isSolidityType",0,I,"parseAbiParameter",0,A,"parseSignature",0,function(e,t={}){if((0,g.isFunctionSignature)(e))return function(e,t={}){let r=(0,g.execFunctionSignature)(e);if(!r)throw new d({signature:e,type:"function"});let n=$(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(A(n[e],{modifiers:g.functionModifiers,structs:t,type:"function"}));let s=[];if(r.returns){let e=$(r.returns),n=e.length;for(let r=0;r<n;r++)s.push(A(e[r],{modifiers:g.functionModifiers,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:i,outputs:s}}(e,t);if((0,g.isEventSignature)(e))return function(e,t={}){let r=(0,g.execEventSignature)(e);if(!r)throw new d({signature:e,type:"event"});let n=$(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(A(n[e],{modifiers:g.eventModifiers,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:i}}(e,t);if((0,g.isErrorSignature)(e))return function(e,t={}){let r=(0,g.execErrorSignature)(e);if(!r)throw new d({signature:e,type:"error"});let n=$(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(A(n[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:i}}(e,t);if((0,g.isConstructorSignature)(e))return function(e,t={}){let r=(0,g.execConstructorSignature)(e);if(!r)throw new d({signature:e,type:"constructor"});let n=$(r.parameters),i=[],a=n.length;for(let e=0;e<a;e++)i.push(A(n[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:i}}(e,t);if((0,g.isFallbackSignature)(e)){var r=e;let t=(0,g.execFallbackSignature)(r);if(!t)throw new d({signature:r,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}if((0,g.isReceiveSignature)(e))return{type:"receive",stateMutability:"payable"};throw new p({signature:e})},"splitParameters",0,$],62265);let P=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;e.s(["parseStructs",0,function(e){let n={},i=e.length;for(let t=0;t<i;t++){let r=e[t];if(!(0,g.isStructSignature)(r))continue;let i=(0,g.execStructSignature)(r);if(!i)throw new d({signature:r,type:"struct"});let a=i.properties.split(";"),s=[],o=a.length;for(let e=0;e<o;e++){let t=a[e].trim();if(!t)continue;let r=A(t,{type:"struct"});s.push(r)}if(!s.length)throw new f({signature:r});n[i.name]=s}let a={},s=Object.entries(n),o=s.length;for(let e=0;e<o;e++){let[i,o]=s[e];a[i]=function e(n=[],i={},a=new Set){let s=[],o=n.length;for(let u=0;u<o;u++){let o=n[u];if(t.isTupleRegex.test(o.type))s.push(o);else{let n=(0,t.execTyped)(P,o.type);if(!n?.type)throw new l({abiParameter:o});let{array:u,type:c}=n;
1if(c in i){if(a.has(c))throw new m({type:c});s.push({...o,type:`tuple${u??""}`,components:e(i[c],i,new Set([...a,c]))})}else if(I(c))s.push(o);else throw new r.UnknownTypeError({type:c})}}return s}(o,n)}return a}],548387)},514113,e=>{"use strict";e.s(["bytesRegex",0,/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,"execTyped",0,function(e,t){let r=e.exec(t);return r?.groups},"integerRegex",0,/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,"isTupleRegex",0,/^\(.+?\).*?$/])},178029,e=>{"use strict";var t=e.i(954751);async function r(e){let r=(0,t.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:r(n),type:"transaction"}}e.s(["createPendingTransactionFilter",0,r])},605527,e=>{"use strict";var t=e.i(265110);async function r(e,{address:n,blockNumber:i,blockTag:a=e.experimental_blockTag??"latest"}){let s="bigint"==typeof i?(0,t.numberToHex)(i):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[n,s||a]}))}e.s(["getBalance",0,r])},807175,e=>{"use strict";var t=e.i(347230),r=e.i(61546);async function n(e,{filter:i}){let a="strict"in i&&i.strict,s=await i.request({method:"eth_getFilterChanges",params:[i.id]});if("string"==typeof s[0])return s;let o=s.map(e=>(0,r.formatLog)(e));return"abi"in i&&i.abi?(0,t.parseEventLogs)({abi:i.abi,logs:o,strict:a}):o}e.s(["getFilterChanges",0,n])},319220,e=>{"use strict";var t=e.i(49426),r=e.i(936795),n=e.i(541472),i=e.i(748005),a=e.i(445566),s=e.i(863738),o=e.i(681340),u=e.i(719271),l=e.i(237879),c=e.i(897687),d=e.i(241587);async function p(e,p){let{account:f,authorizationList:y,allowFailure:m=!0,blockNumber:g,blockOverrides:b,blockTag:h,stateOverride:w}=p,v=p.contracts,{batchSize:E=p.batchSize??1024,deployless:x=p.deployless??!1}="object"==typeof e.batch?.multicall?e.batch.multicall:{},A=(()=>{if(p.multicallAddress)return p.multicallAddress;if(x)return null;if(e.chain)return(0,u.getChainContractAddress)({blockNumber:g,chain:e.chain,contract:"multicall3"});throw Error("client chain not configured. multicallAddress is required.")})(),$=[[]],I=0,S=0;for(let e=0;e<v.length;e++){let{abi:t,address:r,args:n,functionName:i}=v[e];try{let e=(0,o.encodeFunctionData)({abi:t,args:n,functionName:i});S+=(e.length-2)/2,E>0&&S>E&&$[I].length>0&&(I++,S=(e.length-2)/2,$[I]=[]),$[I]=[...$[I],{allowFailure:!0,callData:e,target:r}]}catch(a){let e=(0,l.getContractError)(a,{abi:t,address:r,args:n,docsPath:"/docs/contract/multicall",functionName:i,sender:f});if(!m)throw e;$[I]=[...$[I],{allowFailure:!0,callData:"0x",target:r}]}}let P=await Promise.allSettled($.map(n=>(0,c.getAction)(e,d.readContract,"readContract")({...null===A?{code:r.multicall3Bytecode}:{address:A},abi:t.multicall3Abi,account:f,args:[n],authorizationList:y,blockNumber:g,blockOverrides:b,blockTag:h,functionName:"aggregate3",stateOverride:w}))),T=[];for(let e=0;e<P.length;e++){let t=P[e];if("rejected"===t.status){if(!m)throw t.reason;for(let r=0;r<$[e].length;r++)T.push({status:"failure",error:t.reason,result:void 0});continue}let r=t.value;for(let t=0;t<r.length;t++){let{returnData:i,success:o}=r[t],{callData:u}=$[e][t],{abi:c,address:d,functionName:p,args:f}=v[T.length];try{if("0x"===u)throw new n.AbiDecodingZeroDataError;if(!o)throw new a.RawContractError({data:i});let e=(0,s.decodeFunctionResult)({abi:c,args:f,data:i,functionName:p});T.push(m?{result:e,status:"success"}:e)}catch(t){let e=(0,l.getContractError)(t,{abi:c,address:d,args:f,docsPath:"/docs/contract/multicall",functionName:p});if(!m)throw e;T.push({error:e,result:void 0,status:"failure"})}}}if(T.length!==v.length)throw new i.BaseError("multicall results mismatch");return T}e.s(["multicall",0,p])},241587,e=>{"use strict";var t=e.i(863738),r=e.i(681340),n=e.i(237879),i=e.i(897687),a=e.i(450235);async function s(e,s){let{abi:o,address:u,args:l,functionName:c,...d}=s,p=(0,r.encodeFunctionData)({abi:o,args:l,functionName:c});try{let{data:r}=await (0,i.getAction)(e,a.call,"call")({...d,data:p,to:u});return(0,t.decodeFunctionResult)({abi:o,args:l,functionName:c,data:r||"0x"})}catch(e){throw(0,n.getContractError)(e,{abi:o,address:u,args:l,docsPath:"/docs/contract/readContract",functionName:c})}}e.s(["readContract",0,s])},183292,e=>{"use strict";async function t(e,{filter:r}){return r.request({method:"eth_uninstallFilter",params:[r.id]})}e.s(["uninstallFilter",0,t])},399873,e=>{"use strict";var t=e.i(897687),r=e.i(200966),n=e.i(781666),i=e.i(300517),a=e.i(178029),s=e.i(807175),o=e.i(183292);
1e.s(["watchPendingTransactions",0,function(e,{batch:u=!0,onError:l,onTransactions:c,poll:d,pollingInterval:p=e.pollingInterval}){let f,y,m;return(void 0!==d?d:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type)?(f=(0,i.stringify)(["watchPendingTransactions",e.uid,u,p]),(0,r.observe)(f,{onTransactions:c,onError:l},r=>{let i,l=(0,n.poll)(async()=>{try{if(!i)try{i=await (0,t.getAction)(e,a.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(e){throw l(),e}let n=await (0,t.getAction)(e,s.getFilterChanges,"getFilterChanges")({filter:i});if(0===n.length)return;if(u)r.onTransactions(n);else for(let e of n)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:p});return async()=>{i&&await (0,t.getAction)(e,o.uninstallFilter,"uninstallFilter")({filter:i}),l()}})):(y=!0,m=()=>y=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!y)return;let t=e.result;c([t])},onError(e){l?.(e)}});m=t,y||m()}catch(e){l?.(e)}})(),()=>m())}])},917202,e=>{"use strict";var t=e.i(300517),r=e.i(748005);class n extends r.BaseError{constructor({domain:e}){super(`Invalid domain "${(0,t.stringify)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class i extends r.BaseError{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class a extends r.BaseError{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}e.s(["InvalidDomainError",0,n,"InvalidPrimaryTypeError",0,i,"InvalidStructTypeError",0,a])},347230,901860,e=>{"use strict";var t=e.i(541472),r=e.i(522246),n=e.i(858226),i=e.i(920542),a=e.i(730974),s=e.i(409642),o=e.i(61348),u=e.i(645918),l=e.i(265870);let c="/docs/contract/decodeEventLog";function d(e){let{abi:r,data:n,strict:i,topics:d}=e,p=i??!0,[f,...y]=d;if(!f)throw new t.AbiEventSignatureEmptyTopicsError({docsPath:c});let m=r.find(e=>"event"===e.type&&f===(0,a.toEventSelector)((0,l.formatAbiItem)(e)));if(!(m&&"name"in m)||"event"!==m.type)throw new t.AbiEventSignatureNotFoundError(f,{docsPath:c});let{name:g,inputs:b}=m,h=b?.some(e=>!("name"in e&&e.name)),w=h?[]:{},v=b.map((e,t)=>[e,t]).filter(([e])=>"indexed"in e&&e.indexed);for(let e=0;e<v.length;e++){let[r,n]=v[e],i=y[e];if(!i)throw new t.DecodeLogTopicsMismatch({abiItem:m,param:r});w[h?n:r.name||n]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,u.decodeAbiParameters)([e],t)||[])[0]}({param:r,value:i})}let E=b.filter(e=>!("indexed"in e&&e.indexed));if(E.length>0){if(n&&"0x"!==n)try{let e=(0,u.decodeAbiParameters)(E,n);if(e)if(h)for(let t=0;t<b.length;t++)w[t]=w[t]??e.shift();else for(let t=0;t<E.length;t++)w[E[t].name]=e[t]}catch(e){if(p){if(e instanceof t.AbiDecodingDataSizeTooSmallError||e instanceof s.PositionOutOfBoundsError)throw new t.DecodeLogDataMismatch({abiItem:m,data:n,params:E,size:(0,o.size)(n)});throw e}}else if(p)throw new t.DecodeLogDataMismatch({abiItem:m,data:"0x",params:E,size:0})}return{eventName:g,args:Object.values(w).length>0?w:void 0}}e.s(["decodeEventLog",0,d],901860),e.s(["parseEventLogs",0,function(e){let{abi:s,args:o,logs:u,strict:l=!0}=e,c=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return u.map(e=>{try{let t=s.find(t=>"event"===t.type&&e.topics[0]===(0,a.toEventSelector)(t));if(!t)return null;let u=d({...e,abi:[t],strict:l});if(c&&!c.includes(u.eventName)||!function(e){let{args:t,inputs:a,matchArgs:s}=e;if(!s)return!0;if(!t)return!1;function o(e,t,a){try{if("address"===e.type)return(0,r.isAddressEqual)(t,a);if("string"===e.type||"bytes"===e.type)return(0,i.keccak256)((0,n.toBytes)(t))===a;return t===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(s)?s.every((e,r)=>{if(null==e)return!0;let n=a[r];return!!n&&(Array.isArray(e)?e:[e]).some(e=>o(n,e,t[r]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof s||Array.isArray(s))&&Object.entries(s).every(([e,r])=>
1{if(null==r)return!0;let n=a.find(t=>t.name===e);return!!n&&(Array.isArray(r)?r:[r]).some(r=>o(n,r,t[e]))})}({args:u.args,inputs:t.inputs,matchArgs:o}))return null;return{...u,...e}}catch(i){let r,n;if(i instanceof t.AbiEventSignatureNotFoundError)return null;if(i instanceof t.DecodeLogDataMismatch||i instanceof t.DecodeLogTopicsMismatch){if(l)return null;r=i.abiItem.name,n=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...e,args:n?[]:{},eventName:r}}}).filter(Boolean)}],347230)},522246,e=>{"use strict";var t=e.i(846376),r=e.i(842430);e.s(["isAddressEqual",0,function(e,n){if(!(0,r.isAddress)(e,{strict:!1}))throw new t.InvalidAddressError({address:e});if(!(0,r.isAddress)(n,{strict:!1}))throw new t.InvalidAddressError({address:n});return e.toLowerCase()===n.toLowerCase()}])},675912,336299,e=>{"use strict";var t=e.i(49426),r=e.i(993445),n=e.i(541472),i=e.i(120388),a=e.i(457351),s=e.i(645918),o=e.i(265870);function u(e){let{abi:t,data:r}=e,u=(0,i.slice)(r,0,4),l=t.find(e=>"function"===e.type&&u===(0,a.toFunctionSelector)((0,o.formatAbiItem)(e)));if(!l)throw new n.AbiFunctionSignatureNotFoundError(u,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:l.name,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,s.decodeAbiParameters)(l.inputs,(0,i.slice)(r,4)):void 0}}e.s(["decodeFunctionData",0,u],336299);var l=e.i(490606),c=e.i(634571),d=e.i(987791);let p="/docs/contract/encodeErrorResult";function f(e){let{abi:t,errorName:r,args:i}=e,s=t[0];if(r){let e=(0,d.getAbiItem)({abi:t,args:i,name:r});if(!e)throw new n.AbiErrorNotFoundError(r,{docsPath:p});s=e}if("error"!==s.type)throw new n.AbiErrorNotFoundError(void 0,{docsPath:p});let u=(0,o.formatAbiItem)(s),f=(0,a.toFunctionSelector)(u),y="0x";if(i&&i.length>0){if(!s.inputs)throw new n.AbiErrorInputsNotFoundError(s.name,{docsPath:p});y=(0,c.encodeAbiParameters)(s.inputs,i)}return(0,l.concatHex)([f,y])}let y="/docs/contract/encodeFunctionResult",m="x-batch-gateway:true";async function g(e){let{data:i,ccipRequest:a}=e,{args:[s]}=u({abi:t.batchGatewayAbi,data:i}),o=[],l=[];return await Promise.all(s.map(async(e,n)=>{try{l[n]=e.urls.includes(m)?await g({data:e.data,ccipRequest:a}):await a(e),o[n]=!1}catch(e){var i;o[n]=!0,l[n]="HttpRequestError"===(i=e).name&&i.status?f({abi:t.batchGatewayAbi,errorName:"HttpError",args:[i.status,i.shortMessage]}):f({abi:[r.solidityError],errorName:"Error",args:["shortMessage"in i?i.shortMessage:i.message]})}})),function(e){let{abi:t,functionName:r,result:i}=e,a=t[0];if(r){let e=(0,d.getAbiItem)({abi:t,name:r});if(!e)throw new n.AbiFunctionNotFoundError(r,{docsPath:y});a=e}if("function"!==a.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:y});if(!a.outputs)throw new n.AbiFunctionOutputsNotFoundError(a.name,{docsPath:y});let s=(()=>{if(0===a.outputs.length)return[];if(1===a.outputs.length)return[i];if(Array.isArray(i))return i;throw new n.InvalidArrayError(i)})();return(0,c.encodeAbiParameters)(a.outputs,s)}({abi:t.batchGatewayAbi,functionName:"query",result:[o,l]})}e.s(["localBatchGatewayRequest",0,g,"localBatchGatewayUrl",0,m],675912)},954751,e=>{"use strict";e.s(["createFilterRequestScope",0,function(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:i,transport:a})=>{"success"===i&&t===e&&(r[n]=a.request)}),t=>r[t]||e.request}])},179678,e=>{"use strict";var t=e.i(920542),r=e.i(490606),n=e.i(61348),i=e.i(265110);e.s(["hashMessage",0,function(e,a){let s,o;return(0,t.keccak256)((s="string"==typeof e?(0,i.stringToHex)(e):"string"==typeof e.raw?e.raw:(0,i.bytesToHex)(e.raw),o=(0,i.stringToHex)(`\x19Ethereum Signed Message: 2${(0,n.size)(s)}`),(0,r.concat)([o,s])),a)}],179678)},120062,e=>{"use strict";e.s(["hashDomain",()=>o,"hashTypedData",()=>s]);var t=e.i(634571),r=e.i(490606),n=e.i(265110),i=e.i(920542),a=e.i(734296);function s(e){let{domain:t={},message:n,primaryType:s}=e,l={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:t}),...e.types};(0,a.validateTypedData)({domain:t,message:n,primaryType:s,types:l});let c=["0x1901"];return t&&c.push(o({domain:t,types:l})),"EIP712Domain"!==s&&c.push(u({data:n,primaryType:s,types:l})),(0,i.keccak256)((0,r.concat)(c))}function o({domain:e,types:t}){return u({data:e,primaryType:"EIP712Domain",types:t})}function u({data:e,primaryType:r,types:a}){let s=function e({data:r,primaryType:a,types:s}){let o=[{type:"bytes32"}],u=[function({primaryType:e,types:t}){let r=(0,n.toHex)(function({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),a=i?.[0];if(n.has(a)||void 0===r[a])return n;for(let t of(n.add(a),r[a]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,i.keccak256)(r)}({primaryType:a,types:s})];for(let l of s[a]){let[a,c]=function r({types:a,name:s,type:o,value:u}){if(void 0!==a[o])return[{type:"bytes32"},(0,i.keccak256)(e({data:u,primaryType:o,types:a}))];if("bytes"===o)return[{type:"bytes32"},(0,i.keccak256)(u)];if("string"===o)return[{type:"bytes32"},(0,i.keccak256)((0,n.toHex)(u))];if(o.lastIndexOf("]")===o.length-1){let e=o.slice(0,o.lastIndexOf("[")),n=u.map(t=>r({name:s,type:e,types:a,value:t}));return[{type:"bytes32"},(0,i.keccak256)((0,t.encodeAbiParameters)(n.map(([e])=>e),n.map(([,e])=>e)))]}return[{type:o},u]}({types:s,name:l.name,type:l.type,value:r[l.name]});o.push(a),u.push(c)}return(0,t.encodeAbiParameters)(o,u)}({data:e,primaryType:r,types:a});return(0,i.keccak256)(s)}},734296,e=>{"use strict";e.s(["domainSeparator",()=>f,"getTypesForEIP712Domain",()=>p,"serializeTypedData",()=>c,"validateTypedData",()=>d]);var t=e.i(541472),r=e.i(846376),n=e.i(917202),i=e.i(842430),a=e.i(61348),s=e.i(265110),o=e.i(644859),u=e.i(120062),l=e.i(300517);function c(e){let{domain:t,message:r,primaryType:n,types:i}=e,a=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},s=i.EIP712Domain&&t?a(i.EIP712Domain,t):{},o=(()=>
2{if("EIP712Domain"!==n)return a(i[n],r)})();return(0,l.stringify)({domain:s,message:o,primaryType:n,types:i})}function d(e){let{domain:u,message:l,primaryType:c,types:d}=e,p=(e,u)=>{for(let l of e){let{name:e,type:c}=l,f=u[e],y=c.match(o.integerRegex);if(y&&("number"==typeof f||"bigint"==typeof f)){let[e,t,r]=y;(0,s.numberToHex)(f,{signed:"int"===t,size:Number.parseInt(r,10)/8})}if("address"===c&&"string"==typeof f&&!(0,i.isAddress)(f))throw new r.InvalidAddressError({address:f});let m=c.match(o.bytesRegex);if(m){let[e,r]=m;if(r&&(0,a.size)(f)!==Number.parseInt(r,10))throw new t.BytesSizeMismatchError({expectedSize:Number.parseInt(r,10),givenSize:(0,a.size)(f)})}let g=d[c];g&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new n.InvalidStructTypeError({type:e})}(c),p(g,f))}};if(d.EIP712Domain&&u){if("object"!=typeof u)throw new n.InvalidDomainError({domain:u});p(d.EIP712Domain,u)}if("EIP712Domain"!==c)if(d[c])p(d[c],l);else throw new n.InvalidPrimaryTypeError({primaryType:c,types:d})}function p({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function f({domain:e}){return(0,u.hashDomain)({domain:e,types:{EIP712Domain:p({domain:e})}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.