1import{r as $2,m as N2}from"./index-CDu8tk5u.js";import{r as F2}from"./index-BV8s6ez1.js";import{r as L2}from"./events-DQ172AOg.js";function U2(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function z2(){if(typeof WebSocket<"u")return WebSocket;if(typeof window.WebSocket<"u"||typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const D2=z2(),G2=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:D2},Symbol.toStringTag,{value:"Module"}));var tf={},Wn={},Lt={},an={},qr={},Kn={},Zn={},G0;function c_(){if(G0)return Zn;G0=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.getSDKVersion=void 0;const e=()=>"9.1.0";return Zn.getSDKVersion=e,Zn}var Yn={},V0;function V2(){if(V0)return Yn;V0=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.generateRequestId=void 0;const e=r=>r.toString(16).padStart(2,"0"),t=r=>{const o=new Uint8Array(r/2);return window.crypto.getRandomValues(o),Array.from(o,e).join("")},n=()=>typeof window<"u"?t(10):new Date().getTime().toString(36);return Yn.generateRequestId=n,Yn}var W0;function u_(){if(W0)return Kn;W0=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.MessageFormatter=void 0;const e=c_(),t=V2();class n{}return Kn.MessageFormatter=n,n.makeRequest=(r,o)=>({id:(0,t.generateRequestId)(),method:r,params:o,env:{sdkVersion:(0,e.getSDKVersion)()}}),n.makeResponse=(r,o,s)=>({id:r,success:!0,version:s,data:o}),n.makeErrorResponse=(r,o,s)=>({id:r,success:!1,error:o,version:s}),Kn}var Mr={},K0;function Xr(){if(K0)return Mr;K0=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.RestrictedMethods=Mr.Methods=void 0;var e;(function(n){n.sendTransactions="sendTransactions",n.rpcCall="rpcCall",n.getChainInfo="getChainInfo",n.getSafeInfo="getSafeInfo",n.getTxBySafeTxHash="getTxBySafeTxHash",n.getSafeBalances="getSafeBalances",n.signMessage="signMessage",n.signTypedMessage="signTypedMessage",n.getEnvironmentInfo="getEnvironmentInfo",n.getOffChainSignature="getOffChainSignature",n.requestAddressBook="requestAddressBook",n.wallet_getPermissions="wallet_getPermissions",n.wallet_requestPermissions="wallet_requestPermissions"})(e||(Mr.Methods=e={}));var t;return(function(n){n.requestAddressBook="requestAddressBook"})(t||(Mr.RestrictedMethods=t={})),Mr}var Z0;function W2(){return Z0||(Z0=1,(function(e){var t=qr&&qr.__createBinding||(Object.create?(function(s,i,c,u){u===void 0&&(u=c);var d=Object.getOwnPropertyDescriptor(i,c);(!d||("get"in d?!i.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return i[c]}}),Object.defineProperty(s,u,d)}):(function(s,i,c,u){u===void 0&&(u=c),s[u]=i[c]})),n=qr&&qr.__exportStar||function(s,i){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(i,c)&&t(i,s,c)};Object.defineProperty(e,"__esModule",{value:!0});const r=u_();class o{constructor(i=null,c=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:u,data:d,source:l})=>{const f=!d,_=!this.isServer&&l===window.parent,T=typeof d.version<"u"&&parseInt(d.version.split(".")[0]),w=typeof T=="number"&&T>=1;let p=!0;return Array.isArray(this.allowedOrigins)&&(p=this.allowedOrigins.find(B=>B.test(u))!==void 0),!f&&_&&w&&p},this.logIncomingMessage=u=>{console.info(`Safe Apps SDK v1: A message was received from origin ${u.origin}. `,u.data)},this.onParentMessage=u=>{this.isValidMessage(u)&&(this.debugMode&&this.logIncomingMessage(u),this.handleIncomingMessage(u.data))},this.handleIncomingMessage=u=>{const{id:d}=u,l=this.callbacks.get(d);l&&(l(u),this.callbacks.delete(d))},this.send=(u,d)=>{const l=r.MessageFormatter.makeRequest(u,d);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(l,"*"),new Promise((f,_)=>{this.callbacks.set(l.id,T=>{if(!T.success){_(new Error(T.error));return}f(T)})})},this.allowedOrigins=i,this.debugMode=c,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=o,n(Xr(),e)})(qr)),qr}var Jn={},Hr={},Xn={},Y0;function K2(){if(Y0)return Xn;Y0=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.isObjectEIP712TypedData=void 0;const e=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;return Xn.isObjectEIP712TypedData=e,Xn}var rf={},J0;
1function Z2(){return J0||(J0=1,Object.defineProperty(rf,"__esModule",{value:!0})),rf}var nf={},X0;function Y2(){return X0||(X0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=F2();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return t.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return t.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return t.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return t.TransferDirection}})})(nf)),nf}var of={},Q0;function J2(){return Q0||(Q0=1,Object.defineProperty(of,"__esModule",{value:!0}),Xr()),of}var el;function $f(){return el||(el=1,(function(e){var t=Hr&&Hr.__createBinding||(Object.create?(function(r,o,s,i){i===void 0&&(i=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(r,i,c)}):(function(r,o,s,i){i===void 0&&(i=s),r[i]=o[s]})),n=Hr&&Hr.__exportStar||function(r,o){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(K2(),e),n(Z2(),e),n(Y2(),e),n(J2(),e)})(Hr)),Hr}var tl;function X2(){if(tl)return Jn;tl=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.TXs=void 0;const e=Xr(),t=$f();class n{constructor(o){this.communicator=o}async getBySafeTxHash(o){if(!o)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:o})).data}async signMessage(o){const s={message:o};return(await this.communicator.send(e.Methods.signMessage,s)).data}async signTypedMessage(o){if(!(0,t.isObjectEIP712TypedData)(o))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:o})).data}async send({txs:o,params:s}){if(!o||!o.length)throw new Error("No transactions were passed");const i={txs:o,params:s};return(await this.communicator.send(e.Methods.sendTransactions,i)).data}}return Jn.TXs=n,Jn}var Qn={},ei={},rl;function Nf(){return rl||(rl=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.RPC_CALLS=void 0,ei.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}),ei}var nl;function Q2(){if(nl)return Qn;nl=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.Eth=void 0;const e=Nf(),t=Xr(),n={defaultBlockParam:(o="latest")=>o,returnFullTxObjectParam:(o=!1)=>o,blockNumberToHex:o=>Number.isInteger(o)?`0x${o.toString(16)}`:o};class r{constructor(s){this.communicator=s,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,n.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,n.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,n.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,n.blockNumberToHex,n.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,n.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[n.blockNumberToHex,n.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionCount,formatters:[null,n.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=i=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([i]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(s){const{call:i,formatters:c}=s;return async u=>
1{c&&Array.isArray(u)&&c.forEach((f,_)=>{f&&(u[_]=f(u[_]))});const d={call:i,params:u||[]};return(await this.communicator.send(t.Methods.rpcCall,d)).data}}}return Qn.Eth=r,Qn}var Ut={},sf={},af={},ti={},ri={},il;function e6(){return il||(il=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.version=void 0,ri.version="1.1.0"),ri}var ol;function xn(){if(ol)return ti;ol=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.BaseError=void 0;const e=e6();class t extends Error{constructor(r,o={}){var u;const s=o.cause instanceof t?o.cause.details:(u=o.cause)!=null&&u.message?o.cause.message:o.details,i=o.cause instanceof t&&o.cause.docsPath||o.docsPath,c=[r||"An error occurred.","",...o.metaMessages?[...o.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(` 2`);super(c),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"}),o.cause&&(this.cause=o.cause),this.details=s,this.docsPath=i,this.metaMessages=o.metaMessages,this.shortMessage=r}}return ti.BaseError=t,ti}var Bo={},sl;function t6(){if(sl)return Bo;sl=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.narrow=e;function e(t){return t}return Bo}var xo={},Ro={},Oo={},Co={},Ht={},al;function Yu(){if(al)return Ht;al=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.isTupleRegex=Ht.integerRegex=Ht.bytesRegex=void 0,Ht.execTyped=e;function e(t,n){const r=t.exec(n);return r==null?void 0:r.groups}return Ht.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ht.integerRegex=/^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)?$/,Ht.isTupleRegex=/^\(.+?\).*?$/,Ht}var cl;function d_(){if(cl)return Co;cl=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.formatAbiParameter=n;const e=Yu(),t=/^tuple(?<array>(\[(\d*)\])*)$/;function n(r){let o=r.type;if(t.test(r.type)&&"components"in r){o="(";const s=r.components.length;for(let c=0;c<s;c++){const u=r.components[c];o+=n(u),c<s-1&&(o+=", ")}const i=(0,e.execTyped)(t,r.type);return o+=`)${(i==null?void 0:i.array)??""}`,n({...r,type:o})}return"indexed"in r&&r.indexed&&(o=`${o} indexed`),r.name?`${o} ${r.name}`:o}return Co}var ul;function f_(){if(ul)return Oo;ul=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.formatAbiParameters=t;const e=d_();function t(n){let r="";const o=n.length;for(let s=0;s<o;s++){const i=n[s];r+=(0,e.formatAbiParameter)(i),s!==o-1&&(r+=", ")}return r}return Oo}var dl;function l_(){if(dl)return Ro;dl=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.formatAbiItem=t;const e=f_();function t(n){var r;return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${(r=n.outputs)!=null&&r.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return Ro}var fl;function r6(){if(fl)return xo;fl=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.formatAbi=t;const e=l_();function t(n){const r=[],o=n.length;for(let s=0;s<o;s++){const i=n[s],c=(0,e.formatAbiItem)(i);r.push(c)}return r}return xo}var qo={},$e={},ll;function Rn(){if(ll)return $e;ll=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.functionModifiers=$e.eventModifiers=$e.modifiers=void 0,$e.isErrorSignature=n,$e.execErrorSignature=r,$e.isEventSignature=s,$e.execEventSignature=i,$e.isFunctionSignature=u,$e.execFunctionSignature=d,$e.isStructSignature=f,$e.execStructSignature=_,$e.isConstructorSignature=w,$e.execConstructorSignature=p,$e.isFallbackSignature=j,$e.execFallbackSignature=h,$e.isReceiveSignature=a;const e=Yu(),t=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(v){return t.test(v)}function r(v){return(0,e.execTyped)(t,v)}const o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(v){return o.test(v)}function i(v){return(0,e.execTyped)(o,v)}const c=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function u(v){return c.test(v)}function d(v){return(0,e.execTyped)(c,v)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(v){return l.test(v)}function _(v){return(0,e.execTyped)(l,v)}const T=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function w(v){return T.test(v)}function p(v){return(0,e.execTyped)(T,v)}const B=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function j(v){return B.test(v)}function h(v){return(0,e.execTyped)(B,v)}const P=/^receive\(\) external payable$/;function a(v){return P.test(v)}return $e.modifiers=new Set(["memory","indexed","storage","calldata"]),$e.eventModifiers=new Set(["indexed"]),$e.functionModifiers=new Set(["calldata","memory","storage"]),$e}var Mo={},zt={},bl;function Ju(){if(bl)return zt;
2bl=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.UnknownSolidityTypeError=zt.UnknownTypeError=zt.InvalidAbiItemError=void 0;const e=xn();class t extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}zt.InvalidAbiItemError=t;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" 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"})}}zt.UnknownTypeError=n;class r extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return zt.UnknownSolidityTypeError=r,zt}var Ke={},ml;function Xi(){if(ml)return Ke;ml=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.InvalidAbiTypeParameterError=Ke.InvalidFunctionModifierError=Ke.InvalidModifierError=Ke.SolidityProtectedKeywordError=Ke.InvalidParameterError=Ke.InvalidAbiParametersError=Ke.InvalidAbiParameterError=void 0;const e=xn();class t extends e.BaseError{constructor({param:d}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}Ke.InvalidAbiParameterError=t;class n extends e.BaseError{constructor({params:d}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}Ke.InvalidAbiParametersError=n;class r extends e.BaseError{constructor({param:d}){super("Invalid ABI parameter.",{details:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}Ke.InvalidParameterError=r;class o extends e.BaseError{constructor({param:d,name:l}){super("Invalid ABI parameter.",{details:d,metaMessages:[`"${l}" 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"})}}Ke.SolidityProtectedKeywordError=o;class s extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}Ke.InvalidModifierError=s;class i extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${f}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}Ke.InvalidFunctionModifierError=i;class c extends e.BaseError{constructor({abiParameter:d}){super("Invalid ABI parameter.",{details:JSON.stringify(d,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return Ke.InvalidAbiTypeParameterError=c,Ke}var Dt={},hl;function Ff(){if(hl)return Dt;hl=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.InvalidStructSignatureError=Dt.UnknownSignatureError=Dt.InvalidSignatureError=void 0;const e=xn();class t extends e.BaseError{constructor({signature:s,type:i}){super(`Invalid ${i} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}Dt.InvalidSignatureError=t;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}Dt.UnknownSignatureError=n;class r extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return Dt.InvalidStructSignatureError=r,Dt}var ni={},yl;function b_(){if(yl)return ni;yl=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.CircularReferenceError=void 0;const e=xn();class t extends e.BaseError{constructor({type:r}){super("Circular reference detected.",{metaMessages:[`Struct "${r}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return ni.CircularReferenceError=t,ni}var ct={},ii={},gl;function m_(){if(gl)return ii;gl=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.InvalidParenthesisError=void 0;const e=xn();class t extends e.BaseError{constructor({current:r,depth:o}){super("Unbalanced parentheses.",{metaMessages:[`"${r.trim()}" has too many ${o>0?"opening":"closing"} parentheses.`],details:`Depth "${o}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return ii.InvalidParenthesisError=t,ii}var cn={},pl;function n6(){if(pl)return cn;pl=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.parameterCache=void 0,cn.getParameterCacheKey=e;function e(t,n,r){let o="";if(r)for(const s of Object.entries(r)){if(!s)continue;let i="";for(const c of s[1])i+=`[${c.type}${c.name?`:${c.name}`:""}]`;o+=`(${s[0]}{${i}})`}return n?`${n}:${t}${o}`:t}return cn.parameterCache=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}]]),cn}var _l;function Tn(){if(_l)return ct;
2_l=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.parseSignature=c,ct.parseFunctionSignature=u,ct.parseEventSignature=d,ct.parseErrorSignature=l,ct.parseConstructorSignature=f,ct.parseFallbackSignature=_,ct.parseAbiParameter=B,ct.splitParameters=j,ct.isSolidityType=h,ct.isSolidityKeyword=a,ct.isValidDataLocation=v;const e=Yu(),t=Ju(),n=Xi(),r=Ff(),o=m_(),s=n6(),i=Rn();function c(b,m={}){if((0,i.isFunctionSignature)(b))return u(b,m);if((0,i.isEventSignature)(b))return d(b,m);if((0,i.isErrorSignature)(b))return l(b,m);if((0,i.isConstructorSignature)(b))return f(b,m);if((0,i.isFallbackSignature)(b))return _(b);if((0,i.isReceiveSignature)(b))return{type:"receive",stateMutability:"payable"};throw new r.UnknownSignatureError({signature:b})}function u(b,m={}){const A=(0,i.execFunctionSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"function"});const y=j(A.parameters),E=[],x=y.length;for(let R=0;R<x;R++)E.push(B(y[R],{modifiers:i.functionModifiers,structs:m,type:"function"}));const O=[];if(A.returns){const R=j(A.returns),k=R.length;for(let N=0;N<k;N++)O.push(B(R[N],{modifiers:i.functionModifiers,structs:m,type:"function"}))}return{name:A.name,type:"function",stateMutability:A.stateMutability??"nonpayable",inputs:E,outputs:O}}function d(b,m={}){const A=(0,i.execEventSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"event"});const y=j(A.parameters),E=[],x=y.length;for(let O=0;O<x;O++)E.push(B(y[O],{modifiers:i.eventModifiers,structs:m,type:"event"}));return{name:A.name,type:"event",inputs:E}}function l(b,m={}){const A=(0,i.execErrorSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"error"});const y=j(A.parameters),E=[],x=y.length;for(let O=0;O<x;O++)E.push(B(y[O],{structs:m,type:"error"}));return{name:A.name,type:"error",inputs:E}}function f(b,m={}){const A=(0,i.execConstructorSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"constructor"});const y=j(A.parameters),E=[],x=y.length;for(let O=0;O<x;O++)E.push(B(y[O],{structs:m,type:"constructor"}));return{type:"constructor",stateMutability:A.stateMutability??"nonpayable",inputs:E}}function _(b){const m=(0,i.execFallbackSignature)(b);if(!m)throw new r.InvalidSignatureError({signature:b,type:"fallback"});return{type:"fallback",stateMutability:m.stateMutability??"nonpayable"}}const T=/^(?<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$_]*))?$/,w=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,p=/^u?int$/;function B(b,m){var g,M;const A=(0,s.getParameterCacheKey)(b,m==null?void 0:m.type,m==null?void 0:m.structs);if(s.parameterCache.has(A))return s.parameterCache.get(A);const y=e.isTupleRegex.test(b),E=(0,e.execTyped)(y?w:T,b);if(!E)throw new n.InvalidParameterError({param:b});if(E.name&&a(E.name))throw new n.SolidityProtectedKeywordError({param:b,name:E.name});const x=E.name?{name:E.name}:{},O=E.modifier==="indexed"?{indexed:!0}:{},R=(m==null?void 0:m.structs)??{};let k,N={};if(y){k="tuple";const S=j(E.type),I=[],C=S.length;for(let q=0;q<C;q++)I.push(B(S[q],{structs:R}));N={components:I}}else if(E.type in R)k="tuple",N={components:R[E.type]};else if(p.test(E.type))k=`${E.type}256`;else if(E.type==="address payable")k="address";else if(k=E.type,(m==null?void 0:m.type)!=="struct"&&!h(k))throw new t.UnknownSolidityTypeError({type:k});if(E.modifier){if(!((M=(g=m==null?void 0:m.modifiers)==null?void 0:g.has)!=null&&M.call(g,E.modifier)))throw new n.InvalidModifierError({param:b,type:m==null?void 0:m.type,modifier:E.modifier});if(i.functionModifiers.has(E.modifier)&&!v(k,!!E.array))throw new n.InvalidFunctionModifierError({param:b,type:m==null?void 0:m.type,modifier:E.modifier})}const H={type:`${k}${E.array??""}`,...x,...O,...N};return s.parameterCache.set(A,H),H}function j(b,m=[],A="",y=0){const E=b.trim().length;for(let x=0;x<E;x++){const O=b[x],R=b.slice(x+1);switch(O){case",":return y===0?j(R,[...m,A.trim()]):j(R,m,`${A}${O}`,y);case"(":return j(R,m,`${A}${O}`,y+1);case")":return j(R,m,`${A}${O}`,y-1);default:return j(R,m,`${A}${O}`,y)}}if(A==="")return m;if(y!==0)throw new o.InvalidParenthesisError({current:A,depth:y});return m.push(A.trim()),m}function h(b){return b==="address"||b==="bool"||b==="function"||b==="string"||e.bytesRegex.test(b)||e.integerRegex.test(b)}const P=/^(?: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)$/;function a(b){return b==="address"||b==="bool"||b==="function"||b==="string"||b==="tuple"||e.bytesRegex.test(b)||e.integerRegex.test(b)||P.test(b)}function v(b,m){return m||b==="bytes"||b==="string"||b==="tuple"}return ct}var vl;function Xu(){if(vl)return Mo;vl=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.parseStructs=c;
2const e=Yu(),t=Ju(),n=Xi(),r=Ff(),o=b_(),s=Rn(),i=Tn();function c(l){const f={},_=l.length;for(let B=0;B<_;B++){const j=l[B];if(!(0,s.isStructSignature)(j))continue;const h=(0,s.execStructSignature)(j);if(!h)throw new r.InvalidSignatureError({signature:j,type:"struct"});const P=h.properties.split(";"),a=[],v=P.length;for(let b=0;b<v;b++){const A=P[b].trim();if(!A)continue;const y=(0,i.parseAbiParameter)(A,{type:"struct"});a.push(y)}if(!a.length)throw new r.InvalidStructSignatureError({signature:j});f[h.name]=a}const T={},w=Object.entries(f),p=w.length;for(let B=0;B<p;B++){const[j,h]=w[B];T[j]=d(h,f)}return T}const u=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(l,f,_=new Set){const T=[],w=l.length;for(let p=0;p<w;p++){const B=l[p];if(e.isTupleRegex.test(B.type))T.push(B);else{const h=(0,e.execTyped)(u,B.type);if(!(h!=null&&h.type))throw new n.InvalidAbiTypeParameterError({abiParameter:B});const{array:P,type:a}=h;if(a in f){if(_.has(a))throw new o.CircularReferenceError({type:a});T.push({...B,type:`tuple${P??""}`,components:d(f[a]??[],f,new Set([..._,a]))})}else if((0,i.isSolidityType)(a))T.push(B);else throw new t.UnknownTypeError({type:a})}}return T}return Mo}var El;function i6(){if(El)return qo;El=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.parseAbi=r;
2const e=Rn(),t=Xu(),n=Tn();function r(o){const s=(0,t.parseStructs)(o),i=[],c=o.length;for(let u=0;u<c;u++){const d=o[u];(0,e.isStructSignature)(d)||i.push((0,n.parseSignature)(d,s))}return i}return qo}var Ho={},wl;function o6(){if(wl)return Ho;wl=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.parseAbiItem=o;const e=Ju(),t=Rn(),n=Xu(),r=Tn();function o(s){let i;if(typeof s=="string")i=(0,r.parseSignature)(s);else{const c=(0,n.parseStructs)(s),u=s.length;for(let d=0;d<u;d++){const l=s[d];if(!(0,t.isStructSignature)(l)){i=(0,r.parseSignature)(l,c);break}}}if(!i)throw new e.InvalidAbiItemError({signature:s});return i}return Ho}var ko={},Pl;function s6(){if(Pl)return ko;Pl=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.parseAbiParameter=o;const e=Xi(),t=Rn(),n=Xu(),r=Tn();function o(s){let i;if(typeof s=="string")i=(0,r.parseAbiParameter)(s,{modifiers:t.modifiers});else{const c=(0,n.parseStructs)(s),u=s.length;for(let d=0;d<u;d++){const l=s[d];if(!(0,t.isStructSignature)(l)){i=(0,r.parseAbiParameter)(l,{modifiers:t.modifiers,structs:c});break}}}if(!i)throw new e.InvalidAbiParameterError({param:s});return i}return ko}var $o={},jl;function a6(){if(jl)return $o;jl=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.parseAbiParameters=s;const e=Xi(),t=Rn(),n=Xu(),r=Tn(),o=Tn();function s(i){const c=[];if(typeof i=="string"){const u=(0,r.splitParameters)(i),d=u.length;for(let l=0;l<d;l++)c.push((0,o.parseAbiParameter)(u[l],{modifiers:t.modifiers}))}else{const u=(0,n.parseStructs)(i),d=i.length;for(let l=0;l<d;l++){const f=i[l];if((0,t.isStructSignature)(f))continue;const _=(0,r.splitParameters)(f),T=_.length;for(let w=0;w<T;w++)c.push((0,o.parseAbiParameter)(_[w],{modifiers:t.modifiers,structs:u}))}}if(c.length===0)throw new e.InvalidAbiParametersError({params:i});return c}return $o}var Al;function Qu(){return Al||(Al=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var t=xn();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return t.BaseError}});var n=t6();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var r=r6();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return r.formatAbi}});var o=l_();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return o.formatAbiItem}});var s=d_();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var i=f_();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return i.formatAbiParameters}});var c=i6();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return c.parseAbi}});var u=o6();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return u.parseAbiItem}});var d=s6();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var l=a6();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return l.parseAbiParameters}});var f=Ju();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return f.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return f.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return f.UnknownSolidityTypeError}});var _=Xi();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return _.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return _.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return _.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return _.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return _.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return _.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return _.InvalidAbiParameterError}});var T=Ff();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return T.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return T.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return T.UnknownSignatureError}});var w=m_();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return w.InvalidParenthesisError}});var p=b_();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return p.CircularReferenceError}})})(af)),af}var un={},No={},Sl;function ve(){if(Sl)return No;Sl=1,Object.defineProperty(No,"__esModule",{value:!0}),No.getAction=e;function e(t,n,r){const o=t[n.name];if(typeof o=="function")return o;const s=t[r];return typeof s=="function"?s:i=>n(t,i)}return No}var Fo={},Lo={},se={},oi={},Il;function nr(){if(Il)return oi;Il=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.formatAbiItem=t,oi.formatAbiParams=n;const e=Ce();function t(o,{includeName:s=!1}={}){if(o.type!=="function"&&o.type!=="event"&&o.type!=="error")throw new e.InvalidDefinitionTypeError(o.type);return`${o.name}(${n(o.inputs,{includeName:s})})`}function n(o,{includeName:s=!1}={}){return o?o.map(i=>r(i,{includeName:s})).join(s?", ":","):""}function r(o,{includeName:s}){return o.type.startsWith("tuple")?`(${n(o.components,{includeName:s})})${o.type.slice(5)}`:o.type+(s&&o.name?` ${o.name}`:"")}return oi}var Uo={},zo={},Tl;function at(){if(Tl)return zo;Tl=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.isHex=e;function e(t,{strict:n=!0}={}){return!t||typeof t!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}return zo}var Bl;function ft(){if(Bl)return Uo;Bl=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.size=t;const e=at();function t(n){return(0,e.isHex)(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}return Uo}var dn={},si={},xl;function c6(){return xl||(xl=1,Object.defineProperty(si,"__esModule",{value:!0}),si.version=void 0,si.version="2.37.9"),si}var Rl;function ue(){if(Rl)return dn;Rl=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.BaseError=void 0,dn.setErrorConfig=n;const e=c6();let t={getDocsUrl:({docsBaseUrl:s,docsPath:i="",docsSlug:c})=>i?`${s??"https://viem.sh"}${i}${c?`#${c}`:""}
2`:void 0,version:`viem@${e.version}`};function n(s){t=s}class r extends Error{constructor(i,c={}){var _;const u=(()=>{var T;return c.cause instanceof r?c.cause.details:(T=c.cause)!=null&&T.message?c.cause.message:c.details})(),d=c.cause instanceof r&&c.cause.docsPath||c.docsPath,l=(_=t.getDocsUrl)==null?void 0:_.call(t,{...c,docsPath:d}),f=[i||"An error occurred.","",...c.metaMessages?[...c.metaMessages,""]:[],...l?[`Docs: ${l}`]:[],...u?[`Details: ${u}`]:[],...t.version?[`Version: ${t.version}`]:[]].join(` 3`);super(f,c.cause?{cause:c.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=u,this.docsPath=d,this.metaMessages=c.metaMessages,this.name=c.name??this.name,this.shortMessage=i,this.version=e.version}walk(i){return o(this,i)}}dn.BaseError=r;function o(s,i){return i!=null&&i(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?o(s.cause,i):i?null:s}return dn}var Ol;function Ce(){if(Ol)return se;Ol=1,Object.defineProperty(se,"__esModule",{value:!0}),se.UnsupportedPackedAbiType=se.InvalidDefinitionTypeError=se.InvalidArrayError=se.InvalidAbiDecodingTypeError=se.InvalidAbiEncodingTypeError=se.DecodeLogTopicsMismatch=se.DecodeLogDataMismatch=se.BytesSizeMismatchError=se.AbiItemAmbiguityError=se.AbiFunctionSignatureNotFoundError=se.AbiFunctionOutputsNotFoundError=se.AbiFunctionNotFoundError=se.AbiEventNotFoundError=se.AbiEventSignatureNotFoundError=se.AbiEventSignatureEmptyTopicsError=se.AbiErrorSignatureNotFoundError=se.AbiErrorNotFoundError=se.AbiErrorInputsNotFoundError=se.AbiEncodingLengthMismatchError=se.AbiEncodingBytesSizeMismatchError=se.AbiEncodingArrayLengthMismatchError=se.AbiDecodingZeroDataError=se.AbiDecodingDataSizeTooSmallError=se.AbiDecodingDataSizeInvalidError=se.AbiConstructorParamsNotFoundError=se.AbiConstructorNotFoundError=void 0;const e=nr(),t=ft(),n=ue();class r extends n.BaseError{constructor({docsPath:k}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` 4`),{docsPath:k,name:"AbiConstructorNotFoundError"})}}se.AbiConstructorNotFoundError=r;class o extends n.BaseError{constructor({docsPath:k}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` 5`),{docsPath:k,name:"AbiConstructorParamsNotFoundError"})}}se.AbiConstructorParamsNotFoundError=o;class s extends n.BaseError{constructor({data:k,size:N}){super([`Data size of ${N}
5 bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(` 6`),{metaMessages:[`Data: ${k} (${N} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}se.AbiDecodingDataSizeInvalidError=s;class i extends n.BaseError{constructor({data:k,params:N,size:H}){super([`Data size of ${H} bytes is too small for given parameters.`].join(` 7`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(N,{includeName:!0})})`,`Data: ${k} (${H} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=k,this.params=N,this.size=H}}se.AbiDecodingDataSizeTooSmallError=i;class c extends n.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}se.AbiDecodingZeroDataError=c;class u extends n.BaseError{constructor({expectedLength:k,givenLength:N,type:H}){super([`ABI encoding array length mismatch for type ${H}.`,`Expected length: ${k}`,`Given length: ${N}`].join(` 8`),{name:"AbiEncodingArrayLengthMismatchError"})}}se.AbiEncodingArrayLengthMismatchError=u;class d extends n.BaseError{constructor({expectedSize:k,value:N}){super(`Size of bytes "${N}" (bytes${(0,t.size)(N)}) does not match expected size (bytes${k}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}se.AbiEncodingBytesSizeMismatchError=d;class l extends n.BaseError{constructor({expectedLength:k,givenLength:N}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${k}`,`Given length (values): ${N}`].join(` 9`),{name:"AbiEncodingLengthMismatchError"})}}se.AbiEncodingLengthMismatchError=l;class f extends n.BaseError{constructor(k,{docsPath:N}){super([`Arguments (\`args\`) were provided to "${k}", but "${k}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(` 10`),{docsPath:N,name:"AbiErrorInputsNotFoundError"})}}se.AbiErrorInputsNotFoundError=f;class _ extends n.BaseError{constructor(k,{docsPath:N}={}){super([`Error ${k?`"${k}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(` 11`),{docsPath:N,name:"AbiErrorNotFoundError"})}}se.AbiErrorNotFoundError=_;class T extends n.BaseError{constructor(k,{docsPath:N}){super([`Encoded error signature "${k}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${k}.`].join(` 12`),{docsPath:N,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=k}}se.AbiErrorSignatureNotFoundError=T;class w extends n.BaseError{constructor({docsPath:k}){super("Cannot extract event signature from empty topics.",{docsPath:k,name:"AbiEventSignatureEmptyTopicsError"})}}se.AbiEventSignatureEmptyTopicsError=w;class p extends n.BaseError{constructor(k,{docsPath:N}){super([`Encoded event signature "${k}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${k}.`].join(` 13`),{docsPath:N,name:"AbiEventSignatureNotFoundError"})}}se.AbiEventSignatureNotFoundError=p;class B extends n.BaseError{constructor(k,{docsPath:N}={}){super([`Event ${k?`"${k}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` 14`),{docsPath:N,name:"AbiEventNotFoundError"})}}se.AbiEventNotFoundError=B;class j extends n.BaseError{constructor(k,{docsPath:N}={}){super([`Function ${k?`"${k}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` 15`),{docsPath:N,name:"AbiFunctionNotFoundError"})}}se.AbiFunctionNotFoundError=j;class h extends n.BaseError{constructor(k,{docsPath:N}){super([`Function "${k}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` 16`),{docsPath:N,name:"AbiFunctionOutputsNotFoundError"})}}se.AbiFunctionOutputsNotFoundError=h;class P extends n.BaseError{constructor(k,{docsPath:N}){super([`Encoded function signature "${k}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${k}.`].join(` 17`),{docsPath:N,name:"AbiFunctionSignatureNotFoundError"})}}se.AbiFunctionSignatureNotFoundError=P;class a extends n.BaseError{constructor(k,N){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${k.type}\` in \`${(0,e.formatAbiItem)(k.abiItem)}\`, and`,`\`${N.type}\` in \`${(0,e.formatAbiItem)(N.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}se.AbiItemAmbiguityError=a;class v extends n.BaseError{constructor({expectedSize:k,givenSize:N}){super(`Expected bytes${k}, got bytes${N}.`,{name:"BytesSizeMismatchError"})}}se.BytesSizeMismatchError=v;class b extends n.BaseError{constructor({abiItem:k,data:N,params:H,size:g}){super([`Data size of ${g} bytes is too small for non-indexed event parameters.`].join(` 18`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(H,{includeName:!0})})`,`Data: ${N} (${g} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=k,this.data=N,this.params=H,this.size=g}}se.DecodeLogDataMismatch=b;class m extends n.BaseError{constructor({abiItem:k,param:N}){super([`Expected a topic for indexed event parameter${N.name?` "${N.name}"`:""} on event "${(0,e.formatAbiItem)(k,{includeName:!0})}".`].join(` 19`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=k}}se.DecodeLogTopicsMismatch=m;class A extends n.BaseError{constructor(k,{docsPath:N}){super([`Type "${k}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` 20`),{docsPath:N,name:"InvalidAbiEncodingType"})}}se.InvalidAbiEncodingTypeError=A;class y extends n.BaseError{constructor(k,{docsPath:N}){super([`Type "${k}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` 21`),{docsPath:N,name:"InvalidAbiDecodingType"})}}se.InvalidAbiDecodingTypeError=y;class E extends n.BaseError{constructor(k){super([`Value "${k}" is not a valid array.`].join(` 22`),{name:"InvalidArrayError"})}}se.InvalidArrayError=E;class x extends n.BaseError{constructor(k){super([`"${k}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` 23`),{name:"InvalidDefinitionTypeError"})}}se.InvalidDefinitionTypeError=x;class O extends n.BaseError{constructor(k){super(`Type "${k}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}return se.UnsupportedPackedAbiType=O,se}var ai={},Cl;function h_(){if(Cl)return ai;Cl=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.FilterTypeNotSupportedError=void 0;const e=ue();class t extends e.BaseError{constructor(r){super(`Filter type "${r}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}return ai.FilterTypeNotSupportedError=t,ai}var fr={},fn={}
23,Gt={},ql;function ed(){if(ql)return Gt;ql=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.InvalidBytesLengthError=Gt.SizeExceedsPaddingSizeError=Gt.SliceOffsetOutOfBoundsError=void 0;const e=ue();class t extends e.BaseError{constructor({offset:s,position:i,size:c}){super(`Slice ${i==="start"?"starting":"ending"} at offset "${s}" is out-of-bounds (size: ${c}).`,{name:"SliceOffsetOutOfBoundsError"})}}Gt.SliceOffsetOutOfBoundsError=t;class n extends e.BaseError{constructor({size:s,targetSize:i,type:c}){super(`${c.charAt(0).toUpperCase()}${c.slice(1).toLowerCase()} size (${s}) exceeds padding size (${i}).`,{name:"SizeExceedsPaddingSizeError"})}}Gt.SizeExceedsPaddingSizeError=n;class r extends e.BaseError{constructor({size:s,targetSize:i,type:c}){super(`${c.charAt(0).toUpperCase()}${c.slice(1).toLowerCase()} is expected to be ${i} ${c} long, but is ${s} ${c} long.`,{name:"InvalidBytesLengthError"})}}return Gt.InvalidBytesLengthError=r,Gt}var Ml;function _r(){if(Ml)return fn;Ml=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.pad=t,fn.padHex=n,fn.padBytes=r;const e=ed();function t(o,{dir:s,size:i=32}={}){return typeof o=="string"?n(o,{dir:s,size:i}):r(o,{dir:s,size:i})}function n(o,{dir:s,size:i=32}={}){if(i===null)return o;const c=o.replace("0x","");if(c.length>i*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(c.length/2),targetSize:i,type:"hex"});return`0x${c[s==="right"?"padEnd":"padStart"](i*2,"0")}`}function r(o,{dir:s,size:i=32}={}){if(i===null)return o;if(o.length>i)throw new e.SizeExceedsPaddingSizeError({size:o.length,targetSize:i,type:"bytes"});const c=new Uint8Array(i);for(let u=0;u<i;u++){const d=s==="right";c[d?u:i-u-1]=o[d?u:o.length-u-1]}return c}return fn}var Vt={},ht={},Hl;function On(){if(Hl)return ht;Hl=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.SizeOverflowError=ht.InvalidHexValueError=ht.InvalidHexBooleanError=ht.InvalidBytesBooleanError=ht.IntegerOutOfRangeError=void 0;const e=ue();class t extends e.BaseError{constructor({max:c,min:u,signed:d,size:l,value:f}){super(`Number "${f}" is not in safe ${l?`${l*8}-bit ${d?"signed":"unsigned"} `:""}integer range ${c?`(${u} to ${c})`:`(above ${u})`}`,{name:"IntegerOutOfRangeError"})}}ht.IntegerOutOfRangeError=t;class n extends e.BaseError{constructor(c){super(`Bytes value "${c}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}ht.InvalidBytesBooleanError=n;class r extends e.BaseError{constructor(c){super(`Hex value "${c}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}ht.InvalidHexBooleanError=r;class o extends e.BaseError{constructor(c){super(`Hex value "${c}" is an odd length (${c.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}ht.InvalidHexValueError=o;class s extends e.BaseError{constructor({givenSize:c,maxSize:u}){super(`Size cannot exceed ${u} bytes. Given size: ${c} bytes.`,{name:"SizeOverflowError"})}}return ht.SizeOverflowError=s,ht}var Do={},kl;function ir(){if(kl)return Do;kl=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.trim=e;function e(t,{dir:n="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,o=0;for(let s=0;s<r.length-1&&r[n==="left"?s:r.length-s-1].toString()==="0";s++)o++;return r=n==="left"?r.slice(o):r.slice(0,r.length-o),typeof t=="string"?(r.length===1&&n==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}return Do}var $l;function Fe(){if($l)return Vt;$l=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.assertSize=o,Vt.fromHex=s,Vt.hexToBigInt=i,Vt.hexToBool=c,Vt.hexToNumber=u,Vt.hexToString=d;const e=On(),t=ft(),n=ir(),r=Ae();function o(l,{size:f}){if((0,t.size)(l)>f)throw new e.SizeOverflowError({givenSize:(0,t.size)(l),maxSize:f})}function s(l,f){const _=typeof f=="string"?{to:f}:f,T=_.to;return T==="number"?u(l,_):T==="bigint"?i(l,_):T==="string"?d(l,_):T==="boolean"?c(l,_):(0,r.hexToBytes)(l,_)}function i(l,f={}){const{signed:_}=f;f.size&&o(l,{size:f.size});const T=BigInt(l);if(!_)return T;const w=(l.length-2)/2,p=(1n<<BigInt(w)*8n-1n)-1n;return T<=p?T:T-BigInt(`0x${"f".padStart(w*2,"f")}`)-1n}function c(l,f={}){let _=l;if(f.size&&(o(_,{size:f.size}),_=(0,n.trim)(_)),(0,n.trim)(_)==="0x00")return!1;if((0,n.trim)(_)==="0x01")return!0;throw new e.InvalidHexBooleanError(_)}function u(l,f={}){return Number(i(l,f))}function d(l,f={}){let _=(0,r.hexToBytes)(l);return f.size&&(o(_,{size:f.size}),_=(0,n.trim)(_,{dir:"right"})),new TextDecoder().decode(_)}return Vt}var lr={},Nl;function ie(){if(Nl)return lr;
23Nl=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.toHex=o,lr.boolToHex=s,lr.bytesToHex=i,lr.numberToHex=c,lr.stringToHex=d;const e=On(),t=_r(),n=Fe(),r=Array.from({length:256},(l,f)=>f.toString(16).padStart(2,"0"));function o(l,f={}){return typeof l=="number"||typeof l=="bigint"?c(l,f):typeof l=="string"?d(l,f):typeof l=="boolean"?s(l,f):i(l,f)}function s(l,f={}){const _=`0x${Number(l)}`;return typeof f.size=="number"?((0,n.assertSize)(_,{size:f.size}),(0,t.pad)(_,{size:f.size})):_}function i(l,f={}){let _="";for(let w=0;w<l.length;w++)_+=r[l[w]];const T=`0x${_}`;return typeof f.size=="number"?((0,n.assertSize)(T,{size:f.size}),(0,t.pad)(T,{dir:"right",size:f.size})):T}function c(l,f={}){const{signed:_,size:T}=f,w=BigInt(l);let p;T?_?p=(1n<<BigInt(T)*8n-1n)-1n:p=2n**(BigInt(T)*8n)-1n:typeof l=="number"&&(p=BigInt(Number.MAX_SAFE_INTEGER));const B=typeof p=="bigint"&&_?-p-1n:0;if(p&&w>p||w<B){const h=typeof l=="bigint"?"n":"";throw new e.IntegerOutOfRangeError({max:p?`${p}${h}`:void 0,min:`${B}${h}`,signed:_,size:T,value:`${l}${h}`})}const j=`0x${(_&&w<0?(1n<<BigInt(T*8))+BigInt(w):w).toString(16)}`;return T?(0,t.pad)(j,{size:T}):j}const u=new TextEncoder;function d(l,f={}){const _=u.encode(l);return i(_,f)}return lr}var Fl;function Ae(){if(Fl)return fr;Fl=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.toBytes=i,fr.boolToBytes=c,fr.hexToBytes=l,fr.numberToBytes=f,fr.stringToBytes=_;const e=ue(),t=at(),n=_r(),r=Fe(),o=ie(),s=new TextEncoder;function i(T,w={}){return typeof T=="number"||typeof T=="bigint"?f(T,w):typeof T=="boolean"?c(T,w):(0,t.isHex)(T)?l(T,w):_(T,w)}function c(T,w={}){const p=new Uint8Array(1);return p[0]=Number(T),typeof w.size=="number"?((0,r.assertSize)(p,{size:w.size}),(0,n.pad)(p,{size:w.size})):p}const u={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(T){if(T>=u.zero&&T<=u.nine)return T-u.zero;if(T>=u.A&&T<=u.F)return T-(u.A-10);if(T>=u.a&&T<=u.f)return T-(u.a-10)}function l(T,w={}){let p=T;w.size&&((0,r.assertSize)(p,{size:w.size}),p=(0,n.pad)(p,{dir:"right",size:w.size}));let B=p.slice(2);B.length%2&&(B=`0${B}`);const j=B.length/2,h=new Uint8Array(j);for(let P=0,a=0;P<j;P++){const v=d(B.charCodeAt(a++)),b=d(B.charCodeAt(a++));if(v===void 0||b===void 0)throw new e.BaseError(`Invalid byte sequence ("${B[a-2]}${B[a-1]}" in "${B}").`);h[P]=v*16+b}return h}function f(T,w){const p=(0,o.numberToHex)(T,w);return l(p)}function _(T,w={}){const p=s.encode(T);return typeof w.size=="number"?((0,r.assertSize)(p,{size:w.size}),(0,n.pad)(p,{dir:"right",size:w.size})):p}return fr}var Go={},Ie={},ae={},Ll;function y_(){if(Ll)return ae;Ll=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.toBig=ae.shrSL=ae.shrSH=ae.rotrSL=ae.rotrSH=ae.rotrBL=ae.rotrBH=ae.rotr32L=ae.rotr32H=ae.rotlSL=ae.rotlSH=ae.rotlBL=ae.rotlBH=ae.add5L=ae.add5H=ae.add4L=ae.add4H=ae.add3L=ae.add3H=void 0,ae.add=j,ae.fromBig=n,ae.split=r;const e=BigInt(2**32-1),t=BigInt(32);function n(y,E=!1){return E?{h:Number(y&e),l:Number(y>>t&e)}:{h:Number(y>>t&e)|0,l:Number(y&e)|0}}function r(y,E=!1){const x=y.length;let O=new Uint32Array(x),R=new Uint32Array(x);for(let k=0;k<x;k++){const{h:N,l:H}=n(y[k],E);[O[k],R[k]]=[N,H]}return[O,R]}const o=(y,E)=>BigInt(y>>>0)<<t|BigInt(E>>>0);ae.toBig=o;const s=(y,E,x)=>y>>>x;ae.shrSH=s;const i=(y,E,x)=>y<<32-x|E>>>x;ae.shrSL=i;const c=(y,E,x)=>y>>>x|E<<32-x;ae.rotrSH=c;const u=(y,E,x)=>y<<32-x|E>>>x;ae.rotrSL=u;const d=(y,E,x)=>y<<64-x|E>>>x-32;ae.rotrBH=d;const l=(y,E,x)=>y>>>x-32|E<<64-x;ae.rotrBL=l;const f=(y,E)=>E;ae.rotr32H=f;const _=(y,E)=>y;ae.rotr32L=_;const T=(y,E,x)=>y<<x|E>>>32-x;ae.rotlSH=T;const w=(y,E,x)=>E<<x|y>>>32-x;ae.rotlSL=w;const p=(y,E,x)=>E<<x-32|y>>>64-x;ae.rotlBH=p;const B=(y,E,x)=>y<<x-32|E>>>64-x;ae.rotlBL=B;function j(y,E,x,O){const R=(E>>>0)+(O>>>0);return{h:y+x+(R/2**32|0)|0,l:R|0}}const h=(y,E,x)=>(y>>>0)+(E>>>0)+(x>>>0);ae.add3L=h;const P=(y,E,x,O)=>E+x+O+(y/2**32|0)|0;ae.add3H=P;const a=(y,E,x,O)=>(y>>>0)+(E>>>0)+(x>>>0)+(O>>>0);ae.add4L=a;const v=(y,E,x,O,R)=>E+x+O+R+(y/2**32|0)|0;ae.add4H=v;const b=(y,E,x,O,R)=>(y>>>0)+(E>>>0)+(x>>>0)+(O>>>0)+(R>>>0);ae.add5L=b;
23const m=(y,E,x,O,R,k)=>E+x+O+R+k+(y/2**32|0)|0;ae.add5H=m;const A={fromBig:n,split:r,toBig:o,shrSH:s,shrSL:i,rotrSH:c,rotrSL:u,rotrBH:d,rotrBL:l,rotr32H:f,rotr32L:_,rotlSH:T,rotlSL:w,rotlBH:p,rotlBL:B,add:j,add3L:h,add3H:P,add4L:a,add4H:v,add5H:m,add5L:b};return ae.default=A,ae}var cf={},ci={},Ul;function u6(){return Ul||(Ul=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.crypto=void 0,ci.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),ci}var zl;function vr(){return zl||(zl=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=r,e.abytes=o,e.ahash=s,e.aexists=i,e.aoutput=c,e.u8=u,e.u32=d,e.clean=l,e.createView=f,e.rotr=_,e.rotl=T,e.byteSwap=w,e.byteSwap32=p,e.bytesToHex=h,e.hexToBytes=v,e.asyncLoop=m,e.utf8ToBytes=A,e.bytesToUtf8=y,e.toBytes=E,e.kdfInputToBytes=x,e.concatBytes=O,e.checkOpts=R,e.createHasher=N,e.createOptHasher=H,e.createXOFer=g,e.randomBytes=M;const t=u6();function n(S){return S instanceof Uint8Array||ArrayBuffer.isView(S)&&S.constructor.name==="Uint8Array"}function r(S){if(!Number.isSafeInteger(S)||S<0)throw new Error("positive integer expected, got "+S)}function o(S,...I){if(!n(S))throw new Error("Uint8Array expected");if(I.length>0&&!I.includes(S.length))throw new Error("Uint8Array expected of length "+I+", got length="+S.length)}function s(S){if(typeof S!="function"||typeof S.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");r(S.outputLen),r(S.blockLen)}function i(S,I=!0){if(S.destroyed)throw new Error("Hash instance has been destroyed");if(I&&S.finished)throw new Error("Hash#digest() has already been called")}function c(S,I){o(S);const C=I.outputLen;if(S.length<C)throw new Error("digestInto() expects output buffer of length at least "+C)}function u(S){return new Uint8Array(S.buffer,S.byteOffset,S.byteLength)}function d(S){return new Uint32Array(S.buffer,S.byteOffset,Math.floor(S.byteLength/4))}function l(...S){for(let I=0;I<S.length;I++)S[I].fill(0)}function f(S){return new DataView(S.buffer,S.byteOffset,S.byteLength)}function _(S,I){return S<<32-I|S>>>I}function T(S,I){return S<<I|S>>>32-I>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function w(S){return S<<24&4278190080|S<<8&16711680|S>>>8&65280|S>>>24&255}e.swap8IfBE=e.isLE?S=>S:S=>w(S),e.byteSwapIfBE=e.swap8IfBE;function p(S){for(let I=0;I<S.length;I++)S[I]=w(S[I]);return S}e.swap32IfBE=e.isLE?S=>S:p;const B=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",j=Array.from({length:256},(S,I)=>I.toString(16).padStart(2,"0"));function h(S){if(o(S),B)return S.toHex();let I="";for(let C=0;C<S.length;C++)I+=j[S[C]];return I}const P={_0:48,_9:57,A:65,F:70,a:97,f:102};function a(S){if(S>=P._0&&S<=P._9)return S-P._0;if(S>=P.A&&S<=P.F)return S-(P.A-10);if(S>=P.a&&S<=P.f)return S-(P.a-10)}function v(S){if(typeof S!="string")throw new Error("hex string expected, got "+typeof S);if(B)return Uint8Array.fromHex(S);const I=S.length,C=I/2;if(I%2)throw new Error("hex string expected, got unpadded hex of length "+I);const q=new Uint8Array(C);for(let $=0,L=0;$<C;$++,L+=2){const F=a(S.charCodeAt(L)),U=a(S.charCodeAt(L+1));if(F===void 0||U===void 0){const z=S[L]+S[L+1];throw new Error('hex string expected, got non-hex character "'+z+'" at index '+L)}q[$]=F*16+U}return q}const b=async()=>{};e.nextTick=b;async function m(S,I,C){let q=Date.now();for(let $=0;$<S;$++){C($);const L=Date.now()-q;L>=0&&L<I||(await(0,e.nextTick)(),q+=L)}}function A(S){if(typeof S!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(S))}function y(S){return new TextDecoder().decode(S)}function E(S){return typeof S=="string"&&(S=A(S)),o(S),S}function x(S){return typeof S=="string"&&(S=A(S)),o(S),S}function O(...S){let I=0;for(let q=0;q<S.length;q++){const $=S[q];o($),I+=$.length}const C=new Uint8Array(I);for(let q=0,$=0;q<S.length;q++){const L=S[q];C.set(L,$),$+=L.length}return C}function R(S,I){if(I!==void 0&&{}.toString.call(I)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(S,I)}class k{}e.Hash=k;function N(S){const I=q=>S().update(E(q)).digest(),C=S();return I.outputLen=C.outputLen,I.blockLen=C.blockLen,I.create=()=>S(),I}function H(S){const I=(q,$)=>S($).update(E(q)).digest(),C=S({});return I.outputLen=C.outputLen,I.blockLen=C.blockLen,I.create=q=>S(q),I}function g(S){const I=(q,$)=>S($).update(E(q)).digest(),C=S({});return I.outputLen=C.outputLen,I.blockLen=C.blockLen,I.create=q=>S(q),I}e.wrapConstructor=N,e.wrapConstructorWithOpts=H,e.wrapXOFConstructorWithOpts=g;function M(S=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(S));if(t.crypto&&typeof t.crypto.randomBytes=="function")return Uint8Array.from(t.crypto.randomBytes(S));throw new Error("crypto.getRandomValues must be defined")}})(cf)),cf}var Dl;function d6(){if(Dl)return Ie;
23Dl=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.shake256=Ie.shake128=Ie.keccak_512=Ie.keccak_384=Ie.keccak_256=Ie.keccak_224=Ie.sha3_512=Ie.sha3_384=Ie.sha3_256=Ie.sha3_224=Ie.Keccak=void 0,Ie.keccakP=B;const e=y_(),t=vr(),n=BigInt(0),r=BigInt(1),o=BigInt(2),s=BigInt(7),i=BigInt(256),c=BigInt(113),u=[],d=[],l=[];for(let a=0,v=r,b=1,m=0;a<24;a++){[b,m]=[m,(2*b+3*m)%5],u.push(2*(5*m+b)),d.push((a+1)*(a+2)/2%64);let A=n;for(let y=0;y<7;y++)v=(v<<r^(v>>s)*c)%i,v&o&&(A^=r<<(r<<BigInt(y))-r);l.push(A)}const f=(0,e.split)(l,!0),_=f[0],T=f[1],w=(a,v,b)=>b>32?(0,e.rotlBH)(a,v,b):(0,e.rotlSH)(a,v,b),p=(a,v,b)=>b>32?(0,e.rotlBL)(a,v,b):(0,e.rotlSL)(a,v,b);function B(a,v=24){const b=new Uint32Array(10);for(let m=24-v;m<24;m++){for(let E=0;E<10;E++)b[E]=a[E]^a[E+10]^a[E+20]^a[E+30]^a[E+40];for(let E=0;E<10;E+=2){const x=(E+8)%10,O=(E+2)%10,R=b[O],k=b[O+1],N=w(R,k,1)^b[x],H=p(R,k,1)^b[x+1];for(let g=0;g<50;g+=10)a[E+g]^=N,a[E+g+1]^=H}let A=a[2],y=a[3];for(let E=0;E<24;E++){const x=d[E],O=w(A,y,x),R=p(A,y,x),k=u[E];A=a[k],y=a[k+1],a[k]=O,a[k+1]=R}for(let E=0;E<50;E+=10){for(let x=0;x<10;x++)b[x]=a[E+x];for(let x=0;x<10;x++)a[E+x]^=~b[(x+2)%10]&b[(x+4)%10]}a[0]^=_[m],a[1]^=T[m]}(0,t.clean)(b)}class j extends t.Hash{constructor(v,b,m,A=!1,y=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=v,this.suffix=b,this.outputLen=m,this.enableXOF=A,this.rounds=y,(0,t.anumber)(m),!(0<v&&v<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,t.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,t.swap32IfBE)(this.state32),B(this.state32,this.rounds),(0,t.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(v){(0,t.aexists)(this),v=(0,t.toBytes)(v),(0,t.abytes)(v);const{blockLen:b,state:m}=this,A=v.length;for(let y=0;y<A;){const E=Math.min(b-this.pos,A-y);for(let x=0;x<E;x++)m[this.pos++]^=v[y++];this.pos===b&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:v,suffix:b,pos:m,blockLen:A}=this;v[m]^=b,(b&128)!==0&&m===A-1&&this.keccak(),v[A-1]^=128,this.keccak()}writeInto(v){(0,t.aexists)(this,!1),(0,t.abytes)(v),this.finish();const b=this.state,{blockLen:m}=this;for(let A=0,y=v.length;A<y;){this.posOut>=m&&this.keccak();const E=Math.min(m-this.posOut,y-A);v.set(b.subarray(this.posOut,this.posOut+E),A),this.posOut+=E,A+=E}return v}xofInto(v){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(v)}xof(v){return(0,t.anumber)(v),this.xofInto(new Uint8Array(v))}digestInto(v){if((0,t.aoutput)(v,this),this.finished)throw new Error("digest() was already called");return this.writeInto(v),this.destroy(),v}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,t.clean)(this.state)}_cloneInto(v){const{blockLen:b,suffix:m,outputLen:A,rounds:y,enableXOF:E}=this;return v||(v=new j(b,m,A,E,y)),v.state32.set(this.state32),v.pos=this.pos,v.posOut=this.posOut,v.finished=this.finished,v.rounds=y,v.suffix=m,v.outputLen=A,v.enableXOF=E,v.destroyed=this.destroyed,v}}Ie.Keccak=j;const h=(a,v,b)=>(0,t.createHasher)(()=>new j(v,a,b));Ie.sha3_224=h(6,144,224/8),Ie.sha3_256=h(6,136,256/8),Ie.sha3_384=h(6,104,384/8),Ie.sha3_512=h(6,72,512/8),Ie.keccak_224=h(1,144,224/8),Ie.keccak_256=h(1,136,256/8),Ie.keccak_384=h(1,104,384/8),Ie.keccak_512=h(1,72,512/8);const P=(a,v,b)=>(0,t.createXOFer)((m={})=>new j(v,a,m.dkLen===void 0?b:m.dkLen,!0));return Ie.shake128=P(31,168,128/8),Ie.shake256=P(31,136,256/8),Ie}var Gl;function lt(){if(Gl)return Go;Gl=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.keccak256=o;const e=d6(),t=at(),n=Ae(),r=ie();function o(s,i){const c=i||"hex",u=(0,e.keccak_256)((0,t.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return c==="bytes"?u:(0,r.toHex)(u)}return Go}var ui={},Vo={},Wo={},Vl;function f6(){if(Vl)return Wo;Vl=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.hashSignature=r;const e=Ae(),t=lt(),n=o=>(0,t.keccak256)((0,e.toBytes)(o));function r(o){return n(o)}return Wo}var di={},Ko={},Wl;
23function l6(){if(Wl)return Ko;Wl=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.normalizeSignature=t;const e=ue();function t(n){let r=!0,o="",s=0,i="",c=!1;for(let u=0;u<n.length;u++){const d=n[u];if(["(",")",","].includes(d)&&(r=!0),d==="("&&s++,d===")"&&s--,!!r){if(s===0){if(d===" "&&["event","function",""].includes(i))i="";else if(i+=d,d===")"){c=!0;break}continue}if(d===" "){n[u-1]!==","&&o!==","&&o!==",("&&(o="",r=!1);continue}i+=d,o+=d}}if(!c)throw new e.BaseError("Unable to normalize signature.");return i}return Ko}var Kl;function Lf(){if(Kl)return di;Kl=1,Object.defineProperty(di,"__esModule",{value:!0}),di.toSignature=void 0;const e=Qu(),t=l6(),n=r=>{const o=typeof r=="string"?r:(0,e.formatAbiItem)(r);return(0,t.normalizeSignature)(o)};return di.toSignature=n,di}var Zl;function td(){if(Zl)return Vo;Zl=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.toSignatureHash=n;const e=f6(),t=Lf();function n(r){return(0,e.hashSignature)((0,t.toSignature)(r))}return Vo}var Yl;function Cn(){if(Yl)return ui;Yl=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.toEventSelector=void 0;const e=td();return ui.toEventSelector=e.toSignatureHash,ui}var fi={},li={},Jl;function Ot(){if(Jl)return li;Jl=1,Object.defineProperty(li,"__esModule",{value:!0}),li.InvalidAddressError=void 0;const e=ue();class t extends e.BaseError{constructor({address:r}){super(`Address "${r}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}return li.InvalidAddressError=t,li}var uf={},bi={},Xl;function Qi(){if(Xl)return bi;Xl=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const r=super.get(n);return super.has(n)&&r!==void 0&&(this.delete(n),super.set(n,r)),r}set(n,r){if(super.set(n,r),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}return bi.LruMap=e,bi}var mi={},Ql;function Et(){if(Ql)return mi;Ql=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.checksumAddress=i,mi.getAddress=c;const e=Ot(),t=Ae(),n=lt(),r=Qi(),o=bt(),s=new r.LruMap(8192);function i(u,d){if(s.has(`${u}.${d}`))return s.get(`${u}.${d}`);const l=d?`${d}${u.toLowerCase()}`:u.substring(2).toLowerCase(),f=(0,n.keccak256)((0,t.stringToBytes)(l),"bytes"),_=(d?l.substring(`${d}0x`.length):l).split("");for(let w=0;w<40;w+=2)f[w>>1]>>4>=8&&_[w]&&(_[w]=_[w].toUpperCase()),(f[w>>1]&15)>=8&&_[w+1]&&(_[w+1]=_[w+1].toUpperCase());const T=`0x${_.join("")}`;return s.set(`${u}.${d}`,T),T}function c(u,d){if(!(0,o.isAddress)(u,{strict:!1}))throw new e.InvalidAddressError({address:u});return i(u,d)}return mi}var e1;function bt(){return e1||(e1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAddressCache=void 0,e.isAddress=o;const t=Qi(),n=Et(),r=/^0x[a-fA-F0-9]{40}$/;e.isAddressCache=new t.LruMap(8192);function o(s,i){const{strict:c=!0}=i??{},u=`${s}.${c}`;if(e.isAddressCache.has(u))return e.isAddressCache.get(u);const d=r.test(s)?s.toLowerCase()===s?!0:c?(0,n.checksumAddress)(s)===s:!0:!1;return e.isAddressCache.set(u,d),d}})(uf)),uf}var ln={},t1;function We(){if(t1)return ln;t1=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.concat=e,ln.concatBytes=t,ln.concatHex=n;function e(r){return typeof r[0]=="string"?n(r):t(r)}function t(r){let o=0;for(const c of r)o+=c.length;const s=new Uint8Array(o);let i=0;for(const c of r)s.set(c,i),i+=c.length;return s}function n(r){return`0x${r.reduce((o,s)=>o+s.replace("0x",""),"")}`}return ln}var bn={},r1;function At(){if(r1)return bn;r1=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.slice=r,bn.sliceBytes=i,bn.sliceHex=c;const e=ed(),t=at(),n=ft();function r(u,d,l,{strict:f}={}){return(0,t.isHex)(u,{strict:!1})?c(u,d,l,{strict:f}):i(u,d,l,{strict:f})}function o(u,d){if(typeof d=="number"&&d>0&&d>(0,n.size)(u)-1)throw new e.SliceOffsetOutOfBoundsError({offset:d,position:"start",size:(0,n.size)(u)})}function s(u,d,l){if(typeof d=="number"&&typeof l=="number"&&(0,n.size)(u)!==l-d)throw new e.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:(0,n.size)(u)})}
23function i(u,d,l,{strict:f}={}){o(u,d);const _=u.slice(d,l);return f&&s(_,d,l),_}function c(u,d,l,{strict:f}={}){o(u,d);const _=`0x${u.replace("0x","").slice((d??0)*2,(l??u.length)*2)}`;return f&&s(_,d,l),_}return bn}var Wt={},n1;function rd(){return n1||(n1=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.integerRegex=Wt.bytesRegex=Wt.arrayRegex=void 0,Wt.arrayRegex=/^(.*)\[([0-9]*)\]$/,Wt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Wt.integerRegex=/^(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)?$/),Wt}var i1;function Ct(){if(i1)return fi;i1=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.encodeAbiParameters=f,fi.getArrayComponents=b;const e=Ce(),t=Ot(),n=ue(),r=On(),o=bt(),s=We(),i=_r(),c=ft(),u=At(),d=ie(),l=rd();function f(m,A){if(m.length!==A.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:m.length,givenLength:A.length});const y=_({params:m,values:A}),E=w(y);return E.length===0?"0x":E}function _({params:m,values:A}){const y=[];for(let E=0;E<m.length;E++)y.push(T({param:m[E],value:A[E]}));return y}function T({param:m,value:A}){const y=b(m.type);if(y){const[E,x]=y;return B(A,{length:E,param:{...m,type:x}})}if(m.type==="tuple")return v(A,{param:m});if(m.type==="address")return p(A);if(m.type==="bool")return h(A);if(m.type.startsWith("uint")||m.type.startsWith("int")){const E=m.type.startsWith("int"),[,,x="256"]=l.integerRegex.exec(m.type)??[];return P(A,{signed:E,size:Number(x)})}if(m.type.startsWith("bytes"))return j(A,{param:m});if(m.type==="string")return a(A);throw new e.InvalidAbiEncodingTypeError(m.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function w(m){let A=0;for(let O=0;O<m.length;O++){const{dynamic:R,encoded:k}=m[O];R?A+=32:A+=(0,c.size)(k)}const y=[],E=[];let x=0;for(let O=0;O<m.length;O++){const{dynamic:R,encoded:k}=m[O];R?(y.push((0,d.numberToHex)(A+x,{size:32})),E.push(k),x+=(0,c.size)(k)):y.push(k)}return(0,s.concat)([...y,...E])}function p(m){if(!(0,o.isAddress)(m))throw new t.InvalidAddressError({address:m});return{dynamic:!1,encoded:(0,i.padHex)(m.toLowerCase())}}function B(m,{length:A,param:y}){const E=A===null;if(!Array.isArray(m))throw new e.InvalidArrayError(m);if(!E&&m.length!==A)throw new e.AbiEncodingArrayLengthMismatchError({expectedLength:A,givenLength:m.length,type:`${y.type}[${A}]`});let x=!1;const O=[];for(let R=0;R<m.length;R++){const k=T({param:y,value:m[R]});k.dynamic&&(x=!0),O.push(k)}if(E||x){const R=w(O);if(E){const k=(0,d.numberToHex)(O.length,{size:32});return{dynamic:!0,encoded:O.length>0?(0,s.concat)([k,R]):k}}if(x)return{dynamic:!0,encoded:R}}return{dynamic:!1,encoded:(0,s.concat)(O.map(({encoded:R})=>R))}}function j(m,{param:A}){const[,y]=A.type.split("bytes"),E=(0,c.size)(m);if(!y){let x=m;return E%32!==0&&(x=(0,i.padHex)(x,{dir:"right",size:Math.ceil((m.length-2)/2/32)*32})),{dynamic:!0,encoded:(0,s.concat)([(0,i.padHex)((0,d.numberToHex)(E,{size:32})),x])}}if(E!==Number.parseInt(y,10))throw new e.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(y,10),value:m});return{dynamic:!1,encoded:(0,i.padHex)(m,{dir:"right"})}}function h(m){if(typeof m!="boolean")throw new n.BaseError(`Invalid boolean value: "${m}" (type: ${typeof m}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,i.padHex)((0,d.boolToHex)(m))}}function P(m,{signed:A,size:y=256}){if(typeof y=="number"){const E=2n**(BigInt(y)-(A?1n:0n))-1n,x=A?-E-1n:0n;if(m>E||m<x)throw new r.IntegerOutOfRangeError({max:E.toString(),min:x.toString(),signed:A,size:y/8,value:m.toString()})}return{dynamic:!1,encoded:(0,d.numberToHex)(m,{size:32,signed:A})}}function a(m){const A=(0,d.stringToHex)(m),y=Math.ceil((0,c.size)(A)/32),E=[];for(let x=0;x<y;x++)E.push((0,i.padHex)((0,u.slice)(A,x*32,(x+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,s.concat)([(0,i.padHex)((0,d.numberToHex)((0,c.size)(A),{size:32})),...E])}}function v(m,{param:A}){let y=!1;const E=[];for(let x=0;x<A.components.length;x++){const O=A.components[x],R=Array.isArray(m)?x:O.name,k=T({param:O,value:m[R]});E.push(k),k.dynamic&&(y=!0)}return{dynamic:y,encoded:y?w(E):(0,s.concat)(E.map(({encoded:x})=>x))}}function b(m){const A=m.match(/^(.*)\[(\d+)?\]$/);return A?[A[2]?Number(A[2]):null,A[1]]:void 0}return fi}var mn={},hi={},o1;function Qr(){if(o1)return hi;o1=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.toFunctionSelector=void 0;const e=At(),t=td(),n=r=>(0,e.slice)((0,t.toSignatureHash)(r),0,4);return hi.toFunctionSelector=n,hi}var s1;function or(){if(s1)return mn;s1=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.getAbiItem=s,mn.isArgOfType=i,mn.getAmbiguousTypes=c;const e=Ce(),t=at(),n=bt(),r=Cn(),o=Qr();function s(u){const{abi:d,args:l=[],name:f}=u,_=(0,t.isHex)(f,{strict:!1}),T=d.filter(p=>_?p.type==="function"?(0,o.toFunctionSelector)(p)===f:p.type==="event"?(0,r.toEventSelector)(p)===f:!1:"name"in p&&p.name===f);if(T.length===0)return;if(T.length===1)return T[0];let w;for(const p of T){if(!("inputs"in p))continue;if(!l||l.length===0){if(!p.inputs||p.inputs.length===0)return p;continue}if(!p.inputs||p.inputs.length===0||p.inputs.length!==l.length)continue;if(l.every((j,h)=>
23{const P="inputs"in p&&p.inputs[h];return P?i(j,P):!1})){if(w&&"inputs"in w&&w.inputs){const j=c(p.inputs,w.inputs,l);if(j)throw new e.AbiItemAmbiguityError({abiItem:p,type:j[0]},{abiItem:w,type:j[1]})}w=p}}return w||T[0]}function i(u,d){const l=typeof u,f=d.type;switch(f){case"address":return(0,n.isAddress)(u,{strict:!1});case"bool":return l==="boolean";case"function":return l==="string";case"string":return l==="string";default:return f==="tuple"&&"components"in d?Object.values(d.components).every((_,T)=>i(Object.values(u)[T],_)):/^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)?$/.test(f)?l==="number"||l==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(f)?l==="string"||u instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(f)?Array.isArray(u)&&u.every(_=>i(_,{...d,type:f.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function c(u,d,l){for(const f in u){const _=u[f],T=d[f];if(_.type==="tuple"&&T.type==="tuple"&&"components"in _&&"components"in T)return c(_.components,T.components,l[f]);const w=[_.type,T.type];if(w.includes("address")&&w.includes("bytes20")?!0:w.includes("address")&&w.includes("string")?(0,n.isAddress)(l[f],{strict:!1}):w.includes("address")&&w.includes("bytes")?(0,n.isAddress)(l[f],{strict:!1}):!1)return w}}return mn}var a1;function en(){if(a1)return Lo;a1=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.encodeEventTopics=d;const e=Ce(),t=h_(),n=Ae(),r=lt(),o=Cn(),s=Ct(),i=nr(),c=or(),u="/docs/contract/encodeEventTopics";function d(f){var P;const{abi:_,eventName:T,args:w}=f;let p=_[0];if(T){const a=(0,c.getAbiItem)({abi:_,name:T});if(!a)throw new e.AbiEventNotFoundError(T,{docsPath:u});p=a}if(p.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:u});const B=(0,i.formatAbiItem)(p),j=(0,o.toEventSelector)(B);let h=[];if(w&&"inputs"in p){const a=(P=p.inputs)==null?void 0:P.filter(b=>"indexed"in b&&b.indexed),v=Array.isArray(w)?w:Object.values(w).length>0?(a==null?void 0:a.map(b=>w[b.name]))??[]:[];v.length>0&&(h=(a==null?void 0:a.map((b,m)=>Array.isArray(v[m])?v[m].map((A,y)=>l({param:b,value:v[m][y]})):typeof v[m]<"u"&&v[m]!==null?l({param:b,value:v[m]}):null))??[])}return[j,...h]}function l({param:f,value:_}){if(f.type==="string"||f.type==="bytes")return(0,r.keccak256)((0,n.toBytes)(_));if(f.type==="tuple"||f.type.match(/^(.*)\[(\d+)?\]$/))throw new t.FilterTypeNotSupportedError(f.type);return(0,s.encodeAbiParameters)([f],[_])}return Lo}var Zo={},c1;function nd(){if(c1)return Zo;c1=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.createFilterRequestScope=e;function e(t,{method:n}){var o,s;const r={};return t.transport.type==="fallback"&&((s=(o=t.transport).onResponse)==null||s.call(o,({method:i,response:c,status:u,transport:d})=>{u==="success"&&n===i&&(r[c]=d.request)})),(i=>r[i]||t.request)}return Zo}var u1;function Uf(){if(u1)return Fo;u1=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.createContractEventFilter=r;const e=en(),t=ie(),n=nd();async function r(o,s){const{address:i,abi:c,args:u,eventName:d,fromBlock:l,strict:f,toBlock:_}=s,T=(0,n.createFilterRequestScope)(o,{method:"eth_newFilter"}),w=d?(0,e.encodeEventTopics)({abi:c,args:u,eventName:d}):void 0,p=await o.request({method:"eth_newFilter",params:[{address:i,fromBlock:typeof l=="bigint"?(0,t.numberToHex)(l):l,toBlock:typeof _=="bigint"?(0,t.numberToHex)(_):_,topics:w}]});return{abi:c,args:u,eventName:d,id:p,request:T(p),strict:!!f,type:"event"}}return Fo}var Yo={},Jo={},d1;function ze(){if(d1)return Jo;d1=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.parseAccount=e;function e(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}return Jo}var Xo={},Qo={},f1;function g_(){if(f1)return Qo;f1=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.prepareEncodeFunctionData=s;const e=Ce(),t=Qr(),n=nr(),r=or(),o="/docs/contract/encodeFunctionData";function s(i){const{abi:c,args:u,functionName:d}=i;let l=c[0];if(d){const f=(0,r.getAbiItem)({abi:c,args:u,name:d});if(!f)throw new e.AbiFunctionNotFoundError(d,{docsPath:o});l=f}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:o});return{abi:[l],functionName:(0,t.toFunctionSelector)((0,n.formatAbiItem)(l))}}return Qo}var l1;
23function mt(){if(l1)return Xo;l1=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.encodeFunctionData=r;const e=We(),t=Ct(),n=g_();function r(o){const{args:s}=o,{abi:i,functionName:c}=(()=>{var f;return o.abi.length===1&&((f=o.functionName)!=null&&f.startsWith("0x"))?o:(0,n.prepareEncodeFunctionData)(o)})(),u=i[0],d=c,l="inputs"in u&&u.inputs?(0,t.encodeAbiParameters)(u.inputs,s??[]):void 0;return(0,e.concatHex)([d,l??"0x"])}return Xo}var es={},rt={},Kt={},b1;function zf(){return b1||(b1=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.solidityPanic=Kt.solidityError=Kt.panicReasons=void 0,Kt.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Kt.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Kt.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),Kt}var ts={},rs={},ns={},Zt={},m1;function p_(){if(m1)return Zt;m1=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.RecursiveReadLimitExceededError=Zt.PositionOutOfBoundsError=Zt.NegativeOffsetError=void 0;const e=ue();class t extends e.BaseError{constructor({offset:s}){super(`Offset \`${s}\` cannot be negative.`,{name:"NegativeOffsetError"})}}Zt.NegativeOffsetError=t;class n extends e.BaseError{constructor({length:s,position:i}){super(`Position \`${i}\` is out of bounds (\`0 < position < ${s}\`).`,{name:"PositionOutOfBoundsError"})}}Zt.PositionOutOfBoundsError=n;class r extends e.BaseError{constructor({count:s,limit:i}){super(`Recursive read limit of \`${i}\` exceeded (recursive read count: \`${s}\`).`,{name:"RecursiveReadLimitExceededError"})}}return Zt.RecursiveReadLimitExceededError=r,Zt}var h1;function eo(){if(h1)return ns;h1=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.createCursor=n;const e=p_(),t={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new e.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(r){if(r<0||r>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:r})},decrementPosition(r){if(r<0)throw new e.NegativeOffsetError({offset:r});const o=this.position-r;this.assertPosition(o),this.position=o},getReadCount(r){return this.positionReadCount.get(r||this.position)||0},incrementPosition(r){if(r<0)throw new e.NegativeOffsetError({offset:r});const o=this.position+r;this.assertPosition(o),this.position=o},inspectByte(r){const o=r??this.position;return this.assertPosition(o),this.bytes[o]},inspectBytes(r,o){const s=o??this.position;return this.assertPosition(s+r-1),this.bytes.subarray(s,s+r)},inspectUint8(r){const o=r??this.position;return this.assertPosition(o),this.bytes[o]},inspectUint16(r){const o=r??this.position;return this.assertPosition(o+1),this.dataView.getUint16(o)},inspectUint24(r){const o=r??this.position;return this.assertPosition(o+2),(this.dataView.getUint16(o)<<8)+this.dataView.getUint8(o+2)},inspectUint32(r){const o=r??this.position;return this.assertPosition(o+3),this.dataView.getUint32(o)},pushByte(r){this.assertPosition(this.position),this.bytes[this.position]=r,this.position++},pushBytes(r){this.assertPosition(this.position+r.length-1),this.bytes.set(r,this.position),this.position+=r.length},pushUint8(r){this.assertPosition(this.position),this.bytes[this.position]=r,this.position++},pushUint16(r){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,r),this.position+=2},pushUint24(r){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,r>>8),this.dataView.setUint8(this.position+2,r&255),this.position+=3},pushUint32(r){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,r),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const r=this.inspectByte();return this.position++,r},readBytes(r,o){this.assertReadLimit(),this._touch();const s=this.inspectBytes(r);return this.position+=o??r,s},readUint8(){this.assertReadLimit(),this._touch();const r=this.inspectUint8();return this.position+=1,r},readUint16(){this.assertReadLimit(),this._touch();const r=this.inspectUint16();return this.position+=2,r},readUint24(){this.assertReadLimit(),this._touch();const r=this.inspectUint24();return this.position+=3,r},readUint32(){this.assertReadLimit(),this._touch();const r=this.inspectUint32();return this.position+=4,r},get remaining(){return this.bytes.length-this.position},setPosition(r){const o=this.position;return this.assertPosition(r),this.position=r,()=>this.position=o},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const r=this.getReadCount();this.positionReadCount.set(this.position,r+1),r>0&&this.recursiveReadCount++}};function n(r,{recursiveReadLimit:o=8192}={}){const s=Object.create(t);return s.bytes=r,s.dataView=new DataView(r.buffer,r.byteOffset,r.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=o,s}return ns}var br={},y1;function Df(){if(y1)return br;
23y1=1,Object.defineProperty(br,"__esModule",{value:!0}),br.fromBytes=o,br.bytesToBigInt=s,br.bytesToBool=i,br.bytesToNumber=c,br.bytesToString=u;const e=On(),t=ir(),n=Fe(),r=ie();function o(d,l){const f=typeof l=="string"?{to:l}:l,_=f.to;return _==="number"?c(d,f):_==="bigint"?s(d,f):_==="boolean"?i(d,f):_==="string"?u(d,f):(0,r.bytesToHex)(d,f)}function s(d,l={}){typeof l.size<"u"&&(0,n.assertSize)(d,{size:l.size});const f=(0,r.bytesToHex)(d,l);return(0,n.hexToBigInt)(f,l)}function i(d,l={}){let f=d;if(typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,t.trim)(f)),f.length>1||f[0]>1)throw new e.InvalidBytesBooleanError(f);return!!f[0]}function c(d,l={}){typeof l.size<"u"&&(0,n.assertSize)(d,{size:l.size});const f=(0,r.bytesToHex)(d,l);return(0,n.hexToNumber)(f,l)}function u(d,l={}){let f=d;return typeof l.size<"u"&&((0,n.assertSize)(f,{size:l.size}),f=(0,t.trim)(f,{dir:"right"})),new TextDecoder().decode(f)}return br}var g1;function Er(){if(g1)return rs;g1=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.decodeAbiParameters=l;const e=Ce(),t=Et(),n=eo(),r=ft(),o=At(),s=ir(),i=Df(),c=Ae(),u=ie(),d=Ct();function l(b,m){const A=typeof m=="string"?(0,c.hexToBytes)(m):m,y=(0,n.createCursor)(A);if((0,r.size)(A)===0&&b.length>0)throw new e.AbiDecodingZeroDataError;if((0,r.size)(m)&&(0,r.size)(m)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof m=="string"?m:(0,u.bytesToHex)(m),params:b,size:(0,r.size)(m)});let E=0;const x=[];for(let O=0;O<b.length;++O){const R=b[O];y.setPosition(E);const[k,N]=f(y,R,{staticPosition:0});E+=N,x.push(k)}return x}function f(b,m,{staticPosition:A}){const y=(0,d.getArrayComponents)(m.type);if(y){const[E,x]=y;return p(b,{...m,type:x},{length:E,staticPosition:A})}if(m.type==="tuple")return P(b,m,{staticPosition:A});if(m.type==="address")return w(b);if(m.type==="bool")return B(b);if(m.type.startsWith("bytes"))return j(b,m,{staticPosition:A});if(m.type.startsWith("uint")||m.type.startsWith("int"))return h(b,m);if(m.type==="string")return a(b,{staticPosition:A});throw new e.InvalidAbiDecodingTypeError(m.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const _=32,T=32;function w(b){const m=b.readBytes(32);return[(0,t.checksumAddress)((0,u.bytesToHex)((0,o.sliceBytes)(m,-20))),32]}function p(b,m,{length:A,staticPosition:y}){if(!A){const O=(0,i.bytesToNumber)(b.readBytes(T)),R=y+O,k=R+_;b.setPosition(R);const N=(0,i.bytesToNumber)(b.readBytes(_)),H=v(m);let g=0;const M=[];for(let S=0;S<N;++S){b.setPosition(k+(H?S*32:g));const[I,C]=f(b,m,{staticPosition:k});g+=C,M.push(I)}return b.setPosition(y+32),[M,32]}if(v(m)){const O=(0,i.bytesToNumber)(b.readBytes(T)),R=y+O,k=[];for(let N=0;N<A;++N){b.setPosition(R+N*32);const[H]=f(b,m,{staticPosition:R});k.push(H)}return b.setPosition(y+32),[k,32]}let E=0;const x=[];for(let O=0;O<A;++O){const[R,k]=f(b,m,{staticPosition:y+E});E+=k,x.push(R)}return[x,E]}function B(b){return[(0,i.bytesToBool)(b.readBytes(32),{size:32}),32]}function j(b,m,{staticPosition:A}){const[y,E]=m.type.split("bytes");if(!E){const O=(0,i.bytesToNumber)(b.readBytes(32));b.setPosition(A+O);const R=(0,i.bytesToNumber)(b.readBytes(32));if(R===0)return b.setPosition(A+32),["0x",32];const k=b.readBytes(R);return b.setPosition(A+32),[(0,u.bytesToHex)(k),32]}return[(0,u.bytesToHex)(b.readBytes(Number.parseInt(E,10),32)),32]}function h(b,m){const A=m.type.startsWith("int"),y=Number.parseInt(m.type.split("int")[1]||"256",10),E=b.readBytes(32);return[y>48?(0,i.bytesToBigInt)(E,{signed:A}):(0,i.bytesToNumber)(E,{signed:A}),32]}function P(b,m,{staticPosition:A}){const y=m.components.length===0||m.components.some(({name:O})=>!O),E=y?[]:{};let x=0;if(v(m)){const O=(0,i.bytesToNumber)(b.readBytes(T)),R=A+O;for(let k=0;k<m.components.length;++k){const N=m.components[k];b.setPosition(R+x);const[H,g]=f(b,N,{staticPosition:R});x+=g,E[y?k:N==null?void 0:N.name]=H}return b.setPosition(A+32),[E,32]}for(let O=0;O<m.components.length;++O){const R=m.components[O],[k,N]=f(b,R,{staticPosition:A});E[y?O:R==null?void 0:R.name]=k,x+=N}return[E,x]}function a(b,{staticPosition:m}){const A=(0,i.bytesToNumber)(b.readBytes(32)),y=m+A;b.setPosition(y);const E=(0,i.bytesToNumber)(b.readBytes(32));if(E===0)return b.setPosition(m+32),["",32];const x=b.readBytes(E,32),O=(0,i.bytesToString)((0,s.trim)(x));return b.setPosition(m+32),[O,32]}function v(b){var y;const{type:m}=b;if(m==="string"||m==="bytes"||m.endsWith("[]"))return!0;
23if(m==="tuple")return(y=b.components)==null?void 0:y.some(v);const A=(0,d.getArrayComponents)(b.type);return!!(A&&v({...b,type:A[1]}))}return rs}var p1;function id(){if(p1)return ts;p1=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.decodeErrorResult=i;const e=zf(),t=Ce(),n=At(),r=Qr(),o=Er(),s=nr();function i(c){const{abi:u,data:d}=c,l=(0,n.slice)(d,0,4);if(l==="0x")throw new t.AbiDecodingZeroDataError;const _=[...u||[],e.solidityError,e.solidityPanic].find(T=>T.type==="error"&&l===(0,r.toFunctionSelector)((0,s.formatAbiItem)(T)));if(!_)throw new t.AbiErrorSignatureNotFoundError(l,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:_,args:"inputs"in _&&_.inputs&&_.inputs.length>0?(0,o.decodeAbiParameters)(_.inputs,(0,n.slice)(d,4)):void 0,errorName:_.name}}return ts}var is={},yi={},_1;function Ye(){if(_1)return yi;_1=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.stringify=void 0;const e=(t,n,r)=>JSON.stringify(t,(o,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof n=="function"?n(o,i):i},r);return yi.stringify=e,yi}var v1;function __(){if(v1)return is;v1=1,Object.defineProperty(is,"__esModule",{value:!0}),is.formatAbiItemWithArgs=t;const e=Ye();function t({abiItem:n,args:r,includeFunctionName:o=!0,includeName:s=!1}){if("name"in n&&"inputs"in n&&n.inputs)return`${o?n.name:""}(${n.inputs.map((i,c)=>`${s&&i.name?`${i.name}: `:""}${typeof r[c]=="object"?(0,e.stringify)(r[c]):r[c]}`).join(", ")})`}return is}var os={},Yt={},E1;function to(){return E1||(E1=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.weiUnits=Yt.gweiUnits=Yt.etherUnits=void 0,Yt.etherUnits={gwei:9,wei:18},Yt.gweiUnits={ether:-9,wei:9},Yt.weiUnits={ether:-18,gwei:-9}),Yt}var ss={},w1;function od(){if(w1)return ss;w1=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.formatUnits=e;function e(t,n){let r=t.toString();const o=r.startsWith("-");o&&(r=r.slice(1)),r=r.padStart(n,"0");let[s,i]=[r.slice(0,r.length-n),r.slice(r.length-n)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${i?`.${i}`:""}`}return ss}var P1;function ro(){if(P1)return os;P1=1,Object.defineProperty(os,"__esModule",{value:!0}),os.formatEther=n;const e=to(),t=od();function n(r,o="wei"){return(0,t.formatUnits)(r,e.etherUnits[o])}return os}var as={},j1;function tn(){if(j1)return as;j1=1,Object.defineProperty(as,"__esModule",{value:!0}),as.formatGwei=n;const e=to(),t=od();function n(r,o="wei"){return(0,t.formatUnits)(r,e.gweiUnits[o])}return as}var Jt={},A1;function Gf(){if(A1)return Jt;A1=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.StateAssignmentConflictError=Jt.AccountStateConflictError=void 0,Jt.prettyStateMapping=r,Jt.prettyStateOverride=o;const e=ue();class t extends e.BaseError{constructor({address:i}){super(`State for account "${i}" is set multiple times.`,{name:"AccountStateConflictError"})}}Jt.AccountStateConflictError=t;class n extends e.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}Jt.StateAssignmentConflictError=n;function r(s){return s.reduce((i,{slot:c,value:u})=>`${i} ${c}: ${u} 24`,"")}function o(s){return s.reduce((i,{address:c,...u})=>{let d=`${i} ${c}: 25`;return u.nonce&&(d+=` nonce: ${u.nonce} 26`),u.balance&&(d+=` balance: ${u.balance} 27`),u.code&&(d+=` code: ${u.code} 28`),u.state&&(d+=` state: 29`,d+=r(u.state)),u.stateDiff&&(d+=` stateDiff: 30`,d+=r(u.stateDiff)),d},` State Override: 31`).slice(0,-1)}return Jt}var Oe={},S1;function wt(){if(S1)return Oe;S1=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.WaitForTransactionReceiptTimeoutError=Oe.TransactionReceiptNotFoundError=Oe.TransactionNotFoundError=Oe.TransactionExecutionError=Oe.InvalidStorageKeySizeError=Oe.InvalidSerializedTransactionError=Oe.InvalidSerializedTransactionTypeError=Oe.InvalidSerializableTransactionError=Oe.InvalidLegacyVError=Oe.FeeConflictError=void 0,Oe.prettyPrint=r;
31const e=ro(),t=tn(),n=ue();function r(w){const p=Object.entries(w).map(([j,h])=>h===void 0||h===!1?null:[j,h]).filter(Boolean),B=p.reduce((j,[h])=>Math.max(j,h.length),0);return p.map(([j,h])=>` ${`${j}:`.padEnd(B+1)} ${h}`).join(` 32`)}class o extends n.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` 33`),{name:"FeeConflictError"})}}Oe.FeeConflictError=o;class s extends n.BaseError{constructor({v:p}){super(`Invalid \`v\` value "${p}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}Oe.InvalidLegacyVError=s;class i extends n.BaseError{constructor({transaction:p}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",r(p),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}Oe.InvalidSerializableTransactionError=i;class c extends n.BaseError{constructor({serializedType:p}){super(`Serialized transaction type "${p}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=p}}Oe.InvalidSerializedTransactionTypeError=c;class u extends n.BaseError{constructor({attributes:p,serializedTransaction:B,type:j}){const h=Object.entries(p).map(([P,a])=>typeof a>"u"?P:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${j}" was provided.`,{metaMessages:[`Serialized Transaction: "${B}"`,h.length>0?`Missing Attributes: ${h.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=B,this.type=j}}Oe.InvalidSerializedTransactionError=u;class d extends n.BaseError{constructor({storageKey:p}){super(`Size for storage key "${p}" is invalid. Expected 32 bytes. Got ${Math.floor((p.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}Oe.InvalidStorageKeySizeError=d;class l extends n.BaseError{constructor(p,{account:B,docsPath:j,chain:h,data:P,gas:a,gasPrice:v,maxFeePerGas:b,maxPriorityFeePerGas:m,nonce:A,to:y,value:E}){var O;const x=r({chain:h&&`${h==null?void 0:h.name} (id: ${h==null?void 0:h.id})`,from:B==null?void 0:B.address,to:y,value:typeof E<"u"&&`${(0,e.formatEther)(E)} ${((O=h==null?void 0:h.nativeCurrency)==null?void 0:O.symbol)||"ETH"}`,data:P,gas:a,gasPrice:typeof v<"u"&&`${(0,t.formatGwei)(v)} gwei`,maxFeePerGas:typeof b<"u"&&`${(0,t.formatGwei)(b)} gwei`,maxPriorityFeePerGas:typeof m<"u"&&`${(0,t.formatGwei)(m)} gwei`,nonce:A});super(p.shortMessage,{cause:p,docsPath:j,metaMessages:[...p.metaMessages?[...p.metaMessages," "]:[],"Request Arguments:",x].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=p}}Oe.TransactionExecutionError=l;class f extends n.BaseError{constructor({blockHash:p,blockNumber:B,blockTag:j,hash:h,index:P}){let a="Transaction";j&&P!==void 0&&(a=`Transaction at block time "${j}" at index "${P}"`),p&&P!==void 0&&(a=`Transaction at block hash "${p}" at index "${P}"`),B&&P!==void 0&&(a=`Transaction at block number "${B}" at index "${P}"`),h&&(a=`Transaction with hash "${h}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}}Oe.TransactionNotFoundError=f;class _ extends n.BaseError{constructor({hash:p}){super(`Transaction receipt with hash "${p}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}Oe.TransactionReceiptNotFoundError=_;class T extends n.BaseError{constructor({hash:p}){super(`Timed out while waiting for transaction with hash "${p}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}return Oe.WaitForTransactionReceiptTimeoutError=T,Oe}var kr={},I1;function Vf(){if(I1)return kr;
33I1=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.getUrl=kr.getContractAddress=void 0;const e=n=>n;kr.getContractAddress=e;const t=n=>n;return kr.getUrl=t,kr}var T1;function wr(){if(T1)return rt;T1=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.RawContractError=rt.CounterfactualDeploymentFailedError=rt.ContractFunctionZeroDataError=rt.ContractFunctionRevertedError=rt.ContractFunctionExecutionError=rt.CallExecutionError=void 0;const e=ze(),t=zf(),n=id(),r=nr(),o=__(),s=or(),i=ro(),c=tn(),u=Ce(),d=ue(),l=Gf(),f=wt(),_=Vf();class T extends d.BaseError{constructor(a,{account:v,docsPath:b,chain:m,data:A,gas:y,gasPrice:E,maxFeePerGas:x,maxPriorityFeePerGas:O,nonce:R,to:k,value:N,stateOverride:H}){var S;const g=v?(0,e.parseAccount)(v):void 0;let M=(0,f.prettyPrint)({from:g==null?void 0:g.address,to:k,value:typeof N<"u"&&`${(0,i.formatEther)(N)} ${((S=m==null?void 0:m.nativeCurrency)==null?void 0:S.symbol)||"ETH"}`,data:A,gas:y,gasPrice:typeof E<"u"&&`${(0,c.formatGwei)(E)} gwei`,maxFeePerGas:typeof x<"u"&&`${(0,c.formatGwei)(x)} gwei`,maxPriorityFeePerGas:typeof O<"u"&&`${(0,c.formatGwei)(O)} gwei`,nonce:R});H&&(M+=` 34${(0,l.prettyStateOverride)(H)}`),super(a.shortMessage,{cause:a,docsPath:b,metaMessages:[...a.metaMessages?[...a.metaMessages," "]:[],"Raw Call Arguments:",M].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=a}}rt.CallExecutionError=T;class w extends d.BaseError{constructor(a,{abi:v,args:b,contractAddress:m,docsPath:A,functionName:y,sender:E}){const x=(0,s.getAbiItem)({abi:v,args:b,name:y}),O=x?(0,o.formatAbiItemWithArgs)({abiItem:x,args:b,includeFunctionName:!1,includeName:!1}):void 0,R=x?(0,r.formatAbiItem)(x,{includeName:!0}):void 0,k=(0,f.prettyPrint)({address:m&&(0,_.getContractAddress)(m),function:R,args:O&&O!=="()"&&`${[...Array((y==null?void 0:y.length)??0).keys()].map(()=>" ").join("")}${O}`,sender:E});super(a.shortMessage||`An unknown error occurred while executing the contract function "${y}".`,{cause:a,docsPath:A,metaMessages:[...a.metaMessages?[...a.metaMessages," "]:[],k&&"Contract Call:",k].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=v,this.args=b,this.cause=a,this.contractAddress=m,this.functionName=y,this.sender=E}}rt.ContractFunctionExecutionError=w;class p extends d.BaseError{constructor({abi:a,data:v,functionName:b,message:m}){let A,y,E,x;if(v&&v!=="0x")try{y=(0,n.decodeErrorResult)({abi:a,data:v});const{abiItem:R,errorName:k,args:N}=y;if(k==="Error")x=N[0];else if(k==="Panic"){const[H]=N;x=t.panicReasons[H]}else{const H=R?(0,r.formatAbiItem)(R,{includeName:!0}):void 0,g=R&&N?(0,o.formatAbiItemWithArgs)({abiItem:R,args:N,includeFunctionName:!1,includeName:!1}):void 0;E=[H?`Error: ${H}`:"",g&&g!=="()"?` ${[...Array((k==null?void 0:k.length)??0).keys()].map(()=>" ").join("")}${g}`:""]}}catch(R){A=R}else m&&(x=m);let O;A instanceof u.AbiErrorSignatureNotFoundError&&(O=A.signature,E=[`Unable to decode signature "${O}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${O}.`]),super(x&&x!=="execution reverted"||O?[`The contract function "${b}" reverted with the following ${O?"signature":"reason"}:`,x||O].join(` 35`):`The contract function "${b}" reverted.`,{cause:A,metaMessages:E,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=y,this.raw=v,this.reason=x,this.signature=O}}rt.ContractFunctionRevertedError=p;class B extends d.BaseError{constructor({functionName:a}){super(`The contract function "${a}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${a}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}rt.ContractFunctionZeroDataError=B;
35class j extends d.BaseError{constructor({factory:a}){super(`Deployment for counterfactual contract call failed${a?` for factory "${a}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}rt.CounterfactualDeploymentFailedError=j;class h extends d.BaseError{constructor({data:a,message:v}){super(v||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=a}}return rt.RawContractError=h,rt}var yt={},B1;function qt(){if(B1)return yt;B1=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.TimeoutError=yt.SocketClosedError=yt.RpcRequestError=yt.WebSocketRequestError=yt.HttpRequestError=void 0;const e=Ye(),t=ue(),n=Vf();class r extends t.BaseError{constructor({body:d,cause:l,details:f,headers:_,status:T,url:w}){super("HTTP request failed.",{cause:l,details:f,metaMessages:[T&&`Status: ${T}`,`URL: ${(0,n.getUrl)(w)}`,d&&`Request body: ${(0,e.stringify)(d)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=d,this.headers=_,this.status=T,this.url=w}}yt.HttpRequestError=r;class o extends t.BaseError{constructor({body:d,cause:l,details:f,url:_}){super("WebSocket request failed.",{cause:l,details:f,metaMessages:[`URL: ${(0,n.getUrl)(_)}`,d&&`Request body: ${(0,e.stringify)(d)}`].filter(Boolean),name:"WebSocketRequestError"})}}yt.WebSocketRequestError=o;class s extends t.BaseError{constructor({body:d,error:l,url:f}){super("RPC Request failed.",{cause:l,details:l.message,metaMessages:[`URL: ${(0,n.getUrl)(f)}`,`Request body: ${(0,e.stringify)(d)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=l.code,this.data=l.data}}yt.RpcRequestError=s;class i extends t.BaseError{constructor({url:d}={}){super("The socket has been closed.",{metaMessages:[d&&`URL: ${(0,n.getUrl)(d)}`].filter(Boolean),name:"SocketClosedError"})}}yt.SocketClosedError=i;class c extends t.BaseError{constructor({body:d,url:l}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,n.getUrl)(l)}`,`Request body: ${(0,e.stringify)(d)}`],name:"TimeoutError"})}}return yt.TimeoutError=c,yt}var oe={},x1;function Pr(){if(x1)return oe;x1=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.UnknownRpcError=oe.AtomicityNotSupportedError=oe.AtomicReadyWalletRejectedUpgradeError=oe.BundleTooLargeError=oe.UnknownBundleIdError=oe.DuplicateIdError=oe.UnsupportedChainIdError=oe.UnsupportedNonOptionalCapabilityError=oe.SwitchChainError=oe.ChainDisconnectedError=oe.ProviderDisconnectedError=oe.UnsupportedProviderMethodError=oe.UnauthorizedProviderError=oe.UserRejectedRequestError=oe.JsonRpcVersionUnsupportedError=oe.LimitExceededRpcError=oe.MethodNotSupportedRpcError=oe.TransactionRejectedRpcError=oe.ResourceUnavailableRpcError=oe.ResourceNotFoundRpcError=oe.InvalidInputRpcError=oe.InternalRpcError=oe.InvalidParamsRpcError=oe.MethodNotFoundRpcError=oe.InvalidRequestRpcError=oe.ParseRpcError=oe.ProviderRpcError=oe.RpcError=void 0;const e=ue(),t=qt(),n=-1;class r extends e.BaseError{constructor(H,{code:g,docsPath:M,metaMessages:S,name:I,shortMessage:C}){super(C,{cause:H,docsPath:M,metaMessages:S||(H==null?void 0:H.metaMessages),name:I||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}
35),this.name=I||H.name,this.code=H instanceof t.RpcRequestError?H.code:g??n}}oe.RpcError=r;class o extends r{constructor(H,g){super(H,g),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=g.data}}oe.ProviderRpcError=o;class s extends r{constructor(H){super(H,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}oe.ParseRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class i extends r{constructor(H){super(H,{code:i.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}oe.InvalidRequestRpcError=i,Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c extends r{constructor(H,{method:g}={}){super(H,{code:c.code,name:"MethodNotFoundRpcError",shortMessage:`The method${g?` "${g}"`:""} does not exist / is not available.`})}}oe.MethodNotFoundRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends r{constructor(H){super(H,{code:u.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` 36`)})}}oe.InvalidParamsRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends r{constructor(H){super(H,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}oe.InternalRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class l extends r{constructor(H){super(H,{code:l.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` 37`)})}}oe.InvalidInputRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends r{constructor(H){super(H,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}oe.ResourceNotFoundRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class _ extends r{constructor(H){super(H,{code:_.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}oe.ResourceUnavailableRpcError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class T extends r{constructor(H){super(H,{code:T.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}oe.TransactionRejectedRpcError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class w extends r{constructor(H,{method:g}={}){super(H,{code:w.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${g?` "${g}"`:""} is not supported.`})}}oe.MethodNotSupportedRpcError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class p extends r{constructor(H){super(H,{code:p.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}oe.LimitExceededRpcError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class B extends r{constructor(H){super(H,{code:B.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}oe.JsonRpcVersionUnsupportedError=B,Object.defineProperty(B,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class j extends o{constructor(H){super(H,{code:j.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}oe.UserRejectedRequestError=j,Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});
37class h extends o{constructor(H){super(H,{code:h.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}oe.UnauthorizedProviderError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class P extends o{constructor(H,{method:g}={}){super(H,{code:P.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${g?` " ${g}"`:""}.`})}}oe.UnsupportedProviderMethodError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class a extends o{constructor(H){super(H,{code:a.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}oe.ProviderDisconnectedError=a,Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class v extends o{constructor(H){super(H,{code:v.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}oe.ChainDisconnectedError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class b extends o{constructor(H){super(H,{code:b.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}oe.SwitchChainError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class m extends o{constructor(H){super(H,{code:m.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}oe.UnsupportedNonOptionalCapabilityError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class A extends o{constructor(H){super(H,{code:A.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}oe.UnsupportedChainIdError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class y extends o{constructor(H){super(H,{code:y.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}oe.DuplicateIdError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class E extends o{constructor(H){super(H,{code:E.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}oe.UnknownBundleIdError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class x extends o{constructor(H){super(H,{code:x.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}oe.BundleTooLargeError=x,Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class O extends o{constructor(H){super(H,{code:O.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}oe.AtomicReadyWalletRejectedUpgradeError=O,Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class R extends o{constructor(H){super(H,{code:R.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}oe.AtomicityNotSupportedError=R,Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class k extends r{constructor(H){super(H,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}return oe.UnknownRpcError=k,oe}var R1;function jr(){if(R1)return es;R1=1,Object.defineProperty(es,"__esModule",{value:!0}),es.getContractError=i;const e=Ce(),t=ue(),n=wr(),r=qt(),o=Pr(),s=3;function i(c,{abi:u,address:d,args:l,docsPath:f,functionName:_,sender:T}){const w=c instanceof n.RawContractError?c:c instanceof t.BaseError?c.walk(v=>"data"in v)||c.walk():{},{code:p,data:B,details:j,message:h,shortMessage:P}=w,a=c instanceof e.AbiDecodingZeroDataError?new n.ContractFunctionZeroDataError({functionName:_}):[s,o.InternalRpcError.code].includes(p)&&(B||j||h||P)?new n.ContractFunctionRevertedError({abi:u,data:typeof B=="object"?B.data:B,functionName:_,message:w instanceof r.RpcRequestError?j:P??h}):c;return new n.ContractFunctionExecutionError(a,{abi:u,args:l,contractAddress:d,docsPath:f,functionName:_,sender:T})}return es}var cs={},us={},ds={},fs={},O1;function v_(){if(O1)return fs;O1=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.publicKeyToAddress=n;const e=Et(),t=lt();function n(r){const o=(0,t.keccak256)(`0x${r.substring(4)}`).substring(26);return(0,e.checksumAddress)(`0x${o}`)}return fs}var ls={},df={},we={},et={},C1;function E_(){if(C1)return et;
37C1=1,Object.defineProperty(et,"__esModule",{value:!0}),et.SHA512_IV=et.SHA384_IV=et.SHA224_IV=et.SHA256_IV=et.HashMD=void 0,et.setBigUint64=t,et.Chi=n,et.Maj=r;const e=vr();function t(s,i,c,u){if(typeof s.setBigUint64=="function")return s.setBigUint64(i,c,u);const d=BigInt(32),l=BigInt(4294967295),f=Number(c>>d&l),_=Number(c&l),T=u?4:0,w=u?0:4;s.setUint32(i+T,f,u),s.setUint32(i+w,_,u)}function n(s,i,c){return s&i^~s&c}function r(s,i,c){return s&i^s&c^i&c}class o extends e.Hash{constructor(i,c,u,d){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=i,this.outputLen=c,this.padOffset=u,this.isLE=d,this.buffer=new Uint8Array(i),this.view=(0,e.createView)(this.buffer)}update(i){(0,e.aexists)(this),i=(0,e.toBytes)(i),(0,e.abytes)(i);const{view:c,buffer:u,blockLen:d}=this,l=i.length;for(let f=0;f<l;){const _=Math.min(d-this.pos,l-f);if(_===d){const T=(0,e.createView)(i);for(;d<=l-f;f+=d)this.process(T,f);continue}u.set(i.subarray(f,f+_),this.pos),this.pos+=_,f+=_,this.pos===d&&(this.process(c,0),this.pos=0)}return this.length+=i.length,this.roundClean(),this}digestInto(i){(0,e.aexists)(this),(0,e.aoutput)(i,this),this.finished=!0;const{buffer:c,view:u,blockLen:d,isLE:l}=this;let{pos:f}=this;c[f++]=128,(0,e.clean)(this.buffer.subarray(f)),this.padOffset>d-f&&(this.process(u,0),f=0);for(let B=f;B<d;B++)c[B]=0;t(u,d-8,BigInt(this.length*8),l),this.process(u,0);const _=(0,e.createView)(i),T=this.outputLen;if(T%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const w=T/4,p=this.get();if(w>p.length)throw new Error("_sha2: outputLen bigger than state");for(let B=0;B<w;B++)_.setUint32(4*B,p[B],l)}digest(){const{buffer:i,outputLen:c}=this;this.digestInto(i);const u=i.slice(0,c);return this.destroy(),u}_cloneInto(i){i||(i=new this.constructor),i.set(...this.get());const{blockLen:c,buffer:u,length:d,finished:l,destroyed:f,pos:_}=this;return i.destroyed=f,i.finished=l,i.length=d,i.pos=_,d%c&&i.buffer.set(u),i}clone(){return this._cloneInto()}}return et.HashMD=o,et.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),et.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),et.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),et.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),et}var q1;function w_(){if(q1)return we;q1=1,Object.defineProperty(we,"__esModule",{value:!0}),we.sha512_224=we.sha512_256=we.sha384=we.sha512=we.sha224=we.sha256=we.SHA512_256=we.SHA512_224=we.SHA384=we.SHA512=we.SHA224=we.SHA256=void 0;const e=E_(),t=y_(),n=vr(),r=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),o=new Uint32Array(64);class s extends e.HashMD{constructor(P=32){super(64,P,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:P,B:a,C:v,D:b,E:m,F:A,G:y,H:E}=this;return[P,a,v,b,m,A,y,E]}set(P,a,v,b,m,A,y,E){this.A=P|0,this.B=a|0,this.C=v|0,this.D=b|0,this.E=m|0,this.F=A|0,this.G=y|0,this.H=E|0}process(P,a){for(let R=0;R<16;R++,a+=4)o[R]=P.getUint32(a,!1);for(let R=16;R<64;R++){const k=o[R-15],N=o[R-2],H=(0,n.rotr)(k,7)^(0,n.rotr)(k,18)^k>>>3,g=(0,n.rotr)(N,17)^(0,n.rotr)(N,19)^N>>>10;o[R]=g+o[R-7]+H+o[R-16]|0}let{A:v,B:b,C:m,D:A,E:y,F:E,G:x,H:O}=this;for(let R=0;R<64;R++){const k=(0,n.rotr)(y,6)^(0,n.rotr)(y,11)^(0,n.rotr)(y,25),N=O+k+(0,e.Chi)(y,E,x)+r[R]+o[R]|0,g=((0,n.rotr)(v,2)^(0,n.rotr)(v,13)^(0,n.rotr)(v,22))+(0,e.Maj)(v,b,m)|0;O=x,x=E,E=y,y=A+N|0,A=m,m=b,b=v,v=N+g|0}v=v+this.A|0,b=b+this.B|0,m=m+this.C|0,A=A+this.D|0,y=y+this.E|0,E=E+this.F|0,x=x+this.G|0,O=O+this.H|0,this.set(v,b,m,A,y,E,x,O)}roundClean(){(0,n.clean)(o)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.clean)(this.buffer)}}we.SHA256=s;class i extends s{constructor(){super(28),this.A=e.SHA224_IV[0]|0,this.B=e.SHA224_IV[1]|0,this.C=e.SHA224_IV[2]|0,this.D=e.SHA224_IV[3]|0,this.E=e.SHA224_IV[4]|0,this.F=e.SHA224_IV[5]|0,this.G=e.SHA224_IV[6]|0,this.H=e.SHA224_IV[7]|0}}we.SHA224=i;const c=t.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b89
376f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(h=>BigInt(h))),u=c[0],d=c[1],l=new Uint32Array(80),f=new Uint32Array(80);class _ extends e.HashMD{constructor(P=64){super(128,P,16,!1),this.Ah=e.SHA512_IV[0]|0,this.Al=e.SHA512_IV[1]|0,this.Bh=e.SHA512_IV[2]|0,this.Bl=e.SHA512_IV[3]|0,this.Ch=e.SHA512_IV[4]|0,this.Cl=e.SHA512_IV[5]|0,this.Dh=e.SHA512_IV[6]|0,this.Dl=e.SHA512_IV[7]|0,this.Eh=e.SHA512_IV[8]|0,this.El=e.SHA512_IV[9]|0,this.Fh=e.SHA512_IV[10]|0,this.Fl=e.SHA512_IV[11]|0,this.Gh=e.SHA512_IV[12]|0,this.Gl=e.SHA512_IV[13]|0,this.Hh=e.SHA512_IV[14]|0,this.Hl=e.SHA512_IV[15]|0}get(){const{Ah:P,Al:a,Bh:v,Bl:b,Ch:m,Cl:A,Dh:y,Dl:E,Eh:x,El:O,Fh:R,Fl:k,Gh:N,Gl:H,Hh:g,Hl:M}=this;return[P,a,v,b,m,A,y,E,x,O,R,k,N,H,g,M]}set(P,a,v,b,m,A,y,E,x,O,R,k,N,H,g,M){this.Ah=P|0,this.Al=a|0,this.Bh=v|0,this.Bl=b|0,this.Ch=m|0,this.Cl=A|0,this.Dh=y|0,this.Dl=E|0,this.Eh=x|0,this.El=O|0,this.Fh=R|0,this.Fl=k|0,this.Gh=N|0,this.Gl=H|0,this.Hh=g|0,this.Hl=M|0}process(P,a){for(let C=0;C<16;C++,a+=4)l[C]=P.getUint32(a),f[C]=P.getUint32(a+=4);for(let C=16;C<80;C++){const q=l[C-15]|0,$=f[C-15]|0,L=t.rotrSH(q,$,1)^t.rotrSH(q,$,8)^t.shrSH(q,$,7),F=t.rotrSL(q,$,1)^t.rotrSL(q,$,8)^t.shrSL(q,$,7),U=l[C-2]|0,z=f[C-2]|0,Y=t.rotrSH(U,z,19)^t.rotrBH(U,z,61)^t.shrSH(U,z,6),W=t.rotrSL(U,z,19)^t.rotrBL(U,z,61)^t.shrSL(U,z,6),V=t.add4L(F,W,f[C-7],f[C-16]),X=t.add4H(V,L,Y,l[C-7],l[C-16]);l[C]=X|0,f[C]=V|0}let{Ah:v,Al:b,Bh:m,Bl:A,Ch:y,Cl:E,Dh:x,Dl:O,Eh:R,El:k,Fh:N,Fl:H,Gh:g,Gl:M,Hh:S,Hl:I}=this;for(let C=0;C<80;C++){const q=t.rotrSH(R,k,14)^t.rotrSH(R,k,18)^t.rotrBH(R,k,41),$=t.rotrSL(R,k,14)^t.rotrSL(R,k,18)^t.rotrBL(R,k,41),L=R&N^~R&g,F=k&H^~k&M,U=t.add5L(I,$,F,d[C],f[C]),z=t.add5H(U,S,q,L,u[C],l[C]),Y=U|0,W=t.rotrSH(v,b,28)^t.rotrBH(v,b,34)^t.rotrBH(v,b,39),V=t.rotrSL(v,b,28)^t.rotrBL(v,b,34)^t.rotrBL(v,b,39),X=v&m^v&y^m&y,ne=b&A^b&E^A&E;S=g|0,I=M|0,g=N|0,M=H|0,N=R|0,H=k|0,{h:R,l:k}=t.add(x|0,O|0,z|0,Y|0),x=y|0,O=E|0,y=m|0,E=A|0,m=v|0,A=b|0;const K=t.add3L(Y,V,ne);v=t.add3H(K,z,W,X),b=K|0}({h:v,l:b}=t.add(this.Ah|0,this.Al|0,v|0,b|0)),{h:m,l:A}=t.add(this.Bh|0,this.Bl|0,m|0,A|0),{h:y,l:E}=t.add(this.Ch|0,this.Cl|0,y|0,E|0),{h:x,l:O}=t.add(this.Dh|0,this.Dl|0,x|0,O|0),{h:R,l:k}=t.add(this.Eh|0,this.El|0,R|0,k|0),{h:N,l:H}=t.add(this.Fh|0,this.Fl|0,N|0,H|0),{h:g,l:M}=t.add(this.Gh|0,this.Gl|0,g|0,M|0),{h:S,l:I}=t.add(this.Hh|0,this.Hl|0,S|0,I|0),this.set(v,b,m,A,y,E,x,O,R,k,N,H,g,M,S,I)}roundClean(){(0,n.clean)(l,f)}destroy(){(0,n.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}we.SHA512=_;class T extends _{constructor(){super(48),this.Ah=e.SHA384_IV[0]|0,this.Al=e.SHA384_IV[1]|0,this.Bh=e.SHA384_IV[2]|0,this.Bl=e.SHA384_IV[3]|0,this.Ch=e.SHA384_IV[4]|0,this.Cl=e.SHA384_IV[5]|0,this.Dh=e.SHA384_IV[6]|0,this.Dl=e.SHA384_IV[7]|0,this.Eh=e.SHA384_IV[8]|0,this.El=e.SHA384_IV[9]|0,this.Fh=e.SHA384_IV[10]|0,this.Fl=e.SHA384_IV[11]|0,this.Gh=e.SHA384_IV[12]|0,this.Gl=e.SHA384_IV[13]|0,this.Hh=e.SHA384_IV[14]|0,this.Hl=e.SHA384_IV[15]|0}}we.SHA384=T;const w=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),p=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,28279439
3707,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class B extends _{constructor(){super(28),this.Ah=w[0]|0,this.Al=w[1]|0,this.Bh=w[2]|0,this.Bl=w[3]|0,this.Ch=w[4]|0,this.Cl=w[5]|0,this.Dh=w[6]|0,this.Dl=w[7]|0,this.Eh=w[8]|0,this.El=w[9]|0,this.Fh=w[10]|0,this.Fl=w[11]|0,this.Gh=w[12]|0,this.Gl=w[13]|0,this.Hh=w[14]|0,this.Hl=w[15]|0}}we.SHA512_224=B;class j extends _{constructor(){super(32),this.Ah=p[0]|0,this.Al=p[1]|0,this.Bh=p[2]|0,this.Bl=p[3]|0,this.Ch=p[4]|0,this.Cl=p[5]|0,this.Dh=p[6]|0,this.Dl=p[7]|0,this.Eh=p[8]|0,this.El=p[9]|0,this.Fh=p[10]|0,this.Fl=p[11]|0,this.Gh=p[12]|0,this.Gl=p[13]|0,this.Hh=p[14]|0,this.Hl=p[15]|0}}return we.SHA512_256=j,we.sha256=(0,n.createHasher)(()=>new s),we.sha224=(0,n.createHasher)(()=>new i),we.sha512=(0,n.createHasher)(()=>new _),we.sha384=(0,n.createHasher)(()=>new T),we.sha512_256=(0,n.createHasher)(()=>new j),we.sha512_224=(0,n.createHasher)(()=>new B),we}var gi={},ff={},M1;function b6(){return M1||(M1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=vr();class n extends t.Hash{constructor(s,i){super(),this.finished=!1,this.destroyed=!1,(0,t.ahash)(s);const c=(0,t.toBytes)(i);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,d=new Uint8Array(u);d.set(c.length>u?s.create().update(c).digest():c);for(let l=0;l<d.length;l++)d[l]^=54;this.iHash.update(d),this.oHash=s.create();for(let l=0;l<d.length;l++)d[l]^=106;this.oHash.update(d),(0,t.clean)(d)}update(s){return(0,t.aexists)(this),this.iHash.update(s),this}digestInto(s){(0,t.aexists)(this),(0,t.abytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:i,iHash:c,finished:u,destroyed:d,blockLen:l,outputLen:f}=this;return s=s,s.finished=u,s.destroyed=d,s.blockLen=l,s.outputLen=f,s.oHash=i._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const r=(o,s,i)=>new n(o,s).update(i).digest();e.hmac=r,e.hmac.create=(o,s)=>new n(o,s)})(ff)),ff}var lf={},$r={},xe={},ye={},H1;function no(){if(H1)return ye;H1=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ye,"__esModule",{value:!0}),ye.notImplemented=ye.bitMask=void 0,ye.isBytes=n,ye.abytes=r,ye.abool=o,ye.numberToHexUnpadded=s,ye.hexToNumber=i,ye.bytesToHex=d,ye.hexToBytes=_,ye.bytesToNumberBE=T,ye.bytesToNumberLE=w,ye.numberToBytesBE=p,ye.numberToBytesLE=B,ye.numberToVarBytesBE=j,ye.ensureBytes=h,ye.concatBytes=P,ye.equalBytes=a,ye.utf8ToBytes=v,ye.inRange=m,ye.aInRange=A,ye.bitLen=y,ye.bitGet=E,ye.bitSet=x,ye.createHmacDrbg=N,ye.validateObject=g,ye.memoized=S;const e=BigInt(0),t=BigInt(1);function n(I){return I instanceof Uint8Array||ArrayBuffer.isView(I)&&I.constructor.name==="Uint8Array"}function r(I){if(!n(I))throw new Error("Uint8Array expected")}function o(I,C){if(typeof C!="boolean")throw new Error(I+" boolean expected, got "+C)}function s(I){const C=I.toString(16);return C.length&1?"0"+C:C}function i(I){if(typeof I!="string")throw new Error("hex string expected, got "+typeof I);return I===""?e:BigInt("0x"+I)}const c=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",u=Array.from({length:256},(I,C)=>C.toString(16).padStart(2,"0"));function d(I){if(r(I),c)return I.toHex();let C="";for(let q=0;q<I.length;q++)C+=u[I[q]];return C}const l={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(I){if(I>=l._0&&I<=l._9)return I-l._0;if(I>=l.A&&I<=l.F)return I-(l.A-10);if(I>=l.a&&I<=l.f)return I-(l.a-10)}function _(I){if(typeof I!="string")throw new Error("hex string expected, got "+typeof I);if(c)return Uint8Array.fromHex(I);const C=I.length,q=C/2;if(C%2)throw new Error("hex string expected, got unpadded hex of length "+C);const $=new Uint8Array(q);for(let L=0,F=0;L<q;
37L++,F+=2){const U=f(I.charCodeAt(F)),z=f(I.charCodeAt(F+1));if(U===void 0||z===void 0){const Y=I[F]+I[F+1];throw new Error('hex string expected, got non-hex character "'+Y+'" at index '+F)}$[L]=U*16+z}return $}function T(I){return i(d(I))}function w(I){return r(I),i(d(Uint8Array.from(I).reverse()))}function p(I,C){return _(I.toString(16).padStart(C*2,"0"))}function B(I,C){return p(I,C).reverse()}function j(I){return _(s(I))}function h(I,C,q){let $;if(typeof C=="string")try{$=_(C)}catch(F){throw new Error(I+" must be hex string or Uint8Array, cause: "+F)}else if(n(C))$=Uint8Array.from(C);else throw new Error(I+" must be hex string or Uint8Array");const L=$.length;if(typeof q=="number"&&L!==q)throw new Error(I+" of length "+q+" expected, got "+L);return $}function P(...I){let C=0;for(let $=0;$<I.length;$++){const L=I[$];r(L),C+=L.length}const q=new Uint8Array(C);for(let $=0,L=0;$<I.length;$++){const F=I[$];q.set(F,L),L+=F.length}return q}function a(I,C){if(I.length!==C.length)return!1;let q=0;for(let $=0;$<I.length;$++)q|=I[$]^C[$];return q===0}function v(I){if(typeof I!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(I))}const b=I=>typeof I=="bigint"&&e<=I;function m(I,C,q){return b(I)&&b(C)&&b(q)&&C<=I&&I<q}function A(I,C,q,$){if(!m(C,q,$))throw new Error("expected valid "+I+": "+q+" <= n < "+$+", got "+C)}function y(I){let C;for(C=0;I>e;I>>=t,C+=1);return C}function E(I,C){return I>>BigInt(C)&t}function x(I,C,q){return I|(q?t:e)<<BigInt(C)}const O=I=>(t<<BigInt(I))-t;ye.bitMask=O;const R=I=>new Uint8Array(I),k=I=>Uint8Array.from(I);function N(I,C,q){if(typeof I!="number"||I<2)throw new Error("hashLen must be a number");if(typeof C!="number"||C<2)throw new Error("qByteLen must be a number");if(typeof q!="function")throw new Error("hmacFn must be a function");let $=R(I),L=R(I),F=0;const U=()=>{$.fill(1),L.fill(0),F=0},z=(...X)=>q(L,$,...X),Y=(X=R(0))=>{L=z(k([0]),X),$=z(),X.length!==0&&(L=z(k([1]),X),$=z())},W=()=>{if(F++>=1e3)throw new Error("drbg: tried 1000 values");let X=0;const ne=[];for(;X<C;){$=z();const K=$.slice();ne.push(K),X+=$.length}return P(...ne)};return(X,ne)=>{U(),Y(X);let K;for(;!(K=ne(W()));)Y();return U(),K}}const H={bigint:I=>typeof I=="bigint",function:I=>typeof I=="function",boolean:I=>typeof I=="boolean",string:I=>typeof I=="string",stringOrUint8Array:I=>typeof I=="string"||n(I),isSafeInteger:I=>Number.isSafeInteger(I),array:I=>Array.isArray(I),field:(I,C)=>C.Fp.isValid(I),hash:I=>typeof I=="function"&&Number.isSafeInteger(I.outputLen)};function g(I,C,q={}){const $=(L,F,U)=>{const z=H[F];if(typeof z!="function")throw new Error("invalid validator function");const Y=I[L];if(!(U&&Y===void 0)&&!z(Y,I))throw new Error("param "+String(L)+" is invalid. Expected "+F+", got "+Y)};for(const[L,F]of Object.entries(C))$(L,F,!1);for(const[L,F]of Object.entries(q))$(L,F,!0);return I}const M=()=>{throw new Error("not implemented")};ye.notImplemented=M;function S(I){const C=new WeakMap;return(q,...$)=>{const L=C.get(q);if(L!==void 0)return L;const F=I(q,...$);return C.set(q,F),F}}return ye}var k1;
37function sd(){if(k1)return xe;k1=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.isNegativeLE=void 0,xe.mod=d,xe.pow=l,xe.pow2=f,xe.invert=_,xe.tonelliShanks=p,xe.FpSqrt=B,xe.validateField=P,xe.FpPow=a,xe.FpInvertBatch=v,xe.FpDiv=b,xe.FpLegendre=m,xe.FpIsSquare=A,xe.nLength=y,xe.Field=E,xe.FpSqrtOdd=x,xe.FpSqrtEven=O,xe.hashToPrivateScalar=R,xe.getFieldBytesLength=k,xe.getMinHashLength=N,xe.mapHashToField=H;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=vr(),t=no(),n=BigInt(0),r=BigInt(1),o=BigInt(2),s=BigInt(3),i=BigInt(4),c=BigInt(5),u=BigInt(8);function d(g,M){const S=g%M;return S>=n?S:M+S}function l(g,M,S){return a(E(S),g,M)}function f(g,M,S){let I=g;for(;M-- >n;)I*=I,I%=S;return I}function _(g,M){if(g===n)throw new Error("invert: expected non-zero number");if(M<=n)throw new Error("invert: expected positive modulus, got "+M);let S=d(g,M),I=M,C=n,q=r;for(;S!==n;){const L=I/S,F=I%S,U=C-q*L;I=S,S=F,C=q,q=U}if(I!==r)throw new Error("invert: does not exist");return d(C,M)}function T(g,M){const S=(g.ORDER+r)/i,I=g.pow(M,S);if(!g.eql(g.sqr(I),M))throw new Error("Cannot find square root");return I}function w(g,M){const S=(g.ORDER-c)/u,I=g.mul(M,o),C=g.pow(I,S),q=g.mul(M,C),$=g.mul(g.mul(q,o),C),L=g.mul(q,g.sub($,g.ONE));if(!g.eql(g.sqr(L),M))throw new Error("Cannot find square root");return L}function p(g){if(g<BigInt(3))throw new Error("sqrt is not defined for small field");let M=g-r,S=0;for(;M%o===n;)M/=o,S++;let I=o;const C=E(g);for(;m(C,I)===1;)if(I++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(S===1)return T;let q=C.pow(I,M);const $=(M+r)/o;return function(F,U){if(F.is0(U))return U;if(m(F,U)!==1)throw new Error("Cannot find square root");let z=S,Y=F.mul(F.ONE,q),W=F.pow(U,M),V=F.pow(U,$);for(;!F.eql(W,F.ONE);){if(F.is0(W))return F.ZERO;let X=1,ne=F.sqr(W);for(;!F.eql(ne,F.ONE);)if(X++,ne=F.sqr(ne),X===z)throw new Error("Cannot find square root");const K=r<<BigInt(z-X-1),Z=F.pow(Y,K);z=X,Y=F.sqr(Z),W=F.mul(W,Y),V=F.mul(V,Z)}return V}}function B(g){return g%i===s?T:g%u===c?w:p(g)}const j=(g,M)=>(d(g,M)&r)===r;xe.isNegativeLE=j;const h=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function P(g){const M={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},S=h.reduce((I,C)=>(I[C]="function",I),M);return(0,t.validateObject)(g,S)}function a(g,M,S){if(S<n)throw new Error("invalid exponent, negatives unsupported");if(S===n)return g.ONE;if(S===r)return M;let I=g.ONE,C=M;for(;S>n;)S&r&&(I=g.mul(I,C)),C=g.sqr(C),S>>=r;return I}function v(g,M,S=!1){const I=new Array(M.length).fill(S?g.ZERO:void 0),C=M.reduce(($,L,F)=>g.is0(L)?$:(I[F]=$,g.mul($,L)),g.ONE),q=g.inv(C);return M.reduceRight(($,L,F)=>g.is0(L)?$:(I[F]=g.mul($,I[F]),g.mul($,L)),q),I}function b(g,M,S){return g.mul(M,typeof S=="bigint"?_(S,g.ORDER):g.inv(S))}function m(g,M){const S=(g.ORDER-r)/o,I=g.pow(M,S),C=g.eql(I,g.ONE),q=g.eql(I,g.ZERO),$=g.eql(I,g.neg(g.ONE));if(!C&&!q&&!$)throw new Error("invalid Legendre symbol result");return C?1:q?0:-1}function A(g,M){return m(g,M)===1}function y(g,M){M!==void 0&&(0,e.anumber)(M);const S=M!==void 0?M:g.toString(2).length,I=Math.ceil(S/8);return{nBitLength:S,nByteLength:I}}function E(g,M,S=!1,I={}){if(g<=n)throw new Error("invalid field: expected ORDER > 0, got "+g);const{nBitLength:C,nByteLength:q}=y(g,M);if(q>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let $;const L=Object.freeze({ORDER:g,isLE:S,BITS:C,BYTES:q,MASK:(0,t.bitMask)(C),ZERO:n,ONE:r,create:F=>d(F,g),isValid:F=>{if(typeof F!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof F);return n<=F&&F<g},is0:F=>F===n,isOdd:F=>(F&r)===r,neg:F=>d(-F,g),eql:(F,U)=>F===U,sqr:F=>d(F*F,g),add:(F,U)=>d(F+U,g),sub:(F,U)=>d(F-U,g),mul:(F,U)=>d(F*U,g),pow:(F,U)=>a(L,F,U),div:(F,U)=>d(F*_(U,g),g),sqrN:F=>F*F,addN:(F,U)=>F+U,subN:(F,U)=>F-U,mulN:(F,U)=>F*U,inv:F=>_(F,g),sqrt:I.sqrt||(F=>($||($=B(g)),$(L,F))),toBytes:F=>S?(0,t.numberToBytesLE)(F,q):(0,t.numberToBytesBE)(F,q),fromBytes:F=>{if(F.length!==q)throw new Error("Field.fromBytes: expected "+q+" bytes, got "+F.length);return S?(0,t.bytesToNumberLE)(F):(0,t.bytesToNumberBE)(F)},invertBatch:F=>v(L,F),cmov:(F,U,z)=>z?U:F});return Object.freeze(L)}function x(g,M){if(!g.isOdd)throw new Error("Field doesn't have isOdd");const S=g.sqrt(M);return g.isOdd(S)?S:g.neg(S)}function O(g,M){if(!g.isOdd)throw new Error("Field doesn't have isOdd");const S=g.sqrt(M);return g.isOdd(S)?g.neg(S):S}function R(g,M,S=!1){g=(0,t.ensureBytes)("privateHash",g);const I=g.length,C=y(M).nByteLength+8;if(C<24||I<C||I>1024)throw new Error("hashToPrivateScalar: expected "+C+"-1024 bytes of input, got "+I);const q=S?(0,t.bytesToNumberLE)(g):(0,t.bytesToNumberBE)(g);return d(q,M-r)+r}function k(g){if(typeof g!="bigint")throw new Error("field order must be bigint");const M=g.toString(2).length;return Math.ceil(M/8)}function N(g){const M=k(g);return M+Math.ceil(M/2)}function H(g,M,S=!1){const I=g.length,C=k(M),q=N(M);if(I<16||I<q||I>1024)throw new Error("expected "+q+"-1024 bytes of input, got "+I);const $=S?(0,t.bytesToNumberLE)(g):(0,t.bytesToNumberBE)(g),L=d($,M-r)+r;return S?(0,t.numberToBytesLE)(L,C):(0,t.numberToBytesBE)(L,C)}return xe}var $1;function m6(){if($1)return $r;
vendor: 2,054 bytes, line 37
37$1=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.wNAF=T,$r.pippenger=w,$r.precomputeMSMUnsafe=p,$r.validateBasic=B;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=sd(),t=no(),n=BigInt(0),r=BigInt(1);function o(j,h){const P=h.negate();return j?P:h}function s(j,h){if(!Number.isSafeInteger(j)||j<=0||j>h)throw new Error("invalid window size, expected [1.."+h+"], got W="+j)}function i(j,h){s(j,h);const P=Math.ceil(h/j)+1,a=2**(j-1),v=2**j,b=(0,t.bitMask)(j),m=BigInt(j);return{windows:P,windowSize:a,mask:b,maxNumber:v,shiftBy:m}}function c(j,h,P){const{windowSize:a,mask:v,maxNumber:b,shiftBy:m}=P;let A=Number(j&v),y=j>>m;A>a&&(A-=b,y+=r);const E=h*a,x=E+Math.abs(A)-1,O=A===0,R=A<0,k=h%2!==0;return{nextN:y,offset:x,isZero:O,isNeg:R,isNegF:k,offsetF:E}}function u(j,h){if(!Array.isArray(j))throw new Error("array expected");j.forEach((P,a)=>{if(!(P instanceof h))throw new Error("invalid point at index "+a)})}function d(j,h){if(!Array.isArray(j))throw new Error("array of scalars expected");j.forEach((P,a)=>{if(!h.isValid(P))throw new Error("invalid scalar at index "+a)})}const l=new WeakMap,f=new WeakMap;function _(j){return f.get(j)||1}function T(j,h){return{constTimeNegate:o,hasPrecomputes(P){return _(P)!==1},unsafeLadder(P,a,v=j.ZERO){let b=P;for(;a>n;)a&r&&(v=v.add(b)),b=b.double(),a>>=r;return v},precomputeWindow(P,a){const{windows:v,windowSize:b}=i(a,h),m=[];let A=P,y=A;for(let E=0;E<v;E++){y=A,m.push(y);for(let x=1;x<b;x++)y=y.add(A),m.push(y);A=y.double()}return m},wNAF(P,a,v){let b=j.ZERO,m=j.BASE;const A=i(P,h);for(let y=0;y<A.windows;y++){const{nextN:E,offset:x,isZero:O,isNeg:R,isNegF:k,offsetF:N}=c(v,y,A);v=E,O?m=m.add(o(k,a[N])):b=b.add(o(R,a[x]))}return{p:b,f:m}},wNAFUnsafe(P,a,v,b=j.ZERO){const m=i(P,h);for(let A=0;A<m.windows&&v!==n;A++){const{nextN:y,offset:E,isZero:x,isNeg:O}=c(v,A,m);if(v=y,!x){const R=a[E];b=b.add(O?R.negate():R)}}return b},getPrecomputes(P,a,v){let b=l.get(a);return b||(b=this.precomputeWindow(a,P),P!==1&&l.set(a,v(b))),b},wNAFCached(P,a,v){const b=_(P);
37return this.wNAF(b,this.getPrecomputes(b,P,v),a)},wNAFCachedUnsafe(P,a,v,b){const m=_(P);return m===1?this.unsafeLadder(P,a,b):this.wNAFUnsafe(m,this.getPrecomputes(m,P,v),a,b)},setWindowSize(P,a){s(a,h),f.set(P,a),l.delete(P)}}}function w(j,h,P,a){u(P,j),d(a,h);const v=P.length,b=a.length;if(v!==b)throw new Error("arrays of points and scalars must have equal length");const m=j.ZERO,A=(0,t.bitLen)(BigInt(v));let y=1;A>12?y=A-3:A>4?y=A-2:A>0&&(y=2);const E=(0,t.bitMask)(y),x=new Array(Number(E)+1).fill(m),O=Math.floor((h.BITS-1)/y)*y;let R=m;for(let k=O;k>=0;k-=y){x.fill(m);for(let H=0;H<b;H++){const g=a[H],M=Number(g>>BigInt(k)&E);x[M]=x[M].add(P[H])}let N=m;for(let H=x.length-1,g=m;H>0;H--)g=g.add(x[H]),N=N.add(g);if(R=R.add(N),k!==0)for(let H=0;H<y;H++)R=R.double()}return R}function p(j,h,P,a){s(a,h.BITS),u(P,j);const v=j.ZERO,b=2**a-1,m=Math.ceil(h.BITS/a),A=(0,t.bitMask)(a),y=P.map(E=>{const x=[];for(let O=0,R=E;O<b;O++)x.push(R),R=R.add(E);return x});return E=>{if(d(E,h),E.length>P.length)throw new Error("array of scalars must be smaller than array of points");let x=v;for(let O=0;O<m;O++){if(x!==v)for(let k=0;k<a;k++)x=x.double();const R=BigInt(m*a-(O+1)*a);for(let k=0;k<E.length;k++){const N=E[k],H=Number(N>>R&A);H&&(x=x.add(y[k][H-1]))}}return x}}function B(j){return(0,e.validateField)(j.Fp),(0,t.validateObject)(j,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(j.n,j.nBitLength),...j,p:j.Fp.ORDER})}return $r}var N1;function P_(){return N1||(N1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e.weierstrassPoints=T,e.weierstrass=p,e.SWUFpSqrtRatio=B,e.mapToCurveSimpleSWU=j;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=m6(),n=sd(),r=no();function o(h){h.lowS!==void 0&&(0,r.abool)("lowS",h.lowS),h.prehash!==void 0&&(0,r.abool)("prehash",h.prehash)}function s(h){const P=(0,t.validateBasic)(h);(0,r.validateObject)(P,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:a,Fp:v,a:b}=P;if(a){if(!v.eql(b,v.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof a!="object"||typeof a.beta!="bigint"||typeof a.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...P})}class i extends Error{constructor(P=""){super(P)}}e.DERErr=i,e.DER={Err:i,_tlv:{encode:(h,P)=>{const{Err:a}=e.DER;if(h<0||h>256)throw new a("tlv.encode: wrong tag");if(P.length&1)throw new a("tlv.encode: unpadded data");const v=P.length/2,b=(0,r.numberToHexUnpadded)(v);if(b.length/2&128)throw new a("tlv.encode: long form length too big");const m=v>127?(0,r.numberToHexUnpadded)(b.length/2|128):"";return(0,r.numberToHexUnpadded)(h)+m+b+P},decode(h,P){const{Err:a}=e.DER;let v=0;if(h<0||h>256)throw new a("tlv.encode: wrong tag");if(P.length<2||P[v++]!==h)throw new a("tlv.decode: wrong tlv");const b=P[v++],m=!!(b&128);let A=0;if(!m)A=b;else{const E=b&127;if(!E)throw new a("tlv.decode(long): indefinite length not supported");if(E>4)throw new a("tlv.decode(long): byte length is too big");const x=P.subarray(v,v+E);if(x.length!==E)throw new a("tlv.decode: length bytes not complete");if(x[0]===0)throw new a("tlv.decode(long): zero leftmost byte");for(const O of x)A=A<<8|O;if(v+=E,A<128)throw new a("tlv.decode(long): not minimal encoding")}const y=P.subarray(v,v+A);if(y.length!==A)throw new a("tlv.decode: wrong value length");return{v:y,l:P.subarray(v+A)}}},_int:{encode(h){const{Err:P}=e.DER;if(h<u)throw new P("integer: negative integers are not allowed");let a=(0,r.numberToHexUnpadded)(h);if(Number.parseInt(a[0],16)&8&&(a="00"+a),a.length&1)throw new P("unexpected DER parsing assertion: unpadded hex");return a},decode(h){const{Err:P}=e.DER;if(h[0]&128)throw new P("invalid signature integer: negative");if(h[0]===0&&!(h[1]&128))throw new P("invalid signature integer: unnecessary leading zero");return(0,r.bytesToNumberBE)(h)}},toSig(h){const{Err:P,_int:a,_tlv:v}=e.DER,b=(0,r.ensureBytes)("signature",h),{v:m,l:A}=v.decode(48,b);if(A.length)throw new P("invalid signature: left bytes after parsing");const{v:y,l:E}=v.decode(2,m),{v:x,l:O}=v.decode(2,E);if(O.length)throw new P("invalid signature: left bytes after parsing");return{r:a.decode(y),s:a.decode(x)}},hexFromSig(h){const{_tlv:P,_int:a}=e.DER,v=P.encode(2,a.encode(h.r)),b=P.encode(2,a.encode(h.s)),m=v+b;return P.encode(48,m)}};function c(h,P){return(0,r.bytesToHex)((0,r.numberToBytesBE)(h,P))}const u=BigInt(0),d=BigInt(1),l=BigInt(2),f=BigInt(3),_=BigInt(4);function T(h){const P=s(h),{Fp:a}=P,v=(0,n.Field)(P.n,P.nBitLength),b=P.toBytes||((C,q,$)=>{const L=q.toAffine();return(0,r.concatBytes)(Uint8Array.from([4]),a.toBytes(L.x),a.toBytes(L.y))}),m=P.fromBytes||(C=>{const q=C.subarray(1),$=a.fromBytes(q.subarray(0,a.BYTES)),L=a.fromBytes(q.subarray(a.BYTES,2*a.BYTES));return{x:$,y:L}});function A(C){const{a:q,b:$}=P,L=a.sqr(C),F=a.mul(L,C);return a.add(a.add(F,a.mul(C,q)),$)}function y(C,q){const $=a.sqr(q),L=A(C);return a.eql($,L)}
37if(!y(P.Gx,P.Gy))throw new Error("bad curve params: generator point");const E=a.mul(a.pow(P.a,f),_),x=a.mul(a.sqr(P.b),BigInt(27));if(a.is0(a.add(E,x)))throw new Error("bad curve params: a or b");function O(C){return(0,r.inRange)(C,d,P.n)}function R(C){const{allowedPrivateKeyLengths:q,nByteLength:$,wrapPrivateKey:L,n:F}=P;if(q&&typeof C!="bigint"){if((0,r.isBytes)(C)&&(C=(0,r.bytesToHex)(C)),typeof C!="string"||!q.includes(C.length))throw new Error("invalid private key");C=C.padStart($*2,"0")}let U;try{U=typeof C=="bigint"?C:(0,r.bytesToNumberBE)((0,r.ensureBytes)("private key",C,$))}catch{throw new Error("invalid private key, expected hex or "+$+" bytes, got "+typeof C)}return L&&(U=(0,n.mod)(U,F)),(0,r.aInRange)("private key",U,d,F),U}function k(C){if(!(C instanceof g))throw new Error("ProjectivePoint expected")}const N=(0,r.memoized)((C,q)=>{const{px:$,py:L,pz:F}=C;if(a.eql(F,a.ONE))return{x:$,y:L};const U=C.is0();q==null&&(q=U?a.ONE:a.inv(F));const z=a.mul($,q),Y=a.mul(L,q),W=a.mul(F,q);if(U)return{x:a.ZERO,y:a.ZERO};if(!a.eql(W,a.ONE))throw new Error("invZ was invalid");return{x:z,y:Y}}),H=(0,r.memoized)(C=>{if(C.is0()){if(P.allowInfinityPoint&&!a.is0(C.py))return;throw new Error("bad point: ZERO")}const{x:q,y:$}=C.toAffine();if(!a.isValid(q)||!a.isValid($))throw new Error("bad point: x or y not FE");if(!y(q,$))throw new Error("bad point: equation left != right");if(!C.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(q,$,L){if(q==null||!a.isValid(q))throw new Error("x required");if($==null||!a.isValid($)||a.is0($))throw new Error("y required");if(L==null||!a.isValid(L))throw new Error("z required");this.px=q,this.py=$,this.pz=L,Object.freeze(this)}static fromAffine(q){const{x:$,y:L}=q||{};if(!q||!a.isValid($)||!a.isValid(L))throw new Error("invalid affine point");if(q instanceof g)throw new Error("projective point not allowed");const F=U=>a.eql(U,a.ZERO);return F($)&&F(L)?g.ZERO:new g($,L,a.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(q){const $=(0,n.FpInvertBatch)(a,q.map(L=>L.pz));return q.map((L,F)=>L.toAffine($[F])).map(g.fromAffine)}static fromHex(q){const $=g.fromAffine(m((0,r.ensureBytes)("pointHex",q)));return $.assertValidity(),$}static fromPrivateKey(q){return g.BASE.multiply(R(q))}static msm(q,$){return(0,t.pippenger)(g,v,q,$)}_setWindowSize(q){I.setWindowSize(this,q)}assertValidity(){H(this)}hasEvenY(){const{y:q}=this.toAffine();if(a.isOdd)return!a.isOdd(q);throw new Error("Field doesn't support isOdd")}equals(q){k(q);const{px:$,py:L,pz:F}=this,{px:U,py:z,pz:Y}=q,W=a.eql(a.mul($,Y),a.mul(U,F)),V=a.eql(a.mul(L,Y),a.mul(z,F));return W&&V}negate(){return new g(this.px,a.neg(this.py),this.pz)}double(){const{a:q,b:$}=P,L=a.mul($,f),{px:F,py:U,pz:z}=this;let Y=a.ZERO,W=a.ZERO,V=a.ZERO,X=a.mul(F,F),ne=a.mul(U,U),K=a.mul(z,z),Z=a.mul(F,U);return Z=a.add(Z,Z),V=a.mul(F,z),V=a.add(V,V),Y=a.mul(q,V),W=a.mul(L,K),W=a.add(Y,W),Y=a.sub(ne,W),W=a.add(ne,W),W=a.mul(Y,W),Y=a.mul(Z,Y),V=a.mul(L,V),K=a.mul(q,K),Z=a.sub(X,K),Z=a.mul(q,Z),Z=a.add(Z,V),V=a.add(X,X),X=a.add(V,X),X=a.add(X,K),X=a.mul(X,Z),W=a.add(W,X),K=a.mul(U,z),K=a.add(K,K),X=a.mul(K,Z),Y=a.sub(Y,X),V=a.mul(K,ne),V=a.add(V,V),V=a.add(V,V),new g(Y,W,V)}add(q){k(q);const{px:$,py:L,pz:F}=this,{px:U,py:z,pz:Y}=q;let W=a.ZERO,V=a.ZERO,X=a.ZERO;const ne=P.a,K=a.mul(P.b,f);let Z=a.mul($,U),ee=a.mul(L,z),re=a.mul(F,Y),te=a.add($,L),Q=a.add(U,z);te=a.mul(te,Q),Q=a.add(Z,ee),te=a.sub(te,Q),Q=a.add($,F);let J=a.add(U,Y);return Q=a.mul(Q,J),J=a.add(Z,re),Q=a.sub(Q,J),J=a.add(L,F),W=a.add(z,Y),J=a.mul(J,W),W=a.add(ee,re),J=a.sub(J,W),X=a.mul(ne,Q),W=a.mul(K,re),X=a.add(W,X),W=a.sub(ee,X),X=a.add(ee,X),V=a.mul(W,X),ee=a.add(Z,Z),ee=a.add(ee,Z),re=a.mul(ne,re),Q=a.mul(K,Q),ee=a.add(ee,re),re=a.sub(Z,re),re=a.mul(ne,re),Q=a.add(Q,re),Z=a.mul(ee,Q),V=a.add(V,Z),Z=a.mul(J,Q),W=a.mul(te,W),W=a.sub(W,Z),Z=a.mul(te,ee),X=a.mul(J,X),X=a.add(X,Z),new g(W,V,X)}subtract(q){return this.add(q.negate())}is0(){return this.equals(g.ZERO)}wNAF(q){return I.wNAFCached(this,q,g.normalizeZ)}
37multiplyUnsafe(q){const{endo:$,n:L}=P;(0,r.aInRange)("scalar",q,u,L);const F=g.ZERO;if(q===u)return F;if(this.is0()||q===d)return this;if(!$||I.hasPrecomputes(this))return I.wNAFCachedUnsafe(this,q,g.normalizeZ);let{k1neg:U,k1:z,k2neg:Y,k2:W}=$.splitScalar(q),V=F,X=F,ne=this;for(;z>u||W>u;)z&d&&(V=V.add(ne)),W&d&&(X=X.add(ne)),ne=ne.double(),z>>=d,W>>=d;return U&&(V=V.negate()),Y&&(X=X.negate()),X=new g(a.mul(X.px,$.beta),X.py,X.pz),V.add(X)}multiply(q){const{endo:$,n:L}=P;(0,r.aInRange)("scalar",q,d,L);let F,U;if($){const{k1neg:z,k1:Y,k2neg:W,k2:V}=$.splitScalar(q);let{p:X,f:ne}=this.wNAF(Y),{p:K,f:Z}=this.wNAF(V);X=I.constTimeNegate(z,X),K=I.constTimeNegate(W,K),K=new g(a.mul(K.px,$.beta),K.py,K.pz),F=X.add(K),U=ne.add(Z)}else{const{p:z,f:Y}=this.wNAF(q);F=z,U=Y}return g.normalizeZ([F,U])[0]}multiplyAndAddUnsafe(q,$,L){const F=g.BASE,U=(Y,W)=>W===u||W===d||!Y.equals(F)?Y.multiplyUnsafe(W):Y.multiply(W),z=U(this,$).add(U(q,L));return z.is0()?void 0:z}toAffine(q){return N(this,q)}isTorsionFree(){const{h:q,isTorsionFree:$}=P;if(q===d)return!0;if($)return $(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:q,clearCofactor:$}=P;return q===d?this:$?$(g,this):this.multiplyUnsafe(P.h)}toRawBytes(q=!0){return(0,r.abool)("isCompressed",q),this.assertValidity(),b(g,this,q)}toHex(q=!0){return(0,r.abool)("isCompressed",q),(0,r.bytesToHex)(this.toRawBytes(q))}}g.BASE=new g(P.Gx,P.Gy,a.ONE),g.ZERO=new g(a.ZERO,a.ONE,a.ZERO);const{endo:M,nBitLength:S}=P,I=(0,t.wNAF)(g,M?Math.ceil(S/2):S);return{CURVE:P,ProjectivePoint:g,normPrivateKeyToScalar:R,weierstrassEquation:A,isWithinCurveOrder:O}}function w(h){const P=(0,t.validateBasic)(h);return(0,r.validateObject)(P,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...P})}function p(h){const P=w(h),{Fp:a,n:v,nByteLength:b,nBitLength:m}=P,A=a.BYTES+1,y=2*a.BYTES+1;function E(K){return(0,n.mod)(K,v)}function x(K){return(0,n.invert)(K,v)}const{ProjectivePoint:O,normPrivateKeyToScalar:R,weierstrassEquation:k,isWithinCurveOrder:N}=T({...P,toBytes(K,Z,ee){const re=Z.toAffine(),te=a.toBytes(re.x),Q=r.concatBytes;return(0,r.abool)("isCompressed",ee),ee?Q(Uint8Array.from([Z.hasEvenY()?2:3]),te):Q(Uint8Array.from([4]),te,a.toBytes(re.y))},fromBytes(K){const Z=K.length,ee=K[0],re=K.subarray(1);if(Z===A&&(ee===2||ee===3)){const te=(0,r.bytesToNumberBE)(re);if(!(0,r.inRange)(te,d,a.ORDER))throw new Error("Point is not on curve");const Q=k(te);let J;try{J=a.sqrt(Q)}catch(he){const le=he instanceof Error?": "+he.message:"";throw new Error("Point is not on curve"+le)}const de=(J&d)===d;return(ee&1)===1!==de&&(J=a.neg(J)),{x:te,y:J}}else if(Z===y&&ee===4){const te=a.fromBytes(re.subarray(0,a.BYTES)),Q=a.fromBytes(re.subarray(a.BYTES,2*a.BYTES));return{x:te,y:Q}}else{const te=A,Q=y;throw new Error("invalid Point, expected length of "+te+", or uncompressed "+Q+", got "+Z)}}});function H(K){const Z=v>>d;return K>Z}function g(K){return H(K)?E(-K):K}const M=(K,Z,ee)=>(0,r.bytesToNumberBE)(K.slice(Z,ee));class S{constructor(Z,ee,re){(0,r.aInRange)("r",Z,d,v),(0,r.aInRange)("s",ee,d,v),this.r=Z,this.s=ee,re!=null&&(this.recovery=re),Object.freeze(this)}static fromCompact(Z){const ee=b;return Z=(0,r.ensureBytes)("compactSignature",Z,ee*2),new S(M(Z,0,ee),M(Z,ee,2*ee))}static fromDER(Z){const{r:ee,s:re}=e.DER.toSig((0,r.ensureBytes)("DER",Z));return new S(ee,re)}assertValidity(){}addRecoveryBit(Z){return new S(this.r,this.s,Z)}recoverPublicKey(Z){const{r:ee,s:re,recovery:te}=this,Q=F((0,r.ensureBytes)("msgHash",Z));if(te==null||![0,1,2,3].includes(te))throw new Error("recovery id invalid");const J=te===2||te===3?ee+P.n:ee;if(J>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const de=(te&1)===0?"02":"03",Se=O.fromHex(de+c(J,a.BYTES)),he=x(J),le=E(-Q*he),Ee=E(re*he),pe=O.BASE.multiplyAndAddUnsafe(Se,le,Ee);if(!pe)throw new Error("point at infinify");return pe.assertValidity(),pe}hasHighS(){return H(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,E(-this.s),this.recovery):this}toDERRawBytes(){return(0,r.hexToBytes)(this.toDERHex())}toDERHex(){return e.DER.hexFromSig(this)}toCompactRawBytes(){return(0,r.hexToBytes)(this.toCompactHex())}toCompactHex(){const Z=b;return c(this.r,Z)+c(this.s,Z)}}const I={isValidPrivateKey(K){try{return R(K),!0}catch{return!1}},normPrivateKeyToScalar:R,randomPrivateKey:()=>{const K=(0,n.getMinHashLength)(P.n);return(0,n.mapHashToField)(P.randomBytes(K),P.n)},precompute(K=8,Z=O.BASE){return Z._setWindowSize(K),Z.multiply(BigInt(3)),Z}};function C(K,Z=!0){return O.fromPrivateKey(K).toRawBytes(Z)}function q(K){if(typeof K=="bigint")return!1;if(K instanceof O)return!0;const ee=(0,r.ensureBytes)("key",K).length,re=a.BYTES,te=re+1,Q=2*re+1;if(!(P.allowedPrivateKeyLengths||b===te))return ee===te||ee===Q}function $(K,Z,ee=!0){if(q(K)===!0)throw new Error("first arg must be private key");if(q(Z)===!1)throw new Error("second arg must be public key");return O.fromHex(Z).multiply(R(K)).toRawBytes(ee)}const L=P.bits2int||function(K){if(K.length>8192)throw new Error("input is too large");
37const Z=(0,r.bytesToNumberBE)(K),ee=K.length*8-m;return ee>0?Z>>BigInt(ee):Z},F=P.bits2int_modN||function(K){return E(L(K))},U=(0,r.bitMask)(m);function z(K){return(0,r.aInRange)("num < 2^"+m,K,u,U),(0,r.numberToBytesBE)(K,b)}function Y(K,Z,ee=W){if(["recovered","canonical"].some(He=>He in ee))throw new Error("sign() legacy options not supported");const{hash:re,randomBytes:te}=P;let{lowS:Q,prehash:J,extraEntropy:de}=ee;Q==null&&(Q=!0),K=(0,r.ensureBytes)("msgHash",K),o(ee),J&&(K=(0,r.ensureBytes)("prehashed msgHash",re(K)));const Se=F(K),he=R(Z),le=[z(he),z(Se)];if(de!=null&&de!==!1){const He=de===!0?te(a.BYTES):de;le.push((0,r.ensureBytes)("extraEntropy",He))}const Ee=(0,r.concatBytes)(...le),pe=Se;function Le(He){const De=L(He);if(!N(De))return;const Xe=x(De),Ge=O.BASE.multiply(De).toAffine(),ke=E(Ge.x);if(ke===u)return;const Be=E(Xe*E(pe+ke*he));if(Be===u)return;let Qe=(Ge.x===ke?0:2)|Number(Ge.y&d),Ve=Be;return Q&&H(Be)&&(Ve=g(Be),Qe^=1),new S(ke,Ve,Qe)}return{seed:Ee,k2sig:Le}}const W={lowS:P.lowS,prehash:!1},V={lowS:P.lowS,prehash:!1};function X(K,Z,ee=W){const{seed:re,k2sig:te}=Y(K,Z,ee),Q=P;return(0,r.createHmacDrbg)(Q.hash.outputLen,Q.nByteLength,Q.hmac)(re,te)}O.BASE._setWindowSize(8);function ne(K,Z,ee,re=V){var Qe;const te=K;Z=(0,r.ensureBytes)("msgHash",Z),ee=(0,r.ensureBytes)("publicKey",ee);const{lowS:Q,prehash:J,format:de}=re;if(o(re),"strict"in re)throw new Error("options.strict was renamed to lowS");if(de!==void 0&&de!=="compact"&&de!=="der")throw new Error("format must be compact or der");const Se=typeof te=="string"||(0,r.isBytes)(te),he=!Se&&!de&&typeof te=="object"&&te!==null&&typeof te.r=="bigint"&&typeof te.s=="bigint";if(!Se&&!he)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let le,Ee;try{if(he&&(le=new S(te.r,te.s)),Se){try{de!=="compact"&&(le=S.fromDER(te))}catch(Ve){if(!(Ve instanceof e.DER.Err))throw Ve}!le&&de!=="der"&&(le=S.fromCompact(te))}Ee=O.fromHex(ee)}catch{return!1}if(!le||Q&&le.hasHighS())return!1;J&&(Z=P.hash(Z));const{r:pe,s:Le}=le,He=F(Z),De=x(Le),Xe=E(He*De),Ge=E(pe*De),ke=(Qe=O.BASE.multiplyAndAddUnsafe(Ee,Xe,Ge))==null?void 0:Qe.toAffine();return ke?E(ke.x)===pe:!1}return{CURVE:P,getPublicKey:C,getSharedSecret:$,sign:X,verify:ne,ProjectivePoint:O,Signature:S,utils:I}}function B(h,P){const a=h.ORDER;let v=u;for(let H=a-d;H%l===u;H/=l)v+=d;const b=v,m=l<<b-d-d,A=m*l,y=(a-d)/A,E=(y-d)/l,x=A-d,O=m,R=h.pow(P,y),k=h.pow(P,(y+d)/l);let N=(H,g)=>{let M=R,S=h.pow(g,x),I=h.sqr(S);I=h.mul(I,g);let C=h.mul(H,I);C=h.pow(C,E),C=h.mul(C,S),S=h.mul(C,g),I=h.mul(C,H);let q=h.mul(I,S);C=h.pow(q,O);let $=h.eql(C,h.ONE);S=h.mul(I,k),C=h.mul(q,M),I=h.cmov(S,I,$),q=h.cmov(C,q,$);for(let L=b;L>d;L--){let F=L-l;F=l<<F-d;let U=h.pow(q,F);const z=h.eql(U,h.ONE);S=h.mul(I,M),M=h.mul(M,M),U=h.mul(q,M),I=h.cmov(S,I,z),q=h.cmov(U,q,z)}return{isValid:$,value:I}};if(h.ORDER%_===f){const H=(h.ORDER-f)/_,g=h.sqrt(h.neg(P));N=(M,S)=>{let I=h.sqr(S);const C=h.mul(M,S);I=h.mul(I,C);let q=h.pow(I,H);q=h.mul(q,C);const $=h.mul(q,g),L=h.mul(h.sqr(q),S),F=h.eql(L,M);let U=h.cmov($,q,F);return{isValid:F,value:U}}}return N}function j(h,P){if((0,n.validateField)(h),!h.isValid(P.A)||!h.isValid(P.B)||!h.isValid(P.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const a=B(h,P.Z);if(!h.isOdd)throw new Error("Fp.isOdd is not implemented!");return v=>{let b,m,A,y,E,x,O,R;b=h.sqr(v),b=h.mul(b,P.Z),m=h.sqr(b),m=h.add(m,b),A=h.add(m,h.ONE),A=h.mul(A,P.B),y=h.cmov(P.Z,h.neg(m),!h.eql(m,h.ZERO)),y=h.mul(y,P.A),m=h.sqr(A),x=h.sqr(y),E=h.mul(x,P.A),m=h.add(m,E),m=h.mul(m,A),x=h.mul(x,y),E=h.mul(x,P.B),m=h.add(m,E),O=h.mul(b,A);const{isValid:k,value:N}=a(m,x);R=h.mul(b,v),R=h.mul(R,N),O=h.cmov(O,A,k),R=h.cmov(R,N,k);const H=h.isOdd(v)===h.isOdd(R);R=h.cmov(h.neg(R),R,H);const g=(0,n.FpInvertBatch)(h,[y],!0)[0];return O=h.mul(O,g),{x:O,y:R}}}})(lf)),lf}var F1;function h6(){if(F1)return gi;F1=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.getHash=r,gi.createCurve=o;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=b6(),t=vr(),n=P_();function r(s){return{hash:s,hmac:(i,...c)=>(0,e.hmac)(s,i,(0,t.concatBytes)(...c)),randomBytes:t.randomBytes}}function o(s,i){const c=u=>(0,n.weierstrass)({...s,...r(u)});return{...c(i),create:c}}return gi}var mr={},L1;function y6(){if(L1)return mr;
37L1=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.expand_message_xmd=i,mr.expand_message_xof=c,mr.hash_to_field=u,mr.isogenyMap=d,mr.createHasher=l;const e=sd(),t=no(),n=t.bytesToNumberBE;function r(f,_){if(s(f),s(_),f<0||f>=1<<8*_)throw new Error("invalid I2OSP input: "+f);const T=Array.from({length:_}).fill(0);for(let w=_-1;w>=0;w--)T[w]=f&255,f>>>=8;return new Uint8Array(T)}function o(f,_){const T=new Uint8Array(f.length);for(let w=0;w<f.length;w++)T[w]=f[w]^_[w];return T}function s(f){if(!Number.isSafeInteger(f))throw new Error("number expected")}function i(f,_,T,w){(0,t.abytes)(f),(0,t.abytes)(_),s(T),_.length>255&&(_=w((0,t.concatBytes)((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-"),_)));const{outputLen:p,blockLen:B}=w,j=Math.ceil(T/p);if(T>65535||j>255)throw new Error("expand_message_xmd: invalid lenInBytes");const h=(0,t.concatBytes)(_,r(_.length,1)),P=r(0,B),a=r(T,2),v=new Array(j),b=w((0,t.concatBytes)(P,f,a,r(0,1),h));v[0]=w((0,t.concatBytes)(b,r(1,1),h));for(let A=1;A<=j;A++){const y=[o(b,v[A-1]),r(A+1,1),h];v[A]=w((0,t.concatBytes)(...y))}return(0,t.concatBytes)(...v).slice(0,T)}function c(f,_,T,w,p){if((0,t.abytes)(f),(0,t.abytes)(_),s(T),_.length>255){const B=Math.ceil(2*w/8);_=p.create({dkLen:B}).update((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(_).digest()}if(T>65535||_.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return p.create({dkLen:T}).update(f).update(r(T,2)).update(_).update(r(_.length,1)).digest()}function u(f,_,T){(0,t.validateObject)(T,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:w,k:p,m:B,hash:j,expand:h,DST:P}=T;(0,t.abytes)(f),s(_);const a=typeof P=="string"?(0,t.utf8ToBytes)(P):P,v=w.toString(2).length,b=Math.ceil((v+p)/8),m=_*B*b;let A;if(h==="xmd")A=i(f,a,m,j);else if(h==="xof")A=c(f,a,m,p,j);else if(h==="_internal_pass")A=f;else throw new Error('expand must be "xmd" or "xof"');const y=new Array(_);for(let E=0;E<_;E++){const x=new Array(B);for(let O=0;O<B;O++){const R=b*(O+E*B),k=A.subarray(R,R+b);x[O]=(0,e.mod)(n(k),w)}y[E]=x}return y}function d(f,_){const T=_.map(w=>Array.from(w).reverse());return(w,p)=>{const[B,j,h,P]=T.map(b=>b.reduce((m,A)=>f.add(f.mul(m,w),A))),[a,v]=(0,e.FpInvertBatch)(f,[j,P],!0);return w=f.mul(B,a),p=f.mul(p,f.mul(h,v)),{x:w,y:p}}}function l(f,_,T){if(typeof _!="function")throw new Error("mapToCurve() must be defined");function w(B){return f.fromAffine(_(B))}function p(B){const j=B.clearCofactor();return j.equals(f.ZERO)?f.ZERO:(j.assertValidity(),j)}return{defaults:T,hashToCurve(B,j){const h=u(B,2,{...T,DST:T.DST,...j}),P=w(h[0]),a=w(h[1]);return p(P.add(a))},encodeToCurve(B,j){const h=u(B,1,{...T,DST:T.encodeDST,...j});return p(w(h[0]))},mapToCurve(B){if(!Array.isArray(B))throw new Error("expected array of bigints");for(const j of B)if(typeof j!="bigint")throw new Error("expected array of bigints");return p(w(B))}}}return mr}var U1;function io(){return U1||(U1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.secp256k1_hasher=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=w_(),n=vr(),r=h6(),o=y6(),s=sd(),i=no(),c=P_(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l=BigInt(0),f=BigInt(1),_=BigInt(2),T=(g,M)=>(g+M/_)/M;function w(g){const M=u,S=BigInt(3),I=BigInt(6),C=BigInt(11),q=BigInt(22),$=BigInt(23),L=BigInt(44),F=BigInt(88),U=g*g*g%M,z=U*U*g%M,Y=(0,s.pow2)(z,S,M)*z%M,W=(0,s.pow2)(Y,S,M)*z%M,V=(0,s.pow2)(W,_,M)*U%M,X=(0,s.pow2)(V,C,M)*V%M,ne=(0,s.pow2)(X,q,M)*X%M,K=(0,s.pow2)(ne,L,M)*ne%M,Z=(0,s.pow2)(K,F,M)*K%M,ee=(0,s.pow2)(Z,L,M)*ne%M,re=(0,s.pow2)(ee,S,M)*z%M,te=(0,s.pow2)(re,$,M)*X%M,Q=(0,s.pow2)(te,I,M)*U%M,J=(0,s.pow2)(Q,_,M);if(!p.eql(p.sqr(J),g))throw new Error("Cannot find square root");return J}const p=(0,s.Field)(u,void 0,void 0,{sqrt:w});e.secp256k1=(0,r.createCurve)({a:l,b:BigInt(7),Fp:p,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:g=>{const M=d,S=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),I=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),C=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),q=S,$=BigInt("0x100000000000000000000000000000000"),L=T(q*g,M),F=T(-I*g,M);let U=(0,s.mod)(g-L*S-F*C,M),z=(0,s.mod)(-L*I-F*q,M);const Y=U>$,W=z>$;if(Y&&(U=M-U),W&&(z=M-z),U>$||z>$)throw new Error("splitScalar: Endomorphism failed, k="+g);return{k1neg:Y,k1:U,k2neg:W,k2:z}}}},t.sha256);const B={};function j(g,...M){let S=B[g];if(S===void 0){const I=(0,t.sha256)(Uint8Array.from(g,C=>C.charCodeAt(0)));S=(0,i.concatBytes)(I,I),B[g]=S}return(0,t.sha256)((0,i.concatBytes)(S,...M))}const h=g=>g.toRawBytes(!0).slice(1),P=g=>(0,i.numberToBytesBE)(g,32),a=g=>(0,s.mod)(g,u),v=g=>(0,s.mod)(g,d),b=e.secp256k1.ProjectivePoint,m=(g,M,S)=>b.BASE.multiplyAndAddUnsafe(g,M,S);function A(g){let M=e.secp256k1.utils.normPrivateKeyToScalar(g),S=b.fromPrivateKey(M);return{scalar:S.hasEvenY()?M:v(-M),bytes:h(S)}}function y(g){(0,i.aInRange)("x",g,f,u);const M=a(g*g),S=a(M*g+BigInt(7));let I=w(S);I%_!==l&&(I=a(-I));const C=new b(g,I,f);return C.assertValidity(),C}const E=i.bytesToNumberBE;function x(...g){return v(E(j("BIP0340/challenge",...g)))}function O(g){return A(g).bytes}function R(g,M,S=(0,n.randomBytes)(32)){const I=(0,i.ensureBytes)("message",g),{bytes:C,scalar:q}=A(M),$=(0,i.ensureBytes)("auxRand",S,32),L=P(q^E(j("BIP0340/aux",$))),F=j("BIP0340/nonce",L,C,I),U=v(E(F));if(U===l)throw new Error("sign failed: k is zero");const{bytes:z,scalar:Y}=A(U),W=x(z,C,I),V=new Uint8Array(64);if(V.set(z,0),V.set(P(v(Y+W*q)),32),!k(V,I,C))throw new Error("sign: Invalid signature produced");return V}function k(g,M,S){const I=(0,i.ensureBytes)("signature",g,64),C=(0,i.ensureBytes)("message",M),q=(0,i.ensureBytes)("publicKey",S,32);try{const $=y(E(q)),L=E(I.subarray(0,32));if(!(0,i.inRange)(L,f,u))return!1;const F=E(I.subarray(32,64));if(!(0,i.inRange)(F,f,d))return!1;const U=x(P(L),h($),C),z=m($,F,v(-U));return!(!z||!z.hasEvenY()||z.toAffine().x!==L)}catch{return!1}}e.schnorr={getPublicKey:O,sign:R,verify:k,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:y,pointToBytes:h,numberToBytesBE:i.numberToBytesBE,bytesToNumberBE:i.bytesToNumberBE,taggedHash:j,mod:s.mod}};const N=(0,o.isogenyMap)(p,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a4
3713deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(g=>g.map(M=>BigInt(M)))),H=(0,c.mapToCurveSimpleSWU)(p,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:p.create(BigInt("-11"))});e.secp256k1_hasher=(0,o.createHasher)(e.secp256k1.ProjectivePoint,g=>{const{x:M,y:S}=H(p.create(g[0]));return N(M,S)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:p.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256}),e.hashToCurve=e.secp256k1_hasher.hashToCurve,e.encodeToCurve=e.secp256k1_hasher.encodeToCurve})(df)),df}var z1;function Wf(){if(z1)return ls;z1=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.recoverPublicKey=o;const e=at(),t=ft(),n=Fe(),r=ie();async function o({hash:i,signature:c}){const u=(0,e.isHex)(i)?i:(0,r.toHex)(i),{secp256k1:d}=await Promise.resolve().then(()=>io());return`0x${(()=>{if(typeof c=="object"&&"r"in c&&"s"in c){const{r:p,s:B,v:j,yParity:h}=c,P=Number(h??j),a=s(P);return new d.Signature((0,n.hexToBigInt)(p),(0,n.hexToBigInt)(B)).addRecoveryBit(a)}const _=(0,e.isHex)(c)?c:(0,r.toHex)(c);if((0,t.size)(_)!==65)throw new Error("invalid signature length");const T=(0,n.hexToNumber)(`0x${_.slice(130)}`),w=s(T);return d.Signature.fromCompact(_.substring(2,130)).addRecoveryBit(w)})().recoverPublicKey(u.substring(2)).toHex(!1)}`}function s(i){if(i===0||i===1)return i;if(i===27)return 0;if(i===28)return 1;throw new Error("Invalid yParityOrV value")}return ls}var D1;function Ar(){if(D1)return ds;D1=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.recoverAddress=n;const e=v_(),t=Wf();async function n({hash:r,signature:o}){return(0,e.publicKeyToAddress)(await(0,t.recoverPublicKey)({hash:r,signature:o}))}return ds}var bs={},hn={},G1;function oo(){if(G1)return hn;G1=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.toRlp=o,hn.bytesToRlp=s,hn.hexToRlp=i;const e=ue(),t=eo(),n=Ae(),r=ie();function o(f,_="hex"){const T=c(f),w=(0,t.createCursor)(new Uint8Array(T.length));return T.encode(w),_==="hex"?(0,r.bytesToHex)(w.bytes):w.bytes}function s(f,_="bytes"){return o(f,_)}function i(f,_="hex"){return o(f,_)}function c(f){return Array.isArray(f)?u(f.map(_=>c(_))):d(f)}function u(f){const _=f.reduce((p,B)=>p+B.length,0),T=l(_);return{length:_<=55?1+_:1+T+_,encode(p){_<=55?p.pushByte(192+_):(p.pushByte(247+T),T===1?p.pushUint8(_):T===2?p.pushUint16(_):T===3?p.pushUint24(_):p.pushUint32(_));for(const{encode:B}of f)B(p)}}}function d(f){const _=typeof f=="string"?(0,n.hexToBytes)(f):f,T=l(_.length);return{length:_.length===1&&_[0]<128?1:_.length<=55?1+_.length:1+T+_.length,encode(p){_.length===1&&_[0]<128?p.pushBytes(_):_.length<=55?(p.pushByte(128+_.length),p.pushBytes(_)):(p.pushByte(183+T),T===1?p.pushUint8(_.length):T===2?p.pushUint16(_.length):T===3?p.pushUint24(_.length):p.pushUint32(_.length),p.pushBytes(_))}}}function l(f){if(f<2**8)return 1;if(f<2**16)return 2;if(f<2**24)return 3;if(f<2**32)return 4;throw new e.BaseError("Length is too large.")}return hn}var V1;function j_(){if(V1)return bs;V1=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.hashAuthorization=s;const e=We(),t=Ae(),n=ie(),r=oo(),o=lt();function s(i){const{chainId:c,nonce:u,to:d}=i,l=i.contractAddress??i.address,f=(0,o.keccak256)((0,e.concatHex)(["0x05",(0,r.toRlp)([c?(0,n.numberToHex)(c):"0x",l,u?(0,n.numberToHex)(u):"0x"])]));return d==="bytes"?(0,t.hexToBytes)(f):f}return bs}var W1;function ad(){if(W1)return us;W1=1,Object.defineProperty(us,"__esModule",{value:!0}),us.recoverAuthorizationAddress=n;const e=Ar(),t=j_();async function n(r){const{authorization:o,signature:s}=r;return(0,e.recoverAddress)({hash:(0,t.hashAuthorization)(o),signature:s??o})}return us}var ms={},pi={},K1;
37function A_(){if(K1)return pi;K1=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.EstimateGasExecutionError=void 0;const e=ro(),t=tn(),n=ue(),r=wt();class o extends n.BaseError{constructor(i,{account:c,docsPath:u,chain:d,data:l,gas:f,gasPrice:_,maxFeePerGas:T,maxPriorityFeePerGas:w,nonce:p,to:B,value:j}){var P;const h=(0,r.prettyPrint)({from:c==null?void 0:c.address,to:B,value:typeof j<"u"&&`${(0,e.formatEther)(j)} ${((P=d==null?void 0:d.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:l,gas:f,gasPrice:typeof _<"u"&&`${(0,t.formatGwei)(_)} gwei`,maxFeePerGas:typeof T<"u"&&`${(0,t.formatGwei)(T)} gwei`,maxPriorityFeePerGas:typeof w<"u"&&`${(0,t.formatGwei)(w)} gwei`,nonce:p});super(i.shortMessage,{cause:i,docsPath:u,metaMessages:[...i.metaMessages?[...i.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=i}}return pi.EstimateGasExecutionError=o,pi}var Pe={},Z1;function sr(){if(Z1)return Pe;Z1=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.UnknownNodeError=Pe.TipAboveFeeCapError=Pe.TransactionTypeNotSupportedError=Pe.IntrinsicGasTooLowError=Pe.IntrinsicGasTooHighError=Pe.InsufficientFundsError=Pe.NonceMaxValueError=Pe.NonceTooLowError=Pe.NonceTooHighError=Pe.FeeCapTooLowError=Pe.FeeCapTooHighError=Pe.ExecutionRevertedError=void 0;const e=tn(),t=ue();class n extends t.BaseError{constructor({cause:p,message:B}={}){var h;const j=(h=B==null?void 0:B.replace("execution reverted: ",""))==null?void 0:h.replace("execution reverted","");super(`Execution reverted ${j?`with reason: ${j}`:"for an unknown reason"}.`,{cause:p,name:"ExecutionRevertedError"})}}Pe.ExecutionRevertedError=n,Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class r extends t.BaseError{constructor({cause:p,maxFeePerGas:B}={}){super(`The fee cap (\`maxFeePerGas\`${B?` = ${(0,e.formatGwei)(B)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:p,name:"FeeCapTooHighError"})}}Pe.FeeCapTooHighError=r,Object.defineProperty(r,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends t.BaseError{constructor({cause:p,maxFeePerGas:B}={}){super(`The fee cap (\`maxFeePerGas\`${B?` = ${(0,e.formatGwei)(B)}`:""} gwei) cannot be lower than the block base fee.`,{cause:p,name:"FeeCapTooLowError"})}}Pe.FeeCapTooLowError=o,Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class s extends t.BaseError{constructor({cause:p,nonce:B}={}){super(`Nonce provided for the transaction ${B?`(${B}) `:""}is higher than the next one expected.`,{cause:p,name:"NonceTooHighError"})}}Pe.NonceTooHighError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class i extends t.BaseError{constructor({cause:p,nonce:B}={}){super([`Nonce provided for the transaction ${B?`(${B}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` 38`),{cause:p,name:"NonceTooLowError"})}}Pe.NonceTooLowError=i,Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class c extends t.BaseError{constructor({cause:p,nonce:B}={}){super(`Nonce provided for the transaction ${B?`(${B}) `:""}exceeds the maximum allowed nonce.`,{cause:p,name:"NonceMaxValueError"})}}Pe.NonceMaxValueError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class u extends t.BaseError{constructor({cause:p}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` 39`),{cause:p,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Pe.InsufficientFundsError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class d extends t.BaseError{constructor({cause:p,gas:B}={}){super(`The amount of gas ${B?`(${B}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:p,name:"IntrinsicGasTooHighError"})}}Pe.IntrinsicGasTooHighError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class l extends t.BaseError{constructor({cause:p,gas:B}={}){super(`The amount of gas ${B?`(${B}) `:""}provided for the transaction is too low.`,{cause:p,name:"IntrinsicGasTooLowError"})}}Pe.IntrinsicGasTooLowError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends t.BaseError{constructor({cause:p}){super("The transaction type is not supported for this chain.",{cause:p,name:"TransactionTypeNotSupportedError"})}}
39Pe.TransactionTypeNotSupportedError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class _ extends t.BaseError{constructor({cause:p,maxPriorityFeePerGas:B,maxFeePerGas:j}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${B?` = ${(0,e.formatGwei)(B)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${j?` = ${(0,e.formatGwei)(j)} gwei`:""}).`].join(` 40`),{cause:p,name:"TipAboveFeeCapError"})}}Pe.TipAboveFeeCapError=_,Object.defineProperty(_,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class T extends t.BaseError{constructor({cause:p}){super(`An error occurred while executing: ${p==null?void 0:p.shortMessage}`,{cause:p,name:"UnknownNodeError"})}}return Pe.UnknownNodeError=T,Pe}var _i={},Y1;function so(){if(Y1)return _i;Y1=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.containsNodeError=o,_i.getNodeError=s;const e=ue(),t=sr(),n=qt(),r=Pr();function o(i){return i instanceof r.TransactionRejectedRpcError||i instanceof r.InvalidInputRpcError||i instanceof n.RpcRequestError&&i.code===t.ExecutionRevertedError.code}function s(i,c){const u=(i.details||"").toLowerCase(),d=i instanceof e.BaseError?i.walk(l=>(l==null?void 0:l.code)===t.ExecutionRevertedError.code):i;return d instanceof e.BaseError?new t.ExecutionRevertedError({cause:i,message:d.details}):t.ExecutionRevertedError.nodeMessage.test(u)?new t.ExecutionRevertedError({cause:i,message:i.details}):t.FeeCapTooHighError.nodeMessage.test(u)?new t.FeeCapTooHighError({cause:i,maxFeePerGas:c==null?void 0:c.maxFeePerGas}):t.FeeCapTooLowError.nodeMessage.test(u)?new t.FeeCapTooLowError({cause:i,maxFeePerGas:c==null?void 0:c.maxFeePerGas}):t.NonceTooHighError.nodeMessage.test(u)?new t.NonceTooHighError({cause:i,nonce:c==null?void 0:c.nonce}):t.NonceTooLowError.nodeMessage.test(u)?new t.NonceTooLowError({cause:i,nonce:c==null?void 0:c.nonce}):t.NonceMaxValueError.nodeMessage.test(u)?new t.NonceMaxValueError({cause:i,nonce:c==null?void 0:c.nonce}):t.InsufficientFundsError.nodeMessage.test(u)?new t.InsufficientFundsError({cause:i}):t.IntrinsicGasTooHighError.nodeMessage.test(u)?new t.IntrinsicGasTooHighError({cause:i,gas:c==null?void 0:c.gas}):t.IntrinsicGasTooLowError.nodeMessage.test(u)?new t.IntrinsicGasTooLowError({cause:i,gas:c==null?void 0:c.gas}):t.TransactionTypeNotSupportedError.nodeMessage.test(u)?new t.TransactionTypeNotSupportedError({cause:i}):t.TipAboveFeeCapError.nodeMessage.test(u)?new t.TipAboveFeeCapError({cause:i,maxFeePerGas:c==null?void 0:c.maxFeePerGas,maxPriorityFeePerGas:c==null?void 0:c.maxPriorityFeePerGas}):new t.UnknownNodeError({cause:i})}return _i}var J1;function S_(){if(J1)return ms;J1=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.getEstimateGasError=r;const e=A_(),t=sr(),n=so();function r(o,{docsPath:s,...i}){const c=(()=>{const u=(0,n.getNodeError)(o,i);return u instanceof t.UnknownNodeError?o:u})();return new e.EstimateGasExecutionError(c,{docsPath:s,...i})}return ms}var hs={},X1;function qn(){if(X1)return hs;X1=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.extract=e;function e(t,{format:n}){if(!n)return{};const r={};function o(i){const c=Object.keys(i);for(const u of c)u in t&&(r[u]=t[u]),i[u]&&typeof i[u]=="object"&&!Array.isArray(i[u])&&o(i[u])}const s=n(t||{});return o(s),r}return hs}var bf={},ys={},Q1;function ao(){if(Q1)return ys;Q1=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.defineFormatter=e;function e(t,n){return({exclude:r,format:o})=>({exclude:r,format:s=>{const i=n(s);if(r)for(const c of r)delete i[c];return{...i,...o(s)}},type:t})}return ys}var eb;function ar(){return eb||(eb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.rpcTransactionType=void 0,e.formatTransactionRequest=r;const t=ie(),n=ao();e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function r(s){const i={};return typeof s.authorizationList<"u"&&(i.authorizationList=o(s.authorizationList)),typeof s.accessList<"u"&&(i.accessList=s.accessList),typeof s.blobVersionedHashes<"u"&&(i.blobVersionedHashes=s.blobVersionedHashes),typeof s.blobs<"u"&&(typeof s.blobs[0]!="str
40ing"?i.blobs=s.blobs.map(c=>(0,t.bytesToHex)(c)):i.blobs=s.blobs),typeof s.data<"u"&&(i.data=s.data),typeof s.from<"u"&&(i.from=s.from),typeof s.gas<"u"&&(i.gas=(0,t.numberToHex)(s.gas)),typeof s.gasPrice<"u"&&(i.gasPrice=(0,t.numberToHex)(s.gasPrice)),typeof s.maxFeePerBlobGas<"u"&&(i.maxFeePerBlobGas=(0,t.numberToHex)(s.maxFeePerBlobGas)),typeof s.maxFeePerGas<"u"&&(i.maxFeePerGas=(0,t.numberToHex)(s.maxFeePerGas)),typeof s.maxPriorityFeePerGas<"u"&&(i.maxPriorityFeePerGas=(0,t.numberToHex)(s.maxPriorityFeePerGas)),typeof s.nonce<"u"&&(i.nonce=(0,t.numberToHex)(s.nonce)),typeof s.to<"u"&&(i.to=s.to),typeof s.type<"u"&&(i.type=e.rpcTransactionType[s.type]),typeof s.value<"u"&&(i.value=(0,t.numberToHex)(s.value)),i}e.defineTransactionRequest=(0,n.defineFormatter)("transactionRequest",r);function o(s){return s.map(i=>({address:i.address,r:i.r?(0,t.numberToHex)(BigInt(i.r)):i.r,s:i.s?(0,t.numberToHex)(BigInt(i.s)):i.s,chainId:(0,t.numberToHex)(i.chainId),nonce:(0,t.numberToHex)(i.nonce),...typeof i.yParity<"u"?{yParity:(0,t.numberToHex)(i.yParity)}:{},...typeof i.v<"u"&&typeof i.yParity>"u"?{v:(0,t.numberToHex)(i.v)}:{}}))}})(bf)),bf}var yn={},tb;function Kf(){if(tb)return yn;tb=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.serializeStateMapping=s,yn.serializeAccountStateOverride=i,yn.serializeStateOverride=c;const e=Ot(),t=ed(),n=Gf(),r=bt(),o=ie();function s(u){if(!(!u||u.length===0))return u.reduce((d,{slot:l,value:f})=>{if(l.length!==66)throw new t.InvalidBytesLengthError({size:l.length,targetSize:66,type:"hex"});if(f.length!==66)throw new t.InvalidBytesLengthError({size:f.length,targetSize:66,type:"hex"});return d[l]=f,d},{})}function i(u){const{balance:d,nonce:l,state:f,stateDiff:_,code:T}=u,w={};if(T!==void 0&&(w.code=T),d!==void 0&&(w.balance=(0,o.numberToHex)(d)),l!==void 0&&(w.nonce=(0,o.numberToHex)(l)),f!==void 0&&(w.state=s(f)),_!==void 0){if(w.state)throw new n.StateAssignmentConflictError;w.stateDiff=s(_)}return w}function c(u){if(!u)return;const d={};for(const{address:l,...f}of u){if(!(0,r.isAddress)(l,{strict:!1}))throw new e.InvalidAddressError({address:l});if(d[l])throw new n.AccountStateConflictError({address:l});d[l]=i(f)}return d}return yn}var gs={},G={},rb;function Zf(){return rb||(rb=1,Object.defineProperty(G,"__esModule",{value:!0}),G.minInt144=G.minInt136=G.minInt128=G.minInt120=G.minInt112=G.minInt104=G.minInt96=G.minInt88=G.minInt80=G.minInt72=G.minInt64=G.minInt56=G.minInt48=G.minInt40=G.minInt32=G.minInt24=G.minInt16=G.minInt8=G.maxInt256=G.maxInt248=G.maxInt240=G.maxInt232=G.maxInt224=G.maxInt216=G.maxInt208=G.maxInt200=G.maxInt192=G.maxInt184=G.maxInt176=G.maxInt168=G.maxInt160=G.maxInt152=G.maxInt144=G.maxInt136=G.maxInt128=G.maxInt120=G.maxInt112=G.maxInt104=G.maxInt96=G.maxInt88=G.maxInt80=G.maxInt72=G.maxInt64=G.maxInt56=G.maxInt48=G.maxInt40=G.maxInt32=G.maxInt24=G.maxInt16=G.maxInt8=void 0,G.maxUint256=G.maxUint248=G.maxUint240=G.maxUint232=G.maxUint224=G.maxUint216=G.maxUint208=G.maxUint200=G.maxUint192=G.maxUint184=G.maxUint176=G.maxUint168=G.maxUint160=G.maxUint152=G.maxUint144=G.maxUint136=G.maxUint128=G.maxUint120=G.maxUint112=G.maxUint104=G.maxUint96=G.maxUint88=G.maxUint80=G.maxUint72=G.maxUint64=G.maxUint56=G.maxUint48=G.maxUint40=G.maxUint32=G.maxUint24=G.maxUint16=G.maxUint8=G.minInt256=G.minInt248=G.minInt240=G.minInt232=G.minInt224=G.minInt216=G.minInt208=G.minInt200=G.minInt192=G.minInt184=G.minInt176=G.minInt168=G.minInt160=G.minInt152=void 0,G.maxInt8=2n**(8n-1n)-1n,G.maxInt16=2n**(16n-1n)-1n,G.maxInt24=2n**(24n-1n)-1n,G.maxInt32=2n**(32n-1n)-1n,G.maxInt40=2n**(40n-1n)-1n,G.maxInt48=2n**(48n-1n)-1n,G.maxInt56=2n**(56n-1n)-1n,G.maxInt64=2n**(64n-1n)-1n,G.maxInt72=2n**(72n-1n)-1n,G.maxInt80=2n**(80n-1n)-1n,G.maxInt88=2n**(88n-1n)-1n,G.maxInt96=2n**(96n-1n)-1n,G.maxInt104=2n**(104n-1n)-1n,G.maxInt112=2n**(112n-1n)-1n,G.maxInt120=2n**(120n-1n)-1n,G.maxInt128=2n**(128n-1n)-1n,G.maxInt136=2n**(136n-1n)-1n,G.maxInt144=2n**(144n-1n)-1n,G.maxInt152=2n**(152n-1n)-1n,G.maxInt160=2n**(160n-1n)-1n,G.maxInt168=2n**(168n-1n)-1n,G.maxInt176=2n**(176n-1n)-1n,G.maxInt184=2n**(184n-1n)-1n,G.maxInt192=2n**(192n-1n)-1n,G.maxInt200=2n**(200n-1n)-1n,G.maxInt208=2n**(208n-1n)-1n,G.maxInt216=2n**(216n-1n)-1n,G.maxInt224=2n**(224n-1n)-1n,G.maxInt232=2n**(232n-1n)-1n,G.maxInt240=2n**(240n-1n)-1n,G.maxInt248=2n**(248n-1n)-1n,G.maxInt256=2n**(256n-1n)-1n,G.minInt8=-(2n**(8n-1n)),G.minInt16=-(2n**(16n-1n)),G.minInt24=-(2n**(24n-1n)),G.minInt32=-(2n**(32n-1n)),G.minInt40=-(2n**(40n-1n)),G.minInt48=-(2n**(48n-1n)),G.minInt56=-(2n**(56n-1n)),G.minInt64=-(2n**(64n-1n)),G.minInt72=-(2n**(72n-1n)),G.minInt80=-(2n**(80n-1n)),G.minInt88=-(2n**(88n-1n)),G.minInt96=-(2n**(96n-1n)),G.minInt104=-(2n**(104n-1n)),G.minInt112=-(2n**(112n-1n)),G.minInt120=-(2n**(120n-1n)),G.minInt128=-(2n**(128n-1n)),G.minInt136=-(2n**(136n-1n)),G.minInt144=-(2n**(144n-1n)),G.minInt152=-(2n**(152n-1n)),G.minInt160=-(2n**(160n-1n)),G.minInt168=-(2n**(168
40n-1n)),G.minInt176=-(2n**(176n-1n)),G.minInt184=-(2n**(184n-1n)),G.minInt192=-(2n**(192n-1n)),G.minInt200=-(2n**(200n-1n)),G.minInt208=-(2n**(208n-1n)),G.minInt216=-(2n**(216n-1n)),G.minInt224=-(2n**(224n-1n)),G.minInt232=-(2n**(232n-1n)),G.minInt240=-(2n**(240n-1n)),G.minInt248=-(2n**(248n-1n)),G.minInt256=-(2n**(256n-1n)),G.maxUint8=2n**8n-1n,G.maxUint16=2n**16n-1n,G.maxUint24=2n**24n-1n,G.maxUint32=2n**32n-1n,G.maxUint40=2n**40n-1n,G.maxUint48=2n**48n-1n,G.maxUint56=2n**56n-1n,G.maxUint64=2n**64n-1n,G.maxUint72=2n**72n-1n,G.maxUint80=2n**80n-1n,G.maxUint88=2n**88n-1n,G.maxUint96=2n**96n-1n,G.maxUint104=2n**104n-1n,G.maxUint112=2n**112n-1n,G.maxUint120=2n**120n-1n,G.maxUint128=2n**128n-1n,G.maxUint136=2n**136n-1n,G.maxUint144=2n**144n-1n,G.maxUint152=2n**152n-1n,G.maxUint160=2n**160n-1n,G.maxUint168=2n**168n-1n,G.maxUint176=2n**176n-1n,G.maxUint184=2n**184n-1n,G.maxUint192=2n**192n-1n,G.maxUint200=2n**200n-1n,G.maxUint208=2n**208n-1n,G.maxUint216=2n**216n-1n,G.maxUint224=2n**224n-1n,G.maxUint232=2n**232n-1n,G.maxUint240=2n**240n-1n,G.maxUint248=2n**248n-1n,G.maxUint256=2n**256n-1n),G}var nb;function cr(){if(nb)return gs;nb=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.assertRequest=i;const e=ze(),t=Zf(),n=Ot(),r=sr(),o=wt(),s=bt();function i(c){const{account:u,gasPrice:d,maxFeePerGas:l,maxPriorityFeePerGas:f,to:_}=c,T=u?(0,e.parseAccount)(u):void 0;if(T&&!(0,s.isAddress)(T.address))throw new n.InvalidAddressError({address:T.address});if(_&&!(0,s.isAddress)(_))throw new n.InvalidAddressError({address:_});if(typeof d<"u"&&(typeof l<"u"||typeof f<"u"))throw new o.FeeConflictError;if(l&&l>t.maxUint256)throw new r.FeeCapTooHighError({maxFeePerGas:l});if(f&&l&&f>l)throw new r.TipAboveFeeCapError({maxFeePerGas:l,maxPriorityFeePerGas:f})}return gs}var mf={},vi={},Xt={},ib;function cd(){if(ib)return Xt;ib=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.MaxFeePerGasTooLowError=Xt.Eip1559FeesNotSupportedError=Xt.BaseFeeScalarError=void 0;const e=tn(),t=ue();class n extends t.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}Xt.BaseFeeScalarError=n;class r extends t.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}
40Xt.Eip1559FeesNotSupportedError=r;class o extends t.BaseError{constructor({maxPriorityFeePerGas:i}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,e.formatGwei)(i)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}return Xt.MaxFeePerGasTooLowError=o,Xt}var Ei={},ps={},wi={},ob;function Yf(){if(ob)return wi;ob=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.BlockNotFoundError=void 0;const e=ue();class t extends e.BaseError{constructor({blockHash:r,blockNumber:o}){let s="Block";r&&(s=`Block at hash "${r}"`),o&&(s=`Block at number "${o}"`),super(`${s} could not be found.`,{name:"BlockNotFoundError"})}}return wi.BlockNotFoundError=t,wi}var gn={},hf={},sb;function co(){return sb||(sb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.transactionType=void 0,e.formatTransaction=r;const t=Fe(),n=ao();e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function r(s){const i={...s,blockHash:s.blockHash?s.blockHash:null,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,chainId:s.chainId?(0,t.hexToNumber)(s.chainId):void 0,gas:s.gas?BigInt(s.gas):void 0,gasPrice:s.gasPrice?BigInt(s.gasPrice):void 0,maxFeePerBlobGas:s.maxFeePerBlobGas?BigInt(s.maxFeePerBlobGas):void 0,maxFeePerGas:s.maxFeePerGas?BigInt(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?BigInt(s.maxPriorityFeePerGas):void 0,nonce:s.nonce?(0,t.hexToNumber)(s.nonce):void 0,to:s.to?s.to:null,transactionIndex:s.transactionIndex?Number(s.transactionIndex):null,type:s.type?e.transactionType[s.type]:void 0,typeHex:s.type?s.type:void 0,value:s.value?BigInt(s.value):void 0,v:s.v?BigInt(s.v):void 0};return s.authorizationList&&(i.authorizationList=o(s.authorizationList)),i.yParity=(()=>{if(s.yParity)return Number(s.yParity);if(typeof i.v=="bigint"){if(i.v===0n||i.v===27n)return 0;if(i.v===1n||i.v===28n)return 1;if(i.v>=35n)return i.v%2n===0n?1:0}})(),i.type==="legacy"&&(delete i.accessList,delete i.maxFeePerBlobGas,delete i.maxFeePerGas,delete i.maxPriorityFeePerGas,delete i.yParity),i.type==="eip2930"&&(delete i.maxFeePerBlobGas,delete i.maxFeePerGas,delete i.maxPriorityFeePerGas),i.type==="eip1559"&&delete i.maxFeePerBlobGas,i}e.defineTransaction=(0,n.defineFormatter)("transaction",r);function o(s){return s.map(i=>({address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:i.r,s:i.s,yParity:Number(i.yParity)}))}})(hf)),hf}var ab;function ud(){if(ab)return gn;ab=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.defineBlock=void 0,gn.formatBlock=n;const e=ao(),t=co();function n(r){const o=(r.transactions??[]).map(s=>typeof s=="string"?s:(0,t.formatTransaction)(s));return{...r,baseFeePerGas:r.baseFeePerGas?BigInt(r.baseFeePerGas):null,blobGasUsed:r.blobGasUsed?BigInt(r.blobGasUsed):void 0,difficulty:r.difficulty?BigInt(r.difficulty):void 0,excessBlobGas:r.excessBlobGas?BigInt(r.excessBlobGas):void 0,gasLimit:r.gasLimit?BigInt(r.gasLimit):void 0,gasUsed:r.gasUsed?BigInt(r.gasUsed):void 0,hash:r.hash?r.hash:null,logsBloom:r.logsBloom?r.logsBloom:null,nonce:r.nonce?r.nonce:null,number:r.number?BigInt(r.number):null,size:r.size?BigInt(r.size):void 0,timestamp:r.timestamp?BigInt(r.timestamp):void 0,transactions:o,totalDifficulty:r.totalDifficulty?BigInt(r.totalDifficulty):null}}return gn.defineBlock=(0,e.defineFormatter)("block",n),gn}var cb;function Mn(){if(cb)return ps;cb=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.getBlock=r;const e=Yf(),t=ie(),n=ud();async function r(o,{blockHash:s,blockNumber:i,blockTag:c=o.experimental_blockTag??"latest",includeTransactions:u}={}){var T,w,p;const d=u??!1,l=i!==void 0?(0,t.numberToHex)(i):void 0;let f=null;if(s?f=await o.request({method:"eth_getBlockByHash",params:[s,d]},{dedupe:!0}):f=await o.request({method:"eth_getBlockByNumber",params:[l||c,d]},{dedupe:!!l}),!f)throw new e.BlockNotFoundError({blockHash:s,blockNumber:i});return(((p=(w=(T=o.chain)==null?void 0:T.formatters)==null?void 0:w.block)==null?void 0:p.format)||n.formatBlock)(f)}return ps}var _s={},ub;function Jf(){if(ub)return _s;ub=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.getGasPrice=e;async function e(t){const n=await t.request({method:"eth_gasPrice"});return BigInt(n)}return _s}var db;function I_(){if(db)return Ei;db=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.estimateMaxPriorityFeePerGas=s,Ei.internal_estimateMaxPriorityFeePerGas=i;const e=cd(),t=Fe(),n=ve(),r=Mn(),o=Jf();async function s(c,u){return i(c,u)}async function i(c,u){var _,T;const{block:d,chain:l=c.chain,request:f}=u||{};try{const w=((_=l==null?void 0:l.fees)==null?void 0:_.maxPriorityFeePerGas)??((T=l==null?void 0:l.fees)==null?void 0:T.defaultPriorityFee);if(typeof w=="function"){const B=d||await(0,n.getAction)(c,r.getBlock,"getBlock")({}),j=await w({block:B,client:c,request:f});if(j===null)throw new Error;return j}if(typeof w<"u")return w;const p=await c.request({method:"eth_maxPriorityFeePerGas"});return(0,t.hexToBigInt)(p)}catch{const[w,p]=await Promise.all([d?Promise.resolve(d):(0,n.getAction)(c,r.getBlock,"getBlock")({}),(0,n.getAction)(c,o.getGasPrice,"getGasPrice")({})]);if(typeof w.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const B=p-w.baseFeePerGas;return B<0n?0n:B}}return Ei}var fb;
40function T_(){if(fb)return vi;fb=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.estimateFeesPerGas=s,vi.internal_estimateFeesPerGas=i;const e=cd(),t=ve(),n=I_(),r=Mn(),o=Jf();async function s(c,u){return i(c,u)}async function i(c,u){var P,a;const{block:d,chain:l=c.chain,request:f,type:_="eip1559"}=u||{},T=await(async()=>{var v,b;return typeof((v=l==null?void 0:l.fees)==null?void 0:v.baseFeeMultiplier)=="function"?l.fees.baseFeeMultiplier({block:d,client:c,request:f}):((b=l==null?void 0:l.fees)==null?void 0:b.baseFeeMultiplier)??1.2})();if(T<1)throw new e.BaseFeeScalarError;const p=10**(((P=T.toString().split(".")[1])==null?void 0:P.length)??0),B=v=>v*BigInt(Math.ceil(T*p))/BigInt(p),j=d||await(0,t.getAction)(c,r.getBlock,"getBlock")({});if(typeof((a=l==null?void 0:l.fees)==null?void 0:a.estimateFeesPerGas)=="function"){const v=await l.fees.estimateFeesPerGas({block:d,client:c,multiply:B,request:f,type:_});if(v!==null)return v}if(_==="eip1559"){if(typeof j.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const v=typeof(f==null?void 0:f.maxPriorityFeePerGas)=="bigint"?f.maxPriorityFeePerGas:await(0,n.internal_estimateMaxPriorityFeePerGas)(c,{block:j,chain:l,request:f}),b=B(j.baseFeePerGas);return{maxFeePerGas:(f==null?void 0:f.maxFeePerGas)??b+v,maxPriorityFeePerGas:v}}return{gasPrice:(f==null?void 0:f.gasPrice)??B(await(0,t.getAction)(c,o.getGasPrice,"getGasPrice")({}))}}return vi}var vs={},lb;function dd(){if(lb)return vs;lb=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.getTransactionCount=n;const e=Fe(),t=ie();async function n(r,{address:o,blockTag:s="latest",blockNumber:i}){const c=await r.request({method:"eth_getTransactionCount",params:[o,typeof i=="bigint"?(0,t.numberToHex)(i):s]},{dedupe:!!i});return(0,e.hexToNumber)(c)}return vs}var Es={},bb;function fd(){if(bb)return Es;bb=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.blobsToCommitments=n;const e=Ae(),t=ie();function n(r){const{kzg:o}=r,s=r.to??(typeof r.blobs[0]=="string"?"hex":"bytes"),i=typeof r.blobs[0]=="string"?r.blobs.map(u=>(0,e.hexToBytes)(u)):r.blobs,c=[];for(const u of i)c.push(Uint8Array.from(o.blobToKzgCommitment(u)));return s==="bytes"?c:c.map(u=>(0,t.bytesToHex)(u))}return Es}var ws={},mb;function ld(){if(mb)return ws;mb=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.blobsToProofs=n;const e=Ae(),t=ie();function n(r){const{kzg:o}=r,s=r.to??(typeof r.blobs[0]=="string"?"hex":"bytes"),i=typeof r.blobs[0]=="string"?r.blobs.map(d=>(0,e.hexToBytes)(d)):r.blobs,c=typeof r.commitments[0]=="string"?r.commitments.map(d=>(0,e.hexToBytes)(d)):r.commitments,u=[];for(let d=0;d<i.length;d++){const l=i[d],f=c[d];u.push(Uint8Array.from(o.computeBlobKzgProof(l,f)))}return s==="bytes"?u:u.map(d=>(0,t.bytesToHex)(d))}return ws}var Ps={},js={},As={},St={},hb;function g6(){if(hb)return St;hb=1,Object.defineProperty(St,"__esModule",{value:!0}),St.sha224=St.SHA224=St.sha256=St.SHA256=void 0;const e=w_();return St.SHA256=e.SHA256,St.sha256=e.sha256,St.SHA224=e.SHA224,St.sha224=e.sha224,St}var yb;function Xf(){if(yb)return As;yb=1,Object.defineProperty(As,"__esModule",{value:!0}),As.sha256=o;const e=g6(),t=at(),n=Ae(),r=ie();function o(s,i){const c=i||"hex",u=(0,e.sha256)((0,t.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return c==="bytes"?u:(0,r.toHex)(u)}return As}var gb;function Qf(){if(gb)return js;gb=1,Object.defineProperty(js,"__esModule",{value:!0}),js.commitmentToVersionedHash=n;const e=ie(),t=Xf();function n(r){const{commitment:o,version:s=1}=r,i=r.to??(typeof o=="string"?"hex":"bytes"),c=(0,t.sha256)(o,"bytes");return c.set([s],0),i==="bytes"?c:(0,e.bytesToHex)(c)}return js}var pb;function e0(){if(pb)return Ps;pb=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.commitmentsToVersionedHashes=t;const e=Qf();function t(n){const{commitments:r,version:o}=n,s=n.to??(typeof r[0]=="string"?"hex":"bytes"),i=[];for(const c of r)i.push((0,e.commitmentToVersionedHash)({commitment:c,to:s,version:o}));return i}return Ps}var Ss={},Is={},yf={},_b;function p6(){return _b||(_b=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxBytesPerTransaction=e.bytesPerBlob=e.fieldElementsPerBlob=e.bytesPerFieldElement=void 0;const t=6;e.bytesPerFieldElement=32,e.fieldElementsPerBlob=4096,e.bytesPerBlob=e.bytesPerFieldElement*e.fieldElementsPerBlob,e.maxBytesPerTransaction=e.bytesPerBlob*t-1-1*e.fieldElementsPerBlob*t})(yf)),yf}var It={},Pi={},vb;function B_(){return vb||(vb=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.versionedHashVersionKzg=void 0,Pi.versionedHashVersionKzg=1),Pi}var Eb;function x_(){if(Eb)return It;
40Eb=1,Object.defineProperty(It,"__esModule",{value:!0}),It.InvalidVersionedHashVersionError=It.InvalidVersionedHashSizeError=It.EmptyBlobError=It.BlobSizeTooLargeError=void 0;const e=B_(),t=ue();class n extends t.BaseError{constructor({maxSize:c,size:u}){super("Blob size is too large.",{metaMessages:[`Max: ${c} bytes`,`Given: ${u} bytes`],name:"BlobSizeTooLargeError"})}}It.BlobSizeTooLargeError=n;class r extends t.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}It.EmptyBlobError=r;class o extends t.BaseError{constructor({hash:c,size:u}){super(`Versioned hash "${c}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${u}`],name:"InvalidVersionedHashSizeError"})}}It.InvalidVersionedHashSizeError=o;class s extends t.BaseError{constructor({hash:c,version:u}){super(`Versioned hash "${c}" version is invalid.`,{metaMessages:[`Expected: ${e.versionedHashVersionKzg}`,`Received: ${u}`],name:"InvalidVersionedHashVersionError"})}}return It.InvalidVersionedHashVersionError=s,It}var wb;function R_(){if(wb)return Is;wb=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.toBlobs=i;const e=p6(),t=x_(),n=eo(),r=ft(),o=Ae(),s=ie();
40function i(c){const u=c.to??(typeof c.data=="string"?"hex":"bytes"),d=typeof c.data=="string"?(0,o.hexToBytes)(c.data):c.data,l=(0,r.size)(d);if(!l)throw new t.EmptyBlobError;if(l>e.maxBytesPerTransaction)throw new t.BlobSizeTooLargeError({maxSize:e.maxBytesPerTransaction,size:l});const f=[];let _=!0,T=0;for(;_;){const w=(0,n.createCursor)(new Uint8Array(e.bytesPerBlob));let p=0;for(;p<e.fieldElementsPerBlob;){const B=d.slice(T,T+(e.bytesPerFieldElement-1));if(w.pushByte(0),w.pushBytes(B),B.length<31){w.pushByte(128),_=!1;break}p++,T+=31}f.push(w)}return u==="bytes"?f.map(w=>w.bytes):f.map(w=>(0,s.bytesToHex)(w.bytes))}return Is}var Pb;function bd(){if(Pb)return Ss;Pb=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.toBlobSidecars=r;const e=fd(),t=ld(),n=R_();function r(o){const{data:s,kzg:i,to:c}=o,u=o.blobs??(0,n.toBlobs)({data:s,to:c}),d=o.commitments??(0,e.blobsToCommitments)({blobs:u,kzg:i,to:c}),l=o.proofs??(0,t.blobsToProofs)({blobs:u,commitments:d,kzg:i,to:c}),f=[];for(let _=0;_<u.length;_++)f.push({blob:u[_],commitment:d[_],proof:l[_]});return f}return Ss}var Ts={},jb;function md(){if(jb)return Ts;jb=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.getTransactionType=t;const e=wt();function t(n){if(n.type)return n.type;if(typeof n.authorizationList<"u")return"eip7702";if(typeof n.blobs<"u"||typeof n.blobVersionedHashes<"u"||typeof n.maxFeePerBlobGas<"u"||typeof n.sidecars<"u")return"eip4844";if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")return"eip1559";if(typeof n.gasPrice<"u")return typeof n.accessList<"u"?"eip2930":"legacy";throw new e.InvalidSerializableTransactionError({transaction:n})}return Ts}var Bs={},Ab;function Hn(){if(Ab)return Bs;Ab=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.getChainId=t;const e=Fe();async function t(n){const r=await n.request({method:"eth_chainId"},{dedupe:!0});return(0,e.hexToNumber)(r)}return Bs}var Sb;function hd(){return Sb||(Sb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eip1559NetworkCache=e.defaultParameters=void 0,e.prepareTransactionRequest=p;const t=ze(),n=T_(),r=t0(),o=Mn(),s=dd(),i=cd(),c=fd(),u=ld(),d=e0(),l=bd(),f=ve(),_=cr(),T=md(),w=Hn();e.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"],e.eip1559NetworkCache=new Map;async function p(B,j){const{account:h=B.account,blobs:P,chain:a,gas:v,kzg:b,nonce:m,nonceManager:A,parameters:y=e.defaultParameters,type:E}=j,x=h&&(0,t.parseAccount)(h),O={...j,...x?{from:x==null?void 0:x.address}:{}};let R;async function k(){return R||(R=await(0,f.getAction)(B,o.getBlock,"getBlock")({blockTag:"latest"}),R)}let N;async function H(){return N||(a?a.id:typeof j.chainId<"u"?j.chainId:(N=await(0,f.getAction)(B,w.getChainId,"getChainId")({}),N))}if(y.includes("nonce")&&typeof m>"u"&&x)if(A){const g=await H();O.nonce=await A.consume({address:x.address,chainId:g,client:B})}else O.nonce=await(0,f.getAction)(B,s.getTransactionCount,"getTransactionCount")({address:x.address,blockTag:"pending"});if((y.includes("blobVersionedHashes")||y.includes("sidecars"))&&P&&b){const g=(0,c.blobsToCommitments)({blobs:P,kzg:b});if(y.includes("blobVersionedHashes")){const M=(0,d.commitmentsToVersionedHashes)({commitments:g,to:"hex"});O.blobVersionedHashes=M}if(y.includes("sidecars")){const M=(0,u.blobsToProofs)({blobs:P,commitments:g,kzg:b}),S=(0,l.toBlobSidecars)({blobs:P,commitments:g,proofs:M,to:"hex"});O.sidecars=S}}if(y.includes("chainId")&&(O.chainId=await H()),(y.includes("fees")||y.includes("type"))&&typeof E>"u")try{O.type=(0,T.getTransactionType)(O)}catch{let g=e.eip1559NetworkCache.get(B.uid);if(typeof g>"u"){const M=await k();g=typeof(M==null?void 0:M.baseFeePerGas)=="bigint",e.eip1559NetworkCache.set(B.uid,g)}O.type=g?"eip1559":"legacy"}if(y.includes("fees"))if(O.type!=="legacy"&&O.type!=="eip2930"){if(typeof O.maxFeePerGas>"u"||typeof O.maxPriorityFeePerGas>"u"){const g=await k(),{maxFeePerGas:M,maxPriorityFeePerGas:S}=await(0,n.internal_estimateFeesPerGas)(B,{block:g,chain:a,request:O});if(typeof j.maxPriorityFeePerGas>"u"&&j.maxFeePerGas&&j.maxFeePerGas<S)throw new i.MaxFeePerGasTooLowError({maxPriorityFeePerGas:S});O.maxPriorityFeePerGas=S,O.maxFeePerGas=M}}else{if(typeof j.maxFeePerGas<"u"||typeof j.maxPriorityFeePerGas<"u")throw new i.Eip1559FeesNotSupportedError;if(typeof j.gasPrice>"u"){const g=await k(),{gasPrice:M}=await(0,n.internal_estimateFeesPerGas)(B,{block:g,chain:a,request:O,type:"legacy"});O.gasPrice=M}}return y.includes("gas")&&typeof v>"u"&&(O.gas=await(0,f.getAction)(B,r.estimateGas,"estimateGas")({...O,account:x&&{address:x.address,type:"json-rpc"}})),(0,_.assertRequest)(O),delete O.parameters,O}})(mf)),mf}var Ib;function t0(){if(Ib)return cs;Ib=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.estimateGas=l;const e=ze(),t=ue(),n=ad(),r=ie(),o=S_(),s=qn(),i=ar(),c=Kf(),u=cr(),d=hd();async function l(f,_){var p,B,j;const{account:T=f.account}=_,w=T?(0,e.parseAccount)(T):void 0;try{const{accessList:h,authorizationList:P,blobs:a,blobVersionedHashes:v,blockNumber:b,blockTag:m,data:A,gas:y,gasPrice:E,maxFeePerBlobGas:x,maxFeePerGas:O,maxPriorityFeePerGas:R,nonce:k,value:N,stateOverride:H,...g}=await(0,d.prepareTransactionRequest)(f,{..._,parameters:(w==null?void 0:w.type)==="local"?void 0:["blobVersionedHashes"]}),S=(typeof b=="bigint"?(0,r.numberToHex)(b):void 0)||m,I=(0,c.serializeStateOverride)(H),C=await(async()=>
40{if(g.to)return g.to;if(P&&P.length>0)return await(0,n.recoverAuthorizationAddress)({authorization:P[0]}).catch(()=>{throw new t.BaseError("`to` is required. Could not infer from `authorizationList`")})})();(0,u.assertRequest)(_);const q=(j=(B=(p=f.chain)==null?void 0:p.formatters)==null?void 0:B.transactionRequest)==null?void 0:j.format,L=(q||i.formatTransactionRequest)({...(0,s.extract)(g,{format:q}),from:w==null?void 0:w.address,accessList:h,authorizationList:P,blobs:a,blobVersionedHashes:v,data:A,gas:y,gasPrice:E,maxFeePerBlobGas:x,maxFeePerGas:O,maxPriorityFeePerGas:R,nonce:k,to:C,value:N});return BigInt(await f.request({method:"eth_estimateGas",params:I?[L,S??f.experimental_blockTag??"latest",I]:S?[L,S]:[L]}))}catch(h){throw(0,o.getEstimateGasError)(h,{..._,account:w,chain:f.chain})}}return cs}var Tb;function O_(){if(Tb)return Yo;Tb=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.estimateContractGas=s;const e=ze(),t=mt(),n=jr(),r=ve(),o=t0();async function s(i,c){const{abi:u,address:d,args:l,functionName:f,dataSuffix:_,...T}=c,w=(0,t.encodeFunctionData)({abi:u,args:l,functionName:f});try{return await(0,r.getAction)(i,o.estimateGas,"estimateGas")({data:`${w}${_?_.replace("0x",""):""}`,to:d,...T})}catch(p){const B=T.account?(0,e.parseAccount)(T.account):void 0;throw(0,n.getContractError)(p,{abi:u,address:d,args:l,docsPath:"/docs/contract/estimateContractGas",functionName:f,sender:B==null?void 0:B.address})}}return Yo}var xs={},Rs={},Os={},Cs={},Bb;function Mt(){if(Bb)return Cs;Bb=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.isAddressEqual=n;const e=Ot(),t=bt();function n(r,o){if(!(0,t.isAddress)(r,{strict:!1}))throw new e.InvalidAddressError({address:r});if(!(0,t.isAddress)(o,{strict:!1}))throw new e.InvalidAddressError({address:o});return r.toLowerCase()===o.toLowerCase()}return Cs}var qs={},xb;function uo(){if(xb)return qs;xb=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.decodeEventLog=c;const e=Ce(),t=p_(),n=ft(),r=Cn(),o=Er(),s=nr(),i="/docs/contract/decodeEventLog";function c(d){const{abi:l,data:f,strict:_,topics:T}=d,w=_??!0,[p,...B]=T;if(!p)throw new e.AbiEventSignatureEmptyTopicsError({docsPath:i});const j=l.find(A=>A.type==="event"&&p===(0,r.toEventSelector)((0,s.formatAbiItem)(A)));if(!(j&&"name"in j)||j.type!=="event")throw new e.AbiEventSignatureNotFoundError(p,{docsPath:i});const{name:h,inputs:P}=j,a=P==null?void 0:P.some(A=>!("name"in A&&A.name)),v=a?[]:{},b=P.map((A,y)=>[A,y]).filter(([A])=>"indexed"in A&&A.indexed);for(let A=0;A<b.length;A++){const[y,E]=b[A],x=B[A];if(!x)throw new e.DecodeLogTopicsMismatch({abiItem:j,param:y});v[a?E:y.name||E]=u({param:y,value:x})}const m=P.filter(A=>!("indexed"in A&&A.indexed));if(m.length>0){if(f&&f!=="0x")try{const A=(0,o.decodeAbiParameters)(m,f);if(A)if(a)for(let y=0;y<P.length;y++)v[y]=v[y]??A.shift();else for(let y=0;y<m.length;y++)v[m[y].name]=A[y]}catch(A){if(w)throw A instanceof e.AbiDecodingDataSizeTooSmallError||A instanceof t.PositionOutOfBoundsError?new e.DecodeLogDataMismatch({abiItem:j,data:f,params:m,size:(0,n.size)(f)}):A}else if(w)throw new e.DecodeLogDataMismatch({abiItem:j,data:"0x",params:m,size:0})}return{eventName:h,args:Object.values(v).length>0?v:void 0}}function u({param:d,value:l}){return d.type==="string"||d.type==="bytes"||d.type==="tuple"||d.type.match(/^(.*)\[(\d+)?\]$/)?l:((0,o.decodeAbiParameters)([d],l)||[])[0]}return qs}var Rb;function fo(){if(Rb)return Os;Rb=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.parseEventLogs=i;const e=Ce(),t=Mt(),n=Ae(),r=lt(),o=Cn(),s=uo();function i(u){const{abi:d,args:l,logs:f,strict:_=!0}=u,T=(()=>{if(u.eventName)return Array.isArray(u.eventName)?u.eventName:[u.eventName]})();return f.map(w=>{var p;try{const B=d.find(h=>h.type==="event"&&w.topics[0]===(0,o.toEventSelector)(h));if(!B)return null;const j=(0,s.decodeEventLog)({...w,abi:[B],strict:_});return T&&!T.includes(j.eventName)||!c({args:j.args,inputs:B.inputs,matchArgs:l})?null:{...j,...w}}catch(B){let j,h;if(B instanceof e.AbiEventSignatureNotFoundError)return null;if(B instanceof e.DecodeLogDataMismatch||B instanceof e.DecodeLogTopicsMismatch){if
40(_)return null;j=B.abiItem.name,h=(p=B.abiItem.inputs)==null?void 0:p.some(P=>!("name"in P&&P.name))}return{...w,args:h?[]:{},eventName:j}}}).filter(Boolean)}function c(u){const{args:d,inputs:l,matchArgs:f}=u;if(!f)return!0;if(!d)return!1;function _(T,w,p){try{return T.type==="address"?(0,t.isAddressEqual)(w,p):T.type==="string"||T.type==="bytes"?(0,r.keccak256)((0,n.toBytes)(w))===p:w===p}catch{return!1}}return Array.isArray(d)&&Array.isArray(f)?f.every((T,w)=>{if(T==null)return!0;const p=l[w];return p?(Array.isArray(T)?T:[T]).some(j=>_(p,j,d[w])):!1}):typeof d=="object"&&!Array.isArray(d)&&typeof f=="object"&&!Array.isArray(f)?Object.entries(f).every(([T,w])=>{if(w==null)return!0;const p=l.find(j=>j.name===T);return p?(Array.isArray(w)?w:[w]).some(j=>_(p,j,d[T])):!1}):!1}return Os}var Ms={},Ob;function ur(){if(Ob)return Ms;Ob=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.formatLog=e;function e(t,{args:n,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:n,eventName:r}:{}}}return Ms}var Cb;function r0(){if(Cb)return Rs;Cb=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.getLogs=o;const e=en(),t=fo(),n=ie(),r=ur();async function o(s,{address:i,blockHash:c,fromBlock:u,toBlock:d,event:l,events:f,args:_,strict:T}={}){const w=T??!1,p=f??(l?[l]:void 0);let B=[];p&&(B=[p.flatMap(a=>(0,e.encodeEventTopics)({abi:[a],eventName:a.name,args:f?void 0:_}))],l&&(B=B[0]));let j;c?j=await s.request({method:"eth_getLogs",params:[{address:i,topics:B,blockHash:c}]}):j=await s.request({method:"eth_getLogs",params:[{address:i,topics:B,fromBlock:typeof u=="bigint"?(0,n.numberToHex)(u):u,toBlock:typeof d=="bigint"?(0,n.numberToHex)(d):d}]});const h=j.map(P=>(0,r.formatLog)(P));return p?(0,t.parseEventLogs)({abi:p,args:_,logs:h,strict:w}):h}return Rs}var qb;function n0(){if(qb)return xs;qb=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.getContractEvents=r;const e=or(),t=ve(),n=r0();async function r(o,s){const{abi:i,address:c,args:u,blockHash:d,eventName:l,fromBlock:f,toBlock:_,strict:T}=s,w=l?(0,e.getAbiItem)({abi:i,name:l}):void 0,p=w?void 0:i.filter(B=>B.type==="event");return(0,t.getAction)(o,n.getLogs,"getLogs")({address:c,args:u,blockHash:d,event:w,events:p,fromBlock:f,toBlock:_,strict:T})}return xs}var Hs={},ks={},Mb;function dr(){if(Mb)return ks;Mb=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.decodeFunctionResult=o;const e=Ce(),t=Er(),n=or(),r="/docs/contract/decodeFunctionResult";function o(s){const{abi:i,args:c,functionName:u,data:d}=s;let l=i[0];if(u){const _=(0,n.getAbiItem)({abi:i,args:c,name:u});if(!_)throw new e.AbiFunctionNotFoundError(u,{docsPath:r});l=_}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:r});if(!l.outputs)throw new e.AbiFunctionOutputsNotFoundError(l.name,{docsPath:r});const f=(0,t.decodeAbiParameters)(l.outputs,d);if(f&&f.length>1)return f;if(f&&f.length===1)return f[0]}return ks}var ji={},Ai={},fe={},ge={},Hb;function rn(){if(Hb)return ge;Hb=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(ge,"__esModule",{value:!0}),ge.notImplemented=ge.bitMask=void 0,ge.isBytes=n,ge.abytes=r,ge.abool=o,ge.numberToHexUnpadded=s,ge.hexToNumber=i,ge.bytesToHex=d,ge.hexToBytes=_,ge.bytesToNumberBE=T,ge.bytesToNumberLE=w,ge.numberToBytesBE=p,ge.numberToBytesLE=B,ge.numberToVarBytesBE=j,ge.ensureBytes=h,ge.concatBytes=P,ge.equalBytes=a,ge.utf8ToBytes=v,ge.inRange=m,ge.aInRange=A,ge.bitLen=y,ge.bitGet=E,ge.bitSet=x,ge.createHmacDrbg=N,ge.validateObject=g,ge.memoized=S;const e=BigInt(0),t=BigInt(1);function n(I){return I instanceof Uint8Array||ArrayBuffer.isView(I)&&I.constructor.name==="Uint8Array"}function r(I){if(!n(I))throw new Error("Uint8Array expected")}function o(I,C){if(typeof C!="boolean")throw new Error(I+" boolean expected, got "+C)}function s(I){const C=I.toString(16);return C.length&1?"0"+C:C}function i(I){if(typeof I!="string")throw new Error("hex string expected, got "+typeof I);
40return I===""?e:BigInt("0x"+I)}const c=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",u=Array.from({length:256},(I,C)=>C.toString(16).padStart(2,"0"));function d(I){if(r(I),c)return I.toHex();let C="";for(let q=0;q<I.length;q++)C+=u[I[q]];return C}const l={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(I){if(I>=l._0&&I<=l._9)return I-l._0;if(I>=l.A&&I<=l.F)return I-(l.A-10);if(I>=l.a&&I<=l.f)return I-(l.a-10)}function _(I){if(typeof I!="string")throw new Error("hex string expected, got "+typeof I);if(c)return Uint8Array.fromHex(I);const C=I.length,q=C/2;if(C%2)throw new Error("hex string expected, got unpadded hex of length "+C);const $=new Uint8Array(q);for(let L=0,F=0;L<q;L++,F+=2){const U=f(I.charCodeAt(F)),z=f(I.charCodeAt(F+1));if(U===void 0||z===void 0){const Y=I[F]+I[F+1];throw new Error('hex string expected, got non-hex character "'+Y+'" at index '+F)}$[L]=U*16+z}return $}function T(I){return i(d(I))}function w(I){return r(I),i(d(Uint8Array.from(I).reverse()))}function p(I,C){return _(I.toString(16).padStart(C*2,"0"))}function B(I,C){return p(I,C).reverse()}function j(I){return _(s(I))}function h(I,C,q){let $;if(typeof C=="string")try{$=_(C)}catch(F){throw new Error(I+" must be hex string or Uint8Array, cause: "+F)}else if(n(C))$=Uint8Array.from(C);else throw new Error(I+" must be hex string or Uint8Array");const L=$.length;if(typeof q=="number"&&L!==q)throw new Error(I+" of length "+q+" expected, got "+L);return $}function P(...I){let C=0;for(let $=0;$<I.length;$++){const L=I[$];r(L),C+=L.length}const q=new Uint8Array(C);for(let $=0,L=0;$<I.length;$++){const F=I[$];q.set(F,L),L+=F.length}return q}function a(I,C){if(I.length!==C.length)return!1;let q=0;for(let $=0;$<I.length;$++)q|=I[$]^C[$];return q===0}function v(I){if(typeof I!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(I))}const b=I=>typeof I=="bigint"&&e<=I;function m(I,C,q){return b(I)&&b(C)&&b(q)&&C<=I&&I<q}function A(I,C,q,$){if(!m(C,q,$))throw new Error("expected valid "+I+": "+q+" <= n < "+$+", got "+C)}function y(I){let C;for(C=0;I>e;I>>=t,C+=1);return C}function E(I,C){return I>>BigInt(C)&t}function x(I,C,q){return I|(q?t:e)<<BigInt(C)}const O=I=>(t<<BigInt(I))-t;ge.bitMask=O;const R=I=>new Uint8Array(I),k=I=>Uint8Array.from(I);function N(I,C,q){if(typeof I!="number"||I<2)throw new Error("hashLen must be a number");if(typeof C!="number"||C<2)throw new Error("qByteLen must be a number");if(typeof q!="function")throw new Error("hmacFn must be a function");let $=R(I),L=R(I),F=0;const U=()=>{$.fill(1),L.fill(0),F=0},z=(...X)=>q(L,$,...X),Y=(X=R(0))=>{L=z(k([0]),X),$=z(),X.length!==0&&(L=z(k([1]),X),$=z())},W=()=>{if(F++>=1e3)throw new Error("drbg: tried 1000 values");let X=0;const ne=[];for(;X<C;){$=z();const K=$.slice();ne.push(K),X+=$.length}return P(...ne)};return(X,ne)=>{U(),Y(X);let K;for(;!(K=ne(W()));)Y();return U(),K}}const H={bigint:I=>typeof I=="bigint",function:I=>typeof I=="function",boolean:I=>typeof I=="boolean",string:I=>typeof I=="string",stringOrUint8Array:I=>typeof I=="string"||n(I),isSafeInteger:I=>Number.isSafeInteger(I),array:I=>Array.isArray(I),field:(I,C)=>C.Fp.isValid(I),hash:I=>typeof I=="function"&&Number.isSafeInteger(I.outputLen)};function g(I,C,q={}){const $=(L,F,U)=>{const z=H[F];if(typeof z!="function")throw new Error("invalid validator function");const Y=I[L];if(!(U&&Y===void 0)&&!z(Y,I))throw new Error("param "+String(L)+" is invalid. Expected "+F+", got "+Y)};for(const[L,F]of Object.entries(C))$(L,F,!1);for(const[L,F]of Object.entries(q))$(L,F,!0);return I}const M=()=>{throw new Error("not implemented")};ge.notImplemented=M;function S(I){const C=new WeakMap;return(q,...$)=>{const L=C.get(q);if(L!==void 0)return L;const F=I(q,...$);return C.set(q,F),F}}return ge}var be={},Si={},pn={},Ii={},kb;function _6(){return kb||(kb=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.version=void 0,Ii.version="0.1.1"),Ii}var $b;function v6(){if($b)return pn;$b=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.getUrl=t,pn.getVersion=n,pn.prettyPrint=r;const e=_6();function t(o){return o}function n(){return e.version}function r(o){if(!o)return"";const s=Object.entries(o).map(([c,u])=>
40u===void 0||u===!1?null:[c,u]).filter(Boolean),i=s.reduce((c,[u])=>Math.max(c,u.length),0);return s.map(([c,u])=>` ${`${c}:`.padEnd(i+1)} ${u}`).join(` 41`)}return pn}var Nb;function Pt(){if(Nb)return Si;Nb=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.BaseError=void 0;const e=v6();class t extends Error{constructor(o,s={}){const i=(()=>{var f;if(s.cause instanceof t){if(s.cause.details)return s.cause.details;if(s.cause.shortMessage)return s.cause.shortMessage}return s.cause&&"details"in s.cause&&typeof s.cause.details=="string"?s.cause.details:(f=s.cause)!=null&&f.message?s.cause.message:s.details})(),c=s.cause instanceof t&&s.cause.docsPath||s.docsPath,d=`https://oxlib.sh${c??""}`,l=[o||"An error occurred.",...s.metaMessages?["",...s.metaMessages]:[],...i||c?["",i?`Details: ${i}`:void 0,c?`See: ${d}`:void 0]:[]].filter(f=>typeof f=="string").join(` 42`);super(l,s.cause?{cause:s.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${(0,e.getVersion)()}`}),this.cause=s.cause,this.details=i,this.docs=d,this.docsPath=c,this.shortMessage=o}walk(o){return n(this,o)}}Si.BaseError=t;function n(r,o){return o!=null&&o(r)?r:r&&typeof r=="object"&&"cause"in r&&r.cause?n(r.cause,o):o?null:r}return Si}var gf={},Fb;function C_(){return Fb||(Fb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeMap=void 0,e.assertSize=n,e.assertStartOffset=r,e.assertEndOffset=o,e.charCodeToBase16=s,e.pad=i,e.trim=c;const t=Nt();function n(u,d){if(t.size(u)>d)throw new t.SizeOverflowError({givenSize:t.size(u),maxSize:d})}function r(u,d){if(typeof d=="number"&&d>0&&d>t.size(u)-1)throw new t.SliceOffsetOutOfBoundsError({offset:d,position:"start",size:t.size(u)})}function o(u,d,l){if(typeof d=="number"&&typeof l=="number"&&t.size(u)!==l-d)throw new t.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:t.size(u)})}e.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102};function s(u){if(u>=e.charCodeMap.zero&&u<=e.charCodeMap.nine)return u-e.charCodeMap.zero;if(u>=e.charCodeMap.A&&u<=e.charCodeMap.F)return u-(e.charCodeMap.A-10);if(u>=e.charCodeMap.a&&u<=e.charCodeMap.f)return u-(e.charCodeMap.a-10)}function i(u,d={}){const{dir:l,size:f=32}=d;if(f===0)return u;if(u.length>f)throw new t.SizeExceedsPaddingSizeError({size:u.length,targetSize:f,type:"Bytes"});const _=new Uint8Array(f);for(let T=0;T<f;T++){const w=l==="right";_[w?T:f-T-1]=u[w?T:u.length-T-1]}return _}function c(u,d={}){const{dir:l="left"}=d;let f=u,_=0;for(let T=0;T<f.length-1&&f[l==="left"?T:f.length-T-1].toString()==="0";T++)_++;return f=l==="left"?f.slice(_):f.slice(0,f.length-_),f}})(gf)),gf}var hr={},Lb;function q_(){if(Lb)return hr;Lb=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.assertSize=t,hr.assertStartOffset=n,hr.assertEndOffset=r,hr.pad=o,hr.trim=s;const e=Je();function t(i,c){if(e.size(i)>c)throw new e.SizeOverflowError({givenSize:e.size(i),maxSize:c})}function n(i,c){if(typeof c=="number"&&c>0&&c>e.size(i)-1)throw new e.SliceOffsetOutOfBoundsError({offset:c,position:"start",size:e.size(i)})}function r(i,c,u){if(typeof c=="number"&&typeof u=="number"&&e.size(i)!==u-c)throw new e.SliceOffsetOutOfBoundsError({offset:u,position:"end",size:e.size(i)})}function o(i,c={}){const{dir:u,size:d=32}=c;if(d===0)return i;const l=i.replace("0x","");if(l.length>d*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(l.length/2),targetSize:d,type:"Hex"});return`0x${l[u==="right"?"padEnd":"padStart"](d*2,"0")}`}function s(i,c={}){const{dir:u="left"}=c;let d=i.replace("0x",""),l=0;for(let f=0;f<d.length-1&&d[u==="left"?f:d.length-f-1].toString()==="0";f++)l++;return d=u==="left"?d.slice(l):d.slice(0,d.length-l),d==="0"?"0x":u==="right"&&d.length%2===1?`0x${d}0`:`0x${d}`}return hr}var Ti={},Ub;function yd(){if(Ub)return Ti;Ub=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.parse=t,Ti.stringify=n;const e="#__bigint";function t(r,o){return JSON.parse(r,(s,i)=>{const c=i;return typeof c=="string"&&c.endsWith(e)?BigInt(c.slice(0,-e.length)):typeof o=="function"?o(s,c):c})}function n(r,o,s){return JSON.stringify(r,(i,c)=>typeof o=="function"?o(i,c):typeof c=="bigint"?c.toString()+e:c,s)}return Ti}var zb;function Nt(){if(zb)return be;
42zb=1,Object.defineProperty(be,"__esModule",{value:!0}),be.SizeExceedsPaddingSizeError=be.SliceOffsetOutOfBoundsError=be.SizeOverflowError=be.InvalidBytesTypeError=be.InvalidBytesBooleanError=void 0,be.assert=u,be.concat=d,be.from=l,be.fromArray=f,be.fromBoolean=_,be.fromHex=T,be.fromNumber=w,be.fromString=p,be.isEqual=B,be.padLeft=j,be.padRight=h,be.random=P,be.size=a,be.slice=v,be.toBigInt=b,be.toBoolean=m,be.toHex=A,be.toNumber=y,be.toString=E,be.trimLeft=x,be.trimRight=O,be.validate=R;const e=rn(),t=Pt(),n=Je(),r=C_(),o=q_(),s=yd(),i=new TextDecoder,c=new TextEncoder;function u(S){if(!(S instanceof Uint8Array)){if(!S)throw new N(S);if(typeof S!="object")throw new N(S);if(!("BYTES_PER_ELEMENT"in S))throw new N(S);if(S.BYTES_PER_ELEMENT!==1||S.constructor.name!=="Uint8Array")throw new N(S)}}function d(...S){let I=0;for(const q of S)I+=q.length;const C=new Uint8Array(I);for(let q=0,$=0;q<S.length;q++){const L=S[q];C.set(L,$),$+=L.length}return C}function l(S){return S instanceof Uint8Array?S:typeof S=="string"?T(S):f(S)}function f(S){return S instanceof Uint8Array?S:new Uint8Array(S)}function _(S,I={}){const{size:C}=I,q=new Uint8Array(1);return q[0]=Number(S),typeof C=="number"?(r.assertSize(q,C),j(q,C)):q}function T(S,I={}){const{size:C}=I;let q=S;C&&(o.assertSize(S,C),q=n.padRight(S,C));let $=q.slice(2);$.length%2&&($=`0${$}`);const L=$.length/2,F=new Uint8Array(L);for(let U=0,z=0;U<L;U++){const Y=r.charCodeToBase16($.charCodeAt(z++)),W=r.charCodeToBase16($.charCodeAt(z++));if(Y===void 0||W===void 0)throw new t.BaseError(`Invalid byte sequence ("${$[z-2]}${$[z-1]}" in "${$}").`);F[U]=Y*16+W}return F}function w(S,I){const C=n.fromNumber(S,I);return T(C)}function p(S,I={}){const{size:C}=I,q=c.encode(S);return typeof C=="number"?(r.assertSize(q,C),h(q,C)):q}function B(S,I){return(0,e.equalBytes)(S,I)}function j(S,I){return r.pad(S,{dir:"left",size:I})}function h(S,I){return r.pad(S,{dir:"right",size:I})}function P(S){return crypto.getRandomValues(new Uint8Array(S))}function a(S){return S.length}function v(S,I,C,q={}){const{strict:$}=q;r.assertStartOffset(S,I);const L=S.slice(I,C);return $&&r.assertEndOffset(L,I,C),L}function b(S,I={}){const{size:C}=I;typeof C<"u"&&r.assertSize(S,C);const q=n.fromBytes(S,I);return n.toBigInt(q,I)}function m(S,I={}){const{size:C}=I;let q=S;if(typeof C<"u"&&(r.assertSize(q,C),q=x(q)),q.length>1||q[0]>1)throw new k(q);return!!q[0]}function A(S,I={}){return n.fromBytes(S,I)}function y(S,I={}){const{size:C}=I;typeof C<"u"&&r.assertSize(S,C);const q=n.fromBytes(S,I);return n.toNumber(q,I)}function E(S,I={}){const{size:C}=I;let q=S;return typeof C<"u"&&(r.assertSize(q,C),q=O(q)),i.decode(q)}function x(S){return r.trim(S,{dir:"left"})}function O(S){return r.trim(S,{dir:"right"})}function R(S){try{return u(S),!0}catch{return!1}}class k extends t.BaseError{constructor(I){super(`Bytes value \`${I}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}be.InvalidBytesBooleanError=k;class N extends t.BaseError{constructor(I){super(`Value \`${typeof I=="object"?s.stringify(I):I}\` of type \`${typeof I}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}be.InvalidBytesTypeError=N;class H extends t.BaseError{constructor({givenSize:I,maxSize:C}){super(`Size cannot exceed \`${C}\` bytes. Given size: \`${I}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}be.SizeOverflowError=H;class g extends t.BaseError{constructor({offset:I,position:C,size:q}){super(`Slice ${C==="start"?"starting":"ending"} at offset \`${I}\` is out-of-bounds (size: \`${q}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}be.SliceOffsetOutOfBoundsError=g;class M extends t.BaseError{constructor({size:I,targetSize:C,type:q}){super(`${q.charAt(0).toUpperCase()}${q.slice(1).toLowerCase()} size (\`${I}\`) exceeds padding size (\`${C}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}return be.SizeExceedsPaddingSizeError=M,be}var Db;function Je(){if(Db)return fe;
42Db=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.SizeExceedsPaddingSizeError=fe.SliceOffsetOutOfBoundsError=fe.SizeOverflowError=fe.InvalidLengthError=fe.InvalidHexValueError=fe.InvalidHexTypeError=fe.InvalidHexBooleanError=fe.IntegerOutOfRangeError=void 0,fe.assert=u,fe.concat=d,fe.from=l,fe.fromBoolean=f,fe.fromBytes=_,fe.fromNumber=T,fe.fromString=w,fe.isEqual=p,fe.padLeft=B,fe.padRight=j,fe.random=h,fe.slice=P,fe.size=a,fe.trimLeft=v,fe.trimRight=b,fe.toBigInt=m,fe.toBoolean=A,fe.toBytes=y,fe.toNumber=E,fe.toString=x,fe.validate=O;const e=rn(),t=Nt(),n=Pt(),r=C_(),o=q_(),s=yd(),i=new TextEncoder,c=Array.from({length:256},(C,q)=>q.toString(16).padStart(2,"0"));function u(C,q={}){const{strict:$=!1}=q;if(!C)throw new N(C);if(typeof C!="string")throw new N(C);if($&&!/^0x[0-9a-fA-F]*$/.test(C))throw new H(C);if(!C.startsWith("0x"))throw new H(C)}function d(...C){return`0x${C.reduce((q,$)=>q+$.replace("0x",""),"")}`}function l(C){return C instanceof Uint8Array?_(C):Array.isArray(C)?_(new Uint8Array(C)):C}function f(C,q={}){const $=`0x${Number(C)}`;return typeof q.size=="number"?(o.assertSize($,q.size),B($,q.size)):$}function _(C,q={}){let $="";for(let F=0;F<C.length;F++)$+=c[C[F]];const L=`0x${$}`;return typeof q.size=="number"?(o.assertSize(L,q.size),j(L,q.size)):L}function T(C,q={}){const{signed:$,size:L}=q,F=BigInt(C);let U;L?$?U=(1n<<BigInt(L)*8n-1n)-1n:U=2n**(BigInt(L)*8n)-1n:typeof C=="number"&&(U=BigInt(Number.MAX_SAFE_INTEGER));const z=typeof U=="bigint"&&$?-U-1n:0;if(U&&F>U||F<z){const V=typeof C=="bigint"?"n":"";throw new R({max:U?`${U}${V}`:void 0,min:`${z}${V}`,signed:$,size:L,value:`${C}${V}`})}const W=`0x${($&&F<0?(1n<<BigInt(L*8))+BigInt(F):F).toString(16)}`;return L?B(W,L):W}function w(C,q={}){return _(i.encode(C),q)}function p(C,q){return(0,e.equalBytes)(t.fromHex(C),t.fromHex(q))}function B(C,q){return o.pad(C,{dir:"left",size:q})}function j(C,q){return o.pad(C,{dir:"right",size:q})}function h(C){return _(t.random(C))}function P(C,q,$,L={}){const{strict:F}=L;o.assertStartOffset(C,q);const U=`0x${C.replace("0x","").slice((q??0)*2,($??C.length)*2)}`;return F&&o.assertEndOffset(U,q,$),U}function a(C){return Math.ceil((C.length-2)/2)}function v(C){return o.trim(C,{dir:"left"})}function b(C){return o.trim(C,{dir:"right"})}function m(C,q={}){const{signed:$}=q;
42q.size&&o.assertSize(C,q.size);const L=BigInt(C);if(!$)return L;const F=(C.length-2)/2,U=(1n<<BigInt(F)*8n)-1n,z=U>>1n;return L<=z?L:L-U-1n}function A(C,q={}){q.size&&o.assertSize(C,q.size);const $=v(C);if($==="0x")return!1;if($==="0x1")return!0;throw new k(C)}function y(C,q={}){return t.fromHex(C,q)}function E(C,q={}){const{signed:$,size:L}=q;return Number(!$&&!L?C:m(C,q))}function x(C,q={}){const{size:$}=q;let L=t.fromHex(C);return $&&(r.assertSize(L,$),L=t.trimRight(L)),new TextDecoder().decode(L)}function O(C,q={}){const{strict:$=!1}=q;try{return u(C,{strict:$}),!0}catch{return!1}}class R extends n.BaseError{constructor({max:q,min:$,signed:L,size:F,value:U}){super(`Number \`${U}\` is not in safe${F?` ${F*8}-bit`:""}${L?" signed":" unsigned"} integer range ${q?`(\`${$}\` to \`${q}\`)`:`(above \`${$}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}fe.IntegerOutOfRangeError=R;class k extends n.BaseError{constructor(q){super(`Hex value \`"${q}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}fe.InvalidHexBooleanError=k;class N extends n.BaseError{constructor(q){super(`Value \`${typeof q=="object"?s.stringify(q):q}\` of type \`${typeof q}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}fe.InvalidHexTypeError=N;class H extends n.BaseError{constructor(q){super(`Value \`${q}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}fe.InvalidHexValueError=H;class g extends n.BaseError{constructor(q){super(`Hex value \`"${q}"\` is an odd length (${q.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}fe.InvalidLengthError=g;class M extends n.BaseError{constructor({givenSize:q,maxSize:$}){super(`Size cannot exceed \`${$}\` bytes. Given size: \`${q}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}fe.SizeOverflowError=M;class S extends n.BaseError{constructor({offset:q,position:$,size:L}){super(`Slice ${$==="start"?"starting":"ending"} at offset \`${q}\` is out-of-bounds (size: \`${L}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}fe.SliceOffsetOutOfBoundsError=S;class I extends n.BaseError{constructor({size:q,targetSize:$,type:L}){super(`${L.charAt(0).toUpperCase()}${L.slice(1).toLowerCase()} size (\`${q}\`) exceeds padding size (\`${$}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}return fe.SizeExceedsPaddingSizeError=I,fe}var Bi={},Gb;function E6(){if(Gb)return Bi;Gb=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.fromRpc=t,Bi.toRpc=n;const e=Je();function t(r){return{...r,amount:BigInt(r.amount),index:Number(r.index),validatorIndex:Number(r.validatorIndex)}}function n(r){return{address:r.address,amount:e.fromNumber(r.amount),index:e.fromNumber(r.index),validatorIndex:e.fromNumber(r.validatorIndex)}}return Bi}var Vb;function M_(){if(Vb)return Ai;Vb=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.fromRpc=n,Ai.toRpc=r;const e=Je(),t=E6();function n(o){return{...o.baseFeePerGas&&{baseFeePerGas:BigInt(o.baseFeePerGas)},...o.blobBaseFee&&{blobBaseFee:BigInt(o.blobBaseFee)},...o.feeRecipient&&{feeRecipient:o.feeRecipient},...o.gasLimit&&{gasLimit:BigInt(o.gasLimit)},...o.number&&{number:BigInt(o.number)},...o.prevRandao&&{prevRandao:BigInt(o.prevRandao)},...o.time&&{time:BigInt(o.time)},...o.withdrawals&&{withdrawals:o.withdrawals.map(t.fromRpc)}}}function r(o){return{...typeof o.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(o.baseFeePerGas)},...typeof o.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(o.blobBaseFee)},...typeof o.feeRecipient=="string"&&{feeRecipient:o.feeRecipient},...typeof o.gasLimit=="bigint"&&{gasLimit:e.fromNumber(o.gasLimit)},...typeof o.number=="bigint"&&{number:e.fromNumber(o.number)},...typeof o.prevRandao=="bigint"&&{prevRandao:e.fromNumber(o.prevRandao)},...typeof o.time=="bigint"&&{time:e.fromNumber(o.time)},...o.withdrawals&&{withdrawals:o.withdrawals.map(t.toRpc)}}}return Ai}var _e={},Wb;function Sr(){if(Wb)return _e;
42Wb=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.erc4626Abi=_e.erc721Abi=_e.erc1155Abi=_e.erc20Abi_bytes32=_e.erc20Abi=_e.erc6492SignatureValidatorAbi=_e.erc1271Abi=_e.addressResolverAbi=_e.textResolverAbi=_e.universalResolverReverseAbi=_e.universalResolverResolveAbi=_e.batchGatewayAbi=_e.multicall3Abi=void 0,_e.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],_e.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];const e=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];return _e.universalResolverResolveAbi=[...e,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],_e.universalResolverReverseAbi=[...e,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],_e.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],_e.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],_e.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],_e.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],_e.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}
42],_e.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],_e.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}
42],_e.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],_e.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],_e}var xi={},Kb;function w6(){return Kb||(Kb=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.aggregate3Signature=void 0,xi.aggregate3Signature="0x82ad56cb"),xi}var Tt={},Zb;
42function lo(){return Zb||(Zb=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.multicall3Bytecode=Tt.erc6492SignatureValidatorByteCode=Tt.deploylessCallViaFactoryBytecode=Tt.deploylessCallViaBytecodeBytecode=void 0,Tt.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Tt.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Tt.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b8152
4260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848
42603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Tt.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
42150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"),Tt}var gt={},Yb;function bo(){if(Yb)return gt;Yb=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.InvalidChainIdError=gt.ClientChainNotConfiguredError=gt.ChainNotFoundError=gt.ChainMismatchError=gt.ChainDoesNotSupportContract=void 0;const e=ue();class t extends e.BaseError{constructor({blockNumber:c,chain:u,contract:d}){super(`Chain "${u.name}" does not support contract "${d.name}".`,{metaMessages:["This could be due to any of the following:",...c&&d.blockCreated&&d.blockCreated>c?[`- The contract "${d.name}" was not deployed until block ${d.blockCreated} (current block ${c}).`]:[`- The chain does not have the contract "${d.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}gt.ChainDoesNotSupportContract=t;class n extends e.BaseError{constructor({chain:c,currentChainId:u}){super(`The current chain of the wallet (id: ${u}) does not match the target chain for the transaction (id: ${c.id} – ${c.name}).`,{metaMessages:[`Current Chain ID: ${u}`,`Expected Chain ID: ${c.id} – ${c.name}`],name:"ChainMismatchError"})}}gt.ChainMismatchError=n;class r extends e.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` 43`),{name:"ChainNotFoundError"})}}gt.ChainNotFoundError=r;class o extends e.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}gt.ClientChainNotConfiguredError=o;class s extends e.BaseError{constructor({chainId:c}){super(typeof c=="number"?`Chain ID "${c}
43" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}return gt.InvalidChainIdError=s,gt}var $s={},Jb;function mo(){if(Jb)return $s;Jb=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.encodeDeployData=o;const e=Ce(),t=We(),n=Ct(),r="/docs/contract/encodeDeployData";function o(s){const{abi:i,args:c,bytecode:u}=s;if(!c||c.length===0)return u;const d=i.find(f=>"type"in f&&f.type==="constructor");if(!d)throw new e.AbiConstructorNotFoundError({docsPath:r});if(!("inputs"in d))throw new e.AbiConstructorParamsNotFoundError({docsPath:r});if(!d.inputs||d.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:r});const l=(0,n.encodeAbiParameters)(d.inputs,c);return(0,t.concatHex)([u,l])}return $s}var Ns={},Xb;function Ir(){if(Xb)return Ns;Xb=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.getChainContractAddress=t;const e=bo();function t({blockNumber:n,chain:r,contract:o}){var i;const s=(i=r==null?void 0:r.contracts)==null?void 0:i[o];if(!s)throw new e.ChainDoesNotSupportContract({chain:r,contract:{name:o}});if(n&&s.blockCreated&&s.blockCreated>n)throw new e.ChainDoesNotSupportContract({blockNumber:n,chain:r,contract:{name:o,blockCreated:s.blockCreated}});return s.address}return Ns}var Fs={},Qb;function i0(){if(Qb)return Fs;Qb=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.getCallError=r;const e=wr(),t=sr(),n=so();function r(o,{docsPath:s,...i}){const c=(()=>{const u=(0,n.getNodeError)(o,i);return u instanceof t.UnknownNodeError?o:u})();return new e.CallExecutionError(c,{docsPath:s,...i})}return Fs}var Ls={},Us={},em;function o0(){if(em)return Us;em=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.withResolvers=e;function e(){let t=()=>{},n=()=>{};return{promise:new Promise((o,s)=>{t=o,n=s}),resolve:t,reject:n}}return Us}var tm;function s0(){if(tm)return Ls;tm=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.createBatchScheduler=n;const e=o0(),t=new Map;function n({fn:r,id:o,shouldSplitBatch:s,wait:i=0,sort:c}){const u=async()=>{const T=f();d();const w=T.map(({args:p})=>p);w.length!==0&&r(w).then(p=>{c&&Array.isArray(p)&&p.sort(c);for(let B=0;B<T.length;B++){const{resolve:j}=T[B];j==null||j([p[B],p])}}).catch(p=>{for(let B=0;B<T.length;B++){const{reject:j}=T[B];j==null||j(p)}})},d=()=>t.delete(o),l=()=>f().map(({args:T})=>T),f=()=>t.get(o)||[],_=T=>t.set(o,[...f(),T]);return{flush:d,async schedule(T){const{promise:w,resolve:p,reject:B}=(0,e.withResolvers)();return(s==null?void 0:s([...l(),T]))&&u(),f().length>0?(_({args:T,resolve:p,reject:B}),w):(_({args:T,resolve:p,reject:B}),setTimeout(u,i),w)}}}return Ls}var pf={},Qt={},rm;function P6(){if(rm)return Qt;rm=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.OffchainLookupSenderMismatchError=Qt.OffchainLookupResponseMalformedError=Qt.OffchainLookupError=void 0;const e=Ye(),t=ue(),n=Vf();class r extends t.BaseError{constructor({callbackSelector:c,cause:u,data:d,extraData:l,sender:f,urls:_}){var T;super(u.shortMessage||"An error occurred while fetching for an offchain result.",{cause:u,metaMessages:[...u.metaMessages||[],(T=u.metaMessages)!=null&&T.length?"":[],"Offchain Gateway Call:",_&&[" Gateway URL(s):",..._.map(w=>` ${(0,n.getUrl)(w)}`)],` Sender: ${f}`,` Data: ${d}`,` Callback selector: ${c}`,` Extra data: ${l}`].flat(),name:"OffchainLookupError"})}}Qt.OffchainLookupError=r;class o extends t.BaseError{constructor({result:c,url:u}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,n.getUrl)(u)}`,`Response: ${(0,e.stringify)(c)}`],name:"OffchainLookupResponseMalformedError"})}}Qt.OffchainLookupResponseMalformedError=o;class s extends t.BaseError{constructor({sender:c,to:u}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${u}`,`OffchainLookup sender address: ${c}`],name:"OffchainLookupSenderMismatchError"})}}return Qt.OffchainLookupSenderMismatchError=s,Qt}var _f={},zs={},nm;function a0(){if(nm)return zs;nm=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.decodeFunctionData=s;const e=Ce(),t=At(),n=Qr(),r=Er(),o=nr();function s(i){const{abi:c,data:u}=i,d=(0,t.slice)(u,0,4),l=c.find(f=>f.type==="function"&&d===(0,n.toFunctionSelector)((0,o.formatAbiItem)(f)));if(!l)throw new e.AbiFunctionSignatureNotFoundError(d,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:l.name,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,r.decodeAbiParameters)(l.inputs,(0,t.slice)(u,4)):void 0}}return zs}var Ds={},im;function c0(){if(im)return Ds;im=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.encodeErrorResult=c;const e=Ce(),t=We(),n=Qr(),r=Ct(),o=nr(),s=or(),i="/docs/contract/encodeErrorResult";function c(u){const{abi:d,errorName:l,args:f}=u;let _=d[0];if(l){const B=(0,s.getAbiItem)({abi:d,args:f,name:l});if(!B)throw new e.AbiErrorNotFoundError(l,{docsPath:i});_=B}if(_.type!=="error")throw new e.AbiErrorNotFoundError(void 0,{docsPath:i});const T=(0,o.formatAbiItem)(_),w=(0,n.toFunctionSelector)(T);let p="0x";if(f&&f.length>0){if(!_.inputs)throw new e.AbiErrorInputsNotFoundError(_.name,{docsPath:i});p=(0,r.encodeAbiParameters)(_.inputs,f)}return(0,t.concatHex)([w,p])}return Ds}var Gs={},om;
43function u0(){if(om)return Gs;om=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.encodeFunctionResult=o;const e=Ce(),t=Ct(),n=or(),r="/docs/contract/encodeFunctionResult";function o(s){const{abi:i,functionName:c,result:u}=s;let d=i[0];if(c){const f=(0,n.getAbiItem)({abi:i,name:c});if(!f)throw new e.AbiFunctionNotFoundError(c,{docsPath:r});d=f}if(d.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:r});if(!d.outputs)throw new e.AbiFunctionOutputsNotFoundError(d.name,{docsPath:r});const l=(()=>{if(d.outputs.length===0)return[];if(d.outputs.length===1)return[u];if(Array.isArray(u))return u;throw new e.InvalidArrayError(u)})();return(0,t.encodeAbiParameters)(d.outputs,l)}return Gs}var sm;function gd(){return sm||(sm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localBatchGatewayUrl=void 0,e.localBatchGatewayRequest=i;const t=Sr(),n=zf(),r=a0(),o=c0(),s=u0();e.localBatchGatewayUrl="x-batch-gateway:true";async function i(u){const{data:d,ccipRequest:l}=u,{args:[f]}=(0,r.decodeFunctionData)({abi:t.batchGatewayAbi,data:d}),_=[],T=[];return await Promise.all(f.map(async(w,p)=>{try{T[p]=w.urls.includes(e.localBatchGatewayUrl)?await i({data:w.data,ccipRequest:l}):await l(w),_[p]=!1}catch(B){_[p]=!0,T[p]=c(B)}})),(0,s.encodeFunctionResult)({abi:t.batchGatewayAbi,functionName:"query",result:[_,T]})}function c(u){return u.name==="HttpRequestError"&&u.status?(0,o.encodeErrorResult)({abi:t.batchGatewayAbi,errorName:"HttpError",args:[u.status,u.shortMessage]}):(0,o.encodeErrorResult)({abi:[n.solidityError],errorName:"Error",args:["shortMessage"in u?u.shortMessage:u.message]})}})(_f)),_f}var am;function d0(){return am||(am=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offchainLookupAbiItem=e.offchainLookupSignature=void 0,e.offchainLookup=f,e.ccipRequest=_;const t=ho(),n=P6(),r=qt(),o=id(),s=Ct(),i=Mt(),c=We(),u=at(),d=gd(),l=Ye();e.offchainLookupSignature="0x556f1830",e.offchainLookupAbiItem={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function f(T,{blockNumber:w,blockTag:p,data:B,to:j}){const{args:h}=(0,o.decodeErrorResult)({data:B,abi:[e.offchainLookupAbiItem]}),[P,a,v,b,m]=h,{ccipRead:A}=T,y=A&&typeof(A==null?void 0:A.request)=="function"?A.request:_;try{if(!(0,i.isAddressEqual)(j,P))throw new n.OffchainLookupSenderMismatchError({sender:P,to:j});const E=a.includes(d.localBatchGatewayUrl)?await(0,d.localBatchGatewayRequest)({data:v,ccipRequest:y}):await y({data:v,sender:P,urls:a}),{data:x}=await(0,t.call)(T,{blockNumber:w,blockTag:p,data:(0,c.concat)([b,(0,s.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[E,m])]),to:j});return x}catch(E){throw new n.OffchainLookupError({callbackSelector:b,cause:E,data:B,extraData:m,sender:P,urls:a})}}async function _({data:T,sender:w,urls:p}){var j;let B=new Error("An unknown error occurred.");for(let h=0;h<p.length;h++){const P=p[h],a=P.includes("{data}")?"GET":"POST",v=a==="POST"?{data:T,sender:w}:void 0,b=a==="POST"?{"Content-Type":"application/json"}:{};try{const m=await fetch(P.replace("{sender}",w.toLowerCase()).replace("{data}",T),{body:JSON.stringify(v),headers:b,method:a});let A;if((j=m.headers.get("Content-Type"))!=null&&j.startsWith("application/json")?A=(await m.json()).data:A=await m.text(),!m.ok){B=new r.HttpRequestError({body:v,details:A!=null&&A.error?(0,l.stringify)(A.error):m.statusText,headers:m.headers,status:m.status,url:P});continue}if(!(0,u.isHex)(A)){B=new n.OffchainLookupResponseMalformedError({result:A,url:P});continue}return A}catch(m){B=new r.HttpRequestError({body:v,details:m.message,url:P})}}throw B}})(pf)),pf}var cm;function ho(){if(cm)return ji;cm=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.call=a,ji.getRevertErrorData=y;const e=Qu(),t=M_(),n=ze(),r=Sr(),o=w6(),s=lo(),i=ue(),c=bo(),u=wr(),d=dr(),l=mo(),f=mt(),_=Ir(),T=ie(),w=i0(),p=qn(),B=ar(),j=s0(),h=Kf(),P=cr();async function a(E,x){var J,de,Se,he;const{account:O=E.account,authorizationList:R,batch:k=!!((J=E.batch)!=null&&J.multicall),blockNumber:N,blockTag:H=E.experimental_blockTag??"latest",accessList:g,blobs:M,blockOverrides:S,code:I,data:C,factory:q,factoryData:$,gas:L,gasPrice:F,maxFeePerBlobGas:U,maxFeePerGas:z,maxPriorityFeePerGas:Y,nonce:W,to:V,value:X,stateOverride:ne,...K}=x,Z=O?(0,n.parseAccount)(O):void 0;if(I&&(q||$))throw new i.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(I&&V)throw new i.BaseError("Cannot provide both `code` & `to` as parameters.");const ee=I&&C,re=q&&$&&V&&C,te=ee||re,Q=ee?m({code:I,data:C}):re?A({data:C,factory:q,factoryData:$,to:V}):C;try{(0,P.assertRequest)(x);const Ee=(typeof N=="bigint"?(0,T.numberToHex)(N):void 0)||H,pe=S?t.toRpc(S):void 0,Le=(0,h.serializeStateOverride)(ne),He=(he=(Se=(de=E.chain)==null?void 0:de.formatters)==null?void 0:Se.transactionRequest)==null?void 0:he.format,Xe=(He||B.formatTransactionRequest)({...(0,p.extract)(K,{format:He}),from:Z==null?void 0:Z.address,accessList:g,authorizationList:R,blobs:M,data:Q,gas:L,gasPrice:F,maxFeePerBlobGas:U,maxFeePerGas:z,maxPriorityFeePerGas:Y,nonce:W,to:te?void 0:V,value:X});if(k&&v({request:Xe})&&!Le&&!pe)try{return await b(E,{...Xe,blockNumber:N,blockTag:H})}catch(Be){if(!(Be instanceof c.ClientChainNotConfiguredError)&&!(Be instanceof c.ChainDoesNotSupportContract))throw Be}const Ge=(()=>{const Be=[Xe,Ee];return Le&&pe?[...Be,Le,pe]:Le?[...Be,Le]:pe?[...Be,{},pe]:Be})(),ke=await E.request({method:"eth_call",params:Ge});return ke==="0x"?{data:void 0}:{data:ke}}catch(le){const Ee=y(le),{offchainLookup:pe,offchainLookupSignature:Le}=await Promise.resolve().then(()=>d0());if(E.ccipRead!==!1&&(Ee==null?void 0:Ee.slice(0,10))===Le&&V)return{data:await pe(E,{data:Ee,to:V})};throw te&&(Ee==null?void 0:Ee.slice(0,10))==="0x101bb98d"?new u.CounterfactualDeploymentFailedError({factory:q}):(0,w.getCallError)(le,{...x,account:Z,chain:E.chain})}}function v({request:E}){const{data:x,to:O,...R}=E;return!(!x||x.startsWith(o.aggregate3Signature)||!O||Object.values(R).filter(k=>typeof k<"u").length>0)}async function b(E,x){var F;const{batchSize:O=1024,deployless:R=!1,wait:k=0}=typeof((F=E.batch)==null?void 0:F.multicall)=="object"?E.batch.multicall:{},{blockNumber:N,blockTag:H=E.experimental_blockTag??"latest",data:g,to:M}=x,S=(()=>
43{if(R)return null;if(x.multicallAddress)return x.multicallAddress;if(E.chain)return(0,_.getChainContractAddress)({blockNumber:N,chain:E.chain,contract:"multicall3"});throw new c.ClientChainNotConfiguredError})(),C=(typeof N=="bigint"?(0,T.numberToHex)(N):void 0)||H,{schedule:q}=(0,j.createBatchScheduler)({id:`${E.uid}.${C}`,wait:k,shouldSplitBatch(U){return U.reduce((Y,{data:W})=>Y+(W.length-2),0)>O*2},fn:async U=>{const z=U.map(V=>({allowFailure:!0,callData:V.data,target:V.to})),Y=(0,f.encodeFunctionData)({abi:r.multicall3Abi,args:[z],functionName:"aggregate3"}),W=await E.request({method:"eth_call",params:[{...S===null?{data:m({code:s.multicall3Bytecode,data:Y})}:{to:S,data:Y}},C]});return(0,d.decodeFunctionResult)({abi:r.multicall3Abi,args:[z],functionName:"aggregate3",data:W||"0x"})}}),[{returnData:$,success:L}]=await q({data:g,to:M});if(!L)throw new u.RawContractError({data:$});return $==="0x"?{data:void 0}:{data:$}}function m(E){const{code:x,data:O}=E;return(0,l.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(bytes, bytes)"]),bytecode:s.deploylessCallViaBytecodeBytecode,args:[x,O]})}function A(E){const{data:x,factory:O,factoryData:R,to:k}=E;return(0,l.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:s.deploylessCallViaFactoryBytecode,args:[k,x,O,R]})}function y(E){var O;if(!(E instanceof i.BaseError))return;const x=E.walk();return typeof(x==null?void 0:x.data)=="object"?(O=x.data)==null?void 0:O.data:x.data}return ji}var um;function Ft(){if(um)return Hs;um=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.readContract=s;const e=dr(),t=mt(),n=jr(),r=ve(),o=ho();async function s(i,c){const{abi:u,address:d,args:l,functionName:f,..._}=c,T=(0,t.encodeFunctionData)({abi:u,args:l,functionName:f});try{const{data:w}=await(0,r.getAction)(i,o.call,"call")({..._,data:T,to:d});return(0,e.decodeFunctionResult)({abi:u,args:l,functionName:f,data:w||"0x"})}catch(w){throw(0,n.getContractError)(w,{abi:u,address:d,args:l,docsPath:"/docs/contract/readContract",functionName:f})}}return Hs}var Vs={},dm;function H_(){if(dm)return Vs;dm=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.simulateContract=i;const e=ze(),t=dr(),n=mt(),r=jr(),o=ve(),s=ho();async function i(c,u){const{abi:d,address:l,args:f,dataSuffix:_,functionName:T,...w}=u,p=w.account?(0,e.parseAccount)(w.account):c.account,B=(0,n.encodeFunctionData)({abi:d,args:f,functionName:T});try{const{data:j}=await(0,o.getAction)(c,s.call,"call")({batch:!1,data:`${B}${_?_.replace("0x",""):""}`,to:l,...w,account:p}),h=(0,t.decodeFunctionResult)({abi:d,args:f,functionName:T,data:j||"0x"}),P=d.filter(a=>"name"in a&&a.name===u.functionName);return{result:h,request:{abi:P,address:l,args:f,dataSuffix:_,functionName:T,...w,account:p}}}catch(j){throw(0,r.getContractError)(j,{abi:d,address:l,args:f,docsPath:"/docs/contract/simulateContract",functionName:T,sender:p==null?void 0:p.address})}}return Vs}var Ws={},vf={},fm;function nn(){return fm||(fm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cleanupCache=e.listenersCache=void 0,e.observe=n,e.listenersCache=new Map,e.cleanupCache=new Map;let t=0;function n(r,o,s){const i=++t,c=()=>e.listenersCache.get(r)||[],u=()=>{const T=c();e.listenersCache.set(r,T.filter(w=>w.id!==i))},d=()=>{const T=c();if(!T.some(p=>p.id===i))return;const w=e.cleanupCache.get(r);if(T.length===1&&w){const p=w();p instanceof Promise&&p.catch(()=>{})}u()},l=c();if(e.listenersCache.set(r,[...l,{id:i,fns:o}]),l&&l.length>0)return d;const f={};for(const T in o)f[T]=((...w)=>{var B,j;const p=c();if(p.length!==0)for(const h of p)(j=(B=h.fns)[T])==null||j.call(B,...w)});const _=s(f);return typeof _=="function"&&e.cleanupCache.set(r,_),d}})(vf)),vf}var Ks={},Zs={},lm;function f0(){if(lm)return Zs;lm=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.wait=e;async function e(t){return new Promise(n=>setTimeout(n,t))}return Zs}var bm;function kn(){if(bm)return Ks;bm=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.poll=t;const e=f0();function t(n,{emitOnBegin:r,initialWaitTime:o,interval:s}){let i=!0;const c=()=>i=!1;return(async()=>{let d;r&&(d=await n({unpoll:c}));const l=await(o==null?void 0:o(d))??s;await(0,e.wait)(l);const f=async()=>
43{i&&(await n({unpoll:c}),await(0,e.wait)(s),f())};f()})(),c}return Ks}var Ri={},Ef={},mm;function k_(){return mm||(mm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.responseCache=e.promiseCache=void 0,e.getCache=t,e.withCache=n,e.promiseCache=new Map,e.responseCache=new Map;function t(r){const o=(c,u)=>({clear:()=>u.delete(c),get:()=>u.get(c),set:d=>u.set(c,d)}),s=o(r,e.promiseCache),i=o(r,e.responseCache);return{clear:()=>{s.clear(),i.clear()},promise:s,response:i}}async function n(r,{cacheKey:o,cacheTime:s=Number.POSITIVE_INFINITY}){const i=t(o),c=i.response.get();if(c&&s>0&&Date.now()-c.created.getTime()<s)return c.data;let u=i.promise.get();u||(u=r(),i.promise.set(u));try{const d=await u;return i.response.set({created:new Date,data:d}),d}finally{i.promise.clear()}}})(Ef)),Ef}var hm;function yo(){if(hm)return Ri;hm=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.getBlockNumberCache=n,Ri.getBlockNumber=r;const e=k_(),t=o=>`blockNumber.${o}`;function n(o){return(0,e.getCache)(t(o))}async function r(o,{cacheTime:s=o.cacheTime}={}){const i=await(0,e.withCache)(()=>o.request({method:"eth_blockNumber"}),{cacheKey:t(o.uid),cacheTime:s});return BigInt(i)}return Ri}var Ys={},ym;function pd(){if(ym)return Ys;ym=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.getFilterChanges=n;const e=fo(),t=ur();async function n(r,{filter:o}){const s="strict"in o&&o.strict,i=await o.request({method:"eth_getFilterChanges",params:[o.id]});if(typeof i[0]=="string")return i;const c=i.map(u=>(0,t.formatLog)(u));return!("abi"in o)||!o.abi?c:(0,e.parseEventLogs)({abi:o.abi,logs:c,strict:s})}return Ys}var Js={},gm;function _d(){if(gm)return Js;gm=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.uninstallFilter=e;async function e(t,{filter:n}){return n.request({method:"eth_uninstallFilter",params:[n.id]})}return Js}var pm;function $_(){if(pm)return Ws;pm=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.watchContractEvent=w;const e=Ce(),t=Pr(),n=uo(),r=en(),o=ur(),s=ve(),i=nn(),c=kn(),u=Ye(),d=Uf(),l=yo(),f=n0(),_=pd(),T=_d();function w(p,B){const{abi:j,address:h,args:P,batch:a=!0,eventName:v,fromBlock:b,onError:m,onLogs:A,poll:y,pollingInterval:E=p.pollingInterval,strict:x}=B;return(typeof y<"u"?y:typeof b=="bigint"?!0:!(p.transport.type==="webSocket"||p.transport.type==="ipc"||p.transport.type==="fallback"&&(p.transport.transports[0].c
43onfig.type==="webSocket"||p.transport.transports[0].config.type==="ipc")))?(()=>{const N=x??!1,H=(0,u.stringify)(["watchContractEvent",h,P,a,p.uid,v,E,N,b]);return(0,i.observe)(H,{onLogs:A,onError:m},g=>{let M;b!==void 0&&(M=b-1n);let S,I=!1;const C=(0,c.poll)(async()=>{var q;if(!I){try{S=await(0,s.getAction)(p,d.createContractEventFilter,"createContractEventFilter")({abi:j,address:h,args:P,eventName:v,strict:N,fromBlock:b})}catch{}I=!0;return}try{let $;if(S)$=await(0,s.getAction)(p,_.getFilterChanges,"getFilterChanges")({filter:S});else{const L=await(0,s.getAction)(p,l.getBlockNumber,"getBlockNumber")({});M&&M<L?$=await(0,s.getAction)(p,f.getContractEvents,"getContractEvents")({abi:j,address:h,args:P,eventName:v,fromBlock:M+1n,toBlock:L,strict:N}):$=[],M=L}if($.length===0)return;if(a)g.onLogs($);else for(const L of $)g.onLogs([L])}catch($){S&&$ instanceof t.InvalidInputRpcError&&(I=!1),(q=g.onError)==null||q.call(g,$)}},{emitOnBegin:!0,interval:E});return async()=>{S&&await(0,s.getAction)(p,T.uninstallFilter,"uninstallFilter")({filter:S}),C()}})})():(()=>{const N=x??!1,H=(0,u.stringify)(["watchContractEvent",h,P,a,p.uid,v,E,N]);let g=!0,M=()=>g=!1;return(0,i.observe)(H,{onLogs:A,onError:m},S=>((async()=>{try{const I=(()=>{if(p.transport.type==="fallback"){const $=p.transport.transports.find(L=>L.config.type==="webSocket"||L.config.type==="ipc");return $?$.value:p.transport}return p.transport})(),C=v?(0,r.encodeEventTopics)({abi:j,eventName:v,args:P}):[],{unsubscribe:q}=await I.subscribe({params:["logs",{address:h,topics:C}],onData($){var F;if(!g)return;const L=$.result;try{const{eventName:U,args:z}=(0,n.decodeEventLog)({abi:j,data:L.data,topics:L.topics,strict:x}),Y=(0,o.formatLog)(L,{args:z,eventName:U});S.onLogs([Y])}catch(U){let z,Y;if(U instanceof e.DecodeLogDataMismatch||U instanceof e.DecodeLogTopicsMismatch){if(x)return;z=U.abiItem.name,Y=(F=U.abiItem.inputs)==null?void 0:F.some(V=>!("name"in V&&V.name))}const W=(0,o.formatLog)(L,{args:Y?[]:{},eventName:z});S.onLogs([W])}},onError($){var L;(L=S.onError)==null||L.call(S,$)}});M=q,g||M()}catch(I){m==null||m(I)}})(),()=>M()))})()}return Ws}var Xs={},Nr={},_m;function on(){if(_m)return Nr;
43_m=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.AccountTypeNotSupportedError=Nr.AccountNotFoundError=void 0;const e=ue();class t extends e.BaseError{constructor({docsPath:o}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` 44`),{docsPath:o,docsSlug:"account",name:"AccountNotFoundError"})}}Nr.AccountNotFoundError=t;class n extends e.BaseError{constructor({docsPath:o,metaMessages:s,type:i}){super(`Account type "${i}" is not supported.`,{docsPath:o,metaMessages:s,name:"AccountTypeNotSupportedError"})}}return Nr.AccountTypeNotSupportedError=n,Nr}var Qs={},ea={},vm;function vd(){if(vm)return ea;vm=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.assertCurrentChain=t;const e=bo();function t({chain:n,currentChainId:r}){if(!n)throw new e.ChainNotFoundError;if(r!==n.id)throw new e.ChainMismatchError({chain:n,currentChainId:r})}return ea}var ta={},Em;function l0(){if(Em)return ta;Em=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.getTransactionError=r;const e=sr(),t=wt(),n=so();function r(o,{docsPath:s,...i}){const c=(()=>{const u=(0,n.getNodeError)(o,i);return u instanceof e.UnknownNodeError?o:u})();return new t.TransactionExecutionError(c,{docsPath:s,...i})}return ta}var ra={},wm;function b0(){if(wm)return ra;wm=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.sendRawTransaction=e;async function e(t,{serializedTransaction:n}){return t.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}return ra}var Pm;function Ed(){if(Pm)return Qs;Pm=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.sendTransaction=p;const e=ze(),t=on(),n=ue(),r=ad(),o=vd(),s=l0(),i=qn(),c=ar(),u=ve(),d=Qi(),l=cr(),f=Hn(),_=hd(),T=b0(),w=new d.LruMap(128);async function p(B,j){var M,S,I,C;const{account:h=B.account,chain:P=B.chain,accessList:a,authorizationList:v,blobs:b,data:m,gas:A,gasPrice:y,maxFeePerBlobGas:E,maxFeePerGas:x,maxPriorityFeePerGas:O,nonce:R,type:k,value:N,...H}=j;if(typeof h>"u")throw new t.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const g=h?(0,e.parseAccount)(h):null;try{(0,l.assertRequest)(j);const q=await(async()=>{if(j.to)return j.to;if(j.to!==null&&v&&v.length>0)return await(0,r.recoverAuthorizationAddress)({authorization:v[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((g==null?void 0:g.type)==="json-rpc"||g===null){let $;P!==null&&($=await(0,u.getAction)(B,f.getChainId,"getChainId")({}),(0,o.assertCurrentChain)({currentChainId:$,chain:P}));const L=(I=(S=(M=B.chain)==null?void 0:M.formatters)==null?void 0:S.transactionRequest)==null?void 0:I.format,U=(L||c.formatTransactionRequest)({...(0,i.extract)(H,{format:L}),accessList:a,authorizationList:v,blobs:b,chainId:$,data:m,from:g==null?void 0:g.address,gas:A,gasPrice:y,maxFeePerBlobGas:E,maxFeePerGas:x,maxPriorityFeePerGas:O,nonce:R,to:q,type:k,value:N}),z=w.get(B.uid),Y=z?"wallet_sendTransaction":"eth_sendTransaction";try{return await B.request({method:Y,params:[U]},{retryCount:0})}catch(W){if(z===!1)throw W;const V=W;if(V.name==="InvalidInputRpcError"||V.name==="InvalidParamsRpcError"||V.name==="MethodNotFoundRpcError"||V.name==="MethodNotSupportedRpcError")return await B.request({method:"wallet_sendTransaction",params:[U]},{retryCount:0}).then(X=>(w.set(B.uid,!0),X)).catch(X=>{const ne=X;throw ne.name==="MethodNotFoundRpcError"||ne.name==="MethodNotSupportedRpcError"?(w.set(B.uid,!1),V):ne});throw V}}if((g==null?void 0:g.type)==="local"){const $=await(0,u.getAction)(B,_.prepareTransactionRequest,"prepareTransactionRequest")({account:g,accessList:a,authorizationList:v,blobs:b,chain:P,data:m,gas:A,gasPrice:y,maxFeePerBlobGas:E,maxFeePerGas:x,maxPriorityFeePerGas:O,nonce:R,nonceManager:g.nonceManager,parameters:[..._.defaultParameters,"sidecars"],type:k,value:N,...H,to:q}),L=(C=P==null?void 0:P.serializers)==null?void 0:C.transaction,F=await g.signTransaction($,{serializer:L});return await(0,u.getAction)(B,T.sendRawTransaction,"sendRawTransaction")({serializedTransaction:F})}throw(g==null?void 0:g.type)==="smart"?new t.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new t.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:g==null?void 0:g.type})}catch(q){throw q instanceof t.AccountTypeNotSupportedError?q:(0,s.getTransactionError)(q,{...j,account:g,chain:j.chain||void 0})}}return Qs}var jm;function N_(){if(jm)return Xs;jm=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.writeContract=i;const e=ze(),t=on(),n=mt(),r=jr(),o=ve(),s=Ed();async function i(c,u){const{abi:d,account:l=c.account,address:f,args:_,dataSuffix:T,functionName:w,...p}=u;if(typeof l>"u")throw new t.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const B=l?(0,e.parseAccount)(l):null,j=(0,n.encodeFunctionData)({abi:d,args:_,functionName:w});try{return await(0,o.getAction)(c,s.sendTransaction,"sendTransaction")({data:`${j}${T?T.replace("0x",""):""}`,to:f,account:B,...p})}catch(h){throw(0,r.getContractError)(h,{abi:d,address:f,args:_,docsPath:"/docs/contract/writeContract",functionName:w,sender:B==null?void 0:B.address})}}return Xs}var Am;function j6(){if(Am)return un;Am=1,Object.defineProperty(un,"__esModule",{value:!0}),un.getContract=u,un.getFunctionParameters=d,un.getEventParameters=l;const e=ve(),t=Uf(),n=O_(),r=n0(),o=Ft(),s=H_(),i=$_(),c=N_();function u({abi:f,address:_,client:T}){const w=T,[p,B]=w?"public"in w&&"wallet"in w?[w.public,w.wallet]:"public"in w?[w.public,void 0]:"wallet"in w?[void 0,w.wallet]:[w,w]:[void 0,void 0],j=p!=null,h=B!=null,P={};let a=!1,v=!1,b=!1;for(const m of f)if(m.type==="function"?m.stateMutability==="view"||m.stateMutability==="pure"?a=!0:v=!0:m.type==="event"&&(b=!0),a&&v&&b)break;
44return j&&(a&&(P.read=new Proxy({},{get(m,A){return(...y)=>{const{args:E,options:x}=d(y);return(0,e.getAction)(p,o.readContract,"readContract")({abi:f,address:_,functionName:A,args:E,...x})}}})),v&&(P.simulate=new Proxy({},{get(m,A){return(...y)=>{const{args:E,options:x}=d(y);return(0,e.getAction)(p,s.simulateContract,"simulateContract")({abi:f,address:_,functionName:A,args:E,...x})}}})),b&&(P.createEventFilter=new Proxy({},{get(m,A){return(...y)=>{const E=f.find(R=>R.type==="event"&&R.name===A),{args:x,options:O}=l(y,E);return(0,e.getAction)(p,t.createContractEventFilter,"createContractEventFilter")({abi:f,address:_,eventName:A,args:x,...O})}}}),P.getEvents=new Proxy({},{get(m,A){return(...y)=>{const E=f.find(R=>R.type==="event"&&R.name===A),{args:x,options:O}=l(y,E);return(0,e.getAction)(p,r.getContractEvents,"getContractEvents")({abi:f,address:_,eventName:A,args:x,...O})}}}),P.watchEvent=new Proxy({},{get(m,A){return(...y)=>{const E=f.find(R=>R.type==="event"&&R.name===A),{args:x,options:O}=l(y,E);return(0,e.getAction)(p,i.watchContractEvent,"watchContractEvent")({abi:f,address:_,eventName:A,args:x,...O})}}}))),h&&v&&(P.write=new Proxy({},{get(m,A){return(...y)=>{const{args:E,options:x}=d(y);return(0,e.getAction)(B,c.writeContract,"writeContract")({abi:f,address:_,functionName:A,args:E,...x})}}})),(j||h)&&v&&(P.estimateGas=new Proxy({},{get(m,A){return(...y)=>{const{args:E,options:x}=d(y),O=p??B;return(0,e.getAction)(O,n.estimateContractGas,"estimateContractGas")({abi:f,address:_,functionName:A,args:E,...x,account:x.account??B.account})}}})),P.address=_,P.abi=f,P}function d(f){const _=f.length&&Array.isArray(f[0]),T=_?f[0]:[],w=(_?f[1]:f[0])??{};return{args:T,options:w}}function l(f,_){let T=!1;Array.isArray(f[0])?T=!0:f.length===1?T=_.inputs.some(B=>B.indexed):f.length===2&&(T=!0);const w=T?f[0]:void 0,p=(T?f[1]:f[0])??{};return{args:w,options:p}}return un}var _n={},Oi={},Sm;function F_(){if(Sm)return Oi;Sm=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.BundleFailedError=void 0;const e=ue();class t extends e.BaseError{constructor(r){super(`Call bundle failed with status: ${r.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=r}}return Oi.BundleFailedError=t,Oi}var na={},Im;function wd(){if(Im)return na;Im=1,Object.defineProperty(na,"__esModule",{value:!0}),na.withRetry=t;const e=f0();function t(n,{delay:r=100,retryCount:o=2,shouldRetry:s=()=>!0}={}){return new Promise((i,c)=>{const u=async({count:d=0}={})=>{const l=async({error:f})=>{const _=typeof r=="function"?r({count:d,error:f}):r;_&&await(0,e.wait)(_),u({count:d+1})};try{const f=await n();i(f)}catch(f){if(d<o&&await s({count:d,error:f}))return l({error:f});c(f)}};u()})}return na}var ia={},wf={},Tm;function Pd(){return Tm||(Tm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionReceipt=e.receiptStatuses=void 0,e.formatTransactionReceipt=s;const t=Fe(),n=ao(),r=ur(),o=co();e.receiptStatuses={"0x0":"reverted","0x1":"success"};function s(i){const c={...i,blockNumber:i.blockNumber?BigInt(i.blockNumber):null,contractAddress:i.contractAddress?i.contractAddress:null,cumulativeGasUsed:i.cumulativeGasUsed?BigInt(i.cumulativeGasUsed):null,effectiveGasPrice:i.effectiveGasPrice?BigInt(i.effectiveGasPrice):null,gasUsed:i.gasUsed?BigInt(i.gasUsed):null,logs:i.logs?i.logs.map(u=>(0,r.formatLog)(u)):null,to:i.to?i.to:null,transactionIndex:i.transactionIndex?(0,t.hexToNumber)(i.transactionIndex):null,status:i.status?e.receiptStatuses[i.status]:null,type:i.type?o.transactionType[i.type]||i.type:null};return i.blobGasPrice&&(c.blobGasPrice=BigInt(i.blobGasPrice)),i.blobGasUsed&&(c.blobGasUsed=BigInt(i.blobGasUsed)),c}e.defineTransactionReceipt=(0,n.defineFormatter)("transactionReceipt",s)})(wf)),wf}var Pf={},Bm;function L_(){return Bm||(Bm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fallbackTransactionErrorMagicIdentifier=e.fallbackMagicIdentifier=void 0,e.sendCalls=l;const t=ze(),n=ue(),r=Pr(),o=mt(),s=We(),i=Fe(),c=ie(),u=l0(),d=Ed();e.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",e.fallbackTransactionErrorMagicIdentifier=(0,c.numberToHex)(0,{size:32});async function l(f,_){const{account:T=f.account,capabilities:w,chain:p=f.chain,experimental_fallback:B,experimental_fallbackDelay:j=32,forceAtomic:h=!1,id:P,version:a="2.0.0"}=_,v=T?(0,t.parseAccount)(T):null,b=_.calls.map(m=>{const A=m,y=A.abi?(0,o.encodeFunctionData)({abi:A.abi,functionName:A.functionName,args:A.args}):A.data;return{data:A.dataSuffix&&y?(0,s.concat)([y,A.dataSuffix]):y,to:A.to,value:A.value?(0,c.numberToHex)(A.value):void 0}});try{const m=await f.request({method:"wallet_sendCalls",params:[{atomicRequired:h,calls:b,capabilities:w,chainId:(0,c.numberToHex)(p.id),from:v==null?void 0:v.address,id:P,version:a}]},{retryCount:0});return typeof m=="string"?{id:m}:m}catch(m){const A=m;
44if(B&&(A.name==="MethodNotFoundRpcError"||A.name==="MethodNotSupportedRpcError"||A.name==="UnknownRpcError"||A.details.toLowerCase().includes("does not exist / is not available")||A.details.toLowerCase().includes("missing or invalid. request()")||A.details.toLowerCase().includes("did not match any variant of untagged enum")||A.details.toLowerCase().includes("account upgraded to unsupported contract")||A.details.toLowerCase().includes("eip-7702 not supported")||A.details.toLowerCase().includes("unsupported wc_ method")||A.details.toLowerCase().includes("feature toggled misconfigured"))){if(w&&Object.values(w).some(R=>!R.optional)){const R="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new r.UnsupportedNonOptionalCapabilityError(new n.BaseError(R,{details:R}))}if(h&&b.length>1){const O="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new r.AtomicityNotSupportedError(new n.BaseError(O,{details:O}))}const y=[];for(const O of b){const R=(0,d.sendTransaction)(f,{account:v,chain:p,data:O.data,to:O.to,value:O.value?(0,i.hexToBigInt)(O.value):void 0});y.push(R),j>0&&await new Promise(k=>setTimeout(k,j))}const E=await Promise.allSettled(y);if(E.every(O=>O.status==="rejected"))throw E[0].reason;const x=E.map(O=>O.status==="fulfilled"?O.value:e.fallbackTransactionErrorMagicIdentifier);return{id:(0,s.concat)([...x,(0,c.numberToHex)(p.id,{size:32}),e.fallbackMagicIdentifier])}}throw(0,u.getTransactionError)(m,{..._,account:v,chain:_.chain})}}})(Pf)),Pf}var xm;function U_(){if(xm)return ia;xm=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.getCallsStatus=s;const e=At(),t=ir(),n=Fe(),r=Pd(),o=L_();async function s(i,c){async function u(B){if(B.endsWith(o.fallbackMagicIdentifier.slice(2))){const h=(0,t.trim)((0,e.sliceHex)(B,-64,-32)),P=(0,e.sliceHex)(B,0,-64).slice(2).match(/.{1,64}/g),a=await Promise.all(P.map(b=>o.fallbackTransactionErrorMagicIdentifier.slice(2)!==b?i.request({method:"eth_getTransactionReceipt",params:[`0x${b}`]},{dedupe:!0}):void 0)),v=a.some(b=>b===null)?100:a.every(b=>(b==null?void 0:b.status)==="0x1")?200:a.every(b=>(b==null?void 0:b.status)==="0x0")?500:600;return{atomic:!1,chainId:(0,n.hexToNumber)(h),receipts:a.filter(Boolean),status:v,version:"2.0.0"}}return i.request({method:"wallet_getCallsStatus",params:[B]})}const{atomic:d=!1,chainId:l,receipts:f,version:_="2.0.0",...T}=await u(c.id),[w,p]=(()=>{const B=T.status;return B>=100&&B<200?["pending",B]:B>=200&&B<300?["success",B]:B>=300&&B<700?["failure",B]:B==="CONFIRMED"?["success",200]:B==="PENDING"?["pending",100]:[void 0,B]})();return{...T,atomic:d,chainId:l?(0,n.hexToNumber)(l):void 0,receipts:(f==null?void 0:f.map(B=>({...B,blockNumber:(0,n.hexToBigInt)(B.blockNumber),gasUsed:(0,n.hexToBigInt)(B.gasUsed),status:r.receiptStatuses[B.status]})))??[],statusCode:p,status:w,version:_}}return ia}var Rm;function z_(){if(Rm)return _n;Rm=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.WaitForCallsStatusTimeoutError=void 0,_n.waitForCallsStatus=d;const e=ue(),t=F_(),n=ve(),r=nn(),o=kn(),s=o0(),i=wd(),c=Ye(),u=U_();async function d(f,_){const{id:T,pollingInterval:w=f.pollingInterval,status:p=({statusCode:E})=>E===200||E>=300,retryCount:B=4,retryDelay:j=({count:E})=>~~(1<<E)*200,timeout:h=6e4,throwOnFailure:P=!1}=_,a=(0,c.stringify)(["waitForCallsStatus",f.uid,T]),{promise:v,resolve:b,reject:m}=(0,s.withResolvers)();let A;const y=(0,r.observe)(a,{resolve:b,reject:m},E=>{const x=(0,o.poll)(async()=>{const O=R=>{clearTimeout(A),x(),R(),y()};try{const R=await(0,i.withRetry)(async()=>{const k=await(0,n.getAction)(f,u.getCallsStatus,"getCallsStatus")({id:T});if(P&&k.status==="failure")throw new t.BundleFailedError(k);return k},{retryCount:B,delay:j});if(!p(R))return;O(()=>E.resolve(R))}catch(R){O(()=>E.reject(R))}},{interval:w,emitOnBegin:!0});return x});return A=h?setTimeout(()=>{y(),clearTimeout(A),m(new l({id:T}))},h):void 0,await v}class l extends e.BaseError{constructor({id:_}){super(`Timed out while waiting for call bundle with id "${_}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}return _n.WaitForCallsStatusTimeoutError=l,_n}var Ci={},oa={},Om;function D_(){if(Om)return oa;Om=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.uid=r;const e=256;let t=e,n;function r(o=11){if(!n||t+o>e*2){n="",t=0;for(let s=0;s<e;s++)n+=(256+Math.random()*256|0).toString(16).substring(1)}return n.substring(t,t+++o)}return oa}var Cm;
44function jd(){if(Cm)return Ci;Cm=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.createClient=n,Ci.rpcSchema=r;const e=ze(),t=D_();function n(o){const{batch:s,chain:i,ccipRead:c,key:u="base",name:d="Base Client",type:l="base"}=o,f=o.experimental_blockTag??(typeof(i==null?void 0:i.experimental_preconfirmationTime)=="number"?"pending":void 0),_=(i==null?void 0:i.blockTime)??12e3,T=Math.min(Math.max(Math.floor(_/2),500),4e3),w=o.pollingInterval??T,p=o.cacheTime??w,B=o.account?(0,e.parseAccount)(o.account):void 0,{config:j,request:h,value:P}=o.transport({chain:i,pollingInterval:w}),a={...j,...P},v={account:B,batch:s,cacheTime:p,ccipRead:c,chain:i,key:u,name:d,pollingInterval:w,request:h,transport:a,type:l,uid:(0,t.uid)(),...f?{experimental_blockTag:f}:{}};function b(m){return A=>{const y=A(m);for(const x in v)delete y[x];const E={...m,...y};return Object.assign(E,{extend:b(E)})}}return Object.assign(v,{extend:b(v)})}function r(){return null}return Ci}var sa={},aa={},ca={},ua={},qm;function m0(){if(qm)return ua;qm=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.isNullUniversalResolverError=n;const e=ue(),t=wr();function n(r){var s,i,c,u,d,l;if(!(r instanceof e.BaseError))return!1;const o=r.walk(f=>f instanceof t.ContractFunctionRevertedError);return o instanceof t.ContractFunctionRevertedError?((s=o.data)==null?void 0:s.errorName)==="HttpError"||((i=o.data)==null?void 0:i.errorName)==="ResolverError"||((c=o.data)==null?void 0:c.errorName)==="ResolverNotContract"||((u=o.data)==null?void 0:u.errorName)==="ResolverNotFound"||((d=o.data)==null?void 0:d.errorName)==="ReverseAddressMismatch"||((l=o.data)==null?void 0:l.errorName)==="UnsupportedResolverProfile":!1}return ua}var da={},fa={},Mm;function G_(){if(Mm)return fa;Mm=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.encodedLabelToLabelhash=t;const e=at();function t(n){if(n.length!==66||n.indexOf("[")!==0||n.indexOf("]")!==65)return null;const r=`0x${n.slice(1,65)}`;return(0,e.isHex)(r)?r:null}return fa}var Hm;function h0(){if(Hm)return da;Hm=1,Object.defineProperty(da,"__esModule",{value:!0}),da.namehash=s;const e=We(),t=Ae(),n=ie(),r=lt(),o=G_();function s(i){let c=new Uint8Array(32).fill(0);if(!i)return(0,n.bytesToHex)(c);const u=i.split(".");for(let d=u.length-1;d>=0;d-=1){const l=(0,o.encodedLabelToLabelhash)(u[d]),f=l?(0,t.toBytes)(l):(0,r.keccak256)((0,t.stringToBytes)(u[d]),"bytes");c=(0,r.keccak256)((0,e.concat)([c,f]),"bytes")}return(0,n.bytesToHex)(c)}return da}var la={},ba={},km;function A6(){if(km)return ba;km=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.encodeLabelhash=e;function e(t){return`[${t.slice(2)}]`}return ba}var ma={},$m;function V_(){if($m)return ma;$m=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.labelhash=o;const e=Ae(),t=ie(),n=lt(),r=G_();function o(s){const i=new Uint8Array(32).fill(0);return s?(0,r.encodedLabelToLabelhash)(s)||(0,n.keccak256)((0,e.stringToBytes)(s)):(0,t.bytesToHex)(i)}return ma}var Nm;function y0(){if(Nm)return la;Nm=1,Object.defineProperty(la,"__esModule",{value:!0}),la.packetToBytes=r;const e=Ae(),t=A6(),n=V_();function r(o){const s=o.replace(/^\.|\.$/gm,"");if(s.length===0)return new Uint8Array(1);const i=new Uint8Array((0,e.stringToBytes)(s).byteLength+2);let c=0;const u=s.split(".");for(let d=0;d<u.length;d++){let l=(0,e.stringToBytes)(u[d]);l.byteLength>255&&(l=(0,e.stringToBytes)((0,t.encodeLabelhash)((0,n.labelhash)(u[d])))),i[c]=l.length,i.set(l,c+1),c+=l.length+1}return i.byteLength!==c+1?i.slice(0,c+1):i}return la}var Fm;function S6(){if(Fm)return ca;Fm=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.getEnsAddress=_;const e=Sr(),t=dr(),n=mt(),r=Ir(),o=ir(),s=ie(),i=m0(),c=gd(),u=h0(),d=y0(),l=ve(),f=Ft();async function _(T,w){const{blockNumber:p,blockTag:B,coinType:j,name:h,gatewayUrls:P,strict:a}=w,{chain:v}=T,b=(()=>{if(w.universalResolverAddress)return w.universalResolverAddress;if(!v)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,r.getChainContractAddress)({blockNumber:p,chain:v,contract:"ensUniversalResolver"})})(),m=v==null?void 0:v.ensTlds;if(m&&!m.some(y=>h.endsWith(y)))return null;const A=j!=null?[(0,u.namehash)(h),BigInt(j)]:[(0,u.namehash)(h)];try{const y=(0,n.encodeFunctionData)({abi:e.addressResolverAbi,functionName:"addr",args:A}),E={address:b,abi:e.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,s.toHex)((0,d.packetToBytes)(h)),y,P??[c.localBatchGatewayUrl]],blockNumber:p,blockTag:B},O=await(0,l.getAction)(T,f.readContract,"readContract")(E);if(O[0]==="0x")return null;const R=(0,t.decodeFunctionResult)({abi:e.addressResolverAbi,args:A,functionName:"addr",data:O[0]});return R==="0x"||(0,o.trim)(R)==="0x00"?null:R}catch(y){if(a)throw y;if((0,i.isNullUniversalResolverError)(y))return null;throw y}}return ca}var ha={},ya={},Bt={},pt={},Lm;function g0(){if(Lm)return pt;
44Lm=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.EnsInvalidChainIdError=pt.EnsAvatarUnsupportedNamespaceError=pt.EnsAvatarUriResolutionError=pt.EnsAvatarInvalidNftUriError=pt.EnsAvatarInvalidMetadataError=void 0;const e=ue();class t extends e.BaseError{constructor({data:c}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(c)}`],name:"EnsAvatarInvalidMetadataError"})}}pt.EnsAvatarInvalidMetadataError=t;class n extends e.BaseError{constructor({reason:c}){super(`ENS NFT avatar URI is invalid. ${c}`,{name:"EnsAvatarInvalidNftUriError"})}}pt.EnsAvatarInvalidNftUriError=n;class r extends e.BaseError{constructor({uri:c}){super(`Unable to resolve ENS avatar URI "${c}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}pt.EnsAvatarUriResolutionError=r;class o extends e.BaseError{constructor({namespace:c}){super(`ENS NFT avatar namespace "${c}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}pt.EnsAvatarUnsupportedNamespaceError=o;class s extends e.BaseError{constructor({chainId:c}){super(`Invalid ENSIP-11 chainId: ${c}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}return pt.EnsInvalidChainIdError=s,pt}var Um;function I6(){if(Um)return Bt;Um=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isImageUri=i,Bt.getGateway=c,Bt.resolveAvatarUri=u,Bt.getJsonImage=d,Bt.getMetadataAvatarUri=l,Bt.parseAvatarUri=f,Bt.parseNftUri=_,Bt.getNftTokenUri=T;const e=Ft(),t=g0(),n=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,r=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,o=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,s=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function i(w){try{const p=await fetch(w,{method:"HEAD"});if(p.status===200){const B=p.headers.get("content-type");return B==null?void 0:B.startsWith("image/")}return!1}catch(p){return typeof p=="object"&&typeof p.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(B=>{const j=new Image;j.onload=()=>{B(!0)},j.onerror=()=>{B(!1)},j.src=w})}}function c(w,p){return w?w.endsWith("/")?w.slice(0,-1):w:p}function u({uri:w,gatewayUrls:p}){const B=o.test(w);if(B)return{uri:w,isOnChain:!0,isEncoded:B};const j=c(p==null?void 0:p.ipfs,"https://ipfs.io"),h=c(p==null?void 0:p.arweave,"https://arweave.net"),P=w.match(n),{protocol:a,subpath:v,target:b,subtarget:m=""}=(P==null?void 0:P.groups)||{},A=a==="ipns:/"||v==="ipns/",y=a==="ipfs:/"||v==="ipfs/"||r.test(w);if(w.startsWith("http")&&!A&&!y){let x=w;return p!=null&&p.arweave&&(x=w.replace(/https:\/\/arweave.net/g,p==null?void 0:p.arweave)),{uri:x,isOnChain:!1,isEncoded:!1}}if((A||y)&&b)return{uri:`${j}/${A?"ipns":"ipfs"}/${b}${m}`,isOnChain:!1,isEncoded:!1};if(a==="ar:/"&&b)return{uri:`${h}/${b}${m||""}`,isOnChain:!1,isEncoded:!1};let E=w.replace(s,"");if(E.startsWith("<svg")&&(E=`data:image/svg+xml;base64,${btoa(E)}`),E.startsWith("data:")||E.startsWith("{"))return{uri:E,isOnChain:!0,isEncoded:!1};throw new t.EnsAvatarUriResolutionError({uri:w})}function d(w){if(typeof w!="object"||!("image"in w)&&!("image_url"in w)&&!("image_data"in w))throw new t.EnsAvatarInvalidMetadataError({data:w});return w.image||w.image_url||w.image_data}async function l({gatewayUrls:w,uri:p}){try{const B=await fetch(p).then(h=>h.json());return await f({gatewayUrls:w,uri:d(B)})}catch{throw new t.EnsAvatarUriResolutionError({uri:p})}}async function f({gatewayUrls:w,uri:p}){const{uri:B,isOnChain:j}=u({uri:p,gatewayUrls:w});if(j||await i(B))return B;throw new t.EnsAvatarUriResolutionError({uri:p})}function _(w){let p=w;p.startsWith("did:nft:")&&(p=p.replace("did:nft:","").replace(/_/g,"/"));const[B,j,h]=p.split("/"),[P,a]=B.split(":"),[v,b]=j.split(":");if(!P||P.toLowerCase()!=="eip155")throw new t.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!a)throw new t.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!b)throw new t.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!h)throw new t.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!v)throw new t.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(a,10),namespace:v.toLowerCase(),contractAddress:b,tokenID:h}}async function T(w,{nft:p}){if(p.namespace==="erc721")return(0,e.readContract)(w,{address:p.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(p.tokenID)]});if(p.namespace==="erc1155")return(0,e.readContract)(w,{address:p.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(p.tokenID)]});throw new t.EnsAvatarUnsupportedNamespaceError({namespace:p.namespace})}return Bt}var zm;function T6(){if(zm)return ya;zm=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.parseAvatarRecord=t;const e=I6();async function t(r,{gatewayUrls:o,record:s}){return/eip155:/i.test(s)?n(r,{gatewayUrls:o,record:s}):(0,e.parseAvatarUri)({uri:s,gatewayUrls:o})}async function n(r,{gatewayUrls:o,record:s}){const i=(0,e.parseNftUri)(s),c=await(0,e.getNftTokenUri)(r,{nft:i}),{uri:u,isOnChain:d,isEncoded:l}=(0,e.resolveAvatarUri)({uri:c,gatewayUrls:o});if(d&&(u.includes("data:application/json;base64,")||u.startsWith("{"))){const _=l?atob(u.replace("data:application/json;base64,","")):u,T=JSON.parse(_);return(0,e.parseAvatarUri)({uri:(0,e.getJsonImage)(T),gatewayUrls:o})}let f=i.tokenID;return i.namespace==="erc1155"&&(f=f.replace("0x","").padStart(64,"0")),(0,e.getMetadataAvatarUri)({gatewayUrls:o,uri:u.replace(/(?:0x)?{id}/,f)})}return ya}var ga={},Dm;function W_(){if(Dm)return ga;Dm=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.getEnsText=f;const e=Sr(),t=dr(),n=mt(),r=Ir(),o=ie(),s=m0(),i=gd(),c=h0(),u=y0(),d=ve(),l=Ft();async function f(_,T){const{blockNumber:w,blockTag:p,key:B,name:j,gatewayUrls:h,strict:P}=T,{chain:a}=_,v=(()=>
44{if(T.universalResolverAddress)return T.universalResolverAddress;if(!a)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,r.getChainContractAddress)({blockNumber:w,chain:a,contract:"ensUniversalResolver"})})(),b=a==null?void 0:a.ensTlds;if(b&&!b.some(m=>j.endsWith(m)))return null;try{const m={address:v,abi:e.universalResolverResolveAbi,args:[(0,o.toHex)((0,u.packetToBytes)(j)),(0,n.encodeFunctionData)({abi:e.textResolverAbi,functionName:"text",args:[(0,c.namehash)(j),B]}),h??[i.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:w,blockTag:p},y=await(0,d.getAction)(_,l.readContract,"readContract")(m);if(y[0]==="0x")return null;const E=(0,t.decodeFunctionResult)({abi:e.textResolverAbi,functionName:"text",data:y[0]});return E===""?null:E}catch(m){if(P)throw m;if((0,s.isNullUniversalResolverError)(m))return null;throw m}}return ga}var Gm;function B6(){if(Gm)return ha;Gm=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.getEnsAvatar=r;const e=T6(),t=ve(),n=W_();async function r(o,{blockNumber:s,blockTag:i,assetGatewayUrls:c,name:u,gatewayUrls:d,str
44ict:l,universalResolverAddress:f}){const _=await(0,t.getAction)(o,n.getEnsText,"getEnsText")({blockNumber:s,blockTag:i,key:"avatar",name:u,universalResolverAddress:f,gatewayUrls:d,strict:l});if(!_)return null;try{return await(0,e.parseAvatarRecord)(o,{record:_,gatewayUrls:c})}catch{return null}}return ha}var pa={},Vm;function x6(){if(Vm)return pa;Vm=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.getEnsName=i;const e=Sr(),t=Ir(),n=m0(),r=gd(),o=ve(),s=Ft();async function i(c,u){const{address:d,blockNumber:l,blockTag:f,coinType:_=60n,gatewayUrls:T,strict:w}=u,{chain:p}=c,B=(()=>{if(u.universalResolverAddress)return u.universalResolverAddress;if(!p)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,t.getChainContractAddress)({blockNumber:l,chain:p,contract:"ensUniversalResolver"})})();try{const j={address:B,abi:e.universalResolverReverseAbi,args:[d,_,T??[r.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:l,blockTag:f},h=(0,o.getAction)(c,s.readContract,"readContract"),[P]=await h(j);return P||null}catch(j){if(w)throw j;if((0,n.isNullUniversalResolverError)(j))return null;throw j}}return pa}var _a={},Wm;function R6(){if(Wm)return _a;Wm=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.getEnsResolver=s;const e=Ir(),t=ie(),n=y0(),r=ve(),o=Ft();async function s(i,c){const{blockNumber:u,blockTag:d,name:l}=c,{chain:f}=i,_=(()=>{if(c.universalResolverAddress)return c.universalResolverAddress;if(!f)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,e.getChainContractAddress)({blockNumber:u,chain:f,contract:"ensUniversalResolver"})})(),T=f==null?void 0:f.ensTlds;if(T&&!T.some(p=>l.endsWith(p)))throw new Error(`${l} is not a valid ENS TLD (${T==null?void 0:T.join(", ")}) for chain "${f.name}" (id: ${f.id}).`);const[w]=await(0,r.getAction)(i,o.readContract,"readContract")({address:_,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,t.toHex)((0,n.packetToBytes)(l))],blockNumber:u,blockTag:d});return w}return _a}var va={},Km;function K_(){if(Km)return va;Km=1,Object.defineProperty(va,"__esModule",{value:!0}),va.createAccessList=i;const e=ze(),t=ie(),n=i0(),r=qn(),o=ar(),s=cr();async function i(c,u){var m,A,y;const{account:d=c.account,blockNumber:l,blockTag:f="latest",blobs:_,data:T,gas:w,gasPrice:p,maxFeePerBlobGas:B,maxFeePerGas:j,maxPriorityFeePerGas:h,to:P,value:a,...v}=u,b=d?(0,e.parseAccount)(d):void 0;try{(0,s.assertRequest)(u);const x=(typeof l=="bigint"?(0,t.numberToHex)(l):void 0)||f,O=(y=(A=(m=c.chain)==null?void 0:m.formatters)==null?void 0:A.transactionRequest)==null?void 0:y.format,k=(O||o.formatTransactionRequest)({...(0,r.extract)(v,{format:O}),from:b==null?void 0:b.address,blobs:_,data:T,gas:w,gasPrice:p,maxFeePerBlobGas:B,maxFeePerGas:j,maxPriorityFeePerGas:h,to:P,value:a}),N=await c.request({method:"eth_createAccessList",params:[k,x]});return{accessList:N.accessList,gasUsed:BigInt(N.gasUsed)}}catch(E){throw(0,n.getCallError)(E,{...u,account:b,chain:c.chain})}}return va}var Ea={},Zm;function O6(){if(Zm)return Ea;Zm=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.createBlockFilter=t;const e=nd();async function t(n){const r=(0,e.createFilterRequestScope)(n,{method:"eth_newBlockFilter"}),o=await n.request({method:"eth_newBlockFilter"});return{id:o,request:r(o),type:"block"}}return Ea}var wa={},Ym;function Z_(){if(Ym)return wa;Ym=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.createEventFilter=r;const e=en(),t=ie(),n=nd();async function r(o,{address:s,args:i,event:c,events:u,fromBlock:d,strict:l,toBlock:f}={}){const _=u??(c?[c]:void 0),T=(0,n.createFilterRequestScope)(o,{method:"eth_newFilter"});let w=[];_&&(w=[_.flatMap(j=>(0,e.encodeEventTopics)({abi:[j],eventName:j.name,args:i}))],c&&(w=w[0]));const p=await o.request({method:"eth_newFilter",params:[{address:s,fromBlock:typeof d=="bigint"?(0,t.numberToHex)(d):d,toBlock:typeof f=="bigint"?(0,t.numberToHex)(f):f,...w.length?{topics:w}:{}}]});return{abi:_,args:i,eventName:c?c.name:void 0,fromBlock:d,id:p,request:T(p),strict:!!l,toBlock:f,type:"event"}}return wa}var Pa={},Jm;function Y_(){if(Jm)return Pa;Jm=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.createPendingTransactionFilter=t;const e=nd();async function t(n){const r=(0,e.createFilterRequestScope)(n,{method:"eth_newPendingTransactionFilter"}),o=await n.request({method:"eth_newPendingTransactionFilter"});return{id:o,request:r(o),type:"transaction"}}return Pa}var ja={},Xm;function C6(){if(Xm)return ja;Xm=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.getBalance=t;const e=ie();async function t(n,{address:r,blockNumber:o,blockTag:s=n.experimental_blockTag??"latest"}){const i=typeof o=="bigint"?(0,e.numberToHex)(o):void 0,c=await n.request({method:"eth_getBalance",params:[r,i||s]});return BigInt(c)}return ja}var Aa={},Qm;function q6(){if(Qm)return Aa;Qm=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.getBlobBaseFee=e;async function e(t){const n=await t.request({method:"eth_blobBaseFee"});return BigInt(n)}return Aa}var Sa={},eh;function M6(){if(eh)return Sa;eh=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.getBlockTransactionCount=n;const e=Fe(),t=ie();async function n(r,{blockHash:o,blockNumber:s,blockTag:i="latest"}={}){const c=s!==void 0?(0,t.numberToHex)(s):void 0;let u;return o?u=await r.request({method:"eth_getBlockTransactionCountByHash",params:[o]},{dedupe:!0}):u=await r.request({method:"eth_getBlockTransactionCountByNumber",params:[c||i]},{dedupe:!!c}),(0,e.hexToNumber)(u)}return Sa}var Ia={},th;function J_(){if(th)return Ia;th=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.getCode=t;const e=ie();async function t(n,{address:r,blockNumber:o,blockTag:s="latest"}){const i=o!==void 0?(0,e.numberToHex)(o):void 0,c=await n.request({method:"eth_getCode",params:[r,i||s]},{dedupe:!!i});if(c!=="0x")return c}return Ia}var Ta={},qi={},rh;function H6(){if(rh)return qi;rh=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.Eip712DomainNotFoundError=void 0;const e=ue();class t extends e.BaseError{constructor({address:r}){super(`No EIP-712 domain found on contract "${r}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${r}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}return qi.Eip712DomainNotFoundError=t,qi}var nh;function k6(){if(nh)return Ta;nh=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.getEip712Domain=r;const e=H6(),t=ve(),n=Ft();async function r(s,i){const{address:c,factory:u,factoryData:d}=i;try{const[l,f,_,T,w,p,B]=await(0,t.getAction)(s,n.readContract,"readContract")({abi:o,address:c,functionName:"eip712Domain",factory:u,factoryData:d});return{domain:{name:f,version:_,chainId:Number(T),verifyingContract:w,salt:p},extensions:B,fields:l}}catch(l){const f=l;throw f.name==="ContractFunctionExecutionError"&&f.cause.name==="ContractFunctionZeroDataError"?new e.Eip712DomainNotFoundError({address:c}):f}}const o=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];return Ta}var Ba={},xa={},ih;function $6(){if(ih)return xa;ih=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.formatFeeHistory=e;function e(t){var n;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(n=t.reward)==null?void 0:n.map(r=>r.map(o=>BigInt(o)))}}return xa}var oh;function N6(){if(oh)return Ba;oh=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.getFeeHistory=n;const e=ie(),t=$6();async function n(r,{blockCount:o,blockNumber:s,blockTag:i="latest",rewardPercentiles:c}){const u=typeof s=="bigint"?(0,e.numberToHex)(s):void 0,d=await r.request({method:"eth_feeHistory",params:[(0,e.numberToHex)(o),u||i,c]},{dedupe:!!u});return(0,t.formatFeeHistory)(d)}return Ba}var Ra={},sh;function F6(){if(sh)return Ra;sh=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.getFilterLogs=n;const e=fo(),t=ur();async function n(r,{filter:o}){const s=o.strict??!1,c=(await o.request({method:"eth_getFilterLogs",params:[o.id]})).map(u=>(0,t.formatLog)(u));return o.abi?(0,e.parseEventLogs)({abi:o.abi,logs:c,strict:s}):c}return Ra}var Oa={},Ca={},jf={},qa={},ah;
44function X_(){if(ah)return qa;ah=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.encodePacked=c;const e=Ce(),t=Ot(),n=bt(),r=We(),o=_r(),s=ie(),i=rd();function c(d,l){if(d.length!==l.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:d.length,givenLength:l.length});const f=[];for(let _=0;_<d.length;_++){const T=d[_],w=l[_];f.push(u(T,w))}return(0,r.concatHex)(f)}function u(d,l,f=!1){if(d==="address"){const p=l;if(!(0,n.isAddress)(p))throw new t.InvalidAddressError({address:p});return(0,o.pad)(p.toLowerCase(),{size:f?32:null})}if(d==="string")return(0,s.stringToHex)(l);if(d==="bytes")return l;if(d==="bool")return(0,o.pad)((0,s.boolToHex)(l),{size:f?32:1});const _=d.match(i.integerRegex);if(_){const[p,B,j="256"]=_,h=Number.parseInt(j,10)/8;return(0,s.numberToHex)(l,{size:f?32:h,signed:B==="int"})}const T=d.match(i.bytesRegex);if(T){const[p,B]=T;if(Number.parseInt(B,10)!==(l.length-2)/2)throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(B,10),givenSize:(l.length-2)/2});return(0,o.pad)(l,{dir:"right",size:f?32:null})}const w=d.match(i.arrayRegex);if(w&&Array.isArray(l)){const[p,B]=w,j=[];for(let h=0;h<l.length;h++)j.push(u(B,l[h],!0));return j.length===0?"0x":(0,r.concatHex)(j)}throw new e.UnsupportedPackedAbiType(d)}return qa}var vn={},Ma={},ch;function p0(){if(ch)return Ma;ch=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.isBytes=e;function e(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}return Ma}var uh;function Q_(){if(uh)return vn;uh=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.getContractAddress=u,vn.getCreateAddress=d,vn.getCreate2Address=l;const e=We(),t=p0(),n=_r(),r=At(),o=Ae(),s=oo(),i=lt(),c=Et();function u(f){return f.opcode==="CREATE2"?l(f):d(f)}function d(f){const _=(0,o.toBytes)((0,c.getAddress)(f.from));let T=(0,o.toBytes)(f.nonce);return T[0]===0&&(T=new Uint8Array([])),(0,c.getAddress)(`0x${(0,i.keccak256)((0,s.toRlp)([_,T],"bytes")).slice(26)}`)}function l(f){const _=(0,o.toBytes)((0,c.getAddress)(f.from)),T=(0,n.pad)((0,t.isBytes)(f.salt)?f.salt:(0,o.toBytes)(f.salt),{size:32}),w="bytecodeHash"in f?(0,t.isBytes)(f.bytecodeHash)?f.bytecodeHash:(0,o.toBytes)(f.bytecodeHash):(0,i.keccak256)(f.bytecode,"bytes");return(0,c.getAddress)((0,r.slice)((0,i.keccak256)((0,e.concat)([(0,o.toBytes)("0xff"),_,T,w])),12))}return vn}var Ha={},Mi={},yr={},dh;function Ad(){if(dh)return yr;
44dh=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.assertTransactionEIP7702=f,yr.assertTransactionEIP4844=_,yr.assertTransactionEIP1559=T,yr.assertTransactionEIP2930=w,yr.assertTransactionLegacy=p;const e=B_(),t=Zf(),n=Ot(),r=ue(),o=x_(),s=bo(),i=sr(),c=bt(),u=ft(),d=At(),l=Fe();function f(B){const{authorizationList:j}=B;if(j)for(const h of j){const{chainId:P}=h,a=h.address;if(!(0,c.isAddress)(a))throw new n.InvalidAddressError({address:a});if(P<0)throw new s.InvalidChainIdError({chainId:P})}T(B)}function _(B){const{blobVersionedHashes:j}=B;if(j){if(j.length===0)throw new o.EmptyBlobError;for(const h of j){const P=(0,u.size)(h),a=(0,l.hexToNumber)((0,d.slice)(h,0,1));if(P!==32)throw new o.InvalidVersionedHashSizeError({hash:h,size:P});if(a!==e.versionedHashVersionKzg)throw new o.InvalidVersionedHashVersionError({hash:h,version:a})}}T(B)}function T(B){const{chainId:j,maxPriorityFeePerGas:h,maxFeePerGas:P,to:a}=B;if(j<=0)throw new s.InvalidChainIdError({chainId:j});if(a&&!(0,c.isAddress)(a))throw new n.InvalidAddressError({address:a});if(P&&P>t.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P});if(h&&P&&h>P)throw new i.TipAboveFeeCapError({maxFeePerGas:P,maxPriorityFeePerGas:h})}function w(B){const{chainId:j,maxPriorityFeePerGas:h,gasPrice:P,maxFeePerGas:a,to:v}=B;if(j<=0)throw new s.InvalidChainIdError({chainId:j});if(v&&!(0,c.isAddress)(v))throw new n.InvalidAddressError({address:v});if(h||a)throw new r.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(P&&P>t.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P})}function p(B){const{chainId:j,maxPriorityFeePerGas:h,gasPrice:P,maxFeePerGas:a,to:v}=B;if(v&&!(0,c.isAddress)(v))throw new n.InvalidAddressError({address:v});if(typeof j<"u"&&j<=0)throw new s.InvalidChainIdError({chainId:j});if(h||a)throw new r.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(P&&P>t.maxUint256)throw new i.FeeCapTooHighError({maxFeePerGas:P})}return yr}var ka={},fh;function _0(){if(fh)return ka;fh=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.serializeAccessList=r;const e=Ot(),t=wt(),n=bt();function r(o){if(!o||o.length===0)return[];const s=[];for(let i=0;i<o.length;i++){const{address:c,storageKeys:u}=o[i];for(let d=0;d<u.length;d++)if(u[d].length-2!==64)throw new t.InvalidStorageKeySizeError({storageKey:u[d]});if(!(0,n.isAddress)(c,{strict:!1}))throw new e.InvalidAddressError({address:c});s.push([c,u])}return s}return ka}var lh;function Sd(){if(lh)return Mi;lh=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.serializeTransaction=T,Mi.toYParitySignatureArray=P;const e=wt(),t=ev(),n=fd(),r=ld(),o=e0(),s=bd(),i=We(),c=ir(),u=ie(),d=oo(),l=Ad(),f=md(),_=_0();function T(a,v){const b=(0,f.getTransactionType)(a);return b==="eip1559"?B(a,v):b==="eip2930"?j(a,v):b==="eip4844"?p(a,v):b==="eip7702"?w(a,v):h(a,v)}function w(a,v){const{authorizationList:b,chainId:m,gas:A,nonce:y,to:E,value:x,maxFeePerGas:O,maxPriorityFeePerGas:R,accessList:k,data:N}=a;(0,l.assertTransactionEIP7702)(a);const H=(0,_.serializeAccessList)(k),g=(0,t.serializeAuthorizationList)(b);return(0,i.concatHex)(["0x04",(0,d.toRlp)([(0,u.numberToHex)(m),y?(0,u.numberToHex)(y):"0x",R?(0,u.numberToHex)(R):"0x",O?(0,u.numberToHex)(O):"0x",A?(0,u.numberToHex)(A):"0x",E??"0x",x?(0,u.numberToHex)(x):"0x",N??"0x",H,g,...P(a,v)])])}function p(a,v){const{chainId:b,gas:m,nonce:A,to:y,value:E,maxFeePerBlobGas:x,maxFeePerGas:O,maxPriorityFeePerGas:R,accessList:k,data:N}=a;(0,l.assertTransactionEIP4844)(a);let H=a.blobVersionedHashes,g=a.sidecars;if(a.blobs&&(typeof H>"u"||typeof g>"u")){const $=typeof a.blobs[0]=="string"?a.blobs:a.blobs.map(U=>(0,u.bytesToHex)(U)),L=a.kzg,F=(0,n.blobsToCommitments)({blobs:$,kzg:L});if(typeof H>"u"&&(H=(0,o.commitmentsToVersionedHashes)({commitments:F})),typeof g>"u"){const U=(0,r.blobsToProofs)({blobs:$,commitments:F,kzg:L});g=(0,s.toBlobSidecars)({blobs:$,commitments:F,proofs:U})}}const M=(0,_.serializeAccessList)(k),S=[(0,u.numberToHex)(b),A?(0,u.numberToHex)(A):"0x",R?(0,u.numberToHex)(R):"0x",O?(0,u.numberToHex)(O):"0x",m?(0,u.numberToHex)(m):"0x",y??"0x",E?(0,u.numberToHex)(E):"0x",N??"0x",M,x?(0,u.numberToHex)(x):"0x",H??[],...P(a,v)],I=[],C=[],q=[];if(g)for(let $=0;$<g.length;
44$++){const{blob:L,commitment:F,proof:U}=g[$];I.push(L),C.push(F),q.push(U)}return(0,i.concatHex)(["0x03",g?(0,d.toRlp)([S,I,C,q]):(0,d.toRlp)(S)])}function B(a,v){const{chainId:b,gas:m,nonce:A,to:y,value:E,maxFeePerGas:x,maxPriorityFeePerGas:O,accessList:R,data:k}=a;(0,l.assertTransactionEIP1559)(a);const N=(0,_.serializeAccessList)(R),H=[(0,u.numberToHex)(b),A?(0,u.numberToHex)(A):"0x",O?(0,u.numberToHex)(O):"0x",x?(0,u.numberToHex)(x):"0x",m?(0,u.numberToHex)(m):"0x",y??"0x",E?(0,u.numberToHex)(E):"0x",k??"0x",N,...P(a,v)];return(0,i.concatHex)(["0x02",(0,d.toRlp)(H)])}function j(a,v){const{chainId:b,gas:m,data:A,nonce:y,to:E,value:x,accessList:O,gasPrice:R}=a;(0,l.assertTransactionEIP2930)(a);const k=(0,_.serializeAccessList)(O),N=[(0,u.numberToHex)(b),y?(0,u.numberToHex)(y):"0x",R?(0,u.numberToHex)(R):"0x",m?(0,u.numberToHex)(m):"0x",E??"0x",x?(0,u.numberToHex)(x):"0x",A??"0x",k,...P(a,v)];return(0,i.concatHex)(["0x01",(0,d.toRlp)(N)])}function h(a,v){const{chainId:b=0,gas:m,data:A,nonce:y,to:E,value:x,gasPrice:O}=a;(0,l.assertTransactionLegacy)(a);let R=[y?(0,u.numberToHex)(y):"0x",O?(0,u.numberToHex)(O):"0x",m?(0,u.numberToHex)(m):"0x",E??"0x",x?(0,u.numberToHex)(x):"0x",A??"0x"];if(v){const k=(()=>{if(v.v>=35n)return(v.v-35n)/2n>0?v.v:27n+(v.v===35n?0n:1n);if(b>0)return BigInt(b*2)+BigInt(35n+v.v-27n);const g=27n+(v.v===27n?0n:1n);if(v.v!==g)throw new e.InvalidLegacyVError({v:v.v});return g})(),N=(0,c.trim)(v.r),H=(0,c.trim)(v.s);R=[...R,(0,u.numberToHex)(k),N==="0x00"?"0x":N,H==="0x00"?"0x":H]}else b>0&&(R=[...R,(0,u.numberToHex)(b),"0x","0x"]);return(0,d.toRlp)(R)}function P(a,v){const b=v??a,{v:m,yParity:A}=b;if(typeof b.r>"u")return[];if(typeof b.s>"u")return[];if(typeof m>"u"&&typeof A>"u")return[];const y=(0,c.trim)(b.r),E=(0,c.trim)(b.s);return[typeof A=="number"?A?(0,u.numberToHex)(1):"0x":m===0n?"0x":m===1n?(0,u.numberToHex)(1):m===27n?"0x":(0,u.numberToHex)(1),y==="0x00"?"0x":y,E==="0x00"?"0x":E]}return Mi}var bh;function ev(){if(bh)return Ha;bh=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.serializeAuthorizationList=n;const e=ie(),t=Sd();function n(r){if(!r||r.length===0)return[];const o=[];for(const s of r){const{chainId:i,nonce:c,...u}=s,d=s.address;o.push([i?(0,e.toHex)(i):"0x",d,c?(0,e.toHex)(c):"0x",...(0,t.toYParitySignatureArray)({},u)])}return o}return Ha}var $a={},mh;function tv(){if(mh)return $a;mh=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.verifyAuthorization=r;const e=Et(),t=Mt(),n=ad();async function r({address:o,authorization:s,signature:i}){return(0,t.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverAuthorizationAddress)({authorization:s,signature:i}))}return $a}var Hi={},Af={},hh;function L6(){return hh||(hh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.promiseCache=void 0,e.withDedupe=n;const t=Qi();e.promiseCache=new t.LruMap(8192);function n(r,{enabled:o=!0,id:s}){if(!o||!s)return r();if(e.promiseCache.get(s))return e.promiseCache.get(s);const i=r().finally(()=>e.promiseCache.delete(s));return e.promiseCache.set(s,i),i}})(Af)),Af}var yh;function rv(){if(yh)return Hi;yh=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.buildRequest=c,Hi.shouldRetry=u;const e=ue(),t=qt(),n=Pr(),r=ie(),o=L6(),s=wd(),i=Ye();function c(d,l={}){return async(f,_={})=>{var a;const{dedupe:T=!1,methods:w,retryDelay:p=150,retryCount:B=3,uid:j}={...l,..._},{method:h}=f;if((a=w==null?void 0:w.exclude)!=null&&a.includes(h))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:h});if(w!=null&&w.include&&!w.include.includes(h))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:h});const P=T?(0,r.stringToHex)(`${j}.${(0,i.stringify)(f)}`):void 0;return(0,o.withDedupe)(()=>(0,s.withRetry)(async()=>{try{return await d(f)}catch(v){const b=v;switch(b.code){case n.ParseRpcError.code:throw new n.ParseRpcError(b);case n.InvalidRequestRpcError.code:throw new n.InvalidRequestRpcError(b);case n.MethodNotFoundRpcError.code:throw new n.MethodNotFoundRpcError(b,{method:f.method});case n.InvalidParamsRpcError.code:throw new n.InvalidParamsRpcError(b);case n.InternalRpcError.code:throw new n.InternalRpcError(b);case n.InvalidInputRpcError.code:throw new n.InvalidInputRpcError(b);case n.ResourceNotFoundRpcError.code:throw new n.ResourceNotFoundRpcError(b);case n.ResourceUnavailableRpcError.code:throw new n.ResourceUnavailableRpcError(b);case n.TransactionRejectedRpcError.code:throw new n.TransactionRejectedRpcError(b);case n.MethodNotSupportedRpcError.code:throw new n.MethodNotSupportedRpcError(b,{method:f.method});case n.LimitExceededRpcError.code:throw new n.LimitExceededRpcError(b);case n.JsonRpcVersionUnsupportedError.code:throw new n.JsonRpcVersionUnsupportedError(b);case n.UserRejectedRequestError.code:throw new n.UserRejectedRequestError(b);case n.UnauthorizedProviderError.code:throw new n.UnauthorizedProviderError(b);case n.UnsupportedProviderMethodError.code:throw new n.UnsupportedProviderMethodError(b);case n.ProviderDisconnectedError.code:throw new n.ProviderDisconnectedError(b);case n.ChainDisconnectedError.code:throw new n.ChainDisconnectedError(b);case n.SwitchChainError.code:throw new n.SwitchChainError(b);case n.UnsupportedNonOptionalCapabilityError.code:throw new n.UnsupportedNonOptionalCapabilityError(b);case n.UnsupportedChainIdError.code:throw new n.UnsupportedChainIdError(b);case n.DuplicateIdError.code:throw new n.DuplicateIdError(b);case n.UnknownBundleIdError.code:throw new n.UnknownBundleIdError(b);case n.BundleTooLargeError.code:throw new n.BundleTooLargeError(b);case n.AtomicReadyWalletRejectedUpgradeError.code:throw new n.AtomicReadyWalletRejectedUpgradeError(b);case n.AtomicityNotSupportedError.code:throw new n.AtomicityNotSupportedError(b);case 5e3:throw new n.UserRejectedRequestError(b);default:throw v instanceof e.BaseError?v:new n.UnknownRpcError(b)}}},{delay:({count:v,error:b})=>{var m;if(b&&b instanceof t.HttpRequestError){const A=(m=b==null?void 0:b.headers)==null?void 0:m.get("Retry-After");if(A!=null&&A.match(/\d/))return Number.parseInt(A,10)*1e3}return~~(1<<v)*p},retryCount:B,shouldRetry:({error:v})=>u(v)}),{enabled:T,id:P})}}function u(d){return"code"in d&&typeof d.code=="number"?d.code===-1||d.code===n.LimitExceededRpcError.code||d.code===n.InternalRpcError.code:d instanceof t.HttpRequestError&&d.status?d.status===403||d.status===408||d.status===4
4413||d.status===429||d.status===500||d.status===502||d.status===503||d.status===504:!0}return Hi}var Na={},gh;function nv(){if(gh)return Na;gh=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.defineChain=e;function e(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}return Na}var Fa={},ph;function iv(){if(ph)return Fa;ph=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.extractChain=e;function e({chains:t,id:n}){return t.find(r=>r.id===n)}return Fa}var La={},_h;function v0(){if(_h)return La;_h=1,Object.defineProperty(La,"__esModule",{value:!0}),La.fromRlp=s;const e=ue(),t=On(),n=eo(),r=Ae(),o=ie();function s(d,l="hex"){const f=(()=>{if(typeof d=="string"){if(d.length>3&&d.length%2!==0)throw new t.InvalidHexValueError(d);return(0,r.hexToBytes)(d)}return d})(),_=(0,n.createCursor)(f,{recursiveReadLimit:Number.POSITIVE_INFINITY});return i(_,l)}function i(d,l="hex"){if(d.bytes.length===0)return l==="hex"?(0,o.bytesToHex)(d.bytes):d.bytes;const f=d.readByte();if(f<128&&d.decrementPosition(1),f<192){const T=c(d,f,128),w=d.readBytes(T);return l==="hex"?(0,o.bytesToHex)(w):w}const _=c(d,f,192);return u(d,_,l)}function c(d,l,f){if(f===128&&l<128)return 1;if(l<=f+55)return l-f;if(l===f+55+1)return d.readUint8();if(l===f+55+2)return d.readUint16();if(l===f+55+3)return d.readUint24();if(l===f+55+4)return d.readUint32();throw new e.BaseError("Invalid RLP prefix")}function u(d,l,f){const _=d.position,T=[];for(;d.position-_<l;)T.push(i(d,f));return T}return La}var Ua={},vh;function E0(){if(vh)return Ua;vh=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.isHash=n;const e=at(),t=ft();function n(r){return(0,e.isHex)(r)&&(0,t.size)(r)===32}return Ua}var za={},Fr={},nt={},Eh;function U6(){if(Eh)return nt;Eh=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.ripemd160=nt.RIPEMD160=nt.md5=nt.MD5=nt.sha1=nt.SHA1=void 0;const e=E_(),t=vr(),n=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),r=new Uint32Array(80);class o extends e.HashMD{constructor(){super(64,20,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0}get(){const{A:y,B:E,C:x,D:O,E:R}=this;return[y,E,x,O,R]}set(y,E,x,O,R){this.A=y|0,this.B=E|0,this.C=x|0,this.D=O|0,this.E=R|0}process(y,E){for(let H=0;H<16;H++,E+=4)r[H]=y.getUint32(E,!1);for(let H=16;H<80;H++)r[H]=(0,t.rotl)(r[H-3]^r[H-8]^r[H-14]^r[H-16],1);let{A:x,B:O,C:R,D:k,E:N}=this;for(let H=0;H<80;H++){let g,M;H<20?(g=(0,e.Chi)(O,R,k),M=1518500249):H<40?(g=O^R^k,M=1859775393):H<60?(g=(0,e.Maj)(O,R,k),M=2400959708):(g=O^R^k,M=3395469782);const S=(0,t.rotl)(x,5)+g+N+M+r[H]|0;N=k,k=R,R=(0,t.rotl)(O,30),O=x,x=S}x=x+this.A|0,O=O+this.B|0,R=R+this.C|0,k=k+this.D|0,N=N+this.E|0,this.set(x,O,R,k,N)}roundClean(){(0,t.clean)(r)}destroy(){this.set(0,0,0,0,0),(0,t.clean)(this.buffer)}}nt.SHA1=o,nt.sha1=(0,t.createHasher)(()=>new o);const s=Math.pow(2,32),i=Array.from({length:64},(A,y)=>Math.floor(s*Math.abs(Math.sin(y+1)))),c=n.slice(0,4),u=new Uint32Array(16);class d extends e.HashMD{constructor(){super(64,16,8,!0),this.A=c[0]|0,this.B=c[1]|0,this.C=c[2]|0,this.D=c[3]|0}get(){const{A:y,B:E,C:x,D:O}=this;return[y,E,x,O]}set(y,E,x,O){this.A=y|0,this.B=E|0,this.C=x|0,this.D=O|0}process(y,E){for(let N=0;N<16;N++,E+=4)u[N]=y.getUint32(E,!0);let{A:x,B:O,C:R,D:k}=this;for(let N=0;N<64;N++){let H,g,M;N<16?(H=(0,e.Chi)(O,R,k),g=N,M=[7,12,17,22]):N<32?(H=(0,e.Chi)(k,O,R),g=(5*N+1)%16,M=[5,9,14,20]):N<48?(H=O^R^k,g=(3*N+5)%16,M=[4,11,16,23]):(H=R^(O|~k),g=7*N%16,M=[6,10,15,21]),H=H+x+i[N]+u[g],x=k,k=R,R=O,O=O+(0,t.rotl)(H,M[N%4])}x=x+this.A|0,O=O+this.B|0,R=R+this.C|0,k=k+this.D|0,this.set(x,O,R,k)}roundClean(){(0,t.clean)(u)}destroy(){this.set(0,0,0,0),(0,t.clean)(this.buffer)}}nt.MD5=d,nt.md5=(0,t.createHasher)(()=>new d);const l=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),f=Uint8Array.from(new Array(16).fill(0).map((A,y)=>y)),_=f.map(A=>(9*A+5)%16),T=(()=>{const E=[[f],[_]];for(let x=0;x<4;x++)for(let O of E)O.push(O[x].map(R=>l[R]));return E})(),w=T[0],p=T[1],B=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(A=>Uint8Array.from(A)),j=w.map((A,y)=>A.map(E=>
44B[y][E])),h=p.map((A,y)=>A.map(E=>B[y][E])),P=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),a=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function v(A,y,E,x){return A===0?y^E^x:A===1?y&E|~y&x:A===2?(y|~E)^x:A===3?y&x|E&~x:y^(E|~x)}const b=new Uint32Array(16);class m extends e.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:y,h1:E,h2:x,h3:O,h4:R}=this;return[y,E,x,O,R]}set(y,E,x,O,R){this.h0=y|0,this.h1=E|0,this.h2=x|0,this.h3=O|0,this.h4=R|0}process(y,E){for(let C=0;C<16;C++,E+=4)b[C]=y.getUint32(E,!0);let x=this.h0|0,O=x,R=this.h1|0,k=R,N=this.h2|0,H=N,g=this.h3|0,M=g,S=this.h4|0,I=S;for(let C=0;C<5;C++){const q=4-C,$=P[C],L=a[C],F=w[C],U=p[C],z=j[C],Y=h[C];for(let W=0;W<16;W++){const V=(0,t.rotl)(x+v(C,R,N,g)+b[F[W]]+$,z[W])+S|0;x=S,S=g,g=(0,t.rotl)(N,10)|0,N=R,R=V}for(let W=0;W<16;W++){const V=(0,t.rotl)(O+v(q,k,H,M)+b[U[W]]+L,Y[W])+I|0;O=I,I=M,M=(0,t.rotl)(H,10)|0,H=k,k=V}}this.set(this.h1+N+M|0,this.h2+g+I|0,this.h3+S+O|0,this.h4+x+k|0,this.h0+R+H|0)}roundClean(){(0,t.clean)(b)}destroy(){this.destroyed=!0,(0,t.clean)(this.buffer),this.set(0,0,0,0,0)}}return nt.RIPEMD160=m,nt.ripemd160=(0,t.createHasher)(()=>new m),nt}var wh;function z6(){if(wh)return Fr;wh=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.ripemd160=Fr.RIPEMD160=void 0;const e=U6();return Fr.RIPEMD160=e.RIPEMD160,Fr.ripemd160=e.ripemd160,Fr}var Ph;function ov(){if(Ph)return za;Ph=1,Object.defineProperty(za,"__esModule",{value:!0}),za.ripemd160=o;const e=z6(),t=at(),n=Ae(),r=ie();function o(s,i){const c=i||"hex",u=(0,e.ripemd160)((0,t.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return c==="bytes"?u:(0,r.toHex)(u)}return za}var Sf={},jh;function sv(){return jh||(jh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventHash=void 0;var t=td();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return t.toSignatureHash}})})(Sf)),Sf}var If={},Ah;function av(){return Ah||(Ah=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventSignature=void 0;var t=Lf();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return t.toSignature}})})(If)),If}var Tf={},Sh;function cv(){return Sh||(Sh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionHash=void 0;var t=td();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return t.toSignatureHash}})})(Tf)),Tf}var Bf={},Ih;function uv(){return Ih||(Ih=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionSignature=void 0;var t=Lf();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return t.toSignature}})})(Bf)),Bf}var Lr={},Th;function dv(){if(Th)return Lr;Th=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.nonceManager=void 0,Lr.createNonceManager=n,Lr.jsonRpc=r;const e=dd(),t=Qi();function n(o){const{source:s}=o,i=new Map,c=new t.LruMap(8192),u=new Map,d=({address:l,chainId:f})=>`${l}.${f}`;return{async consume({address:l,chainId:f,client:_}){const T=d({address:l,chainId:f}),w=this.get({address:l,chainId:f,client:_});this.increment({address:l,chainId:f});const p=await w;return await s.set({address:l,chainId:f},p),c.set(T,p),p},async increment({address:l,chainId:f}){const _=d({address:l,chainId:f}),T=i.get(_)??0;i.set(_,T+1)},async get({address:l,chainId:f,client:_}){const T=d({address:l,chainId:f});let w=u.get(T);return w||(w=(async()=>{try{const B=await s.get({address:l,chainId:f,client:_}),j=c.get(T)??0;return j>0&&B<=j?j+1:(c.delete(T),B)}finally{this.reset({address:l,chainId:f})}})(),u.set(T,w)),(i.get(T)??0)+await w},reset({address:l,chainId:f}){const _=d({address:l,chainId:f});i.delete(_),u.delete(_)}}}function r(){return{async get(o){const{address:s,client:i}=o;return(0,e.getTransactionCount)(i,{address:s,blockTag:"pending"})},set(){}}}return Lr.nonceManager=n({source:r()}),Lr}var En={},Da={},Ga={},Bh;function w0(){if(Bh)return Ga;Bh=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.withTimeout=e;function e(t,{errorInstance:n=new Error("timed out"),timeout:r,signal:o}){return new Promise((s,i)=>{(async()=>{let c;try{const u=new AbortController;r>0&&(c=setTimeout(()=>{o?u.abort():i(n)},r)),s(await t({signal:(u==null?void 0:u.signal)||null}))}catch(u){(u==null?void 0:u.name)==="AbortError"&&i(n),i(u)}finally{clearTimeout(c)}})()})}return Ga}var ki={},xh;function fv(){if(xh)return ki;xh=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.idCache=void 0;function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}return ki.idCache=e(),ki}var Rh;function P0(){if(Rh)return Da;Rh=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.getHttpRpcClient=o;const e=qt(),t=w0(),n=Ye(),r=fv();function o(s,i={}){return{async request(c){var j;const{body:u,fetchFn:d=i.fetchFn??fetch,onRequest:l=i.onRequest,onResponse:f=i.onResponse,timeout:_=i.timeout??1e4}=c,T={...i.fetchOptions??{},...c.fetchOptions??{}},{headers:w,method:p,signal:B}=T;try{const h=await(0,t.withTimeout)(async({signal:a})=>{const v={...T,body:Array.isArray(u)?(0,n.stringify)(u.map(y=>({jsonrpc:"2.0",id:y.id??r.idCache.take(),...y}))):(0,n.stringify)({jsonrpc:"2.0",id:u.id??r.idCache.take(),...u}),headers:{"Content-Type":"application/json",...w},method:p||"POST",signal:B||(_>0?a:null)}
44,b=new Request(s,v),m=await(l==null?void 0:l(b,v))??{...v,url:s};return await d(m.url??s,m)},{errorInstance:new e.TimeoutError({body:u,url:s}),timeout:_,signal:!0});f&&await f(h);let P;if((j=h.headers.get("Content-Type"))!=null&&j.startsWith("application/json"))P=await h.json();else{P=await h.text();try{P=JSON.parse(P||"{}")}catch(a){if(h.ok)throw a;P={error:P}}}if(!h.ok)throw new e.HttpRequestError({body:u,details:(0,n.stringify)(P.error)||h.statusText,headers:h.headers,status:h.status,url:s});return P}catch(h){throw h instanceof e.HttpRequestError||h instanceof e.TimeoutError?h:new e.HttpRequestError({body:u,cause:h,url:s})}}}}return Da}var Va={},xf={},Oh;function lv(){return Oh||(Oh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.socketClientCache=void 0,e.getSocketRpcClient=s;const t=qt(),n=s0(),r=w0(),o=fv();e.socketClientCache=new Map;async function s(i){const{getSocket:c,keepAlive:u=!0,key:d="socket",reconnect:l=!0,url:f}=i,{interval:_=3e4}=typeof u=="object"?u:{},{attempts:T=5,delay:w=2e3}=typeof l=="object"?l:{},p=JSON.stringify({keepAlive:u,key:d,url:f,reconnect:l});let B=e.socketClientCache.get(p);if(B)return B;let j=0;const{schedule:h}=(0,n.createBatchScheduler)({id:p,fn:async()=>{const v=new Map,b=new Map;let m,A,y,E=!1;function x(){if(l&&j<T){if(E)return;E=!0,j++,A==null||A.close(),setTimeout(async()=>{await O().catch(console.error),E=!1},w)}else v.clear(),b.clear()}async function O(){const R=await c({onClose(){var k,N;for(const H of v.values())(k=H.onError)==null||k.call(H,new t.SocketClosedError({url:f}));for(const H of b.values())(N=H.onError)==null||N.call(H,new t.SocketClosedError({url:f}));x()},onError(k){var N,H;m=k;for(const g of v.values())(N=g.onError)==null||N.call(g,m);for(const g of b.values())(H=g.onError)==null||H.call(g,m);x()},onOpen(){m=void 0,j=0},onResponse(k){const N=k.method==="eth_subscription",H=N?k.params.subscription:k.id,g=N?b:v,M=g.get(H);M&&M.onResponse(k),N||g.delete(H)}});if(A=R,u&&(y&&clearInterval(y),y=setInterval(()=>{var k;return(k=A.ping)==null?void 0:k.call(A)},_)),l&&b.size>0){const k=b.entries();for(const[N,{onResponse:H,body:g,onError:M}]of k)g&&(b.delete(N),B==null||B.request({body:g,onResponse:H,onError:M}))}return R}return await O(),m=void 0,B={close(){y&&clearInterval(y),A.close(),e.socketClientCache.delete(p)},get socket(){return A},request({body:R,onError:k,onResponse:N}){m&&k&&k(m);const H=R.id??o.idCache.take(),g=M=>{var S;typeof M.id=="number"&&H!==M.id||(R.method==="eth_subscribe"&&typeof M.result=="string"&&b.set(M.result,{onResponse:g,onError:k,body:R}),R.method==="eth_unsubscribe"&&b.delete((S=R.params)==null?void 0:S[0]),N(M))};v.set(H,{onResponse:g,onError:k});try{A.request({body:{jsonrpc:"2.0",id:H,...R}})}catch(M){k==null||k(M)}},requestAsync({body:R,timeout:k=1e4}){return(0,r.withTimeout)(()=>new Promise((N,H)=>this.request({body:R,onError:H,onResponse:N})),{errorInstance:new t.TimeoutError({body:R,url:f}),timeout:k})},requests:v,subscriptions:b,url:f},e.socketClientCache.set(p,B),[B]}}),[P,[a]]=await h();return a}})(xf)),xf}const D6=$2(G2);var Ch;function j0(){if(Ch)return Va;Ch=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.getWebSocketRpcClient=n;const e=qt(),t=lv();async function n(r,o={}){const{keepAlive:s,reconnect:i}=o;return(0,t.getSocketRpcClient)({async getSocket({onClose:c,onError:u,onOpen:d,onResponse:l}){const f=await Promise.resolve().then(()=>D6).then(B=>B.WebSocket),_=new f(r);function T(){_.removeEventListener("close",T),_.removeEventListener("message",w),_.removeEventListener("error",u),_.removeEventListener("open",d),c()}function w({data:B}){if(!(typeof B=="string"&&B.trim().length===0))try{const j=JSON.parse(B);l(j)}catch(j){u(j)}}_.addEventListener("close",T),_.addEventListener("message",w),_.addEventListener("error",u),_.addEventListener("open",d),_.readyState===f.CONNECTING&&await new Promise((B,j)=>{_&&(_.onopen=B,_.onerror=j)});const{close:p}=_;return Object.assign(_,{close(){p.bind(_)(),T()},ping(){try{if(_.readyState===_.CLOSED||_.readyState===_.CLOSING)throw new e.WebSocketRequestError({url:_.url,cause:new e.SocketClosedError({url:_.url})});const B={jsonrpc:"2.0",id:null,method:"net_version",params:[]};_.send(JSON.stringify(B))}catch(B){u(B)}},request({body:B}){if(_.readyState===_.CLOSED||_.readyState===_.CLOSING)throw new e.WebSocketRequestError({body:B,url:_.url,cause:new e.SocketClosedError({url:_.url})});return _.send(JSON.stringify(B))}})},keepAlive:s,reconnect:i,url:r})}return Va}var qh;function bv(){if(qh)return En;qh=1,Object.defineProperty(En,"__esModule",{value:!0}),En.rpc=void 0,En.getSocket=o;const e=P0(),t=j0();function n(s,{body:i,onError:c,onResponse:u}){return s.request({body:i,onError:c,onResponse:u}),s}async function r(s,{body:i,timeout:c=1e4}){return s.requestAsync({body:i,timeout:c})}async function o(s){const i=await(0,t.getWebSocketRpcClient)(s);return Object.assign(i.socket,{requests:i.requests,subscriptions:i.subscriptions})}return En.rpc={http(s,i){return(0,e.getHttpRpcClient)(s).request(i)},webSocket:n,webSocketAsync:r},En}var Wa={},Ka={},$i={},Mh;function mv(){return Mh||(Mh=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.presignMessagePrefix=void 0,$i.presignMessagePrefix=`�Ethereum Signed Message: 45`),$i}var Hh;function hv(){if(Hh)return Ka;Hh=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.toPrefixedMessage=o;const e=mv(),t=We(),n=ft(),r=ie();function o(s){const i=typeof s=="string"?(0,r.stringToHex)(s):typeof s.raw=="string"?s.raw:(0,r.bytesToHex)(s.raw),c=(0,r.stringToHex)(`${e.presignMessagePrefix}${(0,n.size)(i)}`);return(0,t.concat)([c,i])}return Ka}var kh;function go(){if(kh)return Wa;kh=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.hashMessage=n;const e=lt(),t=hv();function n(r,o){return(0,e.keccak256)((0,t.toPrefixedMessage)(r),o)}return Wa}var Ur={},zr={},er={},$h;function yv(){if($h)return er;
45$h=1,Object.defineProperty(er,"__esModule",{value:!0}),er.InvalidStructTypeError=er.InvalidPrimaryTypeError=er.InvalidDomainError=void 0;const e=Ye(),t=ue();class n extends t.BaseError{constructor({domain:i}){super(`Invalid domain "${(0,e.stringify)(i)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}er.InvalidDomainError=n;class r extends t.BaseError{constructor({primaryType:i,types:c}){super(`Invalid primary type \`${i}\` must be one of \`${JSON.stringify(Object.keys(c))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}er.InvalidPrimaryTypeError=r;class o extends t.BaseError{constructor({type:i}){super(`Struct type "${i}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}return er.InvalidStructTypeError=o,er}var Nh;function Id(){if(Nh)return zr;Nh=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.serializeTypedData=d,zr.validateTypedData=l,zr.getTypesForEIP712Domain=f,zr.domainSeparator=_;const e=Ce(),t=Ot(),n=yv(),r=bt(),o=ft(),s=ie(),i=rd(),c=po(),u=Ye();function d(w){const{domain:p,message:B,primaryType:j,types:h}=w,P=(b,m)=>{const A={...m};for(const y of b){const{name:E,type:x}=y;x==="address"&&(A[E]=A[E].toLowerCase())}return A},a=h.EIP712Domain?p?P(h.EIP712Domain,p):{}:{},v=(()=>{if(j!=="EIP712Domain")return P(h[j],B)})();return(0,u.stringify)({domain:a,message:v,primaryType:j,types:h})}function l(w){const{domain:p,message:B,primaryType:j,types:h}=w,P=(a,v)=>{for(const b of a){const{name:m,type:A}=b,y=v[m],E=A.match(i.integerRegex);if(E&&(typeof y=="number"||typeof y=="bigint")){const[R,k,N]=E;(0,s.numberToHex)(y,{signed:k==="int",size:Number.parseInt(N,10)/8})}if(A==="address"&&typeof y=="string"&&!(0,r.isAddress)(y))throw new t.InvalidAddressError({address:y});const x=A.match(i.bytesRegex);if(x){const[R,k]=x;if(k&&(0,o.size)(y)!==Number.parseInt(k,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(k,10),givenSize:(0,o.size)(y)})}const O=h[A];O&&(T(A),P(O,y))}};if(h.EIP712Domain&&p){if(typeof p!="object")throw new n.InvalidDomainError({domain:p});P(h.EIP712Domain,p)}if(j!=="EIP712Domain")if(h[j])P(h[j],B);else throw new n.InvalidPrimaryTypeError({primaryType:j,types:h})}function f({domain:w}){return[typeof(w==null?void 0:w.name)=="string"&&{name:"name",type:"string"},(w==null?void 0:w.version)&&{name:"version",type:"string"},(typeof(w==null?void 0:w.chainId)=="number"||typeof(w==null?void 0:w.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(w==null?void 0:w.verifyingContract)&&{name:"verifyingContract",type:"address"},(w==null?void 0:w.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function _({domain:w}){return(0,c.hashDomain)({domain:w,types:{EIP712Domain:f({domain:w})}})}function T(w){if(w==="address"||w==="bool"||w==="string"||w.startsWith("bytes")||w.startsWith("uint")||w.startsWith("int"))throw new n.InvalidStructTypeError({type:w})}return zr}var Fh;function po(){if(Fh)return Ur;
45Fh=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.hashTypedData=s,Ur.hashDomain=i,Ur.hashStruct=c,Ur.encodeType=l;const e=Ct(),t=We(),n=ie(),r=lt(),o=Id();function s(T){const{domain:w={},message:p,primaryType:B}=T,j={EIP712Domain:(0,o.getTypesForEIP712Domain)({domain:w}),...T.types};(0,o.validateTypedData)({domain:w,message:p,primaryType:B,types:j});const h=["0x1901"];return w&&h.push(i({domain:w,types:j})),B!=="EIP712Domain"&&h.push(c({data:p,primaryType:B,types:j})),(0,r.keccak256)((0,t.concat)(h))}function i({domain:T,types:w}){return c({data:T,primaryType:"EIP712Domain",types:w})}function c({data:T,primaryType:w,types:p}){const B=u({data:T,primaryType:w,types:p});return(0,r.keccak256)(B)}function u({data:T,primaryType:w,types:p}){const B=[{type:"bytes32"}],j=[d({primaryType:w,types:p})];for(const h of p[w]){const[P,a]=_({types:p,name:h.name,type:h.type,value:T[h.name]});B.push(P),j.push(a)}return(0,e.encodeAbiParameters)(B,j)}function d({primaryType:T,types:w}){const p=(0,n.toHex)(l({primaryType:T,types:w}));return(0,r.keccak256)(p)}function l({primaryType:T,types:w}){let p="";const B=f({primaryType:T,types:w});B.delete(T);const j=[T,...Array.from(B).sort()];for(const h of j)p+=`${h}(${w[h].map(({name:P,type:a})=>`${a} ${P}`).join(",")})`;return p}function f({primaryType:T,types:w},p=new Set){const B=T.match(/^\w*/u),j=B==null?void 0:B[0];if(p.has(j)||w[j]===void 0)return p;p.add(j);for(const h of w[j])f({primaryType:h.type,types:w},p);return p}function _({types:T,name:w,type:p,value:B}){if(T[p]!==void 0)return[{type:"bytes32"},(0,r.keccak256)(u({data:B,primaryType:p,types:T}))];if(p==="bytes")return B=`0x${(B.length%2?"0":"")+B.slice(2)}`,[{type:"bytes32"},(0,r.keccak256)(B)];if(p==="string")return[{type:"bytes32"},(0,r.keccak256)((0,n.toHex)(B))];if(p.lastIndexOf("]")===p.length-1){const j=p.slice(0,p.lastIndexOf("[")),h=B.map(P=>_({name:w,type:j,types:T,value:P}));return[{type:"bytes32"},(0,r.keccak256)((0,e.encodeAbiParameters)(h.map(([P])=>P),h.map(([,P])=>P)))]}return[{type:p},B]}return Ur}var Za={},Dr={},Lh;function A0(){return Lh||(Lh=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.zeroHash=Dr.erc6492MagicBytes=void 0,Dr.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",Dr.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),Dr}var Uh;function S0(){if(Uh)return Za;Uh=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.isErc6492Signature=n;const e=A0(),t=At();function n(r){return(0,t.sliceHex)(r,-32)===e.erc6492MagicBytes}return Za}var Ya={},Ni={},Rf={},qe={},Of={},Fi={},Li={},zh;function G6(){return zh||(zh=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.version=void 0,Li.version="1.1.1"),Li}var Dh;function $n(){if(Dh)return Fi;Dh=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.BaseError=void 0;const e=G6();class t extends Error{constructor(r,o={}){var u;const s=o.cause instanceof t?o.cause.details:(u=o.cause)!=null&&u.message?o.cause.message:o.details,i=o.cause instanceof t&&o.cause.docsPath||o.docsPath,c=[r||"An error occurred.","",...o.metaMessages?[...o.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(` 46`);super(c),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"}),o.cause&&(this.cause=o.cause),this.details=s,this.docsPath=i,this.metaMessages=o.metaMessages,this.shortMessage=r}}return Fi.BaseError=t,Fi}var Ja={},Gh;function V6(){if(Gh)return Ja;Gh=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.narrow=e;function e(t){return t}return Ja}var Xa={},Qa={},ec={},tc={},kt={},Vh;function Td(){if(Vh)return kt;
46Vh=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.isTupleRegex=kt.integerRegex=kt.bytesRegex=void 0,kt.execTyped=e;function e(t,n){const r=t.exec(n);return r==null?void 0:r.groups}return kt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,kt.integerRegex=/^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)?$/,kt.isTupleRegex=/^\(.+?\).*?$/,kt}var Wh;function gv(){if(Wh)return tc;Wh=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.formatAbiParameter=n;const e=Td(),t=/^tuple(?<array>(\[(\d*)\])*)$/;function n(r){let o=r.type;if(t.test(r.type)&&"components"in r){o="(";const s=r.components.length;for(let c=0;c<s;c++){const u=r.components[c];o+=n(u),c<s-1&&(o+=", ")}const i=(0,e.execTyped)(t,r.type);return o+=`)${(i==null?void 0:i.array)??""}`,n({...r,type:o})}return"indexed"in r&&r.indexed&&(o=`${o} indexed`),r.name?`${o} ${r.name}`:o}return tc}var Kh;function pv(){if(Kh)return ec;Kh=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.formatAbiParameters=t;const e=gv();function t(n){let r="";const o=n.length;for(let s=0;s<o;s++){const i=n[s];r+=(0,e.formatAbiParameter)(i),s!==o-1&&(r+=", ")}return r}return ec}var Zh;function _v(){if(Zh)return Qa;Zh=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.formatAbiItem=t;const e=pv();function t(n){var r;return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${(r=n.outputs)!=null&&r.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return Qa}var Yh;function W6(){if(Yh)return Xa;Yh=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.formatAbi=t;const e=_v();function t(n){const r=[],o=n.length;for(let s=0;s<o;s++){const i=n[s],c=(0,e.formatAbiItem)(i);r.push(c)}return r}return Xa}var rc={},Ne={},Jh;function Nn(){if(Jh)return Ne;Jh=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.functionModifiers=Ne.eventModifiers=Ne.modifiers=void 0,Ne.isErrorSignature=n,Ne.execErrorSignature=r,Ne.isEventSignature=s,Ne.execEventSignature=i,Ne.isFunctionSignature=u,Ne.execFunctionSignature=d,Ne.isStructSignature=f,Ne.execStructSignature=_,Ne.isConstructorSignature=w,Ne.execConstructorSignature=p,Ne.isFallbackSignature=j,Ne.execFallbackSignature=h,Ne.isReceiveSignature=a;const e=Td(),t=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(v){return t.test(v)}function r(v){return(0,e.execTyped)(t,v)}const o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(v){return o.test(v)}function i(v){return(0,e.execTyped)(o,v)}const c=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function u(v){return c.test(v)}function d(v){return(0,e.execTyped)(c,v)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(v){return l.test(v)}function _(v){return(0,e.execTyped)(l,v)}const T=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function w(v){return T.test(v)}function p(v){return(0,e.execTyped)(T,v)}const B=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function j(v){return B.test(v)}function h(v){return(0,e.execTyped)(B,v)}const P=/^receive\(\) external payable$/;function a(v){return P.test(v)}return Ne.modifiers=new Set(["memory","indexed","storage","calldata"]),Ne.eventModifiers=new Set(["indexed"]),Ne.functionModifiers=new Set(["calldata","memory","storage"]),Ne}var nc={},tr={},Xh;function Bd(){if(Xh)return tr;
46Xh=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.UnknownSolidityTypeError=tr.UnknownTypeError=tr.InvalidAbiItemError=void 0;const e=$n();class t extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}tr.InvalidAbiItemError=t;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" 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"})}}tr.UnknownTypeError=n;class r extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return tr.UnknownSolidityTypeError=r,tr}var Ze={},Qh;function _o(){if(Qh)return Ze;Qh=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.InvalidAbiTypeParameterError=Ze.InvalidFunctionModifierError=Ze.InvalidModifierError=Ze.SolidityProtectedKeywordError=Ze.InvalidParameterError=Ze.InvalidAbiParametersError=Ze.InvalidAbiParameterError=void 0;const e=$n();class t extends e.BaseError{constructor({param:d}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}Ze.InvalidAbiParameterError=t;class n extends e.BaseError{constructor({params:d}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}Ze.InvalidAbiParametersError=n;class r extends e.BaseError{constructor({param:d}){super("Invalid ABI parameter.",{details:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}Ze.InvalidParameterError=r;class o extends e.BaseError{constructor({param:d,name:l}){super("Invalid ABI parameter.",{details:d,metaMessages:[`"${l}" 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"})}}Ze.SolidityProtectedKeywordError=o;class s extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}Ze.InvalidModifierError=s;class i extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${f}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}Ze.InvalidFunctionModifierError=i;class c extends e.BaseError{constructor({abiParameter:d}){super("Invalid ABI parameter.",{details:JSON.stringify(d,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return Ze.InvalidAbiTypeParameterError=c,Ze}var rr={},ey;function I0(){if(ey)return rr;ey=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.InvalidStructSignatureError=rr.UnknownSignatureError=rr.InvalidSignatureError=void 0;const e=$n();class t extends e.BaseError{constructor({signature:s,type:i}){super(`Invalid ${i} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}rr.InvalidSignatureError=t;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}rr.UnknownSignatureError=n;class r extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return rr.InvalidStructSignatureError=r,rr}var Ui={},ty;function vv(){if(ty)return Ui;ty=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.CircularReferenceError=void 0;const e=$n();class t extends e.BaseError{constructor({type:r}){super("Circular reference detected.",{metaMessages:[`Struct "${r}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return Ui.CircularReferenceError=t,Ui}var ut={},zi={},ry;function Ev(){if(ry)return zi;ry=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.InvalidParenthesisError=void 0;const e=$n();class t extends e.BaseError{constructor({current:r,depth:o}){super("Unbalanced parentheses.",{metaMessages:[`"${r.trim()}" has too many ${o>0?"opening":"closing"} parentheses.`],details:`Depth "${o}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return zi.InvalidParenthesisError=t,zi}var wn={},ny;function K6(){if(ny)return wn;ny=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.parameterCache=void 0,wn.getParameterCacheKey=e;function e(t,n,r){let o="";if(r)for(const s of Object.entries(r)){if(!s)continue;let i="";for(const c of s[1])i+=`[${c.type}${c.name?`:${c.name}`:""}]`;o+=`(${s[0]}{${i}})`}return n?`${n}:${t}${o}`:t}return wn.parameterCache=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}]]),wn}var iy;function Bn(){if(iy)return ut;
46iy=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.parseSignature=c,ut.parseFunctionSignature=u,ut.parseEventSignature=d,ut.parseErrorSignature=l,ut.parseConstructorSignature=f,ut.parseFallbackSignature=_,ut.parseAbiParameter=B,ut.splitParameters=j,ut.isSolidityType=h,ut.isSolidityKeyword=a,ut.isValidDataLocation=v;const e=Td(),t=Bd(),n=_o(),r=I0(),o=Ev(),s=K6(),i=Nn();function c(b,m={}){if((0,i.isFunctionSignature)(b))return u(b,m);if((0,i.isEventSignature)(b))return d(b,m);if((0,i.isErrorSignature)(b))return l(b,m);if((0,i.isConstructorSignature)(b))return f(b,m);if((0,i.isFallbackSignature)(b))return _(b);if((0,i.isReceiveSignature)(b))return{type:"receive",stateMutability:"payable"};throw new r.UnknownSignatureError({signature:b})}function u(b,m={}){const A=(0,i.execFunctionSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"function"});const y=j(A.parameters),E=[],x=y.length;for(let R=0;R<x;R++)E.push(B(y[R],{modifiers:i.functionModifiers,structs:m,type:"function"}));const O=[];if(A.returns){const R=j(A.returns),k=R.length;for(let N=0;N<k;N++)O.push(B(R[N],{modifiers:i.functionModifiers,structs:m,type:"function"}))}return{name:A.name,type:"function",stateMutability:A.stateMutability??"nonpayable",inputs:E,outputs:O}}function d(b,m={}){const A=(0,i.execEventSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"event"});const y=j(A.parameters),E=[],x=y.length;for(let O=0;O<x;O++)E.push(B(y[O],{modifiers:i.eventModifiers,structs:m,type:"event"}));return{name:A.name,type:"event",inputs:E}}function l(b,m={}){const A=(0,i.execErrorSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"error"});const y=j(A.parameters),E=[],x=y.length;for(let O=0;O<x;O++)E.push(B(y[O],{structs:m,type:"error"}));return{name:A.name,type:"error",inputs:E}}function f(b,m={}){const A=(0,i.execConstructorSignature)(b);if(!A)throw new r.InvalidSignatureError({signature:b,type:"constructor"});const y=j(A.parameters),E=[],x=y.length;for(let O=0;O<x;O++)E.push(B(y[O],{structs:m,type:"constructor"}));return{type:"constructor",stateMutability:A.stateMutability??"nonpayable",inputs:E}}function _(b){const m=(0,i.execFallbackSignature)(b);if(!m)throw new r.InvalidSignatureError({signature:b,type:"fallback"});return{type:"fallback",stateMutability:m.stateMutability??"nonpayable"}}const T=/^(?<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$_]*))?$/,w=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,p=/^u?int$/;function B(b,m){var g,M;const A=(0,s.getParameterCacheKey)(b,m==null?void 0:m.type,m==null?void 0:m.structs);if(s.parameterCache.has(A))return s.parameterCache.get(A);const y=e.isTupleRegex.test(b),E=(0,e.execTyped)(y?w:T,b);if(!E)throw new n.InvalidParameterError({param:b});if(E.name&&a(E.name))throw new n.SolidityProtectedKeywordError({param:b,name:E.name});const x=E.name?{name:E.name}:{},O=E.modifier==="indexed"?{indexed:!0}:{},R=(m==null?void 0:m.structs)??{};let k,N={};if(y){k="tuple";const S=j(E.type),I=[],C=S.length;for(let q=0;q<C;q++)I.push(B(S[q],{structs:R}));N={components:I}}else if(E.type in R)k="tuple",N={components:R[E.type]};else if(p.test(E.type))k=`${E.type}256`;else if(E.type==="address payable")k="address";else if(k=E.type,(m==null?void 0:m.type)!=="struct"&&!h(k))throw new t.UnknownSolidityTypeError({type:k});if(E.modifier){if(!((M=(g=m==null?void 0:m.modifiers)==null?void 0:g.has)!=null&&M.call(g,E.modifier)))throw new n.InvalidModifierError({param:b,type:m==null?void 0:m.type,modifier:E.modifier});if(i.functionModifiers.has(E.modifier)&&!v(k,!!E.array))throw new n.InvalidFunctionModifierError({param:b,type:m==null?void 0:m.type,modifier:E.modifier})}const H={type:`${k}${E.array??""}`,...x,...O,...N};return s.parameterCache.set(A,H),H}function j(b,m=[],A="",y=0){const E=b.trim().length;for(let x=0;x<E;x++){const O=b[x],R=b.slice(x+1);switch(O){case",":return y===0?j(R,[...m,A.trim()]):j(R,m,`${A}${O}`,y);case"(":return j(R,m,`${A}${O}`,y+1);case")":return j(R,m,`${A}${O}`,y-1);default:return j(R,m,`${A}${O}`,y)}}if(A==="")return m;if(y!==0)throw new o.InvalidParenthesisError({current:A,depth:y});return m.push(A.trim()),m}function h(b){return b==="address"||b==="bool"||b==="function"||b==="string"||e.bytesRegex.test(b)||e.integerRegex.test(b)}const P=/^(?: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)$/;function a(b){return b==="address"||b==="bool"||b==="function"||b==="string"||b==="tuple"||e.bytesRegex.test(b)||e.integerRegex.test(b)||P.test(b)}function v(b,m){return m||b==="bytes"||b==="string"||b==="tuple"}return ut}var oy;function xd(){if(oy)return nc;oy=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.parseStructs=c;const e=Td(),t=Bd(),n=_o(),r=I0(),o=vv(),s=Nn(),i=Bn();function c(l){const f={},_=l.length;for(let B=0;B<_;B++){const j=l[B];if(!(0,s.isStructSignature)(j))continue;const h=(0,s.execStructSignature)(j);if(!h)throw new r.InvalidSignatureError({signature:j,type:"struct"});const P=h.properties.split(";"),a=[],v=P.length;for(let b=0;b<v;b++){const A=P[b].trim();if(!A)continue;const y=(0,i.parseAbiParameter)(A,{type:"struct"});a.push(y)}if(!a.length)throw new r.InvalidStructSignatureError({signature:j});f[h.name]=a}const T={},w=Object.entries(f),p=w.length;for(let B=0;B<p;B++){const[j,h]=w[B];T[j]=d(h,f)}return T}const u=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(l,f,_=new Set){const T=[],w=l.length;for(let p=0;p<w;p++){const B=l[p];if(e.isTupleRegex.test(B.type))T.push(B);else{const h=(0,e.execTyped)(u,B.type);if(!(h!=null&&h.type))throw new n.InvalidAbiTypeParameterError({abiParameter:B});const{array:P,type:a}=h;if(a in f){if(_.has(a))throw new o.CircularReferenceError({type:a});T.push({...B,type:`tuple${P??""}`,components:d(f[a]??[],f,new Set([..._,a]))})}else if((0,i.isSolidityType)(a))T.push(B);else throw new t.UnknownTypeError({type:a})}}return T}return nc}var sy;function Z6(){if(sy)return rc;sy=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.parseAbi=r;const e=Nn(),t=xd(),n=Bn();function r(o){const s=(0,t.parseStructs)(o),i=[],c=o.length;for(let u=0;u<c;u++){const d=o[u];(0,e.isStructSignature)(d)||i.push((0,n.parseSignature)(d,s))}return i}return rc}var ic={},ay;function Y6(){if(ay)return ic;ay=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.parseAbiItem=o;const e=Bd(),t=Nn(),n=xd(),r=Bn();function o(s){let i;if(typeof s=="string")i=(0,r.parseSignature)(s);else{const c=(0,n.parseStructs)(s),u=s.length;for(let d=0;d<u;d++){const l=s[d];
46if(!(0,t.isStructSignature)(l)){i=(0,r.parseSignature)(l,c);break}}}if(!i)throw new e.InvalidAbiItemError({signature:s});return i}return ic}var oc={},cy;function J6(){if(cy)return oc;cy=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.parseAbiParameter=o;const e=_o(),t=Nn(),n=xd(),r=Bn();function o(s){let i;if(typeof s=="string")i=(0,r.parseAbiParameter)(s,{modifiers:t.modifiers});else{const c=(0,n.parseStructs)(s),u=s.length;for(let d=0;d<u;d++){const l=s[d];if(!(0,t.isStructSignature)(l)){i=(0,r.parseAbiParameter)(l,{modifiers:t.modifiers,structs:c});break}}}if(!i)throw new e.InvalidAbiParameterError({param:s});return i}return oc}var sc={},uy;function X6(){if(uy)return sc;uy=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.parseAbiParameters=s;const e=_o(),t=Nn(),n=xd(),r=Bn(),o=Bn();function s(i){const c=[];if(typeof i=="string"){const u=(0,r.splitParameters)(i),d=u.length;for(let l=0;l<d;l++)c.push((0,o.parseAbiParameter)(u[l],{modifiers:t.modifiers}))}else{const u=(0,n.parseStructs)(i),d=i.length;for(let l=0;l<d;l++){const f=i[l];if((0,t.isStructSignature)(f))continue;const _=(0,r.splitParameters)(f),T=_.length;for(let w=0;w<T;w++)c.push((0,o.parseAbiParameter)(_[w],{modifiers:t.modifiers,structs:u}))}}if(c.length===0)throw new e.InvalidAbiParametersError({params:i});return c}return sc}var dy;function Rd(){return dy||(dy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var t=$n();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return t.BaseError}});var n=V6();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var r=W6();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return r.formatAbi}});var o=_v();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return o.formatAbiItem}});var s=gv();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var i=pv();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return i.formatAbiParameters}});var c=Z6();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return c.parseAbi}});var u=Y6();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return u.parseAbiItem}});var d=J6();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var l=X6();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return l.parseAbiParameters}});var f=Bd();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return f.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return f.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return f.UnknownSolidityTypeError}});var _=_o();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return _.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return _.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return _.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return _.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return _.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return _.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return _.InvalidAbiParameterError}});var T=I0();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return T.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return T.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return T.UnknownSignatureError}});var w=Ev();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return w.InvalidParenthesisError}});var p=vv();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return p.CircularReferenceError}})})(Of)),Of}var it={},Pn={},Di={},fy;function Q6(){if(fy)return Di;fy=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const r=super.get(n);return super.has(n)&&r!==void 0&&(this.delete(n),super.set(n,r)),r}set(n,r){if(super.set(n,r),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}return Di.LruMap=e,Di}var ly;function e5(){if(ly)return Pn;ly=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.checksum=void 0,Pn.clear=n;const e=Q6(),t={checksum:new e.LruMap(8192)};Pn.checksum=t.checksum;function n(){for(const r of Object.values(t))r.clear()}return Pn}var Gr={},Vr={},ot={},tt={},Cf={},Gi={},by;function t5(){return by||(by=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.crypto=void 0,Gi.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),Gi}var my;function Tr(){return my||(my=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esMo
46dule",{value:!0}),e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.Hash=e.nextTick=e.swap32IfBE=e.byteSwapIfBE=e.swap8IfBE=e.isLE=void 0,e.isBytes=n,e.anumber=r,e.abytes=o,e.ahash=s,e.aexists=i,e.aoutput=c,e.u8=u,e.u32=d,e.clean=l,e.createView=f,e.rotr=_,e.rotl=T,e.byteSwap=w,e.byteSwap32=p,e.bytesToHex=h,e.hexToBytes=v,e.asyncLoop=m,e.utf8ToBytes=A,e.bytesToUtf8=y,e.toBytes=E,e.kdfInputToBytes=x,e.concatBytes=O,e.checkOpts=R,e.createHasher=N,e.createOptHasher=H,e.createXOFer=g,e.randomBytes=M;const t=t5();function n(S){return S instanceof Uint8Array||ArrayBuffer.isView(S)&&S.constructor.name==="Uint8Array"}function r(S){if(!Number.isSafeInteger(S)||S<0)throw new Error("positive integer expected, got "+S)}function o(S,...I){if(!n(S))throw new Error("Uint8Array expected");if(I.length>0&&!I.includes(S.length))throw new Error("Uint8Array expected of length "+I+", got length="+S.length)}function s(S){if(typeof S!="function"||typeof S.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");r(S.outputLen),r(S.blockLen)}function i(S,I=!0){if(S.destroyed)throw new Error("Hash instance has been destroyed");if(I&&S.finished)throw new Error("Hash#digest() has already been called")}function c(S,I){o(S);const C=I.outputLen;if(S.length<C)throw new Error("digestInto() expects output buffer of length at least "+C)}function u(S){return new Uint8Array(S.buffer,S.byteOffset,S.byteLength)}function d(S){return new Uint32Array(S.buffer,S.byteOffset,Math.floor(S.byteLength/4))}function l(...S){for(let I=0;I<S.length;I++)S[I].fill(0)}function f(S){return new DataView(S.buffer,S.byteOffset,S.byteLength)}function _(S,I){return S<<32-I|S>>>I}function T(S,I){return S<<I|S>>>32-I>>>0}e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function w(S){return S<<24&4278190080|S<<8&16711680|S>>>8&65280|S>>>24&255}e.swap8IfBE=e.isLE?S=>S:S=>w(S),e.byteSwapIfBE=e.swap8IfBE;function p(S){for(let I=0;I<S.length;I++)S[I]=w(S[I]);return S}e.swap32IfBE=e.isLE?S=>S:p;const B=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",j=Array.from({length:256},(S,I)=>I.toString(16).padStart(2,"0"));function h(S){if(o(S),B)return S.toHex();let I="";for(let C=0;C<S.length;C++)I+=j[S[C]];return I}const P={_0:48,_9:57,A:65,F:70,a:97,f:102};function a(S){if(S>=P._0&&S<=P._9)return S-P._0;if(S>=P.A&&S<=P.F)return S-(P.A-10);if(S>=P.a&&S<=P.f)return S-(P.a-10)}function v(S){if(typeof S!="string")throw new Error("hex string expected, got "+typeof S);if(B)return Uint8Array.fromHex(S);const I=S.length,C=I/2;if(I%2)throw new Error("hex string expected, got unpadded hex of length "+I);const q=new Uint8Array(C);for(let $=0,L=0;$<C;$++,L+=2){const F=a(S.charCodeAt(L)),U=a(S.charCodeAt(L+1));if(F===void 0||U===void 0){const z=S[L]+S[L+1];throw new Error('hex string expected, got non-hex character "'+z+'" at index '+L)}q[$]=F*16+U}return q}const b=async()=>{};e.nextTick=b;async function m(S,I,C){let q=Date.now();for(let $=0;$<S;$++){C($);const L=Date.now()-q;L>=0&&L<I||(await(0,e.nextTick)(),q+=L)}}function A(S){if(typeof S!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(S))}function y(S){return new TextDecoder().decode(S)}function E(S){return typeof S=="string"&&(S=A(S)),o(S),S}function x(S){return typeof S=="string"&&(S=A(S)),o(S),S}function O(...S){let I=0;for(let q=0;q<S.length;q++){const $=S[q];o($),I+=$.length}const C=new Uint8Array(I);for(let q=0,$=0;q<S.length;q++){const L=S[q];C.set(L,$),$+=L.length}return C}function R(S,I){if(I!==void 0&&{}.toString.call(I)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(S,I)}class k{}e.Hash=k;function N(S){const I=q=>S().update(E(q)).digest(),C=S();return I.outputLen=C.outputLen,I.blockLen=C.blockLen,I.create=()=>S(),I}function H(S){const I=(q,$)=>S($).update(E(q)).digest(),C=S({});return I.outputLen=C.outputLen,I.blockLen=C.blockLen,I.create=q=>S(q),I}function g(S){const I=(q,$)=>S($).update(E(q)).digest(),C=S({});return I.outputLen=C.outputLen,I.blockLen=C.blockLen,I.create=q=>S(q),I}e.wrapConstructor=N,e.wrapConstructorWithOpts=H,e.wrapXOFConstructorWithOpts=g;function M(S=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(S));if(t.crypto&&typeof t.crypto.randomBytes=="function")return Uint8Array.from(t.crypto.randomBytes(S));throw new Error("crypto.getRandomValues must be defined")}})(Cf)),Cf}var hy;function wv(){if(hy)return tt;
46hy=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.SHA512_IV=tt.SHA384_IV=tt.SHA224_IV=tt.SHA256_IV=tt.HashMD=void 0,tt.setBigUint64=t,tt.Chi=n,tt.Maj=r;const e=Tr();function t(s,i,c,u){if(typeof s.setBigUint64=="function")return s.setBigUint64(i,c,u);const d=BigInt(32),l=BigInt(4294967295),f=Number(c>>d&l),_=Number(c&l),T=u?4:0,w=u?0:4;s.setUint32(i+T,f,u),s.setUint32(i+w,_,u)}function n(s,i,c){return s&i^~s&c}function r(s,i,c){return s&i^s&c^i&c}class o extends e.Hash{constructor(i,c,u,d){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=i,this.outputLen=c,this.padOffset=u,this.isLE=d,this.buffer=new Uint8Array(i),this.view=(0,e.createView)(this.buffer)}update(i){(0,e.aexists)(this),i=(0,e.toBytes)(i),(0,e.abytes)(i);const{view:c,buffer:u,blockLen:d}=this,l=i.length;for(let f=0;f<l;){const _=Math.min(d-this.pos,l-f);if(_===d){const T=(0,e.createView)(i);for(;d<=l-f;f+=d)this.process(T,f);continue}u.set(i.subarray(f,f+_),this.pos),this.pos+=_,f+=_,this.pos===d&&(this.process(c,0),this.pos=0)}return this.length+=i.length,this.roundClean(),this}digestInto(i){(0,e.aexists)(this),(0,e.aoutput)(i,this),this.finished=!0;const{buffer:c,view:u,blockLen:d,isLE:l}=this;let{pos:f}=this;c[f++]=128,(0,e.clean)(this.buffer.subarray(f)),this.padOffset>d-f&&(this.process(u,0),f=0);for(let B=f;B<d;B++)c[B]=0;t(u,d-8,BigInt(this.length*8),l),this.process(u,0);const _=(0,e.createView)(i),T=this.outputLen;if(T%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const w=T/4,p=this.get();if(w>p.length)throw new Error("_sha2: outputLen bigger than state");for(let B=0;B<w;B++)_.setUint32(4*B,p[B],l)}digest(){const{buffer:i,outputLen:c}=this;this.digestInto(i);const u=i.slice(0,c);return this.destroy(),u}_cloneInto(i){i||(i=new this.constructor),i.set(...this.get());const{blockLen:c,buffer:u,length:d,finished:l,destroyed:f,pos:_}=this;return i.destroyed=f,i.finished=l,i.length=d,i.pos=_,d%c&&i.buffer.set(u),i}clone(){return this._cloneInto()}}return tt.HashMD=o,tt.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),tt.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),tt.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),tt.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),tt}var yy;function r5(){if(yy)return ot;
46yy=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.ripemd160=ot.RIPEMD160=ot.md5=ot.MD5=ot.sha1=ot.SHA1=void 0;const e=wv(),t=Tr(),n=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),r=new Uint32Array(80);class o extends e.HashMD{constructor(){super(64,20,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0}get(){const{A:y,B:E,C:x,D:O,E:R}=this;return[y,E,x,O,R]}set(y,E,x,O,R){this.A=y|0,this.B=E|0,this.C=x|0,this.D=O|0,this.E=R|0}process(y,E){for(let H=0;H<16;H++,E+=4)r[H]=y.getUint32(E,!1);for(let H=16;H<80;H++)r[H]=(0,t.rotl)(r[H-3]^r[H-8]^r[H-14]^r[H-16],1);let{A:x,B:O,C:R,D:k,E:N}=this;for(let H=0;H<80;H++){let g,M;H<20?(g=(0,e.Chi)(O,R,k),M=1518500249):H<40?(g=O^R^k,M=1859775393):H<60?(g=(0,e.Maj)(O,R,k),M=2400959708):(g=O^R^k,M=3395469782);const S=(0,t.rotl)(x,5)+g+N+M+r[H]|0;N=k,k=R,R=(0,t.rotl)(O,30),O=x,x=S}x=x+this.A|0,O=O+this.B|0,R=R+this.C|0,k=k+this.D|0,N=N+this.E|0,this.set(x,O,R,k,N)}roundClean(){(0,t.clean)(r)}destroy(){this.set(0,0,0,0,0),(0,t.clean)(this.buffer)}}ot.SHA1=o,ot.sha1=(0,t.createHasher)(()=>new o);const s=Math.pow(2,32),i=Array.from({length:64},(A,y)=>Math.floor(s*Math.abs(Math.sin(y+1)))),c=n.slice(0,4),u=new Uint32Array(16);class d extends e.HashMD{constructor(){super(64,16,8,!0),this.A=c[0]|0,this.B=c[1]|0,this.C=c[2]|0,this.D=c[3]|0}get(){const{A:y,B:E,C:x,D:O}=this;return[y,E,x,O]}set(y,E,x,O){this.A=y|0,this.B=E|0,this.C=x|0,this.D=O|0}process(y,E){for(let N=0;N<16;N++,E+=4)u[N]=y.getUint32(E,!0);let{A:x,B:O,C:R,D:k}=this;for(let N=0;N<64;N++){let H,g,M;N<16?(H=(0,e.Chi)(O,R,k),g=N,M=[7,12,17,22]):N<32?(H=(0,e.Chi)(k,O,R),g=(5*N+1)%16,M=[5,9,14,20]):N<48?(H=O^R^k,g=(3*N+5)%16,M=[4,11,16,23]):(H=R^(O|~k),g=7*N%16,M=[6,10,15,21]),H=H+x+i[N]+u[g],x=k,k=R,R=O,O=O+(0,t.rotl)(H,M[N%4])}x=x+this.A|0,O=O+this.B|0,R=R+this.C|0,k=k+this.D|0,this.set(x,O,R,k)}roundClean(){(0,t.clean)(u)}destroy(){this.set(0,0,0,0),(0,t.clean)(this.buffer)}}ot.MD5=d,ot.md5=(0,t.createHasher)(()=>new d);const l=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),f=Uint8Array.from(new Array(16).fill(0).map((A,y)=>y)),_=f.map(A=>(9*A+5)%16),T=(()=>{const E=[[f],[_]];for(let x=0;x<4;x++)for(let O of E)O.push(O[x].map(R=>l[R]));return E})(),w=T[0],p=T[1],B=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(A=>Uint8Array.from(A)),j=w.map((A,y)=>A.map(E=>B[y][E])),h=p.map((A,y)=>A.map(E=>B[y][E])),P=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),a=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function v(A,y,E,x){return A===0?y^E^x:A===1?y&E|~y&x:A===2?(y|~E)^x:A===3?y&x|E&~x:y^(E|~x)}const b=new Uint32Array(16);class m extends e.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:y,h1:E,h2:x,h3:O,h4:R}=this;return[y,E,x,O,R]}set(y,E,x,O,R){this.h0=y|0,this.h1=E|0,this.h2=x|0,this.h3=O|0,this.h4=R|0}process(y,E){for(let C=0;C<16;C++,E+=4)b[C]=y.getUint32(E,!0);let x=this.h0|0,O=x,R=this.h1|0,k=R,N=this.h2|0,H=N,g=this.h3|0,M=g,S=this.h4|0,I=S;for(let C=0;C<5;C++){const q=4-C,$=P[C],L=a[C],F=w[C],U=p[C],z=j[C],Y=h[C];for(let W=0;W<16;W++){const V=(0,t.rotl)(x+v(C,R,N,g)+b[F[W]]+$,z[W])+S|0;x=S,S=g,g=(0,t.rotl)(N,10)|0,N=R,R=V}for(let W=0;W<16;W++){const V=(0,t.rotl)(O+v(q,k,H,M)+b[U[W]]+L,Y[W])+I|0;O=I,I=M,M=(0,t.rotl)(H,10)|0,H=k,k=V}}this.set(this.h1+N+M|0,this.h2+g+I|0,this.h3+S+O|0,this.h4+x+k|0,this.h0+R+H|0)}roundClean(){(0,t.clean)(b)}destroy(){this.destroyed=!0,(0,t.clean)(this.buffer),this.set(0,0,0,0,0)}}return ot.RIPEMD160=m,ot.ripemd160=(0,t.createHasher)(()=>new m),ot}var gy;function n5(){if(gy)return Vr;gy=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.ripemd160=Vr.RIPEMD160=void 0;const e=r5();return Vr.RIPEMD160=e.RIPEMD160,Vr.ripemd160=e.ripemd160,Vr}var Te={},ce={},py;function Pv(){if(py)return ce;py=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.toBig=ce.shrSL=ce.shrSH=ce.rotrSL=ce.rotrSH=ce.rotrBL=ce.rotrBH=ce.rotr32L=ce.rotr32H=ce.rotlSL=ce.rotlSH=ce.rotlBL=ce.rotlBH=ce.add5L=ce.add5H=ce.add4L=ce.add4H=ce.add3L=ce.add3H=void 0,ce.add=j,ce.fromBig=n,ce.split=r;const e=BigInt(2**32-1),t=BigInt(32);function n(y,E=!1){return E?{h:Number(y&e),l:Number(y>>t&e)}:{h:Number(y>>t&e)|0,l:Number(y&e)|0}}function r(y,E=!1){const x=y.length;let O=new Uint32Array(x),R=new Uint32Array(x);for(let k=0;k<x;k++){const{h:N,l:H}=n(y[k],E);[O[k],R[k]]=[N,H]}return[O,R]}const o=(y,E)=>BigInt(y>>>0)<<t|BigInt(E>>>0);ce.toBig=o;const s=(y,E,x)=>y>>>x;ce.shrSH=s;const i=(y,E,x)=>y<<32-x|E>>>x;ce.shrSL=i;const c=(y,E,x)=>y>>>x|E<<32-x;ce.rotrSH=c;const u=(y,E,x)=>y<<32-x|E>>>x;ce.rotrSL=u;const d=(y,E,x)=>y<<64-x|E>>>x-32;ce.rotrBH=d;const l=(y,E,x)=>y>>>x-32|E<<64-x;ce.rotrBL=l;const f=(y,E)=>E;ce.rotr32H=f;const _=(y,E)=>y;ce.rotr32L=_;const T=(y,E,x)=>y<<x|E>>>32-x;ce.rotlSH=T;const w=(y,E,x)=>E<<x|y>>>32-x;ce.rotlSL=w;const p=(y,E,x)=>E<<x-32|y>>>64-x;ce.rotlBH=p;const B=(y,E,x)=>y<<x-32|E>>>64-x;ce.rotlBL=B;function j(y,E,x,O){const R=(E>>>0)+(O>>>0);return{h:y+x+(R/2**32|0)|0,l:R|0}}const h=(y,E,x)=>(y>>>0)+(E>>>0)+(x>>>0);ce.add3L=h;const P=(y,E,x,O)=>E+x+O+(y/2**32|0)|0;ce.add3H=P;const a=(y,E,x,O)=>(y>>>0)+(E>>>0)+(x>>>0)+(O>>>0);ce.add4L=a;const v=(y,E,x,O,R)=>E+x+O+R+(y/2**32|0)|0;ce.add4H=v;const b=(y,E,x,O,R)=>(y>>>0)+(E>>>0)+(x>>>0)+(O>>>0)+(R>>>0);ce.add5L=b;
46const m=(y,E,x,O,R,k)=>E+x+O+R+k+(y/2**32|0)|0;ce.add5H=m;const A={fromBig:n,split:r,toBig:o,shrSH:s,shrSL:i,rotrSH:c,rotrSL:u,rotrBH:d,rotrBL:l,rotr32H:f,rotr32L:_,rotlSH:T,rotlSL:w,rotlBH:p,rotlBL:B,add:j,add3L:h,add3H:P,add4L:a,add4H:v,add5H:m,add5L:b};return ce.default=A,ce}var _y;function i5(){if(_y)return Te;_y=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.shake256=Te.shake128=Te.keccak_512=Te.keccak_384=Te.keccak_256=Te.keccak_224=Te.sha3_512=Te.sha3_384=Te.sha3_256=Te.sha3_224=Te.Keccak=void 0,Te.keccakP=B;const e=Pv(),t=Tr(),n=BigInt(0),r=BigInt(1),o=BigInt(2),s=BigInt(7),i=BigInt(256),c=BigInt(113),u=[],d=[],l=[];for(let a=0,v=r,b=1,m=0;a<24;a++){[b,m]=[m,(2*b+3*m)%5],u.push(2*(5*m+b)),d.push((a+1)*(a+2)/2%64);let A=n;for(let y=0;y<7;y++)v=(v<<r^(v>>s)*c)%i,v&o&&(A^=r<<(r<<BigInt(y))-r);l.push(A)}const f=(0,e.split)(l,!0),_=f[0],T=f[1],w=(a,v,b)=>b>32?(0,e.rotlBH)(a,v,b):(0,e.rotlSH)(a,v,b),p=(a,v,b)=>b>32?(0,e.rotlBL)(a,v,b):(0,e.rotlSL)(a,v,b);function B(a,v=24){const b=new Uint32Array(10);for(let m=24-v;m<24;m++){for(let E=0;E<10;E++)b[E]=a[E]^a[E+10]^a[E+20]^a[E+30]^a[E+40];for(let E=0;E<10;E+=2){const x=(E+8)%10,O=(E+2)%10,R=b[O],k=b[O+1],N=w(R,k,1)^b[x],H=p(R,k,1)^b[x+1];for(let g=0;g<50;g+=10)a[E+g]^=N,a[E+g+1]^=H}let A=a[2],y=a[3];for(let E=0;E<24;E++){const x=d[E],O=w(A,y,x),R=p(A,y,x),k=u[E];A=a[k],y=a[k+1],a[k]=O,a[k+1]=R}for(let E=0;E<50;E+=10){for(let x=0;x<10;x++)b[x]=a[E+x];for(let x=0;x<10;x++)a[E+x]^=~b[(x+2)%10]&b[(x+4)%10]}a[0]^=_[m],a[1]^=T[m]}(0,t.clean)(b)}class j extends t.Hash{constructor(v,b,m,A=!1,y=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=v,this.suffix=b,this.outputLen=m,this.enableXOF=A,this.rounds=y,(0,t.anumber)(m),!(0<v&&v<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,t.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,t.swap32IfBE)(this.state32),B(this.state32,this.rounds),(0,t.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(v){(0,t.aexists)(this),v=(0,t.toBytes)(v),(0,t.abytes)(v);const{blockLen:b,state:m}=this,A=v.length;for(let y=0;y<A;){const E=Math.min(b-this.pos,A-y);for(let x=0;x<E;x++)m[this.pos++]^=v[y++];this.pos===b&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:v,suffix:b,pos:m,blockLen:A}=this;v[m]^=b,(b&128)!==0&&m===A-1&&this.keccak(),v[A-1]^=128,this.keccak()}writeInto(v){(0,t.aexists)(this,!1),(0,t.abytes)(v),this.finish();const b=this.state,{blockLen:m}=this;for(let A=0,y=v.length;A<y;){this.posOut>=m&&this.keccak();const E=Math.min(m-this.posOut,y-A);v.set(b.subarray(this.posOut,this.posOut+E),A),this.posOut+=E,A+=E}return v}xofInto(v){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(v)}xof(v){return(0,t.anumber)(v),this.xofInto(new Uint8Array(v))}digestInto(v){if((0,t.aoutput)(v,this),this.finished)throw new Error("digest() was already called");return this.writeInto(v),this.destroy(),v}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,t.clean)(this.state)}_cloneInto(v){const{blockLen:b,suffix:m,outputLen:A,rounds:y,enableXOF:E}=this;return v||(v=new j(b,m,A,E,y)),v.state32.set(this.state32),v.pos=this.pos,v.posOut=this.posOut,v.finished=this.finished,v.rounds=y,v.suffix=m,v.outputLen=A,v.enableXOF=E,v.destroyed=this.destroyed,v}}Te.Keccak=j;const h=(a,v,b)=>(0,t.createHasher)(()=>new j(v,a,b));Te.sha3_224=h(6,144,224/8),Te.sha3_256=h(6,136,256/8),Te.sha3_384=h(6,104,384/8),Te.sha3_512=h(6,72,512/8),Te.keccak_224=h(1,144,224/8),Te.keccak_256=h(1,136,256/8),Te.keccak_384=h(1,104,384/8),Te.keccak_512=h(1,72,512/8);const P=(a,v,b)=>(0,t.createXOFer)((m={})=>new j(v,a,m.dkLen===void 0?b:m.dkLen,!0));return Te.shake128=P(31,168,128/8),Te.shake256=P(31,136,256/8),Te}var xt={},je={},vy;function jv(){if(vy)return je;vy=1,Object.defineProperty(je,"__esModule",{value:!0}),je.sha512_224=je.sha512_256=je.sha384=je.sha512=je.sha224=je.sha256=je.SHA512_256=je.SHA512_224=je.SHA384=je.SHA512=je.SHA224=je.SHA256=void 0;const e=wv(),t=Pv(),n=Tr(),r=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
46734187,3204031479,3329325298]),o=new Uint32Array(64);class s extends e.HashMD{constructor(P=32){super(64,P,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:P,B:a,C:v,D:b,E:m,F:A,G:y,H:E}=this;return[P,a,v,b,m,A,y,E]}set(P,a,v,b,m,A,y,E){this.A=P|0,this.B=a|0,this.C=v|0,this.D=b|0,this.E=m|0,this.F=A|0,this.G=y|0,this.H=E|0}process(P,a){for(let R=0;R<16;R++,a+=4)o[R]=P.getUint32(a,!1);for(let R=16;R<64;R++){const k=o[R-15],N=o[R-2],H=(0,n.rotr)(k,7)^(0,n.rotr)(k,18)^k>>>3,g=(0,n.rotr)(N,17)^(0,n.rotr)(N,19)^N>>>10;o[R]=g+o[R-7]+H+o[R-16]|0}let{A:v,B:b,C:m,D:A,E:y,F:E,G:x,H:O}=this;for(let R=0;R<64;R++){const k=(0,n.rotr)(y,6)^(0,n.rotr)(y,11)^(0,n.rotr)(y,25),N=O+k+(0,e.Chi)(y,E,x)+r[R]+o[R]|0,g=((0,n.rotr)(v,2)^(0,n.rotr)(v,13)^(0,n.rotr)(v,22))+(0,e.Maj)(v,b,m)|0;O=x,x=E,E=y,y=A+N|0,A=m,m=b,b=v,v=N+g|0}v=v+this.A|0,b=b+this.B|0,m=m+this.C|0,A=A+this.D|0,y=y+this.E|0,E=E+this.F|0,x=x+this.G|0,O=O+this.H|0,this.set(v,b,m,A,y,E,x,O)}roundClean(){(0,n.clean)(o)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.clean)(this.buffer)}}je.SHA256=s;class i extends s{constructor(){super(28),this.A=e.SHA224_IV[0]|0,this.B=e.SHA224_IV[1]|0,this.C=e.SHA224_IV[2]|0,this.D=e.SHA224_IV[3]|0,this.E=e.SHA224_IV[4]|0,this.F=e.SHA224_IV[5]|0,this.G=e.SHA224_IV[6]|0,this.H=e.SHA224_IV[7]|0}}je.SHA224=i;const c=t.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
465771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(h=>BigInt(h))),u=c[0],d=c[1],l=new Uint32Array(80),f=new Uint32Array(80);class _ extends e.HashMD{constructor(P=64){super(128,P,16,!1),this.Ah=e.SHA512_IV[0]|0,this.Al=e.SHA512_IV[1]|0,this.Bh=e.SHA512_IV[2]|0,this.Bl=e.SHA512_IV[3]|0,this.Ch=e.SHA512_IV[4]|0,this.Cl=e.SHA512_IV[5]|0,this.Dh=e.SHA512_IV[6]|0,this.Dl=e.SHA512_IV[7]|0,this.Eh=e.SHA512_IV[8]|0,this.El=e.SHA512_IV[9]|0,this.Fh=e.SHA512_IV[10]|0,this.Fl=e.SHA512_IV[11]|0,this.Gh=e.SHA512_IV[12]|0,this.Gl=e.SHA512_IV[13]|0,this.Hh=e.SHA512_IV[14]|0,this.Hl=e.SHA512_IV[15]|0}get(){const{Ah:P,Al:a,Bh:v,Bl:b,Ch:m,Cl:A,Dh:y,Dl:E,Eh:x,El:O,Fh:R,Fl:k,Gh:N,Gl:H,Hh:g,Hl:M}=this;return[P,a,v,b,m,A,y,E,x,O,R,k,N,H,g,M]}set(P,a,v,b,m,A,y,E,x,O,R,k,N,H,g,M){this.Ah=P|0,this.Al=a|0,this.Bh=v|0,this.Bl=b|0,this.Ch=m|0,this.Cl=A|0,this.Dh=y|0,this.Dl=E|0,this.Eh=x|0,this.El=O|0,this.Fh=R|0,this.Fl=k|0,this.Gh=N|0,this.Gl=H|0,this.Hh=g|0,this.Hl=M|0}process(P,a){for(let C=0;C<16;C++,a+=4)l[C]=P.getUint32(a),f[C]=P.getUint32(a+=4);for(let C=16;C<80;C++){const q=l[C-15]|0,$=f[C-15]|0,L=t.rotrSH(q,$,1)^t.rotrSH(q,$,8)^t.shrSH(q,$,7),F=t.rotrSL(q,$,1)^t.rotrSL(q,$,8)^t.shrSL(q,$,7),U=l[C-2]|0,z=f[C-2]|0,Y=t.rotrSH(U,z,19)^t.rotrBH(U,z,61)^t.shrSH(U,z,6),W=t.rotrSL(U,z,19)^t.rotrBL(U,z,61)^t.shrSL(U,z,6),V=t.add4L(F,W,f[C-7],f[C-16]),X=t.add4H(V,L,Y,l[C-7],l[C-16]);l[C]=X|0,f[C]=V|0}let{Ah:v,Al:b,Bh:m,Bl:A,Ch:y,Cl:E,Dh:x,Dl:O,Eh:R,El:k,Fh:N,Fl:H,Gh:g,Gl:M,Hh:S,Hl:I}=this;for(let C=0;C<80;C++){const q=t.rotrSH(R,k,14)^t.rotrSH(R,k,18)^t.rotrBH(R,k,41),$=t.rotrSL(R,k,14)^t.rotrSL(R,k,18)^t.rotrBL(R,k,41),L=R&N^~R&g,F=k&H^~k&M,U=t.add5L(I,$,F,d[C],f[C]),z=t.add5H(U,S,q,L,u[C],l[C]),Y=U|0,W=t.rotrSH(v,b,28)^t.rotrBH(v,b,34)^t.rotrBH(v,b,39),V=t.rotrSL(v,b,28)^t.rotrBL(v,b,34)^t.rotrBL(v,b,39),X=v&m^v&y^m&y,ne=b&A^b&E^A&E;S=g|0,I=M|0,g=N|0,M=H|0,N=R|0,H=k|0,{h:R,l:k}=t.add(x|0,O|0,z|0,Y|0),x=y|0,O=E|0,y=m|0,E=A|0,m=v|0,A=b|0;const K=t.add3L(Y,V,ne);v=t.add3H(K,z,W,X),b=K|0}({h:v,l:b}=t.add(this.Ah|0,this.Al|0,v|0,b|0)),{h:m,l:A}=t.add(this.Bh|0,this.Bl|0,m|0,A|0),{h:y,l:E}=t.add(this.Ch|0,this.Cl|0,y|0,E|0),{h:x,l:O}=t.add(this.Dh|0,this.Dl|0,x|0,O|0),{h:R,l:k}=t.add(this.Eh|0,this.El|0,R|0,k|0),{h:N,l:H}=t.add(this.Fh|0,this.Fl|0,N|0,H|0),{h:g,l:M}=t.add(this.Gh|0,this.Gl|0,g|0,M|0),{h:S,l:I}=t.add(this.Hh|0,this.Hl|0,S|0,I|0),this.set(v,b,m,A,y,E,x,O,R,k,N,H,g,M,S,I)}roundClean(){(0,n.clean)(l,f)}destroy(){(0,n.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}je.SHA512=_;class T extends _{constructor(){super(48),this.Ah=e.SHA384_IV[0]|0,this.Al=e.SHA384_IV[1]|0,this.Bh=e.SHA384_IV[2]|0,this.Bl=e.SHA384_IV[3]|0,this.Ch=e.SHA384_IV[4]|0,this.Cl=e.SHA384_IV[5]|0,this.Dh=e.SHA384_IV[6]|0,this.Dl=e.SHA384_IV[7]|0,this.Eh=e.SHA384_IV[8]|0,this.El=e.SHA384_IV[9]|0,this.Fh=e.SHA384_IV[10]|0,this.Fl=e.SHA384_IV[11]|0,this.Gh=e.SHA384_IV[12]|0,this.Gl=e.SHA384_IV[13]|0,this.Hh=e.SHA384_IV[14]|0,this.Hl=e.SHA384_IV[15]|0}}je.SHA384=T;const w=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),p=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class B extends _{constructor(){super(28),this.Ah=w[0]|0,this.Al=w[1]|0,this.Bh=w[2]|0,this.Bl=w[3]|0,this.Ch=w[4]|0,this.Cl=w[5]|0,this.Dh=w[6]|0,this.Dl=w[7]|0,this.Eh=w[8]|0,this.El=w[9]|0,this.Fh=w[10]|0,this.Fl=w[11]|0,this.Gh=w[12]|0,this.Gl=w[13]|0,this.Hh=w[14]|0,this.Hl=w[15]|0}}je.SHA512_224=B;
46class j extends _{constructor(){super(32),this.Ah=p[0]|0,this.Al=p[1]|0,this.Bh=p[2]|0,this.Bl=p[3]|0,this.Ch=p[4]|0,this.Cl=p[5]|0,this.Dh=p[6]|0,this.Dl=p[7]|0,this.Eh=p[8]|0,this.El=p[9]|0,this.Fh=p[10]|0,this.Fl=p[11]|0,this.Gh=p[12]|0,this.Gl=p[13]|0,this.Hh=p[14]|0,this.Hl=p[15]|0}}return je.SHA512_256=j,je.sha256=(0,n.createHasher)(()=>new s),je.sha224=(0,n.createHasher)(()=>new i),je.sha512=(0,n.createHasher)(()=>new _),je.sha384=(0,n.createHasher)(()=>new T),je.sha512_256=(0,n.createHasher)(()=>new j),je.sha512_224=(0,n.createHasher)(()=>new B),je}var Ey;function o5(){if(Ey)return xt;Ey=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.sha224=xt.SHA224=xt.sha256=xt.SHA256=void 0;const e=jv();return xt.SHA256=e.SHA256,xt.sha256=e.sha256,xt.SHA224=e.SHA224,xt.sha224=e.sha224,xt}var wy;function T0(){if(wy)return Gr;wy=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.keccak256=s,Gr.ripemd160=i,Gr.sha256=c,Gr.validate=u;const e=n5(),t=i5(),n=o5(),r=Nt(),o=Je();function s(d,l={}){const{as:f=typeof d=="string"?"Hex":"Bytes"}=l,_=(0,t.keccak_256)(r.from(d));return f==="Bytes"?_:o.fromBytes(_)}function i(d,l={}){const{as:f=typeof d=="string"?"Hex":"Bytes"}=l,_=(0,e.ripemd160)(r.from(d));return f==="Bytes"?_:o.fromBytes(_)}function c(d,l={}){const{as:f=typeof d=="string"?"Hex":"Bytes"}=l,_=(0,n.sha256)(r.from(d));return f==="Bytes"?_:o.fromBytes(_)}function u(d){return o.validate(d)&&o.size(d)===32}return Gr}var Ue={},Py;function Av(){if(Py)return Ue;Py=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.InvalidSerializedSizeError=Ue.InvalidUncompressedPrefixError=Ue.InvalidCompressedPrefixError=Ue.InvalidPrefixError=Ue.InvalidError=void 0,Ue.assert=o,Ue.compress=s,Ue.from=i,Ue.fromBytes=c,Ue.fromHex=u,Ue.toBytes=d,Ue.toHex=l,Ue.validate=f;const e=Nt(),t=Pt(),n=Je(),r=yd();function o(j,h={}){const{compressed:P}=h,{prefix:a,x:v,y:b}=j;if(P===!1||typeof v=="bigint"&&typeof b=="bigint"){if(a!==4)throw new T({prefix:a,cause:new p});return}if(P===!0||typeof v=="bigint"&&typeof b>"u"){if(a!==3&&a!==2)throw new T({prefix:a,cause:new w});return}throw new _({publicKey:j})}function s(j){const{x:h,y:P}=j;return{prefix:P%2n===0n?2:3,x:h}}function i(j){const h=(()=>
46{if(n.validate(j))return u(j);if(e.validate(j))return c(j);const{prefix:P,x:a,y:v}=j;return typeof a=="bigint"&&typeof v=="bigint"?{prefix:P??4,x:a,y:v}:{prefix:P,x:a}})();return o(h),h}function c(j){return u(n.fromBytes(j))}function u(j){if(j.length!==132&&j.length!==130&&j.length!==68)throw new B({publicKey:j});if(j.length===130){const a=BigInt(n.slice(j,0,32)),v=BigInt(n.slice(j,32,64));return{prefix:4,x:a,y:v}}if(j.length===132){const a=Number(n.slice(j,0,1)),v=BigInt(n.slice(j,1,33)),b=BigInt(n.slice(j,33,65));return{prefix:a,x:v,y:b}}const h=Number(n.slice(j,0,1)),P=BigInt(n.slice(j,1,33));return{prefix:h,x:P}}function d(j,h={}){return e.fromHex(l(j,h))}function l(j,h={}){o(j);const{prefix:P,x:a,y:v}=j,{includePrefix:b=!0}=h;return n.concat(b?n.fromNumber(P,{size:1}):"0x",n.fromNumber(a,{size:32}),typeof v=="bigint"?n.fromNumber(v,{size:32}):"0x")}function f(j,h={}){try{return o(j,h),!0}catch{return!1}}class _ extends t.BaseError{constructor({publicKey:h}){super(`Value \`${r.stringify(h)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}Ue.InvalidError=_;class T extends t.BaseError{constructor({prefix:h,cause:P}){super(`Prefix "${h}" is invalid.`,{cause:P}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}Ue.InvalidPrefixError=T;class w extends t.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}Ue.InvalidCompressedPrefixError=w;class p extends t.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}Ue.InvalidUncompressedPrefixError=p;class B extends t.BaseError{constructor({publicKey:h}){super(`Value \`${h}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${n.size(n.from(h))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}return Ue.InvalidSerializedSizeError=B,Ue}var jy;function Od(){if(jy)return it;jy=1,Object.defineProperty(it,"__esModule",{value:!0}),it.InvalidChecksumError=it.InvalidInputError=it.InvalidAddressError=void 0,it.assert=i,it.checksum=c,it.from=u,it.fromPublicKey=d,it.isEqual=l,it.validate=f;const e=Nt(),t=e5(),n=Pt(),r=T0(),o=Av(),s=/^0x[a-fA-F0-9]{40}$/;function i(p,B={}){const{strict:j=!0}=B;if(!s.test(p))throw new _({address:p,cause:new T});if(j){if(p.toLowerCase()===p)return;if(c(p)!==p)throw new _({address:p,cause:new w})}}function c(p){if(t.checksum.has(p))return t.checksum.get(p);i(p,{strict:!1});const B=p.substring(2).toLowerCase(),j=r.keccak256(e.fromString(B),{as:"Bytes"}),h=B.split("");for(let a=0;a<40;a+=2)j[a>>1]>>4>=8&&h[a]&&(h[a]=h[a].toUpperCase()),(j[a>>1]&15)>=8&&h[a+1]&&(h[a+1]=h[a+1].toUpperCase());const P=`0x${h.join("")}`;return t.checksum.set(p,P),P}function u(p,B={}){const{checksum:j=!1}=B;return i(p),j?c(p):p}function d(p,B={}){const j=r.keccak256(`0x${o.toHex(p).slice(4)}`).substring(26);return u(`0x${j}`,B)}function l(p,B){return i(p,{strict:!1}),i(B,{strict:!1}),p.toLowerCase()===B.toLowerCase()}function f(p,B={}){const{strict:j=!0}=B??{};try{return i(p,{strict:j}),!0}catch{return!1}}class _ extends n.BaseError{constructor({address:B,cause:j}){super(`Address "${B}" is invalid.`,{cause:j}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}it.InvalidAddressError=_;class T extends n.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}it.InvalidInputError=T;class w extends n.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}return it.InvalidChecksumError=w,it}var Me={},D={},Ay;function B0(){return Ay||(Ay=1,Object.defineProperty(D,"__esModule",{value:!0}
46),D.minInt120=D.minInt112=D.minInt104=D.minInt96=D.minInt88=D.minInt80=D.minInt72=D.minInt64=D.minInt56=D.minInt48=D.minInt40=D.minInt32=D.minInt24=D.minInt16=D.minInt8=D.maxInt256=D.maxInt248=D.maxInt240=D.maxInt232=D.maxInt224=D.maxInt216=D.maxInt208=D.maxInt200=D.maxInt192=D.maxInt184=D.maxInt176=D.maxInt168=D.maxInt160=D.maxInt152=D.maxInt144=D.maxInt136=D.maxInt128=D.maxInt120=D.maxInt112=D.maxInt104=D.maxInt96=D.maxInt88=D.maxInt80=D.maxInt72=D.maxInt64=D.maxInt56=D.maxInt48=D.maxInt40=D.maxInt32=D.maxInt24=D.maxInt16=D.maxInt8=D.integerRegex=D.bytesRegex=D.arrayRegex=void 0,D.maxUint256=D.maxUint248=D.maxUint240=D.maxUint232=D.maxUint224=D.maxUint216=D.maxUint208=D.maxUint200=D.maxUint192=D.maxUint184=D.maxUint176=D.maxUint168=D.maxUint160=D.maxUint152=D.maxUint144=D.maxUint136=D.maxUint128=D.maxUint120=D.maxUint112=D.maxUint104=D.maxUint96=D.maxUint88=D.maxUint80=D.maxUint72=D.maxUint64=D.maxUint56=D.maxUint48=D.maxUint40=D.maxUint32=D.maxUint24=D.maxUint16=D.maxUint8=D.minInt256=D.minInt248=D.minInt240=D.minInt232=D.minInt224=D.minInt216=D.minInt208=D.minInt200=D.minInt192=D.minInt184=D.minInt176=D.minInt168=D.minInt160=D.minInt152=D.minInt144=D.minInt136=D.minInt128=void 0,D.arrayRegex=/^(.*)\[([0-9]*)\]$/,D.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,D.integerRegex=/^(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)?$/,D.maxInt8=2n**(8n-1n)-1n,D.maxInt16=2n**(16n-1n)-1n,D.maxInt24=2n**(24n-1n)-1n,D.maxInt32=2n**(32n-1n)-1n,D.maxInt40=2n**(40n-1n)-1n,D.maxInt48=2n**(48n-1n)-1n,D.maxInt56=2n**(56n-1n)-1n,D.maxInt64=2n**(64n-1n)-1n,D.maxInt72=2n**(72n-1n)-1n,D.maxInt80=2n**(80n-1n)-1n,D.maxInt88=2n**(88n-1n)-1n,D.maxInt96=2n**(96n-1n)-1n,D.maxInt104=2n**(104n-1n)-1n,D.maxInt112=2n**(112n-1n)-1n,D.maxInt120=2n**(120n-1n)-1n,D.maxInt128=2n**(128n-1n)-1n,D.maxInt136=2n**(136n-1n)-1n,D.maxInt144=2n**(144n-1n)-1n,D.maxInt152=2n**(152n-1n)-1n,D.maxInt160=2n**(160n-1n)-1n,D.maxInt168=2n**(168n-1n)-1n,D.maxInt176=2n**(176n-1n)-1n,D.maxInt184=2n**(184n-1n)-1n,D.maxInt192=2n**(192n-1n)-1n,D.maxInt200=2n**(200n-1n)-1n,D.maxInt208=2n**(208n-1n)-1n,D.maxInt216=2n**(216n-1n)-1n,D.maxInt224=2n**(224n-1n)-1n,D.maxInt232=2n**(232n-1n)-1n,D.maxInt240=2n**(240n-1n)-1n,D.maxInt248=2n**(248n-1n)-1n,D.maxInt256=2n**(256n-1n)-1n,D.minInt8=-(2n**(8n-1n)),D.minInt16=-(2n**(16n-1n)),D.minInt24=-(2n**(24n-1n)),D.minInt32=-(2n**(32n-1n)),D.minInt40=-(2n**(40n-1n)),D.minInt48=-(2n**(48n-1n)),D.minInt56=-(2n**(56n-1n)),D.minInt64=-(2n**(64n-1n)),D.minInt72=-(2n**(72n-1n)),D.minInt80=-(2n**(80n-1n)),D.minInt88=-(2n**(88n-1n)),D.minInt96=-(2n**(96n-1n)),D.minInt104=-(2n**(104n-1n)),D.minInt112=-(2n**(112n-1n)),D.minInt120=-(2n**(120n-1n)),D.minInt128=-(2n**(128n-1n)),D.minInt136=-(2n**(136n-1n)),D.minInt144=-(2n**(144n-1n)),D.minInt152=-(2n**(152n-1n)),D.minInt160=-(2n**(160n-1n)),D.minInt168=-(2n**(168n-1n)),D.minInt176=-(2n**(176n-1n)),D.minInt184=-(2n**(184n-1n)),D.minInt192=-(2n**(192n-1n)),D.minInt200=-(2n**(200n-1n)),D.minInt208=-(2n**(208n-1n)),D.minInt216=-(2n**(216n-1n)),D.minInt224=-(2n**(224n-1n)),D.minInt232=-(2n**(232n-1n)),D.minInt240=-(2n**(240n-1n)),D.minInt248=-(2n**(248n-1n)),D.minInt256=-(2n**(256n-1n)),D.maxUint8=2n**8n-1n,D.maxUint16=2n**16n-1n,D.maxUint24=2n**24n-1n,D.maxUint32=2n**32n-1n,D.maxUint40=2n**40n-1n,D.maxUint48=2n**48n-1n,D.maxUint56=2n**56n-1n,D.maxUint64=2n**64n-1n,D.maxUint72=2n**72n-1n,D.maxUint80=2n**80n-1n,D.maxUint88=2n**88n-1n,D.maxUint96=2n**96n-1n,D.maxUint104=2n**104n-1n,D.maxUint112=2n**112n-1n,D.maxUint120=2n**120n-1n,D.maxUint128=2n**128n-1n,D.maxUint136=2n**136n-1n,D.maxUint144=2n**144n-1n,D.maxUint152=2n**152n-1n,D.maxUint160=2n**160n-1n,D.maxUint168=2n**168n-1n,D.maxUint176=2n**176n-1n,D.maxUint184=2n**184n-1n,D.maxUint192=2n**192n-1n,D.maxUint200=2n**200n-1n,D.maxUint208=2n**208n-1n,D.maxUint216=2n**216n-1n,D.maxUint224=2n**224n-1n,D.maxUint232=2n**232n-1n,D.maxUint240=2n**240n-1n,D.maxUint248=2n**248n-1n,D.maxUint256=2n**256n-1n),D}var Sy;function s5(){if(Sy)return Me;Sy=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.decodeParameter=i,Me.decodeAddress=d,Me.decodeArray=l,Me.decodeBool=f,Me.decodeBytes=_,Me.decodeNumber=T,Me.decodeTuple=w,Me.decodeString=p,Me.prepareParameters=B,Me.prepareParameter=j,Me.encode=h,Me.encodeAddress=P,Me.encodeArray=a,Me.encodeBytes=v,Me.encodeBoolean=b,Me.encodeNumber=m,Me.encodeString=A,Me.encodeTuple=y,Me.getArrayComponents=E,Me.hasDynamicChild=x;const e=vo(),t=Od(),n=Nt(),r=Pt(),o=Je(),s=B0();function i(O,R,k){const{checksumAddress:N,staticPosition:H}=k,g=E(R.type);if(g){const[M,S]=g;return l(O,{...R,type:S},{checksumAddress:N,length:M,staticPosition:H})}if(R.type==="tuple")return w(O,R,{checksumAddress:N,staticPosition:H});if(R.type==="address")return d(O,{checksum:N});if(R.type==="bool")return f(O);if(R.type.startsWith("bytes"))return _(O,R,{staticPosition:H});if(R.type.startsWith("uint")||R.type.startsWith("int"))return T(O,R);if(R.type==="string")return p(O,{staticPosition:H});throw new e.InvalidTypeError(R.type)}const c=32,u=32;function d(O,R={}){const{checksum:k=!1}=R,N=O.readBytes(32);return[(g=>k?t.checksum(g):g)(o.fromBytes(n.slice(N,-20))),32]}function l(O,R,k){const{checksumAddress:N,length:H,staticPosition:g}=k;if(!H){const I=n.toNumber(O.readBytes(u)),C=g+I,q=C+c;O.setPosition(C);const $=n.toNumber(O.readBytes(c)),L=x(R);let F=0;const U=[];for(let z=0;z<$;++z){O.setPosition(q+(L?z*32:F));const[Y,W]=i(O,R,{checksumAddress:N,staticPosition:q});F+=W,U.push(Y)}return O.setPosition(g+32),[U,32]}if(x(R)){const I=n.toNumber(O.readBytes(u)),C=g+I,q=[];for(let $=0;$<H;++$){O.setPosition(C+$*32);const[L]=i(O,R,{checksumAddress:N,staticPosition:C});q.push(L)}return O.setPosition(g+32),[q,32]}let M=0;const S=[];for(let I=0;I<H;++I){const[C,q]=i(O,R,{checksumAddress:N,staticPosition:g+M});M+=q,S.push(C)}return[S,M]}function f(O){return[n.toBoolean(O.readBytes(32),{size:32}),32]}function _(O,R,{staticPosition:k}){const[N,H]=R.type.split("bytes");if(!H){const M=n.toNumber(O.readBytes(32));O.setPosition(k+M);const S=n.toNumber(O.readBytes(32));if(S===0)return O.setPosition(k+32),["0x",32];const I=O.readBytes(S);return O.setPosition(k+32),[o.fromBytes(I),32]}return[o.fromBytes(O.readBytes(Number.parseInt(H,10),32)),32]}function T(O,R){const k=R.type.startsWith("int"),N=Number.parseInt(R.type.split("int")[1]||"256",10),H=O.readBytes(32);return[N>48?n.toBigInt(H,{signed:k}):n.toNumber(H,{signed:k}),32]}function w(O,R,k){const{checksumAddress:N,staticPosition:H}=k,g=R.components.length===0||R.components.some(({name:I})=>!I),M=g?[]:{};let S=0;if(x(R)){const I=n.toNumber(O.readBytes(u)),C=H+I;for(let q=0;q<R.components.length;++q){const $=R.components[q];O.setPosition(C+S);const[L,F]=i(O,$,{checksumAddress:N,staticPosition:C});S+=F,M[g?q:$==null?void 0:$.name]=L}return O.setPosition(H+32),[M,32]}for(let I=0;I<R.components.length;++I){const C=R.components[I],[q,$]=i(O,C,{checksumAddress:N,staticPosition:H});M[g?I:C==null?void 0:C.name]=q,S+=$}return[M,S]}function p(O,{staticPosition:R}){const k=n.toNumber(O.readBytes(32)),N=R+k;O.setPosition(N);const H=n.toNumber(O.readBytes(32));if(H===0)return O.setPosition(R+32),["",32];const g=O.readBytes(H,32),M=n.toString(n.trimLeft(g));return O.setPosition(R+32),[M,32]}function B({checksumAddress:O,parameters:R,values:k}){const N=[];for(let H=0;H<R.length;H++)N.push(j({checksumAddress:O,parameter:R[H],value:k[H]}));return N}function j({checksumAddress:O=!1,parameter:R,value:k}){const N=R,H=E(N.type);if(H){const[g,M]=H;return a(k,{checksumAddress:O,length:g,parameter:{...N,type:M}})}if(N.type==="tuple")return y(k,{checksumAddress:O,parameter:N});if(N.type==="address")return P(k,{checksum:O});if(N.type==="bool")return b(k);if(N.type.startsWith("uint")||N.type.startsWith("int")){const g=N.type.startsWith("int"),[,,M="256"]=s.integerRegex.exec(N.type)??[];return m(k,{signed:g,size:Number(M)})}if(N.type.startsWith("bytes"))return v(k,{type:N.type});if(N.type==="string")return A(k);throw new e.InvalidTypeError(N.type)}function h(O){let R=0;for(let g=0;g<O.length;g++){const{dynamic:M,encoded:S}=O[g];M?R+=32:R+=o.size(S)}const k=[],N=[];let H=0;for(let g=0;g<O.length;g++){const{dynamic:M,encoded:S}=O[g];M?(k.push(o.fromNumber(R+H,{size:32})),N.push(S),H+=o.size(S)):k.push(S)}return o.concat(...k,...N)}function P(O,R){const{checksum:k=!1}=R;return t.assert(O,{strict:k}),{dynamic:!1,encoded:o.padLeft(O.toLowerCase())}}function a(O,R){const{checksumAddress:k,length:N,parameter:H}=R,g=N===null;if(!Array.isArray(O))throw new e.InvalidArrayError(O);if(!g&&O.length!==N)throw new e.ArrayLengthMismatchError({expectedLength:N,givenLength:O.length,type:`${H.type}[${N}]`});let M=!1;const S=[];for(let I=0;I<O.length;I++){const C=j({checksumAddress:k,parameter:H,value:O[I]});C.dynamic&&(M=!0),S.push(C)}if(g||M){const I=h(S);if(g){const C=o.fromNumber(S.length,{size:32});return{dynamic:!0,encoded:S.length>0?o.concat(C,I):C}}if(M)return{dynamic:!0,encoded:I}}return{dynamic:!1,encoded:o.concat(...S.map(({encoded:I})=>I))}}function v(O,{type:R}){const[,k]=R.split("bytes"),N=o.size(O);if(!k){let H=O;return N%32!==0&&(H=o.padRight(H,Math.ceil((O.length-2)/2/32)*32)),{dynamic:!0,encoded:o.concat(o.padLeft(o.fromNumber(N,{size:32})),H)}}if(N!==Number.parseInt(k,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(k,10),value:O});return{dynamic:!1,encoded:o.padRight(O)}}function b(O){if(typeof O!="boolean")throw new r.BaseError(`Invalid boolean value: "${O}" (type: ${typeof O}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:o.padLeft(o.fromBoolean(O))}}function m(O,{signed:R,size:k}){if(typeof k=="number"){const N=2n**(BigInt(k)-(R?1n:0n))-1n,H=R?-N-1n:0n;if(O>N||O<H)throw new o.IntegerOutOfRangeError({max:N.toString(),min:H.toString(),signed:R,size:k/8,value:O.toString()})}return{dynamic:!1,encoded:o.fromNumber(O,{size:32,signed:R})}}function A(O){const R=o.fromString(O),k=Math.ceil(o.size(R)/32),N=[];for(let H=0;H<k;H++)N.push(o.padRight(o.slice(R,H*32,(H+1)*32)));return{dynamic:!0,encoded:o.concat(o.padRight(o.fromNumber(o.size(R),{size:32})),...N)}}function y(O,R){const{checksumAddress:k,parameter:N}=R;let H=!1;const g=[];for(let M=0;M<N.components.length;M++){const S=N.components[M],I=Array.isArray(O)?M:S.name,C=j({checksumAddress:k,parameter:S,value:O[I]});g.push(C),C.dynamic&&(H=!0)}return{dynamic:H,encoded:H?h(g):o.concat(...g.map(({encoded:M})=>M))}}function E(O){const R=O.match(/^(.*)\[(\d+)?\]$/);return R?[R[2]?Number(R[2]):null,R[1]]:void 0}function x(O){var N;const{type:R}=O;
46if(R==="string"||R==="bytes"||R.endsWith("[]"))return!0;if(R==="tuple")return(N=O.components)==null?void 0:N.some(x);const k=E(O.type);return!!(k&&x({...O,type:k[1]}))}return Me}var $t={},Iy;function Sv(){if(Iy)return $t;Iy=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.RecursiveReadLimitExceededError=$t.PositionOutOfBoundsError=$t.NegativeOffsetError=void 0,$t.create=n;const e=Pt(),t={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(i){if(i<0||i>this.bytes.length-1)throw new o({length:this.bytes.length,position:i})},decrementPosition(i){if(i<0)throw new r({offset:i});const c=this.position-i;this.assertPosition(c),this.position=c},getReadCount(i){return this.positionReadCount.get(i||this.position)||0},incrementPosition(i){if(i<0)throw new r({offset:i});const c=this.position+i;this.assertPosition(c),this.position=c},inspectByte(i){const c=i??this.position;return this.assertPosition(c),this.bytes[c]},inspectBytes(i,c){const u=c??this.position;return this.assertPosition(u+i-1),this.bytes.subarray(u,u+i)},inspectUint8(i){const c=i??this.position;return this.assertPosition(c),this.bytes[c]},inspectUint16(i){const c=i??this.position;return this.assertPosition(c+1),this.dataView.getUint16(c)},inspectUint24(i){const c=i??this.position;return this.assertPosition(c+2),(this.dataView.getUint16(c)<<8)+this.dataView.getUint8(c+2)},inspectUint32(i){const c=i??this.position;return this.assertPosition(c+3),this.dataView.getUint32(c)},pushByte(i){this.assertPosition(this.position),this.bytes[this.position]=i,this.position++},pushBytes(i){this.assertPosition(this.position+i.length-1),this.bytes.set(i,this.position),this.position+=i.length},pushUint8(i){this.assertPosition(this.position),this.bytes[this.position]=i,this.position++},pushUint16(i){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,i),this.position+=2},pushUint24(i){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,i>>8),this.dataView.setUint8(this.position+2,i&255),this.position+=3},pushUint32(i){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,i),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const i=this.inspectByte();return this.position++,i},readBytes(i,c){this.assertReadLimit(),this._touch();const u=this.inspectBytes(i);return this.position+=c??i,u},readUint8(){this.assertReadLimit(),this._touch();const i=this.inspectUint8();return this.position+=1,i},readUint16(){this.assertReadLimit(),this._touch();const i=this.inspectUint16();return this.position+=2,i},readUint24(){this.assertReadLimit(),this._touch();const i=this.inspectUint24();return this.position+=3,i},readUint32(){this.assertReadLimit(),this._touch();const i=this.inspectUint32();return this.position+=4,i},get remaining(){return this.bytes.length-this.position},setPosition(i){const c=this.position;return this.assertPosition(i),this.position=i,()=>this.position=c},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const i=this.getReadCount();this.positionReadCount.set(this.position,i+1),i>0&&this.recursiveReadCount++}};function n(i,{recursiveReadLimit:c=8192}={}){const u=Object.create(t);return u.bytes=i,u.dataView=new DataView(i.buffer,i.byteOffset,i.byteLength),u.positionReadCount=new Map,u.recursiveReadLimit=c,u}class r extends e.BaseError{constructor({offset:c}){super(`Offset \`${c}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}$t.NegativeOffsetError=r;class o extends e.BaseError{constructor({length:c,position:u}){super(`Position \`${u}\` is out of bounds (\`0 < position < ${c}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}$t.PositionOutOfBoundsError=o;class s extends e.BaseError{constructor({count:c,limit:u}){super(`Recursive read limit of \`${u}\` exceeded (recursive read count: \`${c}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}return $t.RecursiveReadLimitExceededError=s,$t}var Ty;function vo(){if(Ty)return qe;
46Ty=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.InvalidTypeError=qe.InvalidArrayError=qe.LengthMismatchError=qe.BytesSizeMismatchError=qe.ArrayLengthMismatchError=qe.ZeroDataError=qe.DataSizeTooSmallError=void 0,qe.decode=u,qe.encode=d,qe.encodePacked=l,qe.format=f,qe.from=_;const e=Rd(),t=Od(),n=Nt(),r=Pt(),o=Je(),s=s5(),i=Sv(),c=B0();function u(a,v,b={}){const{as:m="Array",checksumAddress:A=!1}=b,y=typeof v=="string"?n.fromHex(v):v,E=i.create(y);if(n.size(y)===0&&a.length>0)throw new w;if(n.size(y)&&n.size(y)<32)throw new T({data:typeof v=="string"?v:o.fromBytes(v),parameters:a,size:n.size(y)});let x=0;const O=m==="Array"?[]:{};for(let R=0;R<a.length;++R){const k=a[R];E.setPosition(x);const[N,H]=s.decodeParameter(E,k,{checksumAddress:A,staticPosition:0});x+=H,m==="Array"?O.push(N):O[k.name??R]=N}return O}function d(a,v,b){const{checksumAddress:m=!1}=b??{};if(a.length!==v.length)throw new j({expectedLength:a.length,givenLength:v.length});const A=s.prepareParameters({checksumAddress:m,parameters:a,values:v}),y=s.encode(A);return y.length===0?"0x":y}function l(a,v){if(a.length!==v.length)throw new j({expectedLength:a.length,givenLength:v.length});const b=[];for(let m=0;m<a.length;m++){const A=a[m],y=v[m];b.push(l.encode(A,y))}return o.concat(...b)}(function(a){function v(b,m,A=!1){if(b==="address"){const O=m;return t.assert(O),o.padLeft(O.toLowerCase(),A?32:0)}if(b==="string")return o.fromString(m);if(b==="bytes")return m;if(b==="bool")return o.padLeft(o.fromBoolean(m),A?32:1);const y=b.match(c.integerRegex);if(y){const[O,R,k="256"]=y,N=Number.parseInt(k,10)/8;return o.fromNumber(m,{size:A?32:N,signed:R==="int"})}const E=b.match(c.bytesRegex);if(E){const[O,R]=E;if(Number.parseInt(R,10)!==(m.length-2)/2)throw new B({expectedSize:Number.parseInt(R,10),value:m});return o.padRight(m,A?32:0)}const x=b.match(c.arrayRegex);if(x&&Array.isArray(m)){const[O,R]=x,k=[];for(let N=0;N<m.length;N++)k.push(v(R,m[N],!0));return k.length===0?"0x":o.concat(...k)}throw new P(b)}a.encode=v})(l||(qe.encodePacked=l={}));function f(a){return e.formatAbiParameters(a)}function _(a){return Array.isArray(a)&&typeof a[0]=="string"||typeof a=="string"?e.parseAbiParameters(a):a}class T extends r.BaseError{constructor({data:v,parameters:b,size:m}){super(`Data size of ${m} bytes is too small for given parameters.`,{metaMessages:[`Params: (${e.formatAbiParameters(b)})`,`Data: ${v} (${m} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}qe.DataSizeTooSmallError=T;class w extends r.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}qe.ZeroDataError=w;class p extends r.BaseError{constructor({expectedLength:v,givenLength:b,type:m}){super(`Array length mismatch for type \`${m}\`. Expected: \`${v}\`. Given: \`${b}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}qe.ArrayLengthMismatchError=p;class B extends r.BaseError{constructor({expectedSize:v,value:b}){super(`Size of bytes "${b}" (bytes${o.size(b)}) does not match expected size (bytes${v}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}qe.BytesSizeMismatchError=B;class j extends r.BaseError{constructor({expectedLength:v,givenLength:b}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${v}`,`Given length (values): ${b}`].join(` 47`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}qe.LengthMismatchError=j;class h extends r.BaseError{constructor(v){super(`Value \`${v}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}qe.InvalidArrayError=h;class P extends r.BaseError{constructor(v){super(`Type \`${v}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}return qe.InvalidTypeError=P,qe}var dt={},jt={},By;function a5(){if(By)return jt;
47By=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.toBytes=o,jt.toHex=s,jt.to=i,jt.decodeRlpCursor=c,jt.readLength=u,jt.readList=d,jt.from=l,jt.fromBytes=f,jt.fromHex=_;const e=Nt(),t=Pt(),n=Je(),r=Sv();function o(j){return i(j,"Bytes")}function s(j){return i(j,"Hex")}function i(j,h){const P=h??(typeof j=="string"?"Hex":"Bytes"),a=(()=>{if(typeof j=="string"){if(j.length>3&&j.length%2!==0)throw new n.InvalidLengthError(j);return e.fromHex(j)}return j})(),v=r.create(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return c(v,P)}function c(j,h="Hex"){if(j.bytes.length===0)return h==="Hex"?n.fromBytes(j.bytes):j.bytes;const P=j.readByte();if(P<128&&j.decrementPosition(1),P<192){const v=u(j,P,128),b=j.readBytes(v);return h==="Hex"?n.fromBytes(b):b}const a=u(j,P,192);return d(j,a,h)}function u(j,h,P){if(P===128&&h<128)return 1;if(h<=P+55)return h-P;if(h===P+55+1)return j.readUint8();if(h===P+55+2)return j.readUint16();if(h===P+55+3)return j.readUint24();if(h===P+55+4)return j.readUint32();throw new t.BaseError("Invalid RLP prefix")}function d(j,h,P){const a=j.position,v=[];for(;j.position-a<h;)v.push(c(j,P));return v}function l(j,h){const{as:P}=h,a=T(j),v=r.create(new Uint8Array(a.length));return a.encode(v),P==="Hex"?n.fromBytes(v.bytes):v.bytes}function f(j,h={}){const{as:P="Bytes"}=h;return l(j,{as:P})}function _(j,h={}){const{as:P="Hex"}=h;return l(j,{as:P})}function T(j){return Array.isArray(j)?w(j.map(h=>T(h))):p(j)}function w(j){const h=j.reduce((v,b)=>v+b.length,0),P=B(h);return{length:h<=55?1+h:1+P+h,encode(v){h<=55?v.pushByte(192+h):(v.pushByte(247+P),P===1?v.pushUint8(h):P===2?v.pushUint16(h):P===3?v.pushUint24(h):v.pushUint32(h));for(const{encode:b}of j)b(v)}}}function p(j){const h=typeof j=="string"?e.fromHex(j):j,P=B(h.length);return{length:h.length===1&&h[0]<128?1:h.length<=55?1+h.length:1+P+h.length,encode(v){h.length===1&&h[0]<128?v.pushBytes(h):h.length<=55?(v.pushByte(128+h.length),v.pushBytes(h)):(v.pushByte(183+P),P===1?v.pushUint8(h.length):P===2?v.pushUint16(h.length):P===3?v.pushUint24(h.length):v.pushUint32(h.length),v.pushBytes(h))}}}function B(j){if(j<2**8)return 1;if(j<2**16)return 2;if(j<2**24)return 3;if(j<2**32)return 4;throw new t.BaseError("Length is too large.")}return jt}var me={},qf={},Vi={},Mf={},xy;function c5(){return xy||(xy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=Tr();class n extends t.Hash{constructor(s,i){super(),this.finished=!1,this.destroyed=!1,(0,t.ahash)(s);const c=(0,t.toBytes)(i);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,d=new Uint8Array(u);d.set(c.length>u?s.create().update(c).digest():c);for(let l=0;l<d.length;l++)d[l]^=54;this.iHash.update(d),this.oHash=s.create();for(let l=0;l<d.length;l++)d[l]^=106;this.oHash.update(d),(0,t.clean)(d)}update(s){return(0,t.aexists)(this),this.iHash.update(s),this}digestInto(s){(0,t.aexists)(this),(0,t.abytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:i,iHash:c,finished:u,destroyed:d,blockLen:l,outputLen:f}=this;return s=s,s.finished=u,s.destroyed=d,s.blockLen=l,s.outputLen=f,s.oHash=i._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const r=(o,s,i)=>new n(o,s).update(i).digest();e.hmac=r,e.hmac.create=(o,s)=>new n(o,s)})(Mf)),Mf}var Hf={},Wr={},Re={},Ry;function Cd(){if(Ry)return Re;Ry=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.isNegativeLE=void 0,Re.mod=d,Re.pow=l,Re.pow2=f,Re.invert=_,Re.tonelliShanks=p,Re.FpSqrt=B,Re.validateField=P,Re.FpPow=a,Re.FpInvertBatch=v,Re.FpDiv=b,Re.FpLegendre=m,Re.FpIsSquare=A,Re.nLength=y,Re.Field=E,Re.FpSqrtOdd=x,Re.FpSqrtEven=O,Re.hashToPrivateScalar=R,Re.getFieldBytesLength=k,Re.getMinHashLength=N,Re.mapHashToField=H;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Tr(),t=rn(),n=BigInt(0),r=BigInt(1),o=BigInt(2),s=BigInt(3),i=BigInt(4),c=BigInt(5),u=BigInt(8);function d(g,M){const S=g%M;return S>=n?S:M+S}function l(g,M,S){return a(E(S),g,M)}function f(g,M,S){let I=g;
47for(;M-- >n;)I*=I,I%=S;return I}function _(g,M){if(g===n)throw new Error("invert: expected non-zero number");if(M<=n)throw new Error("invert: expected positive modulus, got "+M);let S=d(g,M),I=M,C=n,q=r;for(;S!==n;){const L=I/S,F=I%S,U=C-q*L;I=S,S=F,C=q,q=U}if(I!==r)throw new Error("invert: does not exist");return d(C,M)}function T(g,M){const S=(g.ORDER+r)/i,I=g.pow(M,S);if(!g.eql(g.sqr(I),M))throw new Error("Cannot find square root");return I}function w(g,M){const S=(g.ORDER-c)/u,I=g.mul(M,o),C=g.pow(I,S),q=g.mul(M,C),$=g.mul(g.mul(q,o),C),L=g.mul(q,g.sub($,g.ONE));if(!g.eql(g.sqr(L),M))throw new Error("Cannot find square root");return L}function p(g){if(g<BigInt(3))throw new Error("sqrt is not defined for small field");let M=g-r,S=0;for(;M%o===n;)M/=o,S++;let I=o;const C=E(g);for(;m(C,I)===1;)if(I++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(S===1)return T;let q=C.pow(I,M);const $=(M+r)/o;return function(F,U){if(F.is0(U))return U;if(m(F,U)!==1)throw new Error("Cannot find square root");let z=S,Y=F.mul(F.ONE,q),W=F.pow(U,M),V=F.pow(U,$);for(;!F.eql(W,F.ONE);){if(F.is0(W))return F.ZERO;let X=1,ne=F.sqr(W);for(;!F.eql(ne,F.ONE);)if(X++,ne=F.sqr(ne),X===z)throw new Error("Cannot find square root");const K=r<<BigInt(z-X-1),Z=F.pow(Y,K);z=X,Y=F.sqr(Z),W=F.mul(W,Y),V=F.mul(V,Z)}return V}}function B(g){return g%i===s?T:g%u===c?w:p(g)}const j=(g,M)=>(d(g,M)&r)===r;Re.isNegativeLE=j;const h=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function P(g){const M={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},S=h.reduce((I,C)=>(I[C]="function",I),M);return(0,t.validateObject)(g,S)}function a(g,M,S){if(S<n)throw new Error("invalid exponent, negatives unsupported");if(S===n)return g.ONE;if(S===r)return M;let I=g.ONE,C=M;for(;S>n;)S&r&&(I=g.mul(I,C)),C=g.sqr(C),S>>=r;return I}function v(g,M,S=!1){const I=new Array(M.length).fill(S?g.ZERO:void 0),C=M.reduce(($,L,F)=>g.is0(L)?$:(I[F]=$,g.mul($,L)),g.ONE),q=g.inv(C);return M.reduceRight(($,L,F)=>g.is0(L)?$:(I[F]=g.mul($,I[F]),g.mul($,L)),q),I}function b(g,M,S){return g.mul(M,typeof S=="bigint"?_(S,g.ORDER):g.inv(S))}function m(g,M){const S=(g.ORDER-r)/o,I=g.pow(M,S),C=g.eql(I,g.ONE),q=g.eql(I,g.ZERO),$=g.eql(I,g.neg(g.ONE));if(!C&&!q&&!$)throw new Error("invalid Legendre symbol result");return C?1:q?0:-1}function A(g,M){return m(g,M)===1}function y(g,M){M!==void 0&&(0,e.anumber)(M);const S=M!==void 0?M:g.toString(2).length,I=Math.ceil(S/8);return{nBitLength:S,nByteLength:I}}function E(g,M,S=!1,I={}){if(g<=n)throw new Error("invalid field: expected ORDER > 0, got "+g);const{nBitLength:C,nByteLength:q}=y(g,M);if(q>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let $;const L=Object.freeze({ORDER:g,isLE:S,BITS:C,BYTES:q,MASK:(0,t.bitMask)(C),ZERO:n,ONE:r,create:F=>d(F,g),isValid:F=>{if(typeof F!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof F);return n<=F&&F<g},is0:F=>F===n,isOdd:F=>(F&r)===r,neg:F=>d(-F,g),eql:(F,U)=>F===U,sqr:F=>d(F*F,g),add:(F,U)=>d(F+U,g),sub:(F,U)=>d(F-U,g),mul:(F,U)=>d(F*U,g),pow:(F,U)=>a(L,F,U),div:(F,U)=>d(F*_(U,g),g),sqrN:F=>F*F,addN:(F,U)=>F+U,subN:(F,U)=>F-U,mulN:(F,U)=>F*U,inv:F=>_(F,g),sqrt:I.sqrt||(F=>($||($=B(g)),$(L,F))),toBytes:F=>S?(0,t.numberToBytesLE)(F,q):(0,t.numberToBytesBE)(F,q),fromBytes:F=>{if(F.length!==q)throw new Error("Field.fromBytes: expected "+q+" bytes, got "+F.length);return S?(0,t.bytesToNumberLE)(F):(0,t.bytesToNumberBE)(F)},invertBatch:F=>v(L,F),cmov:(F,U,z)=>z?U:F});return Object.freeze(L)}function x(g,M){if(!g.isOdd)throw new Error("Field doesn't have isOdd");const S=g.sqrt(M);return g.isOdd(S)?S:g.neg(S)}function O(g,M){if(!g.isOdd)throw new Error("Field doesn't have isOdd");const S=g.sqrt(M);return g.isOdd(S)?g.neg(S):S}function R(g,M,S=!1){g=(0,t.ensureBytes)("privateHash",g);const I=g.length,C=y(M).nByteLength+8;if(C<24||I<C||I>1024)throw new Error("hashToPrivateScalar: expected "+C+"-1024 bytes of input, got "+I);const q=S?(0,t.bytesToNumberLE)(g):(0,t.bytesToNumberBE)(g);return d(q,M-r)+r}function k(g){if(typeof g!="bigint")throw new Error("field order must be bigint");const M=g.toString(2).length;return Math.ceil(M/8)}function N(g){const M=k(g);return M+Math.ceil(M/2)}function H(g,M,S=!1){const I=g.length,C=k(M),q=N(M);if(I<16||I<q||I>1024)throw new Error("expected "+q+"-1024 bytes of input, got "+I);const $=S?(0,t.bytesToNumberLE)(g):(0,t.bytesToNumberBE)(g),L=d($,M-r)+r;return S?(0,t.numberToBytesLE)(L,C):(0,t.numberToBytesBE)(L,C)}return Re}var Oy;function u5(){if(Oy)return Wr;
vendor: 2,054 bytes, line 47
47Oy=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.wNAF=T,Wr.pippenger=w,Wr.precomputeMSMUnsafe=p,Wr.validateBasic=B;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Cd(),t=rn(),n=BigInt(0),r=BigInt(1);function o(j,h){const P=h.negate();return j?P:h}function s(j,h){if(!Number.isSafeInteger(j)||j<=0||j>h)throw new Error("invalid window size, expected [1.."+h+"], got W="+j)}function i(j,h){s(j,h);const P=Math.ceil(h/j)+1,a=2**(j-1),v=2**j,b=(0,t.bitMask)(j),m=BigInt(j);return{windows:P,windowSize:a,mask:b,maxNumber:v,shiftBy:m}}function c(j,h,P){const{windowSize:a,mask:v,maxNumber:b,shiftBy:m}=P;let A=Number(j&v),y=j>>m;A>a&&(A-=b,y+=r);const E=h*a,x=E+Math.abs(A)-1,O=A===0,R=A<0,k=h%2!==0;return{nextN:y,offset:x,isZero:O,isNeg:R,isNegF:k,offsetF:E}}function u(j,h){if(!Array.isArray(j))throw new Error("array expected");j.forEach((P,a)=>{if(!(P instanceof h))throw new Error("invalid point at index "+a)})}function d(j,h){if(!Array.isArray(j))throw new Error("array of scalars expected");j.forEach((P,a)=>{if(!h.isValid(P))throw new Error("invalid scalar at index "+a)})}const l=new WeakMap,f=new WeakMap;function _(j){return f.get(j)||1}function T(j,h){return{constTimeNegate:o,hasPrecomputes(P){return _(P)!==1},unsafeLadder(P,a,v=j.ZERO){let b=P;for(;a>n;)a&r&&(v=v.add(b)),b=b.double(),a>>=r;return v},precomputeWindow(P,a){const{windows:v,windowSize:b}=i(a,h),m=[];let A=P,y=A;for(let E=0;E<v;E++){y=A,m.push(y);for(let x=1;x<b;x++)y=y.add(A),m.push(y);A=y.double()}return m},wNAF(P,a,v){let b=j.ZERO,m=j.BASE;const A=i(P,h);for(let y=0;y<A.windows;y++){const{nextN:E,offset:x,isZero:O,isNeg:R,isNegF:k,offsetF:N}=c(v,y,A);v=E,O?m=m.add(o(k,a[N])):b=b.add(o(R,a[x]))}return{p:b,f:m}},wNAFUnsafe(P,a,v,b=j.ZERO){const m=i(P,h);for(let A=0;A<m.windows&&v!==n;A++){const{nextN:y,offset:E,isZero:x,isNeg:O}=c(v,A,m);if(v=y,!x){const R=a[E];b=b.add(O?R.negate():R)}}return b},getPrecomputes(P,a,v){let b=l.get(a);return b||(b=this.precomputeWindow(a,P),P!==1&&l.set(a,v(b))),b},wNAFCached(P,a,v){const b=_(P);
47return this.wNAF(b,this.getPrecomputes(b,P,v),a)},wNAFCachedUnsafe(P,a,v,b){const m=_(P);return m===1?this.unsafeLadder(P,a,b):this.wNAFUnsafe(m,this.getPrecomputes(m,P,v),a,b)},setWindowSize(P,a){s(a,h),f.set(P,a),l.delete(P)}}}function w(j,h,P,a){u(P,j),d(a,h);const v=P.length,b=a.length;if(v!==b)throw new Error("arrays of points and scalars must have equal length");const m=j.ZERO,A=(0,t.bitLen)(BigInt(v));let y=1;A>12?y=A-3:A>4?y=A-2:A>0&&(y=2);const E=(0,t.bitMask)(y),x=new Array(Number(E)+1).fill(m),O=Math.floor((h.BITS-1)/y)*y;let R=m;for(let k=O;k>=0;k-=y){x.fill(m);for(let H=0;H<b;H++){const g=a[H],M=Number(g>>BigInt(k)&E);x[M]=x[M].add(P[H])}let N=m;for(let H=x.length-1,g=m;H>0;H--)g=g.add(x[H]),N=N.add(g);if(R=R.add(N),k!==0)for(let H=0;H<y;H++)R=R.double()}return R}function p(j,h,P,a){s(a,h.BITS),u(P,j);const v=j.ZERO,b=2**a-1,m=Math.ceil(h.BITS/a),A=(0,t.bitMask)(a),y=P.map(E=>{const x=[];for(let O=0,R=E;O<b;O++)x.push(R),R=R.add(E);return x});return E=>{if(d(E,h),E.length>P.length)throw new Error("array of scalars must be smaller than array of points");let x=v;for(let O=0;O<m;O++){if(x!==v)for(let k=0;k<a;k++)x=x.double();const R=BigInt(m*a-(O+1)*a);for(let k=0;k<E.length;k++){const N=E[k],H=Number(N>>R&A);H&&(x=x.add(y[k][H-1]))}}return x}}function B(j){return(0,e.validateField)(j.Fp),(0,t.validateObject)(j,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(j.n,j.nBitLength),...j,p:j.Fp.ORDER})}return Wr}var Cy;function Iv(){return Cy||(Cy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e.weierstrassPoints=T,e.weierstrass=p,e.SWUFpSqrtRatio=B,e.mapToCurveSimpleSWU=j;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=u5(),n=Cd(),r=rn();function o(h){h.lowS!==void 0&&(0,r.abool)("lowS",h.lowS),h.prehash!==void 0&&(0,r.abool)("prehash",h.prehash)}function s(h){const P=(0,t.validateBasic)(h);(0,r.validateObject)(P,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:a,Fp:v,a:b}=P;if(a){if(!v.eql(b,v.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof a!="object"||typeof a.beta!="bigint"||typeof a.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...P})}class i extends Error{constructor(P=""){super(P)}}e.DERErr=i,e.DER={Err:i,_tlv:{encode:(h,P)=>{const{Err:a}=e.DER;if(h<0||h>256)throw new a("tlv.encode: wrong tag");if(P.length&1)throw new a("tlv.encode: unpadded data");const v=P.length/2,b=(0,r.numberToHexUnpadded)(v);if(b.length/2&128)throw new a("tlv.encode: long form length too big");const m=v>127?(0,r.numberToHexUnpadded)(b.length/2|128):"";return(0,r.numberToHexUnpadded)(h)+m+b+P},decode(h,P){const{Err:a}=e.DER;let v=0;if(h<0||h>256)throw new a("tlv.encode: wrong tag");if(P.length<2||P[v++]!==h)throw new a("tlv.decode: wrong tlv");const b=P[v++],m=!!(b&128);let A=0;if(!m)A=b;else{const E=b&127;if(!E)throw new a("tlv.decode(long): indefinite length not supported");if(E>4)throw new a("tlv.decode(long): byte length is too big");const x=P.subarray(v,v+E);if(x.length!==E)throw new a("tlv.decode: length bytes not complete");if(x[0]===0)throw new a("tlv.decode(long): zero leftmost byte");for(const O of x)A=A<<8|O;if(v+=E,A<128)throw new a("tlv.decode(long): not minimal encoding")}const y=P.subarray(v,v+A);if(y.length!==A)throw new a("tlv.decode: wrong value length");return{v:y,l:P.subarray(v+A)}}},_int:{encode(h){const{Err:P}=e.DER;if(h<u)throw new P("integer: negative integers are not allowed");let a=(0,r.numberToHexUnpadded)(h);if(Number.parseInt(a[0],16)&8&&(a="00"+a),a.length&1)throw new P("unexpected DER parsing assertion: unpadded hex");return a},decode(h){const{Err:P}=e.DER;if(h[0]&128)throw new P("invalid signature integer: negative");if(h[0]===0&&!(h[1]&128))throw new P("invalid signature integer: unnecessary leading zero");return(0,r.bytesToNumberBE)(h)}},toSig(h){const{Err:P,_int:a,_tlv:v}=e.DER,b=(0,r.ensureBytes)("signature",h),{v:m,l:A}=v.decode(48,b);if(A.length)throw new P("invalid signature: left bytes after parsing");const{v:y,l:E}=v.decode(2,m),{v:x,l:O}=v.decode(2,E);if(O.length)throw new P("invalid signature: left bytes after parsing");return{r:a.decode(y),s:a.decode(x)}},hexFromSig(h){const{_tlv:P,_int:a}=e.DER,v=P.encode(2,a.encode(h.r)),b=P.encode(2,a.encode(h.s)),m=v+b;return P.encode(48,m)}};function c(h,P){return(0,r.bytesToHex)((0,r.numberToBytesBE)(h,P))}const u=BigInt(0),d=BigInt(1),l=BigInt(2),f=BigInt(3),_=BigInt(4);function T(h){const P=s(h),{Fp:a}=P,v=(0,n.Field)(P.n,P.nBitLength),b=P.toBytes||((C,q,$)=>{const L=q.toAffine();return(0,r.concatBytes)(Uint8Array.from([4]),a.toBytes(L.x),a.toBytes(L.y))}),m=P.fromBytes||(C=>{const q=C.subarray(1),$=a.fromBytes(q.subarray(0,a.BYTES)),L=a.fromBytes(q.subarray(a.BYTES,2*a.BYTES));return{x:$,y:L}});function A(C){const{a:q,b:$}=P,L=a.sqr(C),F=a.mul(L,C);return a.add(a.add(F,a.mul(C,q)),$)}function y(C,q){const $=a.sqr(q),L=A(C);return a.eql($,L)}
47if(!y(P.Gx,P.Gy))throw new Error("bad curve params: generator point");const E=a.mul(a.pow(P.a,f),_),x=a.mul(a.sqr(P.b),BigInt(27));if(a.is0(a.add(E,x)))throw new Error("bad curve params: a or b");function O(C){return(0,r.inRange)(C,d,P.n)}function R(C){const{allowedPrivateKeyLengths:q,nByteLength:$,wrapPrivateKey:L,n:F}=P;if(q&&typeof C!="bigint"){if((0,r.isBytes)(C)&&(C=(0,r.bytesToHex)(C)),typeof C!="string"||!q.includes(C.length))throw new Error("invalid private key");C=C.padStart($*2,"0")}let U;try{U=typeof C=="bigint"?C:(0,r.bytesToNumberBE)((0,r.ensureBytes)("private key",C,$))}catch{throw new Error("invalid private key, expected hex or "+$+" bytes, got "+typeof C)}return L&&(U=(0,n.mod)(U,F)),(0,r.aInRange)("private key",U,d,F),U}function k(C){if(!(C instanceof g))throw new Error("ProjectivePoint expected")}const N=(0,r.memoized)((C,q)=>{const{px:$,py:L,pz:F}=C;if(a.eql(F,a.ONE))return{x:$,y:L};const U=C.is0();q==null&&(q=U?a.ONE:a.inv(F));const z=a.mul($,q),Y=a.mul(L,q),W=a.mul(F,q);if(U)return{x:a.ZERO,y:a.ZERO};if(!a.eql(W,a.ONE))throw new Error("invZ was invalid");return{x:z,y:Y}}),H=(0,r.memoized)(C=>{if(C.is0()){if(P.allowInfinityPoint&&!a.is0(C.py))return;throw new Error("bad point: ZERO")}const{x:q,y:$}=C.toAffine();if(!a.isValid(q)||!a.isValid($))throw new Error("bad point: x or y not FE");if(!y(q,$))throw new Error("bad point: equation left != right");if(!C.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(q,$,L){if(q==null||!a.isValid(q))throw new Error("x required");if($==null||!a.isValid($)||a.is0($))throw new Error("y required");if(L==null||!a.isValid(L))throw new Error("z required");this.px=q,this.py=$,this.pz=L,Object.freeze(this)}static fromAffine(q){const{x:$,y:L}=q||{};if(!q||!a.isValid($)||!a.isValid(L))throw new Error("invalid affine point");if(q instanceof g)throw new Error("projective point not allowed");const F=U=>a.eql(U,a.ZERO);return F($)&&F(L)?g.ZERO:new g($,L,a.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(q){const $=(0,n.FpInvertBatch)(a,q.map(L=>L.pz));return q.map((L,F)=>L.toAffine($[F])).map(g.fromAffine)}static fromHex(q){const $=g.fromAffine(m((0,r.ensureBytes)("pointHex",q)));return $.assertValidity(),$}static fromPrivateKey(q){return g.BASE.multiply(R(q))}static msm(q,$){return(0,t.pippenger)(g,v,q,$)}_setWindowSize(q){I.setWindowSize(this,q)}assertValidity(){H(this)}hasEvenY(){const{y:q}=this.toAffine();if(a.isOdd)return!a.isOdd(q);throw new Error("Field doesn't support isOdd")}equals(q){k(q);const{px:$,py:L,pz:F}=this,{px:U,py:z,pz:Y}=q,W=a.eql(a.mul($,Y),a.mul(U,F)),V=a.eql(a.mul(L,Y),a.mul(z,F));return W&&V}negate(){return new g(this.px,a.neg(this.py),this.pz)}double(){const{a:q,b:$}=P,L=a.mul($,f),{px:F,py:U,pz:z}=this;let Y=a.ZERO,W=a.ZERO,V=a.ZERO,X=a.mul(F,F),ne=a.mul(U,U),K=a.mul(z,z),Z=a.mul(F,U);return Z=a.add(Z,Z),V=a.mul(F,z),V=a.add(V,V),Y=a.mul(q,V),W=a.mul(L,K),W=a.add(Y,W),Y=a.sub(ne,W),W=a.add(ne,W),W=a.mul(Y,W),Y=a.mul(Z,Y),V=a.mul(L,V),K=a.mul(q,K),Z=a.sub(X,K),Z=a.mul(q,Z),Z=a.add(Z,V),V=a.add(X,X),X=a.add(V,X),X=a.add(X,K),X=a.mul(X,Z),W=a.add(W,X),K=a.mul(U,z),K=a.add(K,K),X=a.mul(K,Z),Y=a.sub(Y,X),V=a.mul(K,ne),V=a.add(V,V),V=a.add(V,V),new g(Y,W,V)}add(q){k(q);const{px:$,py:L,pz:F}=this,{px:U,py:z,pz:Y}=q;let W=a.ZERO,V=a.ZERO,X=a.ZERO;const ne=P.a,K=a.mul(P.b,f);let Z=a.mul($,U),ee=a.mul(L,z),re=a.mul(F,Y),te=a.add($,L),Q=a.add(U,z);te=a.mul(te,Q),Q=a.add(Z,ee),te=a.sub(te,Q),Q=a.add($,F);let J=a.add(U,Y);return Q=a.mul(Q,J),J=a.add(Z,re),Q=a.sub(Q,J),J=a.add(L,F),W=a.add(z,Y),J=a.mul(J,W),W=a.add(ee,re),J=a.sub(J,W),X=a.mul(ne,Q),W=a.mul(K,re),X=a.add(W,X),W=a.sub(ee,X),X=a.add(ee,X),V=a.mul(W,X),ee=a.add(Z,Z),ee=a.add(ee,Z),re=a.mul(ne,re),Q=a.mul(K,Q),ee=a.add(ee,re),re=a.sub(Z,re),re=a.mul(ne,re),Q=a.add(Q,re),Z=a.mul(ee,Q),V=a.add(V,Z),Z=a.mul(J,Q),W=a.mul(te,W),W=a.sub(W,Z),Z=a.mul(te,ee),X=a.mul(J,X),X=a.add(X,Z),new g(W,V,X)}subtract(q){return this.add(q.negate())}is0(){return this.equals(g.ZERO)}wNAF(q){return I.wNAFCached(this,q,g.normalizeZ)}
47multiplyUnsafe(q){const{endo:$,n:L}=P;(0,r.aInRange)("scalar",q,u,L);const F=g.ZERO;if(q===u)return F;if(this.is0()||q===d)return this;if(!$||I.hasPrecomputes(this))return I.wNAFCachedUnsafe(this,q,g.normalizeZ);let{k1neg:U,k1:z,k2neg:Y,k2:W}=$.splitScalar(q),V=F,X=F,ne=this;for(;z>u||W>u;)z&d&&(V=V.add(ne)),W&d&&(X=X.add(ne)),ne=ne.double(),z>>=d,W>>=d;return U&&(V=V.negate()),Y&&(X=X.negate()),X=new g(a.mul(X.px,$.beta),X.py,X.pz),V.add(X)}multiply(q){const{endo:$,n:L}=P;(0,r.aInRange)("scalar",q,d,L);let F,U;if($){const{k1neg:z,k1:Y,k2neg:W,k2:V}=$.splitScalar(q);let{p:X,f:ne}=this.wNAF(Y),{p:K,f:Z}=this.wNAF(V);X=I.constTimeNegate(z,X),K=I.constTimeNegate(W,K),K=new g(a.mul(K.px,$.beta),K.py,K.pz),F=X.add(K),U=ne.add(Z)}else{const{p:z,f:Y}=this.wNAF(q);F=z,U=Y}return g.normalizeZ([F,U])[0]}multiplyAndAddUnsafe(q,$,L){const F=g.BASE,U=(Y,W)=>W===u||W===d||!Y.equals(F)?Y.multiplyUnsafe(W):Y.multiply(W),z=U(this,$).add(U(q,L));return z.is0()?void 0:z}toAffine(q){return N(this,q)}isTorsionFree(){const{h:q,isTorsionFree:$}=P;if(q===d)return!0;if($)return $(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:q,clearCofactor:$}=P;return q===d?this:$?$(g,this):this.multiplyUnsafe(P.h)}toRawBytes(q=!0){return(0,r.abool)("isCompressed",q),this.assertValidity(),b(g,this,q)}toHex(q=!0){return(0,r.abool)("isCompressed",q),(0,r.bytesToHex)(this.toRawBytes(q))}}g.BASE=new g(P.Gx,P.Gy,a.ONE),g.ZERO=new g(a.ZERO,a.ONE,a.ZERO);const{endo:M,nBitLength:S}=P,I=(0,t.wNAF)(g,M?Math.ceil(S/2):S);return{CURVE:P,ProjectivePoint:g,normPrivateKeyToScalar:R,weierstrassEquation:A,isWithinCurveOrder:O}}function w(h){const P=(0,t.validateBasic)(h);return(0,r.validateObject)(P,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...P})}function p(h){const P=w(h),{Fp:a,n:v,nByteLength:b,nBitLength:m}=P,A=a.BYTES+1,y=2*a.BYTES+1;function E(K){return(0,n.mod)(K,v)}function x(K){return(0,n.invert)(K,v)}const{ProjectivePoint:O,normPrivateKeyToScalar:R,weierstrassEquation:k,isWithinCurveOrder:N}=T({...P,toBytes(K,Z,ee){const re=Z.toAffine(),te=a.toBytes(re.x),Q=r.concatBytes;return(0,r.abool)("isCompressed",ee),ee?Q(Uint8Array.from([Z.hasEvenY()?2:3]),te):Q(Uint8Array.from([4]),te,a.toBytes(re.y))},fromBytes(K){const Z=K.length,ee=K[0],re=K.subarray(1);if(Z===A&&(ee===2||ee===3)){const te=(0,r.bytesToNumberBE)(re);if(!(0,r.inRange)(te,d,a.ORDER))throw new Error("Point is not on curve");const Q=k(te);let J;try{J=a.sqrt(Q)}catch(he){const le=he instanceof Error?": "+he.message:"";throw new Error("Point is not on curve"+le)}const de=(J&d)===d;return(ee&1)===1!==de&&(J=a.neg(J)),{x:te,y:J}}else if(Z===y&&ee===4){const te=a.fromBytes(re.subarray(0,a.BYTES)),Q=a.fromBytes(re.subarray(a.BYTES,2*a.BYTES));return{x:te,y:Q}}else{const te=A,Q=y;throw new Error("invalid Point, expected length of "+te+", or uncompressed "+Q+", got "+Z)}}});function H(K){const Z=v>>d;return K>Z}function g(K){return H(K)?E(-K):K}const M=(K,Z,ee)=>(0,r.bytesToNumberBE)(K.slice(Z,ee));class S{constructor(Z,ee,re){(0,r.aInRange)("r",Z,d,v),(0,r.aInRange)("s",ee,d,v),this.r=Z,this.s=ee,re!=null&&(this.recovery=re),Object.freeze(this)}static fromCompact(Z){const ee=b;return Z=(0,r.ensureBytes)("compactSignature",Z,ee*2),new S(M(Z,0,ee),M(Z,ee,2*ee))}static fromDER(Z){const{r:ee,s:re}=e.DER.toSig((0,r.ensureBytes)("DER",Z));return new S(ee,re)}assertValidity(){}addRecoveryBit(Z){return new S(this.r,this.s,Z)}recoverPublicKey(Z){const{r:ee,s:re,recovery:te}=this,Q=F((0,r.ensureBytes)("msgHash",Z));if(te==null||![0,1,2,3].includes(te))throw new Error("recovery id invalid");const J=te===2||te===3?ee+P.n:ee;if(J>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const de=(te&1)===0?"02":"03",Se=O.fromHex(de+c(J,a.BYTES)),he=x(J),le=E(-Q*he),Ee=E(re*he),pe=O.BASE.multiplyAndAddUnsafe(Se,le,Ee);if(!pe)throw new Error("point at infinify");return pe.assertValidity(),pe}hasHighS(){return H(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,E(-this.s),this.recovery):this}toDERRawBytes(){return(0,r.hexToBytes)(this.toDERHex())}toDERHex(){return e.DER.hexFromSig(this)}toCompactRawBytes(){return(0,r.hexToBytes)(this.toCompactHex())}toCompactHex(){const Z=b;return c(this.r,Z)+c(this.s,Z)}}const I={isValidPrivateKey(K){try{return R(K),!0}catch{return!1}},normPrivateKeyToScalar:R,randomPrivateKey:()=>{const K=(0,n.getMinHashLength)(P.n);return(0,n.mapHashToField)(P.randomBytes(K),P.n)},precompute(K=8,Z=O.BASE){return Z._setWindowSize(K),Z.multiply(BigInt(3)),Z}};function C(K,Z=!0){return O.fromPrivateKey(K).toRawBytes(Z)}function q(K){if(typeof K=="bigint")return!1;if(K instanceof O)return!0;const ee=(0,r.ensureBytes)("key",K).length,re=a.BYTES,te=re+1,Q=2*re+1;if(!(P.allowedPrivateKeyLengths||b===te))return ee===te||ee===Q}function $(K,Z,ee=!0){if(q(K)===!0)throw new Error("first arg must be private key");if(q(Z)===!1)throw new Error("second arg must be public key");return O.fromHex(Z).multiply(R(K)).toRawBytes(ee)}const L=P.bits2int||function(K){if(K.length>8192)throw new Error("input is too large");
47const Z=(0,r.bytesToNumberBE)(K),ee=K.length*8-m;return ee>0?Z>>BigInt(ee):Z},F=P.bits2int_modN||function(K){return E(L(K))},U=(0,r.bitMask)(m);function z(K){return(0,r.aInRange)("num < 2^"+m,K,u,U),(0,r.numberToBytesBE)(K,b)}function Y(K,Z,ee=W){if(["recovered","canonical"].some(He=>He in ee))throw new Error("sign() legacy options not supported");const{hash:re,randomBytes:te}=P;let{lowS:Q,prehash:J,extraEntropy:de}=ee;Q==null&&(Q=!0),K=(0,r.ensureBytes)("msgHash",K),o(ee),J&&(K=(0,r.ensureBytes)("prehashed msgHash",re(K)));const Se=F(K),he=R(Z),le=[z(he),z(Se)];if(de!=null&&de!==!1){const He=de===!0?te(a.BYTES):de;le.push((0,r.ensureBytes)("extraEntropy",He))}const Ee=(0,r.concatBytes)(...le),pe=Se;function Le(He){const De=L(He);if(!N(De))return;const Xe=x(De),Ge=O.BASE.multiply(De).toAffine(),ke=E(Ge.x);if(ke===u)return;const Be=E(Xe*E(pe+ke*he));if(Be===u)return;let Qe=(Ge.x===ke?0:2)|Number(Ge.y&d),Ve=Be;return Q&&H(Be)&&(Ve=g(Be),Qe^=1),new S(ke,Ve,Qe)}return{seed:Ee,k2sig:Le}}const W={lowS:P.lowS,prehash:!1},V={lowS:P.lowS,prehash:!1};function X(K,Z,ee=W){const{seed:re,k2sig:te}=Y(K,Z,ee),Q=P;return(0,r.createHmacDrbg)(Q.hash.outputLen,Q.nByteLength,Q.hmac)(re,te)}O.BASE._setWindowSize(8);function ne(K,Z,ee,re=V){var Qe;const te=K;Z=(0,r.ensureBytes)("msgHash",Z),ee=(0,r.ensureBytes)("publicKey",ee);const{lowS:Q,prehash:J,format:de}=re;if(o(re),"strict"in re)throw new Error("options.strict was renamed to lowS");if(de!==void 0&&de!=="compact"&&de!=="der")throw new Error("format must be compact or der");const Se=typeof te=="string"||(0,r.isBytes)(te),he=!Se&&!de&&typeof te=="object"&&te!==null&&typeof te.r=="bigint"&&typeof te.s=="bigint";if(!Se&&!he)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let le,Ee;try{if(he&&(le=new S(te.r,te.s)),Se){try{de!=="compact"&&(le=S.fromDER(te))}catch(Ve){if(!(Ve instanceof e.DER.Err))throw Ve}!le&&de!=="der"&&(le=S.fromCompact(te))}Ee=O.fromHex(ee)}catch{return!1}if(!le||Q&&le.hasHighS())return!1;J&&(Z=P.hash(Z));const{r:pe,s:Le}=le,He=F(Z),De=x(Le),Xe=E(He*De),Ge=E(pe*De),ke=(Qe=O.BASE.multiplyAndAddUnsafe(Ee,Xe,Ge))==null?void 0:Qe.toAffine();return ke?E(ke.x)===pe:!1}return{CURVE:P,getPublicKey:C,getSharedSecret:$,sign:X,verify:ne,ProjectivePoint:O,Signature:S,utils:I}}function B(h,P){const a=h.ORDER;let v=u;for(let H=a-d;H%l===u;H/=l)v+=d;const b=v,m=l<<b-d-d,A=m*l,y=(a-d)/A,E=(y-d)/l,x=A-d,O=m,R=h.pow(P,y),k=h.pow(P,(y+d)/l);let N=(H,g)=>{let M=R,S=h.pow(g,x),I=h.sqr(S);I=h.mul(I,g);let C=h.mul(H,I);C=h.pow(C,E),C=h.mul(C,S),S=h.mul(C,g),I=h.mul(C,H);let q=h.mul(I,S);C=h.pow(q,O);let $=h.eql(C,h.ONE);S=h.mul(I,k),C=h.mul(q,M),I=h.cmov(S,I,$),q=h.cmov(C,q,$);for(let L=b;L>d;L--){let F=L-l;F=l<<F-d;let U=h.pow(q,F);const z=h.eql(U,h.ONE);S=h.mul(I,M),M=h.mul(M,M),U=h.mul(q,M),I=h.cmov(S,I,z),q=h.cmov(U,q,z)}return{isValid:$,value:I}};if(h.ORDER%_===f){const H=(h.ORDER-f)/_,g=h.sqrt(h.neg(P));N=(M,S)=>{let I=h.sqr(S);const C=h.mul(M,S);I=h.mul(I,C);let q=h.pow(I,H);q=h.mul(q,C);const $=h.mul(q,g),L=h.mul(h.sqr(q),S),F=h.eql(L,M);let U=h.cmov($,q,F);return{isValid:F,value:U}}}return N}function j(h,P){if((0,n.validateField)(h),!h.isValid(P.A)||!h.isValid(P.B)||!h.isValid(P.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const a=B(h,P.Z);if(!h.isOdd)throw new Error("Fp.isOdd is not implemented!");return v=>{let b,m,A,y,E,x,O,R;b=h.sqr(v),b=h.mul(b,P.Z),m=h.sqr(b),m=h.add(m,b),A=h.add(m,h.ONE),A=h.mul(A,P.B),y=h.cmov(P.Z,h.neg(m),!h.eql(m,h.ZERO)),y=h.mul(y,P.A),m=h.sqr(A),x=h.sqr(y),E=h.mul(x,P.A),m=h.add(m,E),m=h.mul(m,A),x=h.mul(x,y),E=h.mul(x,P.B),m=h.add(m,E),O=h.mul(b,A);const{isValid:k,value:N}=a(m,x);R=h.mul(b,v),R=h.mul(R,N),O=h.cmov(O,A,k),R=h.cmov(R,N,k);const H=h.isOdd(v)===h.isOdd(R);R=h.cmov(h.neg(R),R,H);const g=(0,n.FpInvertBatch)(h,[y],!0)[0];return O=h.mul(O,g),{x:O,y:R}}}})(Hf)),Hf}var qy;function d5(){if(qy)return Vi;qy=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.getHash=r,Vi.createCurve=o;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=c5(),t=Tr(),n=Iv();function r(s){return{hash:s,hmac:(i,...c)=>(0,e.hmac)(s,i,(0,t.concatBytes)(...c)),randomBytes:t.randomBytes}}function o(s,i){const c=u=>(0,n.weierstrass)({...s,...r(u)});return{...c(i),create:c}}return Vi}var gr={},My;function f5(){if(My)return gr;
47My=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.expand_message_xmd=i,gr.expand_message_xof=c,gr.hash_to_field=u,gr.isogenyMap=d,gr.createHasher=l;const e=Cd(),t=rn(),n=t.bytesToNumberBE;function r(f,_){if(s(f),s(_),f<0||f>=1<<8*_)throw new Error("invalid I2OSP input: "+f);const T=Array.from({length:_}).fill(0);for(let w=_-1;w>=0;w--)T[w]=f&255,f>>>=8;return new Uint8Array(T)}function o(f,_){const T=new Uint8Array(f.length);for(let w=0;w<f.length;w++)T[w]=f[w]^_[w];return T}function s(f){if(!Number.isSafeInteger(f))throw new Error("number expected")}function i(f,_,T,w){(0,t.abytes)(f),(0,t.abytes)(_),s(T),_.length>255&&(_=w((0,t.concatBytes)((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-"),_)));const{outputLen:p,blockLen:B}=w,j=Math.ceil(T/p);if(T>65535||j>255)throw new Error("expand_message_xmd: invalid lenInBytes");const h=(0,t.concatBytes)(_,r(_.length,1)),P=r(0,B),a=r(T,2),v=new Array(j),b=w((0,t.concatBytes)(P,f,a,r(0,1),h));v[0]=w((0,t.concatBytes)(b,r(1,1),h));for(let A=1;A<=j;A++){const y=[o(b,v[A-1]),r(A+1,1),h];v[A]=w((0,t.concatBytes)(...y))}return(0,t.concatBytes)(...v).slice(0,T)}function c(f,_,T,w,p){if((0,t.abytes)(f),(0,t.abytes)(_),s(T),_.length>255){const B=Math.ceil(2*w/8);_=p.create({dkLen:B}).update((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(_).digest()}if(T>65535||_.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return p.create({dkLen:T}).update(f).update(r(T,2)).update(_).update(r(_.length,1)).digest()}function u(f,_,T){(0,t.validateObject)(T,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:w,k:p,m:B,hash:j,expand:h,DST:P}=T;(0,t.abytes)(f),s(_);const a=typeof P=="string"?(0,t.utf8ToBytes)(P):P,v=w.toString(2).length,b=Math.ceil((v+p)/8),m=_*B*b;let A;if(h==="xmd")A=i(f,a,m,j);else if(h==="xof")A=c(f,a,m,p,j);else if(h==="_internal_pass")A=f;else throw new Error('expand must be "xmd" or "xof"');const y=new Array(_);for(let E=0;E<_;E++){const x=new Array(B);for(let O=0;O<B;O++){const R=b*(O+E*B),k=A.subarray(R,R+b);x[O]=(0,e.mod)(n(k),w)}y[E]=x}return y}function d(f,_){const T=_.map(w=>Array.from(w).reverse());return(w,p)=>{const[B,j,h,P]=T.map(b=>b.reduce((m,A)=>f.add(f.mul(m,w),A))),[a,v]=(0,e.FpInvertBatch)(f,[j,P],!0);return w=f.mul(B,a),p=f.mul(p,f.mul(h,v)),{x:w,y:p}}}function l(f,_,T){if(typeof _!="function")throw new Error("mapToCurve() must be defined");function w(B){return f.fromAffine(_(B))}function p(B){const j=B.clearCofactor();return j.equals(f.ZERO)?f.ZERO:(j.assertValidity(),j)}return{defaults:T,hashToCurve(B,j){const h=u(B,2,{...T,DST:T.DST,...j}),P=w(h[0]),a=w(h[1]);return p(P.add(a))},encodeToCurve(B,j){const h=u(B,1,{...T,DST:T.encodeDST,...j});return p(w(h[0]))},mapToCurve(B){if(!Array.isArray(B))throw new Error("expected array of bigints");for(const j of B)if(typeof j!="bigint")throw new Error("expected array of bigints");return p(w(B))}}}return gr}var Hy;function Tv(){return Hy||(Hy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.secp256k1_hasher=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=jv(),n=Tr(),r=d5(),o=f5(),s=Cd(),i=rn(),c=Iv(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l=BigInt(0),f=BigInt(1),_=BigInt(2),T=(g,M)=>(g+M/_)/M;function w(g){const M=u,S=BigInt(3),I=BigInt(6),C=BigInt(11),q=BigInt(22),$=BigInt(23),L=BigInt(44),F=BigInt(88),U=g*g*g%M,z=U*U*g%M,Y=(0,s.pow2)(z,S,M)*z%M,W=(0,s.pow2)(Y,S,M)*z%M,V=(0,s.pow2)(W,_,M)*U%M,X=(0,s.pow2)(V,C,M)*V%M,ne=(0,s.pow2)(X,q,M)*X%M,K=(0,s.pow2)(ne,L,M)*ne%M,Z=(0,s.pow2)(K,F,M)*K%M,ee=(0,s.pow2)(Z,L,M)*ne%M,re=(0,s.pow2)(ee,S,M)*z%M,te=(0,s.pow2)(re,$,M)*X%M,Q=(0,s.pow2)(te,I,M)*U%M,J=(0,s.pow2)(Q,_,M);if(!p.eql(p.sqr(J),g))throw new Error("Cannot find square root");return J}const p=(0,s.Field)(u,void 0,void 0,{sqrt:w});e.secp256k1=(0,r.createCurve)({a:l,b:BigInt(7),Fp:p,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:g=>{const M=d,S=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),I=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),C=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),q=S,$=BigInt("0x100000000000000000000000000000000"),L=T(q*g,M),F=T(-I*g,M);let U=(0,s.mod)(g-L*S-F*C,M),z=(0,s.mod)(-L*I-F*q,M);const Y=U>$,W=z>$;if(Y&&(U=M-U),W&&(z=M-z),U>$||z>$)throw new Error("splitScalar: Endomorphism failed, k="+g);return{k1neg:Y,k1:U,k2neg:W,k2:z}}}},t.sha256);const B={};function j(g,...M){let S=B[g];if(S===void 0){const I=(0,t.sha256)(Uint8Array.from(g,C=>C.charCodeAt(0)));S=(0,i.concatBytes)(I,I),B[g]=S}return(0,t.sha256)((0,i.concatBytes)(S,...M))}const h=g=>g.toRawBytes(!0).slice(1),P=g=>(0,i.numberToBytesBE)(g,32),a=g=>(0,s.mod)(g,u),v=g=>(0,s.mod)(g,d),b=e.secp256k1.ProjectivePoint,m=(g,M,S)=>b.BASE.multiplyAndAddUnsafe(g,M,S);function A(g){let M=e.secp256k1.utils.normPrivateKeyToScalar(g),S=b.fromPrivateKey(M);return{scalar:S.hasEvenY()?M:v(-M),bytes:h(S)}}function y(g){(0,i.aInRange)("x",g,f,u);const M=a(g*g),S=a(M*g+BigInt(7));let I=w(S);I%_!==l&&(I=a(-I));const C=new b(g,I,f);return C.assertValidity(),C}const E=i.bytesToNumberBE;function x(...g){return v(E(j("BIP0340/challenge",...g)))}function O(g){return A(g).bytes}function R(g,M,S=(0,n.randomBytes)(32)){const I=(0,i.ensureBytes)("message",g),{bytes:C,scalar:q}=A(M),$=(0,i.ensureBytes)("auxRand",S,32),L=P(q^E(j("BIP0340/aux",$))),F=j("BIP0340/nonce",L,C,I),U=v(E(F));if(U===l)throw new Error("sign failed: k is zero");const{bytes:z,scalar:Y}=A(U),W=x(z,C,I),V=new Uint8Array(64);if(V.set(z,0),V.set(P(v(Y+W*q)),32),!k(V,I,C))throw new Error("sign: Invalid signature produced");return V}function k(g,M,S){const I=(0,i.ensureBytes)("signature",g,64),C=(0,i.ensureBytes)("message",M),q=(0,i.ensureBytes)("publicKey",S,32);try{const $=y(E(q)),L=E(I.subarray(0,32));if(!(0,i.inRange)(L,f,u))return!1;const F=E(I.subarray(32,64));if(!(0,i.inRange)(F,f,d))return!1;const U=x(P(L),h($),C),z=m($,F,v(-U));return!(!z||!z.hasEvenY()||z.toAffine().x!==L)}catch{return!1}}e.schnorr={getPublicKey:O,sign:R,verify:k,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:y,pointToBytes:h,numberToBytesBE:i.numberToBytesBE,bytesToNumberBE:i.bytesToNumberBE,taggedHash:j,mod:s.mod}};const N=(0,o.isogenyMap)(p,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a4
4713deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(g=>g.map(M=>BigInt(M)))),H=(0,c.mapToCurveSimpleSWU)(p,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:p.create(BigInt("-11"))});e.secp256k1_hasher=(0,o.createHasher)(e.secp256k1.ProjectivePoint,g=>{const{x:M,y:S}=H(p.create(g[0]));return N(M,S)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:p.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256}),e.hashToCurve=e.secp256k1_hasher.hashToCurve,e.encodeToCurve=e.secp256k1_hasher.encodeToCurve})(qf)),qf}var ky;function Bv(){if(ky)return me;ky=1,Object.defineProperty(me,"__esModule",{value:!0}),me.InvalidVError=me.InvalidYParityError=me.InvalidSError=me.InvalidRError=me.MissingPropertiesError=me.InvalidSerializedSizeError=void 0,me.assert=i,me.fromBytes=c,me.fromHex=u,me.extract=d,me.from=l,me.fromDerBytes=f,me.fromDerHex=_,me.fromLegacy=T,me.fromRpc=w,me.fromTuple=p,me.toBytes=B,me.toHex=j,me.toDerBytes=h,me.toDerHex=P,me.toLegacy=a,me.toRpc=v,me.toTuple=b,me.validate=m,me.vToYParity=A,me.yParityToV=y;const e=Tv(),t=Nt(),n=Pt(),r=Je(),o=yd(),s=B0();function i(H,g={}){const{recovered:M}=g;if(typeof H.r>"u")throw new x({signature:H});if(typeof H.s>"u")throw new x({signature:H});if(M&&typeof H.yParity>"u")throw new x({signature:H});if(H.r<0n||H.r>s.maxUint256)throw new O({value:H.r});if(H.s<0n||H.s>s.maxUint256)throw new R({value:H.s});if(typeof H.yParity=="number"&&H.yParity!==0&&H.yParity!==1)throw new k({value:H.yParity})}function c(H){return u(r.fromBytes(H))}function u(H){if(H.length!==130&&H.length!==132)throw new E({signature:H});const g=BigInt(r.slice(H,0,32)),M=BigInt(r.slice(H,32,64)),S=(()=>{const I=+`0x${H.slice(130)}`;if(!Number.isNaN(I))try{return A(I)}catch{throw new k({value:I})}})();return typeof S>"u"?{r:g,s:M}:{r:g,s:M,yParity:S}}function d(H){if(!(typeof H.r>"u")&&!(typeof H.s>"u"))return l(H)}function l(H){const g=typeof H=="string"?u(H):H instanceof Uint8Array?c(H):typeof H.r=="string"?w(H):H.v?T(H):{r:H.r,s:H.s,...typeof H.yParity<"u"?{yParity:H.yParity}:{}};return i(g),g}function f(H){return _(r.fromBytes(H))}function _(H){const{r:g,s:M}=e.secp256k1.Signature.fromDER(r.from(H).slice(2));return{r:g,s:M}}function T(H){return{r:H.r,s:H.s,yParity:A(H.v)}}function w(H){const g=(()=>{const M=H.v?Number(H.v):void 0;let S=H.yParity?Number(H.yParity):void 0;if(typeof M=="number"&&typeof S!="number"&&(S=A(M)),typeof S!="number")throw new k({value:H.yParity});return S})();return{r:BigInt(H.r),s:BigInt(H.s),yParity:g}}function p(H){const[g,M,S]=H;return l({r:M==="0x"?0n:BigInt(M),s:S==="0x"?0n:BigInt(S),yParity:g==="0x"?0:Number(g)})}function B(H){return t.fromHex(j(H))}function j(H){i(H);const g=H.r,M=H.s;return r.concat(r.fromNumber(g,{size:32}),r.fromNumber(M,{size:32}),typeof H.yParity=="number"?r.fromNumber(y(H.yParity),{size:1}):"0x")}function h(H){return new e.secp256k1.Signature(H.r,H.s).toDERRawBytes()}function P(H){return`0x${new e.secp256k1.Signature(H.r,H.s).toDERHex()}`}function a(H){return{r:H.r,s:H.s,v:y(H.yParity)}}function v(H){const{r:g,s:M,yParity:S}=H;return{r:r.fromNumber(g,{size:32}),s:r.fromNumber(M,{size:32}),yParity:S===0?"0x0":"0x1"}}function b(H){const{r:g,s:M,yParity:S}=H;return[S?"0x01":"0x",g===0n?"0x":r.trimLeft(r.fromNumber(g)),M===0n?"0x":r.trimLeft(r.fromNumber(M))]}function m(H,g={}){try{return i(H,g),!0}catch{return!1}}
47function A(H){if(H===0||H===27)return 0;if(H===1||H===28)return 1;if(H>=35)return H%2===0?1:0;throw new N({value:H})}function y(H){if(H===0)return 27;if(H===1)return 28;throw new k({value:H})}class E extends n.BaseError{constructor({signature:g}){super(`Value \`${g}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${r.size(r.from(g))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}me.InvalidSerializedSizeError=E;class x extends n.BaseError{constructor({signature:g}){super(`Signature \`${o.stringify(g)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}me.MissingPropertiesError=x;class O extends n.BaseError{constructor({value:g}){super(`Value \`${g}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}me.InvalidRError=O;class R extends n.BaseError{constructor({value:g}){super(`Value \`${g}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}me.InvalidSError=R;class k extends n.BaseError{constructor({value:g}){super(`Value \`${g}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}me.InvalidYParityError=k;class N extends n.BaseError{constructor({value:g}){super(`Value \`${g}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}return me.InvalidVError=N,me}var $y;function l5(){if($y)return dt;
47$y=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.from=o,dt.fromRpc=s,dt.fromRpcList=i,dt.fromTuple=c,dt.fromTupleList=u,dt.getSignPayload=d,dt.hash=l,dt.toRpc=f,dt.toRpcList=_,dt.toTuple=T,dt.toTupleList=w;const e=T0(),t=Je(),n=a5(),r=Bv();function o(p,B={}){return typeof p.chainId=="string"?s(p):{...p,...B.signature}}function s(p){const{address:B,chainId:j,nonce:h}=p,P=r.extract(p);return{address:B,chainId:Number(j),nonce:BigInt(h),...P}}function i(p){return p.map(s)}function c(p){const[B,j,h,P,a,v]=p;let b={address:j,chainId:B==="0x"?0:Number(B),nonce:h==="0x"?0n:BigInt(h)};return P&&a&&v&&(b={...b,...r.fromTuple([P,a,v])}),o(b)}function u(p){const B=[];for(const j of p)B.push(c(j));return B}function d(p){return l(p,{presign:!0})}function l(p,B={}){const{presign:j}=B;return e.keccak256(t.concat("0x05",n.fromHex(T(j?{address:p.address,chainId:p.chainId,nonce:p.nonce}:p))))}function f(p){const{address:B,chainId:j,nonce:h,...P}=p;return{address:B,chainId:t.fromNumber(j),nonce:t.fromNumber(h),...r.toRpc(P)}}function _(p){return p.map(f)}function T(p){const{address:B,chainId:j,nonce:h}=p,P=r.extract(p);return[j?t.fromNumber(j):"0x",B,h?t.fromNumber(h):"0x",...P?r.toTuple(P):[]]}function w(p){if(!p||p.length===0)return[];const B=[];for(const j of p)B.push(T(j));return B}return dt}var _t={},Kr={},Ny;function b5(){if(Ny)return Kr;
47Ny=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.extraEntropy=void 0,Kr.setExtraEntropy=e,Kr.extraEntropy=!1;function e(t){Kr.extraEntropy=t}return Kr}var Fy;function m5(){if(Fy)return _t;Fy=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.noble=void 0,_t.createKeyPair=i,_t.getPublicKey=c,_t.getSharedSecret=u,_t.randomPrivateKey=d,_t.recoverAddress=l,_t.recoverPublicKey=f,_t.sign=_,_t.verify=T;const e=Tv(),t=Od(),n=Nt(),r=Je(),o=b5(),s=Av();_t.noble=e.secp256k1;function i(w={}){const{as:p="Hex"}=w,B=d({as:p}),j=c({privateKey:B});return{privateKey:B,publicKey:j}}function c(w){const{privateKey:p}=w,B=e.secp256k1.ProjectivePoint.fromPrivateKey(r.from(p).slice(2));return s.from(B)}function u(w){const{as:p="Hex",privateKey:B,publicKey:j}=w,a=e.secp256k1.ProjectivePoint.fromHex(s.toHex(j).slice(2)).multiply(e.secp256k1.utils.normPrivateKeyToScalar(r.from(B).slice(2))).toRawBytes(!0);return p==="Hex"?r.fromBytes(a):a}function d(w={}){const{as:p="Hex"}=w,B=e.secp256k1.utils.randomPrivateKey();return p==="Hex"?r.fromBytes(B):B}function l(w){return t.fromPublicKey(f(w))}function f(w){const{payload:p,signature:B}=w,{r:j,s:h,yParity:P}=B,v=new e.secp256k1.Signature(BigInt(j),BigInt(h)).addRecoveryBit(P).recoverPublicKey(r.from(p).substring(2));return s.from(v)}function _(w){const{extraEntropy:p=o.extraEntropy,hash:B,payload:j,privateKey:h}=w,{r:P,s:a,recovery:v}=e.secp256k1.sign(n.from(j),n.from(h),{extraEntropy:typeof p=="boolean"?p:r.from(p).slice(2),lowS:!0,...B?{prehash:!0}:{}});return{r:P,s:a,yParity:v}}function T(w){const{address:p,hash:B,payload:j,publicKey:h,signature:P}=w;return p?t.isEqual(p,l({payload:j,signature:P})):e.secp256k1.verify(P,n.from(j),s.toBytes(h),...B?[{prehash:!0,lowS:!0}]:[])}return _t}var Ly;function h5(){return Ly||(Ly=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.suffixParameters=e.magicBytes=void 0,e.assert=c,e.from=u,e.unwrap=d,e.wrap=l,e.validate=f;const t=vo(),n=l5(),r=Pt(),o=Je(),s=m5(),i=Bv();e.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",e.suffixParameters=t.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function c(T){if(typeof T=="string"){if(o.slice(T,-32)!==e.magicBytes)throw new _(T)}else i.assert(T.authorization)}function u(T){return typeof T=="string"?d(T):T}function d(T){c(T);const w=o.toNumber(o.slice(T,-64,-32)),p=o.slice(T,-w-64,-64),B=o.slice(T,0,-w-64),[j,h,P]=t.decode(e.suffixParameters,p);return{authorization:n.from({address:j.delegation,chainId:Number(j.chainId),nonce:j.nonce,yParity:j.yParity,r:j.r,s:j.s}),signature:B,...P&&P!=="0x"?{data:P,to:h}:{}}}function l(T){const{data:w,signature:p}=T;c(T);const B=s.recoverAddress({payload:n.getSignPayload(T.authorization),signature:i.from(T.authorization)}),j=t.encode(e.suffixParameters,[{...T.authorization,delegation:T.authorization.address,chainId:BigInt(T.authorization.chainId)},T.to??B,w??"0x"]),h=o.fromNumber(o.size(j),{size:32});return o.concat(p,j,h,e.magicBytes)}function f(T){try{return c(T),!0}catch{return!1}}class _ extends r.BaseError{constructor(w){super(`Value \`${w}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=_})(Rf)),Rf}var Uy;function qd(){return Uy||(Uy=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.SignatureErc8010=void 0,Ni.SignatureErc8010=h5()),Ni}var zy;function x0(){if(zy)return Ya;zy=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.isErc8010Signature=t;const e=qd();function t(n){return e.SignatureErc8010.validate(n)}return Ya}var ac={},Dy;function xv(){if(Dy)return ac;Dy=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.parseErc6492Signature=n;const e=Er(),t=S0();function n(r){if(!(0,t.isErc6492Signature)(r))return{signature:r};const[o,s,i]=(0,e.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],r);return{address:o,data:s,signature:i}}return ac}var cc={}
47,Gy;function Rv(){if(Gy)return cc;Gy=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.parseErc8010Signature=r;const e=qd(),t=ie(),n=x0();function r(o){if(!(0,n.isErc8010Signature)(o))return{signature:o};const{authorization:s,to:i,...c}=e.SignatureErc8010.unwrap(o);return{authorization:{address:s.address,chainId:s.chainId,nonce:Number(s.nonce),r:(0,t.numberToHex)(s.r,{size:32}),s:(0,t.numberToHex)(s.s,{size:32}),yParity:s.yParity},...i?{address:i}:{},...c}}return cc}var uc={},Vy;function R0(){if(Vy)return uc;Vy=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.recoverMessageAddress=n;const e=go(),t=Ar();async function n({message:r,signature:o}){return(0,t.recoverAddress)({hash:(0,e.hashMessage)(r),signature:o})}return uc}var dc={},Wy;function O0(){if(Wy)return dc;Wy=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.recoverTypedDataAddress=n;const e=po(),t=Ar();async function n(r){const{domain:o,message:s,primaryType:i,signature:c,types:u}=r;return(0,t.recoverAddress)({hash:(0,e.hashTypedData)({domain:o,message:s,primaryType:i,types:u}),signature:c})}return dc}var fc={},Ky;function Ov(){if(Ky)return fc;Ky=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.serializeErc6492Signature=o;const e=A0(),t=Ct(),n=We(),r=Ae();function o(s){const{address:i,data:c,signature:u,to:d="hex"}=s,l=(0,n.concatHex)([(0,t.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[i,c,u]),e.erc6492MagicBytes]);return d==="hex"?l:(0,r.hexToBytes)(l)}return fc}var lc={},Zy;function Cv(){if(Zy)return lc;Zy=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.serializeErc8010Signature=n;const e=qd(),t=Ae();function n(r){const{address:o,data:s,signature:i,to:c="hex"}=r,u=e.SignatureErc8010.wrap({authorization:{address:r.authorization.address,chainId:r.authorization.chainId,nonce:BigInt(r.authorization.nonce),r:BigInt(r.authorization.r),s:BigInt(r.authorization.s),yParity:r.authorization.yParity},data:s,signature:i,to:o});return c==="hex"?u:(0,t.hexToBytes)(u)}return lc}var bc={},Yy;function qv(){if(Yy)return bc;Yy=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.verifyHash=r;const e=Et(),t=Mt(),n=Ar();async function r({address:o,hash:s,signature:i}){return(0,t.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverAddress)({hash:s,signature:i}))}return bc}var mc={},Jy;function Mv(){if(Jy)return mc;Jy=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.verifyMessage=r;const e=Et(),t=Mt(),n=R0();async function r({address:o,message:s,signature:i}){return(0,t.isAddressEqual)((0,e.getAddress)(o),await(0,n.recoverMessageAddress)({message:s,signature:i}))}return mc}var hc={},Xy;function Hv(){if(Xy)return hc;Xy=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.verifyTypedData=r;const e=Et(),t=Mt(),n=O0();async function r(o){const{address:s,domain:i,message:c,primaryType:u,signature:d,types:l}=o;return(0,t.isAddressEqual)((0,e.getAddress)(s),await(0,n.recoverTypedDataAddress)({domain:i,message:c,primaryType:u,signature:d,types:l}))}return hc}var yc={},Qy;function C0(){if(Qy)return yc;Qy=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.getSerializedTransactionType=r;const e=wt(),t=At(),n=Fe();function r(o){const s=(0,t.sliceHex)(o,0,1);if(s==="0x04")return"eip7702";if(s==="0x03")return"eip4844";if(s==="0x02")return"eip1559";if(s==="0x01")return"eip2930";if(s!=="0x"&&(0,n.hexToNumber)(s)>=192)return"legacy";throw new e.InvalidSerializedTransactionTypeError({serializedType:s})}return yc}var jn={},eg;function q0(){if(eg)return jn;eg=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.parseTransaction=_,jn.toTransactionArray=h,jn.parseAccessList=P;const e=Ot(),t=wt(),n=bt(),r=bd(),o=at(),s=_r(),i=ir(),c=Fe(),u=v0(),d=E0(),l=Ad(),f=C0();function _(b){const m=(0,f.getSerializedTransactionType)(b);return m==="eip1559"?p(b):m==="eip2930"?B(b):m==="eip4844"?w(b):m==="eip7702"?T(b):j(b)}function T(b){const m=h(b),[A,y,E,x,O,R,k,N,H,g,M,S,I]=m;if(m.length!==10&&m.length!==13)throw new t.InvalidSerializedTransactionError({attributes:{chainId:A,nonce:y,maxPriorityFeePerGas:E,maxFeePerGas:x,gas:O,to:R,value:k,data:N,accessList:H,authorizationList:g,...m.length>9?{v:M,r:S,s:I}:{}},serializedTransaction:b,type:"eip7702"});const C={chainId:(0,c.hexToNumber)(A),type:"eip7702"};return(0,o.isHex)(R)&&R!=="0x"&&(C.to=R),(0,o.isHex)(O)&&O!=="0x"&&(C.gas=(0,c.hexToBigInt)(O)),(0,o.isHex)(N)&&N!=="0x"&&(C.data=N),(0,o.isHex)(y)&&(C.nonce=y==="0x"?0:(0,c.hexToNumber)(y)),(0,o.isHex)(k)&&k!=="0x"&&(C.value=(0,c.hexToBigInt)(k)),(0,o.isHex)(x)&&x!=="0x"&&(C.maxFeePerGas=(0,c.hexToBigInt)(x)),(0,o.isHex)(E)&&E!=="0x"&&(C.maxPriorityFeePerGas=(0,c.hexToBigInt)(E)),H.length!==0&&H!=="0x"&&(C.accessList=P(H)),g.length!==0&&g!=="0x"&&(C.authorizationList=a(g)),(0,l.assertTransactionEIP7702)(C),{...m.length===13?v(m):void 0,...C}}function w(b){const m=h(b),A=m.length===4,y=A?m[0]:m,E=A?m.slice(1):[],[x,O,R,k,N,H,g,M,S,I,C,q,$,L]=y,[F,U,z]=E;if(!(y.length===11||y.length===14))throw new t.InvalidSerializedTransactionError({attributes:{chainId:x,nonce:O,maxPriorityFeePerGas:R,maxFeePerGas:k,gas:N,to:H,value:g,data:M,accessList:S,...y.length>9?{v:q,r:$,s:L}:{}},serializedTransaction:b,type:"eip4844"});const Y={blobVersionedHashes:C,chainId:(0,c.hexToNumber)(x),type:"eip4844"};return(0,o.isHex)(H)&&H!=="0x"&&(Y.to=H),(0,o.isHex)(N)&&N!=="0x"&&(Y.gas=(0,c.hexToBigInt)(N)),(0,o.isHex)(M)&&M!=="0x"&&(Y.data=M),(0,o.isHex)(O)&&(Y.nonce=O==="0x"?0:(0,c.hexToNumber)(O)),(0,o.isHex)(g)&&g!=="0x"&&(Y.value=(0,c.hexToBigInt)(g)),(0,o.isHex)(I)&&I!=="0x"&&(Y.maxFeePerBlobGas=(0,c.hexToBigInt)(I)),(0,o.isHex)(k)&&k!=="0x"&&(Y.maxFeePerGas=(0,c.hexToBigInt)(k)),(0,o.isHex)(R)&&R!=="0x"&&(Y.maxPriorityFeePerGas=(0,c.hexToBigInt)(R)),S.length!==0&&S!=="0x"&&(Y.accessList=P(S)),F&&U&&z&&(Y.sidecars=(0,r.toBlobSidecars)({blobs:F,commitments:U,proofs:z})),(0,l.assertTransactionEIP4844)(Y),{...y.length===14?v(y):void 0,...Y}}function p(b){const m=h(b),[A,y,E,x,O,R,k,N,H,g,M,S]=m;if(!(m.length===9||m.length===12))throw new t.InvalidSerializedTransactionError({attributes:{chainId:A,nonce:y,maxPriorityFeePerGas:E,maxFeePerGas:x,gas:O,to:R,value:k,data:N,accessList:H,...m.length>9?{v:g,r:M,s:S}:{}},serializedTransaction:b,type:"eip1559"});const I={chainId:(0,c.hexToNumber)(A),type:"eip1559"};return(0,o.isHex)(R)&&R!=="0x"&&(I.to=R),(0,o.isHex)(O)&&O!=="0x"&&(I.gas=(0,c.hexToBigInt)(O)),(0,o.isHex)(N)&&N!=="0x"&&(I.data=N),(0,o.isHex)(y)&&(I.nonce=y==="0x"?0:(0,c.hexToNumber)(y)),(0,o.isHex)(k)&&k!=="0x"&&(I.value=(0,c.hexToBigInt)(k)),(0,o.isHex)(x)&&x!=="0x"&&(I.maxFeePerGas=(0,c.hexToBigInt)(x)),(0,o.isHex)(E)&&E!=="0x"&&(I.maxPriorityFeePerGas=(0,c.hexToBigInt)(E)),H.length!==0&&H!=="0x"&&(I.accessList=P(H)),(0,l.assertTransactionEIP1559)(I),{...m.length===12?v(m):void 0,...I}}function B(b){const m=h(b),[A,y,E,x,O,R,k,N,H,g,M]=m;if(!(m.length===8||m.length===11))throw new t.InvalidSerializedTransactionError({attributes:{chainId:A,nonce:y,gasPrice:E,gas:x,to:O,value:R,data:k,accessList:N,...m.length>8?{v:H,r:g,s:M}:{}},serializedTransaction:b,type:"eip2930"});const S={chainId:(0,c.hexToNumber)(A),type:"eip2930"};return(0,o.isHex)(O)&&O!=="0x"&&(S.to=O),(0,o.isHex)(x)&&x!=="0x"&&(S.gas=(0,c.hexToBigInt)(x)),(0,o.isHex)(k)&&k!=="0x"&&(S.data=k),(0,o.isHex)(y)&&(S.nonce=y==="0x"?0:(0,c.hexToNumber)(y)),(0,o.isHex)(R)&&R!=="0x"&&(S.value=(0,c.hexToBigInt)(R)),(0,o.isHex)(E)&&E!=="0x"&&(S.gasPrice=(0,c.hexToBigInt)(E)),N.length!==0&&N!=="0x"&&(S.accessList=P(N)),(0,l.assertTransactionEIP2930)(S),{...m.length===11?v(m):void 0,...S}}function j(b){const m=(0,u.fromRlp)(b,"hex"),[A,y,E,x,O,R,k,N,H]=m;if(!(m.length===6||m.length===9))throw new t.InvalidSerializedTransactionError({attributes:{nonce:A,gasPrice:y,gas:E,to:x,value:O,data:R,...m.length>6?{v:k,r:N,s:H}:{}},serializedTransaction:b,type:"legacy"});const g={type:"legacy"};
47if((0,o.isHex)(x)&&x!=="0x"&&(g.to=x),(0,o.isHex)(E)&&E!=="0x"&&(g.gas=(0,c.hexToBigInt)(E)),(0,o.isHex)(R)&&R!=="0x"&&(g.data=R),(0,o.isHex)(A)&&(g.nonce=A==="0x"?0:(0,c.hexToNumber)(A)),(0,o.isHex)(O)&&O!=="0x"&&(g.value=(0,c.hexToBigInt)(O)),(0,o.isHex)(y)&&y!=="0x"&&(g.gasPrice=(0,c.hexToBigInt)(y)),(0,l.assertTransactionLegacy)(g),m.length===6)return g;const M=(0,o.isHex)(k)&&k!=="0x"?(0,c.hexToBigInt)(k):0n;if(H==="0x"&&N==="0x")return M>0&&(g.chainId=Number(M)),g;const S=M,I=Number((S-35n)/2n);if(I>0)g.chainId=I;else if(S!==27n&&S!==28n)throw new t.InvalidLegacyVError({v:S});return g.v=S,g.s=H,g.r=N,g.yParity=S%2n===0n?1:0,g}function h(b){return(0,u.fromRlp)(`0x${b.slice(4)}`,"hex")}function P(b){const m=[];for(let A=0;A<b.length;A++){const[y,E]=b[A];if(!(0,n.isAddress)(y,{strict:!1}))throw new e.InvalidAddressError({address:y});m.push({address:y,storageKeys:E.map(x=>(0,d.isHash)(x)?x:(0,i.trim)(x))})}return m}function a(b){const m=[];for(let A=0;A<b.length;A++){const[y,E,x,O,R,k]=b[A];m.push({address:E,chainId:y==="0x"?0:(0,c.hexToNumber)(y),nonce:x==="0x"?0:(0,c.hexToNumber)(x),...v([O,R,k])})}return m}function v(b){const m=b.slice(-3),A=m[0]==="0x"||(0,c.hexToBigInt)(m[0])===0n?27n:28n;return{r:(0,s.padHex)(m[1],{size:32}),s:(0,s.padHex)(m[2],{size:32}),v:A,yParity:A===27n?0:1}}return jn}var gc={},pc={},Wi={},tg;function kv(){if(tg)return Wi;tg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.InvalidDecimalNumberError=void 0;const e=ue();class t extends e.BaseError{constructor({value:r}){super(`Number \`${r}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}return Wi.InvalidDecimalNumberError=t,Wi}var rg;function Md(){if(rg)return pc;rg=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.parseUnits=t;const e=kv();function t(n,r){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new e.InvalidDecimalNumberError({value:n});let[o,s="0"]=n.split(".");const i=o.startsWith("-");if(i&&(o=o.slice(1)),s=s.replace(/(0+)$/,""),r===0)Math.round(+`.${s}`)===1&&(o=`${BigInt(o)+1n}`),s="";else if(s.length>r){const[c,u,d]=[s.slice(0,r-1),s.slice(r-1,r),s.slice(r)],l=Math.round(+`${u}.${d}`);l>9?s=`${BigInt(c)+BigInt(1)}0`.padStart(c.length+1,"0"):s=`${c}${l}`,s.length>r&&(s=s.slice(1),o=`${BigInt(o)+1n}`),s=s.slice(0,r)}else s=s.padEnd(r,"0");return BigInt(`${i?"-":""}${o}${s}`)}return pc}var ng;function $v(){if(ng)return gc;ng=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.parseEther=n;const e=to(),t=Md();function n(r,o="wei"){return(0,t.parseUnits)(r,e.etherUnits[o])}return gc}var _c={},ig;function Nv(){if(ig)return _c;ig=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.parseGwei=n;const e=to(),t=Md();function n(r,o="wei"){return(0,t.parseUnits)(r,e.gweiUnits[o])}return _c}var og;function Fv(){return og||(og=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.buildRequest=e.verifyAuthorization=e.serializeAuthorizationList=e.recoverAuthorizationAddress=e.hashAuthorization=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.parseEventLogs=e.getAbiItem=e.formatAbiItemWithArgs=e.formatAbiParams=e.formatAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.publicKeyToAddress=e.parseAccount=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=void 0,e.ripemd160=e.keccak256=e.isHash=e.getAction=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.defineFormatter=e.extract=e.formatBlock=e.defineBlock=e.getTransactionError=e.getNodeError=e.containsNodeError=e.getEstimateGasError=e.getContractError=e.getCallError=e.toRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=void 0,e.validateTypedData=e.serializeTypedData=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.serializeErc8010Signature=e.serializeErc6492Signature=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseErc8010Signature=e.parseErc6492Signature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashMessage=e.getWebSocketRpcClient=e.socketClientCache=e.getSocketRpcClient=e.getHttpRpcClient=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.nonceManager=e.createNonceManager=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=void 0;var t=Qu();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return t.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return t.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return t.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return t.parseAbiParameters}});var n=ze();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return n.parseAccount}});var r=v_();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return r.publicKeyToAddress}});var o=Er();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return o.decodeAbiParameters}});var s=id();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return s.decodeErrorResult}});var i=uo();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return i.decodeEventLog}});var c=a0();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return c.decodeFunctionData}});var u=dr();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return u.decodeFunctionResult}});var d=Ct();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return d.encodeAbiParameters}});var l=mo();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return l.encodeDeployData}});var f=c0();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return f.encodeErrorResult}});var _=en();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return _.encodeEventTopics}});var T=mt();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return T.encodeFunctionData}});var w=u0();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return w.encodeFunctionResult}});var p=X_();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return p.encodePacked}});var B=nr();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return B.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return B.formatAbiParams}});var j=__();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return j.formatAbiItemWithArgs}});var h=or();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return h.getAbiItem}});var P=fo();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return P.parseEventLogs}});var a=Et();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return a.getAddress}});var v=Q_();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return v.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return v.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return v.getCreateAddress}});var b=bt();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return b.isAddress}});var m=Mt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return m.isAddressEqual}});var A=j_();Object.defineProperty(e,"hashAuthorization",{enumerable:!0,get:function(){return A.hashAuthorization}});var y=ad();Object.defineProperty(e,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return y.recoverAuthorizationAddress}});var E=ev();Object.defineProperty(e,"serializeAuthorizationList",{enumerable:!0,get:function(){return E.serializeAuthorizationList}});var x=tv();Object.defineProperty(e,"verifyAuthorization",{enumerable:!0,get:function(){return x.verifyAuthorization}});var O=rv();Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return O.buildRequest}});var R=d0();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return R.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return R.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return R.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return R.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return R.offchainLookupSignature}});var k=vd();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return k.assertCurrentChain}});var N=nv();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return N.defineChain}});var H=iv();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return H.extractChain}});var g=Ir();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return g.getChainContractAddress}});var M=We();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return M.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return M.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return M.concatHex}});var S=p0();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return S.isBytes}});var I=at();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return I.isHex}});var C=_r();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return C.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return C.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return C.padHex}});var q=ft();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return q.size}});var $=At();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return $.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return $.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return $.sliceHex}});
47var L=ir();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return L.trim}});var F=Df();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return F.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return F.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return F.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return F.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return F.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return F.fromBytes}});var U=Fe();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return U.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return U.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return U.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return U.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return U.hexToString}});var z=v0();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return z.fromRlp}});var Y=Ae();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Y.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Y.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Y.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Y.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Y.toBytes}});var W=ie();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return W.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return W.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return W.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return W.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return W.toHex}});var V=oo();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return V.toRlp}});var X=i0();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return X.getCallError}});var ne=jr();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return ne.getContractError}});var K=S_();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return K.getEstimateGasError}});var Z=so();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return Z.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return Z.getNodeError}});var ee=l0();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return ee.getTransactionError}});var re=ud();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return re.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return re.formatBlock}});var te=qn();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return te.extract}});var Q=ao();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return Q.defineFormatter}});var J=ur();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return J.formatLog}});var de=co();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return de.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return de.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return de.transactionType}});var Se=Pd();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return Se.defineTransactionReceipt}});var he=ar();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return he.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return he.formatTransactionRequest}});var le=ve();Object.defineProperty(e,"getAction",{enumerable:!0,get:function(){return le.getAction}});var Ee=E0();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return Ee.isHash}});var pe=lt();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return pe.keccak256}});var Le=ov();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Le.ripemd160}});var He=Xf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return He.sha256}});var De=sv();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return De.toEventHash}});var Xe=Cn();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return Xe.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return Xe.toEventSelector}});var Ge=av();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return Ge.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return Ge.toEventSignature}});var ke=cv();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return ke.toFunctionHash}});var Be=Qr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return Be.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return Be.toFunctionSelector}});var Qe=uv();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return Qe.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return Qe.toFunctionSignature}});var Ve=dv();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return Ve.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return Ve.nonceManager}});var Fn=rd();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return Fn.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return Fn.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return Fn.integerRegex}});var wo=bv();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return wo.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return wo.rpc}});var Br=P0();Object.defineProperty(e,"getHttpRpcClient",{enumerable:!0,get:function(){return Br.getHttpRpcClient}});var Po=lv();Object.defineProperty(e,"getSocketRpcClient",{enumerable:!0,get:function(){return Po.get
47SocketRpcClient}}),Object.defineProperty(e,"socketClientCache",{enumerable:!0,get:function(){return Po.socketClientCache}});var kd=j0();Object.defineProperty(e,"getWebSocketRpcClient",{enumerable:!0,get:function(){return kd.getWebSocketRpcClient}});var $d=go();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return $d.hashMessage}});var jo=po();Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return jo.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return jo.hashTypedData}});var Ln=S0();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return Ln.isErc6492Signature}});var Nd=x0();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return Nd.isErc8010Signature}});var Fd=xv();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return Fd.parseErc6492Signature}});var Un=Rv();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return Un.parseErc8010Signature}});var Ld=Ar();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return Ld.recoverAddress}});var zn=R0();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return zn.recoverMessageAddress}});var Ud=Wf();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return Ud.recoverPublicKey}});var xr=O0();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return xr.recoverTypedDataAddress}});var Rr=Ov();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return Rr.serializeErc6492Signature}});var zd=Cv();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return zd.serializeErc8010Signature}});var Or=qv();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return Or.verifyHash}});var Cr=Mv();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return Cr.verifyMessage}});var Dn=Hv();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return Dn.verifyTypedData}});var Dd=Ye();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return Dd.stringify}});var Gd=cr();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return Gd.assertRequest}});var Gn=Ad();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Gn.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Gn.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return Gn.assertTransactionLegacy}});var Vd=C0();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return Vd.getSerializedTransactionType}});var Ao=md();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return Ao.getTransactionType}});var Wd=q0();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return Wd.parseTransaction}});var Vn=_0();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return Vn.serializeAccessList}});var So=Sd();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return So.serializeTransaction}});var sn=Id();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return sn.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return sn.validateTypedData}});var Kd=ro();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return Kd.formatEther}});var Zd=tn();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return Zd.formatGwei}});var Yd=od();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return Yd.formatUnits}});var Jd=$v();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return Jd.parseEther}});var Xd=Nv();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return Xd.parseGwei}});var Io=Md();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return Io.parseUnits}})})(jf)),jf}var sg;function y5(){if(sg)return Ca;sg=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.formatProof=n;const e=Fv();function t(r){return r.map(o=>({...o,value:BigInt(o.value)}))}function n(r){return{...r,balance:r.balance?BigInt(r.balance):void 0,nonce:r.nonce?(0,e.hexToNumber)(r.nonce):void 0,storageProof:r.storageProof?t(r.storageProof):void 0}}return Ca}var ag;function g5(){if(ag)return Oa;ag=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.getProof=n;const e=ie(),t=y5();async function n(r,{address:o,blockNumber:s,blockTag:i,storageKeys:c}){const u=i??"latest",d=s!==void 0?(0,e.numberToHex)(s):void 0,l=await r.request({method:"eth_getProof",params:[o,c,d||u]});return(0,t.formatProof)(l)}return Oa}var vc={},cg;function p5(){if(cg)return vc;cg=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.getStorageAt=t;const e=ie();async function t(n,{address:r,blockNumber:o,blockTag:s="latest",slot:i}){const c=o!==void 0?(0,e.numberToHex)(o):void 0;return await n.request({method:"eth_getStorageAt",params:[r,i,c||s]})}return vc}var Ec={},ug;function M0(){if(ug)return Ec;ug=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.getTransaction=r;const e=wt(),t=ie(),n=co();async function r(o,{blockHash:s,blockNumber:i,blockTag:c,hash:u,index:d}){var w,p,B;const l=c||"latest",f=i!==void 0?(0,t.numberToHex)(i):void 0;let _=null;if(u?_=await o.request({method:"eth_getTransactionByHash",params:[u]},{dedupe:!0}):s?_=await o.request({method:"eth_getTransactionByBlockHashAndIndex",params:[s,(0,t.numberToHex)(d)]},{dedupe:!0}):_=await o.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||l,(0,t.numberToHex)(d)]},{dedupe:!!f}),!_)throw new e.TransactionNotFoundError({blockHash:s,blockNumber:i,blockTag:l,hash:u,index:d});return(((B=(p=(w=o.chain)==null?void 0:w.formatters)==null?void 0:p.transaction)==null?void 0:B.format)||n.formatTransaction)(_)}return Ec}var wc={},dg;function _5(){if(dg)return wc;dg=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.getTransactionConfirmations=r;const e=ve(),t=yo(),n=M0();async function r(o,{hash:s,transactionReceipt:i}){const[c,u]=await Promise.all([(0,e.getAction)(o,t.getBlockNumber,"getBlockNumber")({}),s?(0,e.getAction)(o,n.getTransaction,"getTransaction")({hash:s}):void 0]),d=(i==null?void 0:i.blockNumber)||(u==null?void 0:u.blockNumber);return d?c-d+1n:0n}return wc}var Pc={},fg;function Lv(){if(fg)return Pc;fg=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.getTransactionReceipt=n;const e=wt(),t=Pd();async function n(r,{hash:o}){var c,u,d;const s=await r.request({method:"eth_getTransactionReceipt",params:[o]},{dedupe:!0});if(!s)throw new e.TransactionReceiptNotFoundError({hash:o});return(((d=(u=(c=r.chain)==null?void 0:c.formatters)==null?void 0:u.transactionReceipt)==null?void 0:d.format)||t.formatTransactionReceipt)(s)}return Pc}var jc={},lg;function v5(){if(lg)return jc;lg=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.multicall=f;const e=Sr(),t=lo(),n=Ce(),r=ue(),o=wr(),s=dr(),i=mt(),c=Ir(),u=jr(),d=ve(),l=Ft();async function f(_,T){var k;const{account:w,authorizationList:p,allowFailure:B=!0,blockNumber:j,blockOverrides:h,blockTag:P,stateOverride:a}=T,v=T.contracts,{batchSize:b=T.batchSize??1024,deployless:m=T.deployless??!1}=typeof((k=_.batch)==null?void 0:k.multicall)=="object"?_.batch.multicall:{},A=(()=>
47{if(T.multicallAddress)return T.multicallAddress;if(m)return null;if(_.chain)return(0,c.getChainContractAddress)({blockNumber:j,chain:_.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),y=[[]];let E=0,x=0;for(let N=0;N<v.length;N++){const{abi:H,address:g,args:M,functionName:S}=v[N];try{const I=(0,i.encodeFunctionData)({abi:H,args:M,functionName:S});x+=(I.length-2)/2,b>0&&x>b&&y[E].length>0&&(E++,x=(I.length-2)/2,y[E]=[]),y[E]=[...y[E],{allowFailure:!0,callData:I,target:g}]}catch(I){const C=(0,u.getContractError)(I,{abi:H,address:g,args:M,docsPath:"/docs/contract/multicall",functionName:S,sender:w});if(!B)throw C;y[E]=[...y[E],{allowFailure:!0,callData:"0x",target:g}]}}const O=await Promise.allSettled(y.map(N=>(0,d.getAction)(_,l.readContract,"readContract")({...A===null?{code:t.multicall3Bytecode}:{address:A},abi:e.multicall3Abi,account:w,args:[N],authorizationList:p,blockNumber:j,blockOverrides:h,blockTag:P,functionName:"aggregate3",stateOverride:a}))),R=[];for(let N=0;N<O.length;N++){const H=O[N];if(H.status==="rejected"){if(!B)throw H.reason;for(let M=0;M<y[N].length;M++)R.push({status:"failure",error:H.reason,result:void 0});continue}const g=H.value;for(let M=0;M<g.length;M++){const{returnData:S,success:I}=g[M],{callData:C}=y[N][M],{abi:q,address:$,functionName:L,args:F}=v[R.length];try{if(C==="0x")throw new n.AbiDecodingZeroDataError;if(!I)throw new o.RawContractError({data:S});const U=(0,s.decodeFunctionResult)({abi:q,args:F,data:S,functionName:L});R.push(B?{result:U,status:"success"}:U)}catch(U){const z=(0,u.getContractError)(U,{abi:q,address:$,args:F,docsPath:"/docs/contract/multicall",functionName:L});if(!B)throw z;R.push({error:z,result:void 0,status:"failure"})}}}if(R.length!==v.length)throw new r.BaseError("multicall results mismatch");return R}return jc}var Ac={},bg;function Uv(){if(bg)return Ac;bg=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.simulateBlocks=B;const e=M_(),t=ze(),n=Ce(),r=wr(),o=sr(),s=dr(),i=mt(),c=We(),u=ie(),d=jr(),l=so(),f=ud(),_=ur(),T=ar(),w=Kf(),p=cr();async function B(j,h){const{blockNumber:P,blockTag:a=j.experimental_blockTag??"latest",blocks:v,returnFullTransactions:b,traceTransfers:m,validation:A}=h;try{const y=[];for(const R of v){const k=R.blockOverrides?e.toRpc(R.blockOverrides):void 0,N=R.calls.map(g=>{const M=g,S=M.account?(0,t.parseAccount)(M.account):void 0,I=M.abi?(0,i.encodeFunctionData)(M):M.data,C={...M,data:M.dataSuffix?(0,c.concat)([I||"0x",M.dataSuffix]):I,from:M.from??(S==null?void 0:S.address)};return(0,p.assertRequest)(C),(0,T.formatTransactionRequest)(C)}),H=R.stateOverrides?(0,w.serializeStateOverride)(R.stateOverrides):void 0;y.push({blockOverrides:k,calls:N,stateOverrides:H})}const x=(typeof P=="bigint"?(0,u.numberToHex)(P):void 0)||a;return(await j.request({method:"eth_simulateV1",params:[{blockStateCalls:y,returnFullTransactions:b,traceTransfers:m,validation:A},x]})).map((R,k)=>({...(0,f.formatBlock)(R),calls:R.calls.map((N,H)=>{var z,Y;const{abi:g,args:M,functionName:S,to:I}=v[k].calls[H],C=((z=N.error)==null?void 0:z.data)??N.returnData,q=BigInt(N.gasUsed),$=(Y=N.logs)==null?void 0:Y.map(W=>(0,_.formatLog)(W)),L=N.status==="0x1"?"success":"failure",F=g&&L==="success"&&C!=="0x"?(0,s.decodeFunctionResult)({abi:g,data:C,functionName:S}):null,U=(()=>{var V;if(L==="success")return;let W;if(((V=N.error)==null?void 0:V.data)==="0x"?W=new n.AbiDecodingZeroDataError:N.error&&(W=new r.RawContractError(N.error)),!!W)return(0,d.getContractError)(W,{abi:g??[],address:I??"0x",args:M,functionName:S??"<unknown>"})})();return{data:C,gasUsed:q,logs:$,status:L,...L==="success"?{result:F}:{error:U}}})}))}catch(y){const E=y,x=(0,l.getNodeError)(E,{});throw x instanceof o.UnknownNodeError?E:x}}return Ac}var Sc={},pr={},st={},An={},mg;function E5(){if(mg)return An;mg=1,Object.defineProperty(An,"__esModule",{value:!0}),An.normalizeSignature=n,An.isArgOfType=r,An.getAmbiguousTypes=o;const e=Od(),t=Pt();function n(s){let i=!0,c="",u=0,d="",l=!1;for(let f=0;f<s.length;f++){const _=s[f];if(["(",")",","].includes(_)&&(i=!0),_==="("&&u++,_===")"&&u--,!!i){if(u===0){if(_===" "&&["event","function","error",""].includes(d))d="";else if(d+=_,_===")"){l=!0;break}continue}if(_===" "){s[f-1]!==","&&c!==","&&c!==",("&&(c="",i=!1);continue}d+=_,c+=_}}if(!l)throw new t.BaseError("Unable to normalize signature.");return d}function r(s,i){const c=typeof s,u=i.type;switch(u){case"address":return e.validate(s,{strict:!1});case"bool":return c==="boolean";
47case"function":return c==="string";case"string":return c==="string";default:return u==="tuple"&&"components"in i?Object.values(i.components).every((d,l)=>r(Object.values(s)[l],d)):/^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)?$/.test(u)?c==="number"||c==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(u)?c==="string"||s instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(u)?Array.isArray(s)&&s.every(d=>r(d,{...i,type:u.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function o(s,i,c){for(const u in s){const d=s[u],l=i[u];if(d.type==="tuple"&&l.type==="tuple"&&"components"in d&&"components"in l)return o(d.components,l.components,c[u]);const f=[d.type,l.type];if(f.includes("address")&&f.includes("bytes20")?!0:f.includes("address")&&f.includes("string")?e.validate(c[u],{strict:!1}):f.includes("address")&&f.includes("bytes")?e.validate(c[u],{strict:!1}):!1)return f}}return An}var hg;function zv(){if(hg)return st;hg=1,Object.defineProperty(st,"__esModule",{value:!0}),st.InvalidSelectorSizeError=st.NotFoundError=st.AmbiguityError=void 0,st.format=s,st.from=i,st.fromAbi=c,st.getSelector=u,st.getSignature=d,st.getSignatureHash=l;const e=Rd(),t=Pt(),n=T0(),r=Je(),o=E5();function s(w){return e.formatAbiItem(w)}function i(w,p={}){const{prepare:B=!0}=p,j=Array.isArray(w)||typeof w=="string"?e.parseAbiItem(w):w;return{...j,...B?{hash:l(j)}:{}}}function c(w,p,B){const{args:j=[],prepare:h=!0}=B??{},P=r.validate(p,{strict:!1}),a=w.filter(m=>P?m.type==="function"||m.type==="error"?u(m)===r.slice(p,0,4):m.type==="event"?l(m)===p:!1:"name"in m&&m.name===p);if(a.length===0)throw new _({name:p});if(a.length===1)return{...a[0],...h?{hash:l(a[0])}:{}};let v;for(const m of a){if(!("inputs"in m))continue;if(!j||j.length===0){if(!m.inputs||m.inputs.length===0)return{...m,...h?{hash:l(m)}:{}};continue}if(!m.inputs||m.inputs.length===0||m.inputs.length!==j.length)continue;if(j.every((y,E)=>{const x="inputs"in m&&m.inputs[E];return x?o.isArgOfType(y,x):!1})){if(v&&"inputs"in v&&v.inputs){const y=o.getAmbiguousTypes(m.inputs,v.inputs,j);if(y)throw new f({abiItem:m,type:y[0]},{abiItem:v,type:y[1]})}v=m}}const b=(()=>{if(v)return v;const[m,...A]=a;return{...m,overloads:A}})();if(!b)throw new _({name:p});return{...b,...h?{hash:l(b)}:{}}}function u(...w){const p=(()=>
47{if(Array.isArray(w[0])){const[B,j]=w;return c(B,j)}return w[0]})();return r.slice(l(p),0,4)}function d(...w){const p=(()=>{if(Array.isArray(w[0])){const[j,h]=w;return c(j,h)}return w[0]})(),B=typeof p=="string"?p:e.formatAbiItem(p);return o.normalizeSignature(B)}function l(...w){const p=(()=>{if(Array.isArray(w[0])){const[B,j]=w;return c(B,j)}return w[0]})();return typeof p!="string"&&"hash"in p&&p.hash?p.hash:n.keccak256(r.fromString(d(p)))}class f extends t.BaseError{constructor(p,B){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${p.type}\` in \`${o.normalizeSignature(e.formatAbiItem(p.abiItem))}\`, and`,`\`${B.type}\` in \`${o.normalizeSignature(e.formatAbiItem(B.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}st.AmbiguityError=f;class _ extends t.BaseError{constructor({name:p,data:B,type:j="item"}){const h=p?` with name "${p}"`:B?` with data "${B}"`:"";super(`ABI ${j}${h} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}st.NotFoundError=_;class T extends t.BaseError{constructor({data:p}){super(`Selector size is invalid. Expected 4 bytes. Received ${r.size(p)} bytes ("${p}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}return st.InvalidSelectorSizeError=T,st}var yg;function w5(){if(yg)return pr;yg=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.decode=o,pr.encode=s,pr.format=i,pr.from=c,pr.fromAbi=u;const e=Rd(),t=zv(),n=vo(),r=Je();function o(...d){const[l,f]=(()=>{if(Array.isArray(d[0])){const[w,p]=d;return[u(w),p]}return d})(),{bytecode:_}=f;if(l.inputs.length===0)return;const T=f.data.replace(_,"0x");return n.decode(l.inputs,T)}function s(...d){var w;const[l,f]=(()=>{if(Array.isArray(d[0])){const[p,B]=d;return[u(p),B]}return d})(),{bytecode:_,args:T}=f;return r.concat(_,(w=l.inputs)!=null&&w.length&&(T!=null&&T.length)?n.encode(l.inputs,T):"0x")}function i(d){return e.formatAbiItem(d)}function c(d){return t.from(d)}function u(d){const l=d.find(f=>f.type==="constructor");if(!l)throw new t.NotFoundError({name:"constructor"});return l}return pr}var Rt={},gg;function P5(){if(gg)return Rt;
47gg=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.decodeData=o,Rt.decodeResult=s,Rt.encodeData=i,Rt.encodeResult=c,Rt.format=u,Rt.from=d,Rt.fromAbi=l,Rt.getSelector=f;const e=Rd(),t=zv(),n=vo(),r=Je();function o(..._){const[T,w]=(()=>{if(Array.isArray(_[0])){const[j,h,P]=_;return[l(j,h),P]}return _})(),{overloads:p}=T;if(r.size(w)<4)throw new t.InvalidSelectorSizeError({data:w});if(T.inputs.length===0)return;const B=p?l([T,...p],w):T;if(!(r.size(w)<=4))return n.decode(B.inputs,r.slice(w,4))}function s(..._){const[T,w,p={}]=(()=>{if(Array.isArray(_[0])){const[j,h,P,a]=_;return[l(j,h),P,a]}return _})(),B=n.decode(T.outputs,w,p);if(!(B&&Object.keys(B).length===0))return B&&Object.keys(B).length===1?Array.isArray(B)?B[0]:Object.values(B)[0]:B}function i(..._){const[T,w=[]]=(()=>{if(Array.isArray(_[0])){const[v,b,m]=_;return[l(v,b,{args:m}),m]}const[P,a]=_;return[P,a]})(),{overloads:p}=T,B=p?l([T,...p],T.name,{args:w}):T,j=f(B),h=w.length>0?n.encode(B.inputs,w):void 0;return h?r.concat(j,h):j}function c(..._){const[T,w,p={}]=(()=>{if(Array.isArray(_[0])){const[h,P,a,v]=_;return[l(h,P),a,v]}return _})(),{as:B="Array"}=p,j=T.outputs.length===1?[w]:Array.isArray(w)?w:B==="Object"?Object.values(w):[w];return n.encode(T.outputs,j)}function u(_){return e.formatAbiItem(_)}function d(_,T={}){return t.from(_,T)}function l(_,T,w){const p=t.fromAbi(_,T,w);if(p.type!=="function")throw new t.NotFoundError({name:T,type:"function"});return p}function f(_){return t.getSelector(_)}return Rt}var vt={},pg;function Dv(){return pg||(pg=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.zeroAddress=vt.ethAddress=vt.entryPoint08Address=vt.entryPoint07Address=vt.entryPoint06Address=void 0,vt.entryPoint06Address="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",vt.entryPoint07Address="0x0000000071727De22E5E9d8BAf0edAc6f37da032",vt.entryPoint08Address="0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",vt.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",vt.zeroAddress="0x0000000000000000000000000000000000000000"),vt}var _g;function j5(){if(_g)return Sc;_g=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.simulateCalls=f;const e=w5(),t=P5(),n=ze(),r=Dv(),o=lo(),s=ue(),i=mt(),c=Fv(),u=K_(),d=Uv(),l="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function f(_,T){const{blockNumber:w,blockTag:p,calls:B,stateOverrides:j,traceAssetChanges:h,traceTransfers:P,validation:a}=T,v=T.account?(0,n.parseAccount)(T.account):void 0;if(h&&!v)throw new s.BaseError("`account` is required when `traceAssetChanges` is true");const b=v?e.encode(e.from("constructor(bytes, bytes)"),{bytecode:o.deploylessCallViaBytecodeBytecode,args:[l,t.encodeData(t.from("function getBalance(address)"),[v.address])]}):void 0,m=h?await Promise.all(T.calls.map(async V=>{if(!V.data&&!V.abi)return;const{accessList:X}=await(0,u.createAccessList)(_,{account:v.address,...V,data:V.abi?(0,i.encodeFunctionData)(V):V.data});return X.map(({address:ne,storageKeys:K})=>K.length>0?ne:null)})).then(V=>V.flat().filter(Boolean)):[],A=await(0,d.simulateBlocks)(_,{blockNumber:w,blockTag:p,blocks:[...h?[{calls:[{data:b}],stateOverrides:j},{calls:m.map((V,X)=>({abi:[t.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:V,from:r.zeroAddress,nonce:X})),stateOverrides:[{address:r.zeroAddress,nonce:0}]}]:[],{calls:[...B,{}].map(V=>({...V,from:v==null?void 0:v.address})),stateOverrides:j},...h?[{calls:[{data:b}]},{calls:m.map((V,X)=>({abi:[t.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:V,from:r.zeroAddress,nonce:X})),stateOverrides:[{address:r.zeroAddress,nonce:0}]},{calls:m.map((V,X)=>({to:V,abi:[t.from("function decimals() returns (uint256)")],functionName:"decimals",from:r.zeroAddress,nonce:X})),stateOverrides:[{address:r.zeroAddress,nonce:0}]},{calls:m.map((V,X)=>({to:V,abi:[t.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:r.zeroAddress,nonce:X})),stateOverrides:[{address:r.zeroAddress,nonce:0}]},{calls:m.map((V,X)=>({to:V,abi:[t.from("function symbol() returns (string)")],functionName:"symbol",from:r.zeroAddress,nonce:X})),stateOverrides:[{address:r.zeroAddress,nonce:0}]}]:[]],traceTransfers:P,validation:a}),y=h?A[2]:A[0],[E,x,,O,R,k,N,H]=h?A:[],{calls:g,...M}
47=y,S=g.slice(0,-1)??[],I=(E==null?void 0:E.calls)??[],C=(x==null?void 0:x.calls)??[],q=[...I,...C].map(V=>V.status==="success"?(0,c.hexToBigInt)(V.data):null),$=(O==null?void 0:O.calls)??[],L=(R==null?void 0:R.calls)??[],F=[...$,...L].map(V=>V.status==="success"?(0,c.hexToBigInt)(V.data):null),U=((k==null?void 0:k.calls)??[]).map(V=>V.status==="success"?V.result:null),z=((H==null?void 0:H.calls)??[]).map(V=>V.status==="success"?V.result:null),Y=((N==null?void 0:N.calls)??[]).map(V=>V.status==="success"?V.result:null),W=[];for(const[V,X]of F.entries()){const ne=q[V];if(typeof X!="bigint"||typeof ne!="bigint")continue;const K=U[V-1],Z=z[V-1],ee=Y[V-1],re=V===0?{address:r.ethAddress,decimals:18,symbol:"ETH"}:{address:m[V-1],decimals:ee||K?Number(K??1):void 0,symbol:Z??void 0};W.some(te=>te.token.address===re.address)||W.push({token:re,value:{pre:ne,post:X,diff:X-ne}})}return{assetChanges:W,block:M,results:S}}return Sc}var Sn={},Ki={},kf={},vg;function A5(){return vg||(vg=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.universalSignatureValidatorAbi=e.universalSignatureValidatorBytecode=e.magicBytes=void 0,e.assert=o,e.from=s,e.unwrap=i,e.wrap=c,e.validate=u;const t=vo(),n=Pt(),r=Je();e.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",e.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
47603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",e.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function o(l){if(r.slice(l,-32)!==e.magicBytes)throw new d(l)}function s(l){return typeof l=="string"?i(l):l}function i(l){o(l);const[f,_,T]=t.decode(t.from("address, bytes, bytes"),l);return{data:_,signature:T,to:f}}function c(l){const{data:f,signature:_,to:T}=l;return r.concat(t.encode(t.from("address, bytes, bytes"),[T,f,_]),e.magicBytes)}function u(l){try{return o(l),!0}catch{return!1}}class d extends n.BaseError{constructor(f){super(`Value \`${f}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=d})(kf)),kf}var Eg;function S5(){return Eg||(Eg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.SignatureErc6492=void 0,Ki.SignatureErc6492=A5()),Ki}var Ic={},wg;function Gv(){if(wg)return Ic;wg=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.serializeSignature=r;const e=io(),t=Fe(),n=Ae();function r({r:o,s,to:i="hex",v:c,yParity:u}){const d=(()=>{if(u===0||u===1)return u;if(c&&(c===27n||c===28n||c>=35n))return c%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new e.secp256k1.Signature((0,t.hexToBigInt)(o),(0,t.hexToBigInt)(s)).toCompactHex()}${d===0?"1b":"1c"}`;return i==="hex"?l:(0,n.hexToBytes)(l)}return Ic}var Pg;function Hd(){if(Pg)return Sn;Pg=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.verifyHash=a,Sn.verifyErc8010=v,Sn.verifyErc1271=m;const e=S5(),t=qd(),n=Sr(),r=lo(),o=wr(),s=mo(),i=mt(),c=Et(),u=Mt(),d=tv(),l=We(),f=at(),_=Fe(),T=ie(),w=ve(),p=Ar(),B=Gv(),j=ho(),h=J_(),P=Ft();async function a(y,E){var H,g,M,S,I,C;const{address:x,hash:O,erc6492VerifierAddress:R=E.universalSignatureVerifierAddress??((M=(g=(H=y.chain)==null?void 0:H.contracts)==null?void 0:g.erc6492Verifier)==null?void 0:M.address),multicallAddress:k=E.multicallAddress??((C=(I=(S=y.chain)==null?void 0:S.contracts)==null?void 0:I.multicall3)==null?void 0:C.address)}=E,N=(()=>{const q=E.signature;return(0,f.isHex)(q)?q:typeof q=="object"&&"r"in q&&"s"in q?(0,B.serializeSignature)(q):(0,T.bytesToHex)(q)})();try{return t.SignatureErc8010.validate(N)?await v(y,{...E,multicallAddress:k,signature:N}):await b(y,{...E,verifierAddress:R,signature:N})}catch(q){try{if((0,u.isAddressEqual)((0,c.getAddress)(x),await(0,p.recoverAddress)({hash:O,signature:N})))return!0}catch{}if(q instanceof A)return!1;throw q}}async function v(y,E){var F;const{address:x,blockNumber:O,blockTag:R,hash:k,multicallAddress:N}=E,{authorization:H,data:g,signature:M,to:S}=t.SignatureErc8010.unwrap(E.signature);if(await(0,h.getCode)(y,{address:x,blockNumber:O,blockTag:R})===(0,l.concatHex)(["0xef0100",H.address]))return await m(y,{address:x,blockNumber:O,blockTag:R,hash:k,signature:M});const C={address:H.address,chainId:Number(H.chainId),nonce:Number(H.nonce),r:(0,T.numberToHex)(H.r,{size:32}),s:(0,T.numberToHex)(H.s,{size:32}),yParity:H.yParity};if(!await(0,d.verifyAuthorization)({address:x,authorization:C}))throw new A;const $=await(0,w.getAction)(y,P.readContract,"readContract")({...N?{address:N}:{code:r.multicall3Bytecode},authorizationList:[C],abi:n.multicall3Abi,blockNumber:O,blockTag:"pending",functionName:"aggregate3",args:[[...g?[{allowFailure:!0,target:S??x,callData:g}
47]:[],{allowFailure:!0,target:x,callData:(0,i.encodeFunctionData)({abi:n.erc1271Abi,functionName:"isValidSignature",args:[k,M]})}]]}),L=(F=$[$.length-1])==null?void 0:F.returnData;if(L!=null&&L.startsWith("0x1626ba7e"))return!0;throw new A}async function b(y,E){const{address:x,factory:O,factoryData:R,hash:k,signature:N,verifierAddress:H,...g}=E,M=await(async()=>!O&&!R||e.SignatureErc6492.validate(N)?N:e.SignatureErc6492.wrap({data:R,signature:N,to:O}))(),S=H?{to:H,data:(0,i.encodeFunctionData)({abi:n.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[x,k,M]}),...g}:{data:(0,s.encodeDeployData)({abi:n.erc6492SignatureValidatorAbi,args:[x,k,M],bytecode:r.erc6492SignatureValidatorByteCode}),...g},{data:I}=await(0,w.getAction)(y,j.call,"call")(S).catch(C=>{throw C instanceof o.CallExecutionError?new A:C});if((0,_.hexToBool)(I??"0x0"))return!0;throw new A}async function m(y,E){const{address:x,blockNumber:O,blockTag:R,hash:k,signature:N}=E;if((await(0,w.getAction)(y,P.readContract,"readContract")({address:x,abi:n.erc1271Abi,args:[k,N],blockNumber:O,blockTag:R,functionName:"isValidSignature"}).catch(g=>{throw g instanceof o.ContractFunctionExecutionError?new A:g})).startsWith("0x1626ba7e"))return!0;throw new A}class A extends Error{}return Sn}var Tc={},jg;function I5(){if(jg)return Tc;jg=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.verifyMessage=n;const e=go(),t=Hd();async function n(r,{address:o,message:s,factory:i,factoryData:c,signature:u,...d}){const l=(0,e.hashMessage)(s);return(0,t.verifyHash)(r,{address:o,factory:i,factoryData:c,hash:l,signature:u,...d})}return Tc}var Bc={},Ag;function T5(){if(Ag)return Bc;Ag=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.verifyTypedData=n;const e=po(),t=Hd();async function n(r,o){const{address:s,factory:i,factoryData:c,signature:u,message:d,primaryType:l,types:f,domain:_,...T}=o,w=(0,e.hashTypedData)({message:d,primaryType:l,types:f,domain:_});return(0,t.verifyHash)(r,{address:s,factory:i,factoryData:c,hash:w,signature:u,...T})}return Bc}var xc={},Rc={},Sg;function Vv(){if(Sg)return Rc;Sg=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.watchBlockNumber=i;const e=Fe(),t=ve(),n=nn(),r=kn(),o=Ye(),s=yo();function i(c,{emitOnBegin:u=!1,emitMissed:d=!1,onBlockNumber:l,onError:f,poll:_,pollingInterval:T=c.pollingInterval}){const w=typeof _<"u"?_:!(c.transport.type==="webSocket"||c.transport.type==="ipc"||c.transport.type==="fallback"&&(c.transport.transports[0].c
47onfig.type==="webSocket"||c.transport.transports[0].config.type==="ipc"));let p;return w?(()=>{const h=(0,o.stringify)(["watchBlockNumber",c.uid,u,d,T]);return(0,n.observe)(h,{onBlockNumber:l,onError:f},P=>(0,r.poll)(async()=>{var a;try{const v=await(0,t.getAction)(c,s.getBlockNumber,"getBlockNumber")({cacheTime:0});if(p!==void 0){if(v===p)return;if(v-p>1&&d)for(let b=p+1n;b<v;b++)P.onBlockNumber(b,p),p=b}(p===void 0||v>p)&&(P.onBlockNumber(v,p),p=v)}catch(v){(a=P.onError)==null||a.call(P,v)}},{emitOnBegin:u,interval:T}))})():(()=>{const h=(0,o.stringify)(["watchBlockNumber",c.uid,u,d]);return(0,n.observe)(h,{onBlockNumber:l,onError:f},P=>{let a=!0,v=()=>a=!1;return(async()=>{try{const b=(()=>{if(c.transport.type==="fallback"){const A=c.transport.transports.find(y=>y.config.type==="webSocket"||y.config.type==="ipc");return A?A.value:c.transport}return c.transport})(),{unsubscribe:m}=await b.subscribe({params:["newHeads"],onData(A){var E;if(!a)return;const y=(0,e.hexToBigInt)((E=A.result)==null?void 0:E.number);P.onBlockNumber(y,p),p=y},onError(A){var y;(y=P.onError)==null||y.call(P,A)}});v=m,a||v()}catch(b){f==null||f(b)}})(),()=>v()})})()}return Rc}var Ig;function B5(){if(Ig)return xc;Ig=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.waitForTransactionReceipt=f;const e=Yf(),t=wt(),n=ve(),r=nn(),o=o0(),s=wd(),i=Ye(),c=Mn(),u=M0(),d=Lv(),l=Vv();async function f(_,T){const{checkReplacement:w=!0,confirmations:p=1,hash:B,onReplaced:j,retryCount:h=6,retryDelay:P=({count:g})=>~~(1<<g)*200,timeout:a=18e4}=T,v=(0,i.stringify)(["waitForTransactionReceipt",_.uid,B]),b=(()=>{var g;return T.pollingInterval?T.pollingInterval:(g=_.chain)!=null&&g.experimental_preconfirmationTime?_.chain.experimental_preconfirmationTime:_.pollingInterval})();let m,A,y,E=!1,x,O;const{promise:R,resolve:k,reject:N}=(0,o.withResolvers)(),H=a?setTimeout(()=>{O==null||O(),x==null||x(),N(new t.WaitForTransactionReceiptTimeoutError({hash:B}))},a):void 0;return x=(0,r.observe)(v,{onReplaced:j,resolve:k,reject:N},async g=>{if(y=await(0,n.getAction)(_,d.getTransactionReceipt,"getTransactionReceipt")({hash:B}).catch(()=>{}),y&&p<=1){clearTimeout(H),g.resolve(y),x==null||x();return}O=(0,n.getAction)(_,l.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:b,async onBlockNumber(M){const S=C=>{clearTimeout(H),O==null||O(),C(),x==null||x()};let I=M;if(!E)try{if(y){if(p>1&&(!y.blockNumber||I-y.blockNumber+1n<p))return;S(()=>g.resolve(y));return}if(w&&!m&&(E=!0,await(0,s.withRetry)(async()=>{m=await(0,n.getAction)(_,u.getTransaction,"getTransaction")({hash:B}),m.blockNumber&&(I=m.blockNumber)},{delay:P,retryCount:h}),E=!1),y=await(0,n.getAction)(_,d.getTransactionReceipt,"getTransactionReceipt")({hash:B}),p>1&&(!y.blockNumber||I-y.blockNumber+1n<p))return;S(()=>g.resolve(y))}catch(C){if(C instanceof t.TransactionNotFoundError||C instanceof t.TransactionReceiptNotFoundError){if(!m){E=!1;return}try{A=m,E=!0;const q=await(0,s.withRetry)(()=>(0,n.getAction)(_,c.getBlock,"getBlock")({blockNumber:I,includeTransactions:!0}),{delay:P,retryCount:h,shouldRetry:({error:F})=>F instanceof e.BlockNotFoundError});E=!1;const $=q.transactions.find(({from:F,nonce:U})=>F===A.from&&U===A.nonce);if(!$||(y=await(0,n.getAction)(_,d.getTransactionReceipt,"getTransactionReceipt")({hash:$.hash}),p>1&&(!y.blockNumber||I-y.blockNumber+1n<p)))return;let L="replaced";$.to===A.to&&$.value===A.value&&$.input===A.input?L="repriced":$.from===$.to&&$.value===0n&&(L="cancelled"),S(()=>{var F;(F=g.onReplaced)==null||F.call(g,{reason:L,replacedTransaction:A,transaction:$,transactionReceipt:y}),g.resolve(y)})}catch(q){S(()=>g.reject(q))}}else S(()=>g.reject(C))}}})}),R}return xc}var Oc={},Tg;function x5(){if(Tg)return Oc;Tg=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.watchBlocks=s;const e=ve(),t=nn(),n=kn(),r=Ye(),o=Mn();function s(i,{blockTag:c=i.experimental_blockTag??"latest",emitMissed:u=!1,emitOnBegin:d=!1,onBlock:l,onError:f,includeTransactions:_,poll:T,pollingInterval:w=i.pollingInterval}){const p=typeof T<"u"?T:!(i.transport.type==="webSocket"||i.transport.type==="ipc"||i.transport.type==="fallback"&&(i.transport.transports[0].c
47onfig.type==="webSocket"||i.transport.transports[0].config.type==="ipc")),B=_??!1;let j;return p?(()=>{const a=(0,r.stringify)(["watchBlocks",i.uid,c,u,d,B,w]);return(0,t.observe)(a,{onBlock:l,onError:f},v=>(0,n.poll)(async()=>{var b;try{const m=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockTag:c,includeTransactions:B});if(m.number!==null&&(j==null?void 0:j.number)!=null){if(m.number===j.number)return;if(m.number-j.number>1&&u)for(let A=(j==null?void 0:j.number)+1n;A<m.number;A++){const y=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockNumber:A,includeTransactions:B});v.onBlock(y,j),j=y}}((j==null?void 0:j.number)==null||c==="pending"&&(m==null?void 0:m.number)==null||m.number!==null&&m.number>j.number)&&(v.onBlock(m,j),j=m)}catch(m){(b=v.onError)==null||b.call(v,m)}},{emitOnBegin:d,interval:w}))})():(()=>{let a=!0,v=!0,b=()=>a=!1;return(async()=>{try{d&&(0,e.getAction)(i,o.getBlock,"getBlock")({blockTag:c,includeTransactions:B}).then(y=>{a&&v&&(l(y,void 0),v=!1)}).catch(f);const m=(()=>{if(i.transport.type==="fallback"){const y=i.transport.transports.find(E=>E.config.type==="webSocket"||E.config.type==="ipc");return y?y.value:i.transport}return i.transport})(),{unsubscribe:A}=await m.subscribe({params:["newHeads"],async onData(y){var x;if(!a)return;const E=await(0,e.getAction)(i,o.getBlock,"getBlock")({blockNumber:(x=y.result)==null?void 0:x.number,includeTransactions:B}).catch(()=>{});a&&(l(E,j),v=!1,j=E)},onError(y){f==null||f(y)}});b=A,a||b()}catch(m){f==null||f(m)}})(),()=>b()})()}return Oc}var Cc={},Bg;function R5(){if(Bg)return Cc;Bg=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.watchEvent=w;const e=Ce(),t=Pr(),n=uo(),r=en(),o=ur(),s=ve(),i=nn(),c=kn(),u=Ye(),d=Z_(),l=yo(),f=pd(),_=r0(),T=_d();function w(p,{address:B,args:j,batch:h=!0,event:P,events:a,fromBlock:v,onError:b,onLogs:m,poll:A,pollingInterval:y=p.pollingInterval,strict:E}){const x=typeof A<"u"?A:typeof v=="bigint"?!0:!(p.transport.type==="webSocket"||p.transport.type==="ipc"||p.transport.type==="fallback"&&(p.transport.transports[0].c
47onfig.type==="webSocket"||p.transport.transports[0].config.type==="ipc")),O=E??!1;return x?(()=>{const N=(0,u.stringify)(["watchEvent",B,j,h,p.uid,P,y,v]);return(0,i.observe)(N,{onLogs:m,onError:b},H=>{let g;v!==void 0&&(g=v-1n);let M,S=!1;const I=(0,c.poll)(async()=>{var C;if(!S){try{M=await(0,s.getAction)(p,d.createEventFilter,"createEventFilter")({address:B,args:j,event:P,events:a,strict:O,fromBlock:v})}catch{}S=!0;return}try{let q;if(M)q=await(0,s.getAction)(p,f.getFilterChanges,"getFilterChanges")({filter:M});else{const $=await(0,s.getAction)(p,l.getBlockNumber,"getBlockNumber")({});g&&g!==$?q=await(0,s.getAction)(p,_.getLogs,"getLogs")({address:B,args:j,event:P,events:a,fromBlock:g+1n,toBlock:$}):q=[],g=$}if(q.length===0)return;if(h)H.onLogs(q);else for(const $ of q)H.onLogs([$])}catch(q){M&&q instanceof t.InvalidInputRpcError&&(S=!1),(C=H.onError)==null||C.call(H,q)}},{emitOnBegin:!0,interval:y});return async()=>{M&&await(0,s.getAction)(p,T.uninstallFilter,"uninstallFilter")({filter:M}),I()}})})():(()=>{let N=!0,H=()=>N=!1;return(async()=>{try{const g=(()=>{if(p.transport.type==="fallback"){const C=p.transport.transports.find(q=>q.config.type==="webSocket"||q.config.type==="ipc");return C?C.value:p.transport}return p.transport})(),M=a??(P?[P]:void 0);let S=[];M&&(S=[M.flatMap(q=>(0,r.encodeEventTopics)({abi:[q],eventName:q.name,args:j}))],P&&(S=S[0]));const{unsubscribe:I}=await g.subscribe({params:["logs",{address:B,topics:S}],onData(C){var $;if(!N)return;const q=C.result;try{const{eventName:L,args:F}=(0,n.decodeEventLog)({abi:M??[],data:q.data,topics:q.topics,strict:O}),U=(0,o.formatLog)(q,{args:F,eventName:L});m([U])}catch(L){let F,U;if(L instanceof e.DecodeLogDataMismatch||L instanceof e.DecodeLogTopicsMismatch){if(E)return;F=L.abiItem.name,U=($=L.abiItem.inputs)==null?void 0:$.some(Y=>!("name"in Y&&Y.name))}const z=(0,o.formatLog)(q,{args:U?[]:{},eventName:F});m([z])}},onError(C){b==null||b(C)}});H=I,N||H()}catch(g){b==null||b(g)}})(),()=>H()})()}return Cc}var qc={},xg;function O5(){if(xg)return qc;xg=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.watchPendingTransactions=c;const e=ve(),t=nn(),n=kn(),r=Ye(),o=Y_(),s=pd(),i=_d();function c(u,{batch:d=!0,onError:l,onTransactions:f,poll:_,pollingInterval:T=u.pollingInterval}){return(typeof _<"u"?_:u.transport.type!=="webSocket"&&u.transport.type!=="ipc")?(()=>{const j=(0,r.stringify)(["watchPendingTransactions",u.uid,d,T]);return(0,t.observe)(j,{onTransactions:f,onError:l},h=>{let P;const a=(0,n.poll)(async()=>{var v;try{if(!P)try{P=await(0,e.getAction)(u,o.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(m){throw a(),m}const b=await(0,e.getAction)(u,s.getFilterChanges,"getFilterChanges")({filter:P});if(b.length===0)return;if(d)h.onTransactions(b);else for(const m of b)h.onTransactions([m])}catch(b){(v=h.onError)==null||v.call(h,b)}},{emitOnBegin:!0,interval:T});return async()=>{P&&await(0,e.getAction)(u,i.uninstallFilter,"uninstallFilter")({filter:P}),a()}})})():(()=>{let j=!0,h=()=>j=!1;return(async()=>{try{const{unsubscribe:P}=await u.transport.subscribe({params:["newPendingTransactions"],onData(a){if(!j)return;const v=a.result;f([v])},onError(a){l==null||l(a)}});h=P,j||h()}catch(P){l==null||l(P)}})(),()=>h()})()}return qc}var Mc={},Hc={},Rg;function C5(){if(Rg)return Hc;Rg=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.parseSiweMessage=e;function e(r){var w,p,B;const{scheme:o,statement:s,...i}=((w=r.match(t))==null?void 0:w.groups)??{},{chainId:c,expirationTime:u,issuedAt:d,notBefore:l,requestId:f,..._}=((p=r.match(n))==null?void 0:p.groups)??{},T=(B=r.split("Resources:")[1])==null?void 0:B.split(` 48- `).slice(1);return{...i,..._,...c?{chainId:Number(c)}:{},...u?{expirationTime:new Date(u)}:{},...d?{issuedAt:new Date(d)}:{},...l?{notBefore:new Date(l)}:{},...f?{requestId:f}:{},...T?{resources:T}:{},...o?{scheme:o}:{},...s?{statement:s}:{}}}const t=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,n=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;return Hc}var kc={},Og;function q5(){if(Og)return kc;Og=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.validateSiweMessage=n;const e=bt(),t=Mt();function n(r){const{address:o,domain:s,message:i,nonce:c,scheme:u,time:d=new Date}=r;if(s&&i.domain!==s||c&&i.nonce!==c||u&&i.scheme!==u||i.expirationTime&&d>=i.expirationTime||i.notBefore&&d<i.notBefore)return!1;try{if(!i.address||!(0,e.isAddress)(i.address,{strict:!1})||o&&!(0,t.isAddressEqual)(i.address,o))return!1}catch{return!1}return!0}return kc}var Cg;function M5(){if(Cg)return Mc;Cg=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.verifySiweMessage=o;const e=go(),t=C5(),n=q5(),r=Hd();async function o(s,i){const{address:c,domain:u,message:d,nonce:l,scheme:f,signature:_,time:T=new Date,...w}=i,p=(0,t.parseSiweMessage)(d);if(!p.address||!(0,n.validateSiweMessage)({address:c,domain:u,message:p,nonce:l,scheme:f,time:T}))return!1;const j=(0,e.hashMessage)(d);return(0,r.verifyHash)(s,{address:p.address,hash:j,signature:_,...w})}return Mc}var qg;function Wv(){if(qg)return aa;qg=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.publicActions=te;const e=S6(),t=B6(),n=x6(),r=R6(),o=W_(),s=ho(),i=K_(),c=O6(),u=Uf(),d=Z_(),l=Y_(),f=O_(),_=T_(),T=t0(),w=I_(),p=C6(),B=q6(),j=Mn(),h=yo(),P=M6(),a=Hn(),v=J_(),b=n0(),m=k6(),A=N6(),y=pd(),E=F6(),x=Jf(),O=r0(),R=g5(),k=p5(),N=M0(),H=_5(),g=dd(),M=Lv(),S=v5(),I=Ft(),C=Uv(),q=j5(),$=H_(),L=_d(),F=Hd(),U=I5(),z=T5(),Y=B5(),W=Vv(),V=x5(),X=$_(),ne=R5(),K=O5(),Z=M5(),ee=hd(),re=b0();function te(Q){return{call:J=>(0,s.call)(Q,J),createAccessList:J=>(0,i.createAccessList)(Q,J),createBlockFilter:()=>(0,c.createBlockFilter)(Q),createContractEventFilter:J=>(0,u.createContractEventFilter)(Q,J),createEventFilter:J=>(0,d.createEventFilter)(Q,J),createPendingTransactionFilter:()=>(0,l.createPendingTransactionFilter)(Q),estimateContractGas:J=>(0,f.estimateContractGas)(Q,J),estimateGas:J=>(0,T.estimateGas)(Q,J),getBalance:J=>(0,p.getBalance)(Q,J),getBlobBaseFee:()=>(0,B.getBlobBaseFee)(Q),getBlock:J=>(0,j.getBlock)(Q,J),getBlockNumber:J=>(0,h.getBlockNumber)(Q,J),getBlockTransactionCount:J=>(0,P.getBlockTransactionCount)(Q,J),getBytecode:J=>(0,v.getCode)(Q,J),getChainId:()=>(0,a.getChainId)(Q),getCode:J=>(0,v.getCode)(Q,J),getContractEvents:J=>(0,b.getContractEvents)(Q,J),getEip712Domain:J=>(0,m.getEip712Domain)(Q,J),getEnsAddress:J=>(0,e.getEnsAddress)(Q,J),getEnsAvatar:J=>(0,t.getEnsAvatar)(Q,J),getEnsName:J=>(0,n.getEnsName)(Q,J),getEnsResolver:J=>(0,r.getEnsResolver)(Q,J),getEnsText:J=>
48(0,o.getEnsText)(Q,J),getFeeHistory:J=>(0,A.getFeeHistory)(Q,J),estimateFeesPerGas:J=>(0,_.estimateFeesPerGas)(Q,J),getFilterChanges:J=>(0,y.getFilterChanges)(Q,J),getFilterLogs:J=>(0,E.getFilterLogs)(Q,J),getGasPrice:()=>(0,x.getGasPrice)(Q),getLogs:J=>(0,O.getLogs)(Q,J),getProof:J=>(0,R.getProof)(Q,J),estimateMaxPriorityFeePerGas:J=>(0,w.estimateMaxPriorityFeePerGas)(Q,J),getStorageAt:J=>(0,k.getStorageAt)(Q,J),getTransaction:J=>(0,N.getTransaction)(Q,J),getTransactionConfirmations:J=>(0,H.getTransactionConfirmations)(Q,J),getTransactionCount:J=>(0,g.getTransactionCount)(Q,J),getTransactionReceipt:J=>(0,M.getTransactionReceipt)(Q,J),multicall:J=>(0,S.multicall)(Q,J),prepareTransactionRequest:J=>(0,ee.prepareTransactionRequest)(Q,J),readContract:J=>(0,I.readContract)(Q,J),sendRawTransaction:J=>(0,re.sendRawTransaction)(Q,J),simulate:J=>(0,C.simulateBlocks)(Q,J),simulateBlocks:J=>(0,C.simulateBlocks)(Q,J),simulateCalls:J=>(0,q.simulateCalls)(Q,J),simulateContract:J=>(0,$.simulateContract)(Q,J),verifyHash:J=>(0,F.verifyHash)(Q,J),verifyMessage:J=>(0,U.verifyMessage)(Q,J),verifySiweMessage:J=>(0,Z.verifySiweMessage)(Q,J),verifyTypedData:J=>(0,z.verifyTypedData)(Q,J),uninstallFilter:J=>(0,L.uninstallFilter)(Q,J),waitForTransactionReceipt:J=>(0,Y.waitForTransactionReceipt)(Q,J),watchBlocks:J=>(0,V.watchBlocks)(Q,J),watchBlockNumber:J=>(0,W.watchBlockNumber)(Q,J),watchContractEvent:J=>(0,X.watchContractEvent)(Q,J),watchEvent:J=>(0,ne.watchEvent)(Q,J),watchPendingTransactions:J=>(0,K.watchPendingTransactions)(Q,J)}}return aa}var Mg;function H5(){if(Mg)return sa;Mg=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.createPublicClient=n;const e=jd(),t=Wv();function n(r){const{key:o="public",name:s="Public Client"}=r;return(0,e.createClient)({...r,key:o,name:s,type:"publicClient"}).extend(t.publicActions)}return sa}var $c={},Nc={},Fc={},Hg;function k5(){if(Hg)return Fc;Hg=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.dropTransaction=e;async function e(t,{hash:n}){await t.request({method:`${t.mode}_dropTransaction`,params:[n]})}return Fc}var Lc={},kg;function $5(){if(kg)return Lc;kg=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.dumpState=e;async function e(t){return t.request({method:`${t.mode}_dumpState`})}return Lc}var Uc={},$g;function N5(){if($g)return Uc;$g=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.getAutomine=e;async function e(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}return Uc}var zc={},Ng;function F5(){if(Ng)return zc;Ng=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.getTxpoolContent=e;async function e(t){return await t.request({method:"txpool_content"})}return zc}var Dc={},Fg;function L5(){if(Fg)return Dc;Fg=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.getTxpoolStatus=t;const e=Fe();async function t(n){const{pending:r,queued:o}=await n.request({method:"txpool_status"});return{pending:(0,e.hexToNumber)(r),queued:(0,e.hexToNumber)(o)}}return Dc}var Gc={},Lg;function U5(){if(Lg)return Gc;Lg=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.impersonateAccount=e;async function e(t,{address:n}){await t.request({method:`${t.mode}_impersonateAccount`,params:[n]})}return Gc}var Vc={},Ug;function z5(){if(Ug)return Vc;Ug=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.increaseTime=t;const e=ie();async function t(n,{seconds:r}){return await n.request({method:"evm_increaseTime",params:[(0,e.numberToHex)(r)]})}return Vc}var Wc={},zg;function D5(){if(zg)return Wc;zg=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.inspectTxpool=e;async function e(t){return await t.request({method:"txpool_inspect"})}return Wc}var Kc={},Dg;function G5(){if(Dg)return Kc;Dg=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.loadState=e;async function e(t,{state:n}){await t.request({method:`${t.mode}_loadState`,params:[n]})}return Kc}var Zc={},Gg;function V5(){if(Gg)return Zc;Gg=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.mine=t;const e=ie();async function t(n,{blocks:r,interval:o}){n.mode==="ganache"?await n.request({method:"evm_mine",params:[{blocks:(0,e.numberToHex)(r)}]}):await n.request({method:`${n.mode}_mine`,params:[(0,e.numberToHex)(r),(0,e.numberToHex)(o||0)]})}return Zc}var Yc={},Vg;function W5(){if(Vg)return Yc;Vg=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.removeBlockTimestampInterval=e;async function e(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}return Yc}var Jc={},Wg;function K5(){if(Wg)return Jc;Wg=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.reset=e;async function e(t,{blockNumber:n,jsonRpcUrl:r}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(n),jsonRpcUrl:r}}]})}return Jc}var Xc={},Kg;function Z5(){if(Kg)return Xc;Kg=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.revert=e;async function e(t,{id:n}){await t.request({method:"evm_revert",params:[n]})}return Xc}var Qc={},Zg;function Y5(){if(Zg)return Qc;Zg=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.sendUnsignedTransaction=n;
48const e=qn(),t=ar();async function n(r,o){var a,v,b;const{accessList:s,data:i,from:c,gas:u,gasPrice:d,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:_,to:T,value:w,...p}=o,B=(b=(v=(a=r.chain)==null?void 0:a.formatters)==null?void 0:v.transactionRequest)==null?void 0:b.format,h=(B||t.formatTransactionRequest)({...(0,e.extract)(p,{format:B}),accessList:s,data:i,from:c,gas:u,gasPrice:d,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:_,to:T,value:w});return await r.request({method:"eth_sendUnsignedTransaction",params:[h]})}return Qc}var eu={},Yg;function J5(){if(Yg)return eu;Yg=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.setAutomine=e;async function e(t,n){t.mode==="ganache"?n?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[n]})}return eu}var tu={},Jg;function X5(){if(Jg)return tu;Jg=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.setBalance=t;const e=ie();async function t(n,{address:r,value:o}){n.mode==="ganache"?await n.request({method:"evm_setAccountBalance",params:[r,(0,e.numberToHex)(o)]}):await n.request({method:`${n.mode}_setBalance`,params:[r,(0,e.numberToHex)(o)]})}return tu}var ru={},Xg;function Q5(){if(Xg)return ru;Xg=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.setBlockGasLimit=t;const e=ie();async function t(n,{gasLimit:r}){await n.request({method:"evm_setBlockGasLimit",params:[(0,e.numberToHex)(r)]})}return ru}var nu={},Qg;function eE(){if(Qg)return nu;Qg=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.setBlockTimestampInterval=e;async function e(t,{interval:n}){const r=t.mode==="hardhat"?n*1e3:n;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[r]})}return nu}var iu={},ep;function tE(){if(ep)return iu;ep=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.setCode=e;async function e(t,{address:n,bytecode:r}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[n,r]}):await t.request({method:`${t.mode}_setCode`,params:[n,r]})}return iu}var ou={},tp;function rE(){if(tp)return ou;tp=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.setCoinbase=e;async function e(t,{address:n}){await t.request({method:`${t.mode}_setCoinbase`,params:[n]})}return ou}var su={},rp;function nE(){if(rp)return su;rp=1,Object.defineProperty(su,"__esModule",{value:!0}),su.setIntervalMining=e;async function e(t,{interval:n}){const r=t.mode==="hardhat"?n*1e3:n;await t.request({method:"evm_setIntervalMining",params:[r]})}return su}var au={},np;function iE(){if(np)return au;np=1,Object.defineProperty(au,"__esModule",{value:!0}),au.setLoggingEnabled=e;async function e(t,n){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[n]})}return au}var cu={},ip;function oE(){if(ip)return cu;ip=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.setMinGasPrice=t;const e=ie();async function t(n,{gasPrice:r}){await n.request({method:`${n.mode}_setMinGasPrice`,params:[(0,e.numberToHex)(r)]})}return cu}var uu={},op;function sE(){if(op)return uu;op=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.setNextBlockBaseFeePerGas=t;const e=ie();async function t(n,{baseFeePerGas:r}){await n.request({method:`${n.mode}_setNextBlockBaseFeePerGas`,params:[(0,e.numberToHex)(r)]})}return uu}var du={},sp;function aE(){if(sp)return du;sp=1,Object.defineProperty(du,"__esModule",{value:!0}),du.setNextBlockTimestamp=t;const e=ie();async function t(n,{timestamp:r}){await n.request({method:"evm_setNextBlockTimestamp",params:[(0,e.numberToHex)(r)]})}return du}var fu={},ap;function cE(){if(ap)return fu;ap=1,Object.defineProperty(fu,"__esModule",{value:!0}),fu.setNonce=t;const e=ie();async function t(n,{address:r,nonce:o}){await n.request({method:`${n.mode}_setNonce`,params:[r,(0,e.numberToHex)(o)]})}return fu}var lu={},cp;function uE(){if(cp)return lu;cp=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.setRpcUrl=e;async function e(t,n){await t.request({method:`${t.mode}_setRpcUrl`,params:[n]})}return lu}var bu={},up;function dE(){if(up)return bu;up=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.setStorageAt=t;const e=ie();async function t(n,{address:r,index:o,value:s}){await n.request({method:`${n.mode}_setStorageAt`,params:[r,typeof o=="number"?(0,e.numberToHex)(o):o,s]})}return bu}var mu={},dp;function fE(){if(dp)return mu;
48dp=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.snapshot=e;async function e(t){return await t.request({method:"evm_snapshot"})}return mu}var hu={},fp;function lE(){if(fp)return hu;fp=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.stopImpersonatingAccount=e;async function e(t,{address:n}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[n]})}return hu}var lp;function Kv(){if(lp)return Nc;lp=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.testActions=k;const e=k5(),t=$5(),n=N5(),r=F5(),o=L5(),s=U5(),i=z5(),c=D5(),u=G5(),d=V5(),l=W5(),f=K5(),_=Z5(),T=Y5(),w=J5(),p=X5(),B=Q5(),j=eE(),h=tE(),P=rE(),a=nE(),v=iE(),b=oE(),m=sE(),A=aE(),y=cE(),E=uE(),x=dE(),O=fE(),R=lE();function k({mode:N}){return H=>{const g=H.extend(()=>({mode:N}));return{dropTransaction:M=>(0,e.dropTransaction)(g,M),dumpState:()=>(0,t.dumpState)(g),getAutomine:()=>(0,n.getAutomine)(g),getTxpoolContent:()=>(0,r.getTxpoolContent)(g),getTxpoolStatus:()=>(0,o.getTxpoolStatus)(g),impersonateAccount:M=>(0,s.impersonateAccount)(g,M),increaseTime:M=>(0,i.increaseTime)(g,M),inspectTxpool:()=>(0,c.inspectTxpool)(g),loadState:M=>(0,u.loadState)(g,M),mine:M=>(0,d.mine)(g,M),removeBlockTimestampInterval:()=>(0,l.removeBlockTimestampInterval)(g),reset:M=>(0,f.reset)(g,M),revert:M=>(0,_.revert)(g,M),sendUnsignedTransaction:M=>(0,T.sendUnsignedTransaction)(g,M),setAutomine:M=>(0,w.setAutomine)(g,M),setBalance:M=>(0,p.setBalance)(g,M),setBlockGasLimit:M=>(0,B.setBlockGasLimit)(g,M),setBlockTimestampInterval:M=>(0,j.setBlockTimestampInterval)(g,M),setCode:M=>(0,h.setCode)(g,M),setCoinbase:M=>(0,P.setCoinbase)(g,M),setIntervalMining:M=>(0,a.setIntervalMining)(g,M),setLoggingEnabled:M=>(0,v.setLoggingEnabled)(g,M),setMinGasPrice:M=>(0,b.setMinGasPrice)(g,M),setNextBlockBaseFeePerGas:M=>(0,m.setNextBlockBaseFeePerGas)(g,M),setNextBlockTimestamp:M=>(0,A.setNextBlockTimestamp)(g,M),setNonce:M=>(0,y.setNonce)(g,M),setRpcUrl:M=>(0,E.setRpcUrl)(g,M),setStorageAt:M=>(0,x.setStorageAt)(g,M),snapshot:()=>(0,O.snapshot)(g),stopImpersonatingAccount:M=>(0,R.stopImpersonatingAccount)(g,M)}}}return Nc}var bp;function bE(){if(bp)return $c;bp=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.createTestClient=n;const e=jd(),t=Kv();function n(r){const{key:o="test",name:s="Test Client",mode:i}=r;return(0,e.createClient)({...r,key:o,name:s,type:"testClient"}).extend(u=>({mode:i,...(0,t.testActions)({mode:i})(u)}))}return $c}var yu={},gu={},pu={},mp;function mE(){if(mp)return pu;mp=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.addChain=t;const e=ie();async function t(n,{chain:r}){const{id:o,name:s,nativeCurrency:i,rpcUrls:c,blockExplorers:u}=r;await n.request({method:"wallet_addEthereumChain",params:[{chainId:(0,e.numberToHex)(o),chainName:s,nativeCurrency:i,rpcUrls:c.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}return pu}var _u={},hp;function hE(){if(hp)return _u;hp=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.deployContract=n;const e=mo(),t=Ed();function n(r,o){const{abi:s,args:i,bytecode:c,...u}=o,d=(0,e.encodeDeployData)({abi:s,args:i,bytecode:c});return(0,t.sendTransaction)(r,{...u,...u.authorizationList?{to:null}:{},data:d})}return _u}var vu={},yp;function yE(){if(yp)return vu;yp=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.getAddresses=t;const e=Et();async function t(n){var o;return((o=n.account)==null?void 0:o.type)==="local"?[n.account.address]:(await n.request({method:"eth_accounts"},{dedupe:!0})).map(s=>(0,e.checksumAddress)(s))}return vu}var Eu={},gp;function gE(){if(gp)return Eu;gp=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.getCapabilities=n;const e=ze(),t=ie();async function n(r,o={}){const{account:s=r.account,chainId:i}=o,c=s?(0,e.parseAccount)(s):void 0,u=i?[c==null?void 0:c.address,[(0,t.numberToHex)(i)]]:[c==null?void 0:c.address],d=await r.request({method:"wallet_getCapabilities",params:u}),l={};for(const[f,_]of Object.entries(d)){l[Number(f)]={};for(let[T,w]of Object.entries(_))T==="addSubAccount"&&(T="unstable_addSubAccount"),l[Number(f)][T]=w}return typeof i=="number"?l[i]:l}return Eu}var wu={},pp;function pE(){if(pp)return wu;
48pp=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.getPermissions=e;async function e(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}return wu}var Pu={},_p;function Zv(){if(_p)return Pu;_p=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.prepareAuthorization=i;const e=ze(),t=on(),n=Mt(),r=ve(),o=Hn(),s=dd();async function i(c,u){var p;const{account:d=c.account,chainId:l,nonce:f}=u;if(!d)throw new t.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const _=(0,e.parseAccount)(d),T=(()=>{if(u.executor)return u.executor==="self"?u.executor:(0,e.parseAccount)(u.executor)})(),w={address:u.contractAddress??u.address,chainId:l,nonce:f};return typeof w.chainId>"u"&&(w.chainId=((p=c.chain)==null?void 0:p.id)??await(0,r.getAction)(c,o.getChainId,"getChainId")({})),typeof w.nonce>"u"&&(w.nonce=await(0,r.getAction)(c,s.getTransactionCount,"getTransactionCount")({address:_.address,blockTag:"pending"}),(T==="self"||T!=null&&T.address&&(0,n.isAddressEqual)(T.address,_.address))&&(w.nonce+=1)),w}return Pu}var ju={},vp;function _E(){if(vp)return ju;vp=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.requestAddresses=t;const e=Et();async function t(n){return(await n.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(o=>(0,e.getAddress)(o))}return ju}var Au={},Ep;function vE(){if(Ep)return Au;Ep=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.requestPermissions=e;async function e(t,n){return t.request({method:"wallet_requestPermissions",params:[n]},{retryCount:0})}return Au}var Su={},wp;function EE(){if(wp)return Su;wp=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.showCallsStatus=e;async function e(t,n){const{id:r}=n;await t.request({method:"wallet_showCallsStatus",params:[r]})}return Su}var Iu={},Pp;function wE(){if(Pp)return Iu;Pp=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.signAuthorization=r;const e=ze(),t=on(),n=Zv();async function r(o,s){const{account:i=o.account}=s;if(!i)throw new t.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const c=(0,e.parseAccount)(i);if(!c.signAuthorization)throw new t.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:c.type});const u=await(0,n.prepareAuthorization)(o,s);return c.signAuthorization(u)}return Iu}var Tu={},jp;function PE(){if(jp)return Tu;jp=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.signMessage=r;const e=ze(),t=on(),n=ie();async function r(o,{account:s=o.account,message:i}){if(!s)throw new t.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const c=(0,e.parseAccount)(s);if(c.signMessage)return c.signMessage({message:i});const u=typeof i=="string"?(0,n.stringToHex)(i):i.raw instanceof Uint8Array?(0,n.toHex)(i.raw):i.raw;return o.request({method:"personal_sign",params:[u,c.address]},{retryCount:0})}return Tu}var Bu={},Ap;function jE(){if(Ap)return Bu;Ap=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.signTransaction=u;const e=ze(),t=on(),n=vd(),r=ie(),o=ar(),s=ve(),i=cr(),c=Hn();async function u(d,l){var h,P,a,v;const{account:f=d.account,chain:_=d.chain,...T}=l;if(!f)throw new t.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const w=(0,e.parseAccount)(f);(0,i.assertRequest)({account:w,...l});const p=await(0,s.getAction)(d,c.getChainId,"getChainId")({});_!==null&&(0,n.assertCurrentChain)({currentChainId:p,chain:_});const B=(_==null?void 0:_.formatters)||((h=d.chain)==null?void 0:h.formatters),j=((P=B==null?void 0:B.transactionRequest)==null?void 0:P.format)||o.formatTransactionRequest;return w.signTransaction?w.signTransaction({...T,chainId:p},{serializer:(v=(a=d.chain)==null?void 0:a.serializers)==null?void 0:v.transaction}):await d.request({method:"eth_signTransaction",params:[{...j(T),chainId:(0,r.numberToHex)(p),from:w.address}]},{retryCount:0})}return Bu}var xu={},Sp;function AE(){if(Sp)return xu;Sp=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.signTypedData=r;const e=ze(),t=on(),n=Id();async function r(o,s){const{account:i=o.account,domain:c,message:u,primaryType:d}=s;
48if(!i)throw new t.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const l=(0,e.parseAccount)(i),f={EIP712Domain:(0,n.getTypesForEIP712Domain)({domain:c}),...s.types};if((0,n.validateTypedData)({domain:c,message:u,primaryType:d,types:f}),l.signTypedData)return l.signTypedData({domain:c,message:u,primaryType:d,types:f});const _=(0,n.serializeTypedData)({domain:c,message:u,primaryType:d,types:f});return o.request({method:"eth_signTypedData_v4",params:[l.address,_]},{retryCount:0})}return xu}var Ru={},Ip;function SE(){if(Ip)return Ru;Ip=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.switchChain=t;const e=ie();async function t(n,{id:r}){await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,e.numberToHex)(r)}]},{retryCount:0})}return Ru}var Ou={},Tp;function IE(){if(Tp)return Ou;Tp=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.watchAsset=e;async function e(t,n){return await t.request({method:"wallet_watchAsset",params:n},{retryCount:0})}return Ou}var Bp;function Yv(){if(Bp)return gu;Bp=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.walletActions=m;const e=Hn(),t=mE(),n=hE(),r=yE(),o=U_(),s=gE(),i=pE(),c=Zv(),u=hd(),d=_E(),l=vE(),f=L_(),_=b0(),T=Ed(),w=EE(),p=wE(),B=PE(),j=jE(),h=AE(),P=SE(),a=z_(),v=IE(),b=N_();function m(A){return{addChain:y=>(0,t.addChain)(A,y),deployContract:y=>(0,n.deployContract)(A,y),getAddresses:()=>(0,r.getAddresses)(A),getCallsStatus:y=>(0,o.getCallsStatus)(A,y),getCapabilities:y=>(0,s.getCapabilities)(A,y),getChainId:()=>(0,e.getChainId)(A),getPermissions:()=>(0,i.getPermissions)(A),prepareAuthorization:y=>(0,c.prepareAuthorization)(A,y),prepareTransactionRequest:y=>(0,u.prepareTransactionRequest)(A,y),requestAddresses:()=>(0,d.requestAddresses)(A),requestPermissions:y=>(0,l.requestPermissions)(A,y),sendCalls:y=>(0,f.sendCalls)(A,y),sendRawTransaction:y=>(0,_.sendRawTransaction)(A,y),sendTransaction:y=>(0,T.sendTransaction)(A,y),showCallsStatus:y=>(0,w.showCallsStatus)(A,y),signAuthorization:y=>(0,p.signAuthorization)(A,y),signMessage:y=>(0,B.signMessage)(A,y),signTransaction:y=>(0,j.signTransaction)(A,y),signTypedData:y=>(0,h.signTypedData)(A,y),switchChain:y=>(0,P.switchChain)(A,y),waitForCallsStatus:y=>(0,a.waitForCallsStatus)(A,y),watchAsset:y=>(0,v.watchAsset)(A,y),writeContract:y=>(0,b.writeContract)(A,y)}}return gu}var xp;function TE(){if(xp)return yu;xp=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.createWalletClient=n;const e=jd(),t=Yv();function n(r){const{key:o="wallet",name:s="Wallet Client",transport:i}=r;return(0,e.createClient)({...r,key:o,name:s,transport:i,type:"walletClient"}).extend(t.walletActions)}return yu}var Cu={},Rp;function Eo(){if(Rp)return Cu;Rp=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.createTransport=n;const e=rv(),t=D_();function n({key:r,methods:o,name:s,request:i,retryCount:c=3,retryDelay:u=150,timeout:d,type:l},f){const _=(0,t.uid)();return{config:{key:r,methods:o,name:s,request:i,retryCount:c,retryDelay:u,timeout:d,type:l},request:(0,e.buildRequest)(i,{methods:o,retryCount:c,retryDelay:u,uid:_}),value:f}}return Cu}var qu={},Op;function BE(){if(Op)return qu;
48Op=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.custom=t;const e=Eo();function t(n,r={}){const{key:o="custom",methods:s,name:i="Custom Provider",retryDelay:c}=r;return({retryCount:u})=>(0,e.createTransport)({key:o,methods:s,name:i,request:n.request.bind(n),retryCount:r.retryCount??u,retryDelay:c,type:"custom"})}return qu}var In={},Cp;function xE(){if(Cp)return In;Cp=1,Object.defineProperty(In,"__esModule",{value:!0}),In.fallback=o,In.shouldThrow=s,In.rankTransports=i;const e=sr(),t=Pr(),n=f0(),r=Eo();function o(c,u={}){const{key:d="fallback",name:l="Fallback",rank:f=!1,shouldThrow:_=s,retryCount:T,retryDelay:w}=u;return(({chain:p,pollingInterval:B=4e3,timeout:j,...h})=>{let P=c,a=()=>{};const v=(0,r.createTransport)({key:d,name:l,async request({method:b,params:m}){let A;const y=async(E=0)=>{const x=P[E]({...h,chain:p,retryCount:0,timeout:j});try{const O=await x.request({method:b,params:m});return a({method:b,params:m,response:O,transport:x,status:"success"}),O}catch(O){if(a({error:O,method:b,params:m,transport:x,status:"error"}),_(O)||E===P.length-1||(A??(A=P.slice(E+1).some(R=>{const{include:k,exclude:N}=R({chain:p}).config.methods||{};return k?k.includes(b):N?!N.includes(b):!0})),!A))throw O;return y(E+1)}};return y()},retryCount:T,retryDelay:w,type:"fallback"},{onResponse:b=>a=b,transports:P.map(b=>b({chain:p,retryCount:0}))});if(f){const b=typeof f=="object"?f:{};i({chain:p,interval:b.interval??B,onTransports:m=>P=m,ping:b.ping,sampleCount:b.sampleCount,timeout:b.timeout,transports:P,weights:b.weights})}return v})}function s(c){return!!("code"in c&&typeof c.code=="number"&&(c.code===t.TransactionRejectedRpcError.code||c.code===t.UserRejectedRequestError.code||e.ExecutionRevertedError.nodeMessage.test(c.message)||c.code===5e3))}function i({chain:c,interval:u=4e3,onTransports:d,ping:l,sampleCount:f=10,timeout:_=1e3,transports:T,weights:w={}}){const{stability:p=.7,latency:B=.3}=w,j=[],h=async()=>{const P=await Promise.all(T.map(async b=>{const m=b({chain:c,retryCount:0,timeout:_}),A=Date.now();let y,E;try{await(l?l({transport:m}):m.request({method:"net_listening"})),E=1}catch{E=0}finally{y=Date.now()}return{latency:y-A,success:E}}));j.push(P),j.length>f&&j.shift();const a=Math.max(...j.map(b=>Math.max(...b.map(({latency:m})=>m)))),v=T.map((b,m)=>{const A=j.map(R=>R[m].latency),E=1-A.reduce((R,k)=>R+k,0)/A.length/a,x=j.map(R=>R[m].success),O=x.reduce((R,k)=>R+k,0)/x.length;return O===0?[0,m]:[B*E+p*O,m]}).sort((b,m)=>m[0]-b[0]);d(v.map(([,b])=>T[b])),await(0,n.wait)(u),h()};h()}return In}var Mu={},Zi={},qp;function H0(){if(qp)return Zi;qp=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.UrlRequiredError=void 0;const e=ue();class t extends e.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}return Zi.UrlRequiredError=t,Zi}var Mp;function RE(){if(Mp)return Mu;Mp=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.http=s;const e=qt(),t=H0(),n=s0(),r=P0(),o=Eo();function s(i,c={}){const{batch:u,fetchFn:d,fetchOptions:l,key:f="http",methods:_,name:T="HTTP JSON-RPC",onFetchRequest:w,onFetchResponse:p,retryDelay:B,raw:j}=c;return({chain:h,retryCount:P,timeout:a})=>{const{batchSize:v=1e3,wait:b=0}=typeof u=="object"?u:{},m=c.retryCount??P,A=a??c.timeout??1e4,y=i||(h==null?void 0:h.rpcUrls.default.http[0]);if(!y)throw new t.UrlRequiredError;const E=(0,r.getHttpRpcClient)(y,{fetchFn:d,fetchOptions:l,onRequest:w,onResponse:p,timeout:A});return(0,o.createTransport)({key:f,methods:_,name:T,async request({method:x,params:O}){const R={method:x,params:O},{schedule:k}=(0,n.createBatchScheduler)({id:y,wait:b,shouldSplitBatch(M){return M.length>v},fn:M=>E.request({body:M}),sort:(M,S)=>M.id-S.id}),N=async M=>u?k(M):[await E.request({body:M})],[{error:H,result:g}]=await N(R);if(j)return{error:H,result:g};if(H)throw new e.RpcRequestError({body:R,error:H,url:y});return g},retryCount:m,retryDelay:B,timeout:A,type:"http"},{fetchOptions:l,url:y})}}return Mu}var Hu={},Hp;function OE(){if(Hp)return Hu;
48Hp=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.webSocket=s;const e=qt(),t=H0(),n=bv(),r=j0(),o=Eo();function s(i,c={}){const{keepAlive:u,key:d="webSocket",methods:l,name:f="WebSocket JSON-RPC",reconnect:_,retryDelay:T}=c;return({chain:w,retryCount:p,timeout:B})=>{var v;const j=c.retryCount??p,h=B??c.timeout??1e4,P=i||((v=w==null?void 0:w.rpcUrls.default.webSocket)==null?void 0:v[0]),a={keepAlive:u,reconnect:_};if(!P)throw new t.UrlRequiredError;return(0,o.createTransport)({key:d,methods:l,name:f,async request({method:b,params:m}){const A={method:b,params:m},y=await(0,r.getWebSocketRpcClient)(P,a),{error:E,result:x}=await y.requestAsync({body:A,timeout:h});if(E)throw new e.RpcRequestError({body:A,error:E,url:P});return x},retryCount:j,retryDelay:T,timeout:h,type:"webSocket"},{getSocket(){return(0,n.getSocket)(P)},getRpcClient(){return(0,r.getWebSocketRpcClient)(P,a)},async subscribe({params:b,onData:m,onError:A}){const y=await(0,r.getWebSocketRpcClient)(P,a),{result:E}=await new Promise((x,O)=>y.request({body:{method:"eth_subscribe",params:b},onError(R){O(R),A==null||A(R)},onResponse(R){if(R.error){O(R.error),A==null||A(R.error);return}if(typeof R.id=="number"){x(R);return}R.method==="eth_subscription"&&m(R.params)}}));return{subscriptionId:E,async unsubscribe(){return new Promise(x=>y.request({body:{method:"eth_unsubscribe",params:[E]},onResponse:x}))}}}})}}return Hu}var Yi={},kp;function CE(){if(kp)return Yi;kp=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.ProviderRpcError=void 0;class e extends Error{constructor(n,r){super(r),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n,this.details=r}}return Yi.ProviderRpcError=e,Yi}var ku={},$p;function qE(){if($p)return ku;$p=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.decodeDeployData=r;const e=Ce(),t=Er(),n="/docs/contract/decodeDeployData";function r(o){const{abi:s,bytecode:i,data:c}=o;if(c===i)return{bytecode:i}
48;const u=s.find(l=>"type"in l&&l.type==="constructor");if(!u)throw new e.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in u))throw new e.AbiConstructorParamsNotFoundError({docsPath:n});if(!u.inputs||u.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:n});return{args:(0,t.decodeAbiParameters)(u.inputs,`0x${c.replace(i,"")}`),bytecode:i}}return ku}var $u={},Np;function ME(){if(Np)return $u;Np=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.fromBlobs=r;const e=eo(),t=Ae(),n=ie();function r(o){const s=o.to??(typeof o.blobs[0]=="string"?"hex":"bytes"),i=typeof o.blobs[0]=="string"?o.blobs.map(f=>(0,t.hexToBytes)(f)):o.blobs,c=i.reduce((f,_)=>f+_.length,0),u=(0,e.createCursor)(new Uint8Array(c));let d=!0;for(const f of i){const _=(0,e.createCursor)(f);for(;d&&_.position<f.length;){_.incrementPosition(1);let T=31;f.length-_.position<31&&(T=f.length-_.position);for(const w in Array.from({length:T})){const p=_.readByte();if(p===128&&!_.inspectBytes(_.remaining).includes(128)){d=!1;break}u.pushByte(p)}}}const l=u.bytes.slice(0,u.position);return s==="hex"?(0,n.bytesToHex)(l):l}return $u}var Nu={},Fp;function HE(){if(Fp)return Nu;Fp=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.sidecarsToVersionedHashes=t;const e=Qf();function t(n){const{sidecars:r,version:o}=n,s=n.to??(typeof r[0].blob=="string"?"hex":"bytes"),i=[];for(const{commitment:c}of r)i.push((0,e.commitmentToVersionedHash)({commitment:c,to:s,version:o}));return i}return Nu}var Fu={},Lp;function kE(){if(Lp)return Fu;Lp=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.toCoinType=n;const e=g0(),t=2147483648;function n(r){if(r===1)return 60n;if(r>=t||r<0)throw new e.EnsInvalidChainIdError({chainId:r});return BigInt((2147483648|r)>>>0)}return Fu}var Lu={},Up;function Jv(){if(Up)return Lu;Up=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.defineKzg=e;function e({blobToKzgCommitment:t,computeBlobKzgProof:n}){return{blobToKzgCommitment:t,computeBlobKzgProof:n}}return Lu}var Uu={},zp;function $E(){if(zp)return Uu;zp=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.setupKzg=t;const e=Jv();function t(n,r){try{n.loadTrustedSetup(r)}catch(o){const s=o;if(!s.message.includes("trusted setup is already loaded"))throw s}return(0,e.defineKzg)(n)}return Uu}var zu={},Dp;function NE(){if(Dp)return zu;Dp=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.compactSignatureToSignature=n;const e=Ae(),t=ie();function n({r,yParityAndS:o}){const s=(0,e.hexToBytes)(o),i=s[0]&128?1:0,c=s;return i===1&&(c[0]&=127),{r,s:(0,t.bytesToHex)(c),yParity:i}}return zu}var Du={},Gp;function FE(){if(Gp)return Du;Gp=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.parseCompactSignature=n;const e=io(),t=ie();function n(r){const{r:o,s}=e.secp256k1.Signature.fromCompact(r.slice(2,130));return{r:(0,t.numberToHex)(o,{size:32}),yParityAndS:(0,t.numberToHex)(s,{size:32})}}return Du}var Gu={},Vp;function LE(){if(Vp)return Gu;Vp=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.parseSignature=n;const e=io(),t=ie();function n(r){const{r:o,s}=e.secp256k1.Signature.fromCompact(r.slice(2,130)),i=+`0x${r.slice(130)}`,[c,u]=(()=>
48{if(i===0||i===1)return[void 0,i];if(i===27)return[BigInt(i),0];if(i===28)return[BigInt(i),1];throw new Error("Invalid yParityOrV value")})();return typeof c<"u"?{r:(0,t.numberToHex)(o,{size:32}),s:(0,t.numberToHex)(s,{size:32}),v:c,yParity:u}:{r:(0,t.numberToHex)(o,{size:32}),s:(0,t.numberToHex)(s,{size:32}),yParity:u}}return Gu}var Vu={},Wp;function UE(){if(Wp)return Vu;Wp=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.recoverTransactionAddress=o;const e=lt(),t=q0(),n=Sd(),r=Ar();async function o(s){const{serializedTransaction:i,signature:c}=s,u=(0,t.parseTransaction)(i),d=c??{r:u.r,s:u.s,v:u.v,yParity:u.yParity},l=(0,n.serializeTransaction)({...u,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,r.recoverAddress)({hash:(0,e.keccak256)(l),signature:d})}return Vu}var Wu={},Kp;function zE(){if(Kp)return Wu;Kp=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.serializeCompactSignature=n;const e=io(),t=Fe();function n({r,yParityAndS:o}){return`0x${new e.secp256k1.Signature((0,t.hexToBigInt)(r),(0,t.hexToBigInt)(o)).toCompactHex()}`}return Wu}var Ku={},Zp;function DE(){if(Zp)return Ku;Zp=1,Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.signatureToCompactSignature=n;const e=Ae(),t=ie();function n(r){const{r:o,s,v:i,yParity:c}=r,u=Number(c??i-27n);let d=s;if(u===1){const l=(0,e.hexToBytes)(s);l[0]|=128,d=(0,t.bytesToHex)(l)}return{r:o,yParityAndS:d}}return Ku}var Yp;function GE(){return Yp||(Yp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxInt8=e.universalSignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode=e.deploylessCallViaFactoryBytecode=e.deploylessCallViaBytecodeBytecode=e.zeroHash=e.zeroAddress=e.ethAddress=e.multicall3Abi=e.universalSignatureValidatorAbi=e.erc6492SignatureValidatorAbi=e.erc4626Abi=e.erc1155Abi=e.erc721Abi=e.erc20Abi_bytes32=e.erc20Abi=e.webSocket=e.http=e.shouldThrow=e.fallback=e.custom=e.createTransport=e.walletActions=e.testActions=e.publicActions=e.createWalletClient=e.createTestClient=e.createPublicClient=e.rpcSchema=e.createClient=e.WaitForCallsStatusTimeoutError=e.getContract=e.UnknownTypeError=e.UnknownSignatureError=e.SolidityProtectedKeywordError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.InvalidStructSignatureError=e.InvalidSignatureError=e.InvalidParenthesisError=e.InvalidParameterError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=e.InvalidAbiItemError=e.CircularReferenceError=void 0,e.maxUint152=e.maxUint144=e.maxUint136=e.maxUint128=e.maxUint120=e.maxUint112=e.maxUint104=e.maxUint96=e.maxUint88=e.maxUint80=e.maxUint72=e.maxUint64=e.maxUint56=e.maxUint48=e.maxUint40=e.maxUint32=e.maxUint24=e.maxUint16=e.maxUint8=e.maxInt256=e.maxInt248=e.maxInt240=e.maxInt232=e.maxInt224=e.maxInt216=e.maxInt208=e.maxInt200=e.maxInt192=e.maxInt184=e.maxInt176=e.maxInt168=e.maxInt160=e.maxInt152=e.maxInt144=e.maxInt136=e.maxInt128=e.maxInt120=e.maxInt112=e.maxInt104=e.maxInt96=e.maxInt88=e.maxInt80=e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=void 0,e.AbiConstructorNotFoundError=e.weiUnits=e.gweiUnits=e.etherUnits=e.presignMessagePrefix=e.minInt256=e.minInt248=e.minInt240=e.minInt232=e.minInt224=e.minInt216=e.minInt208=e.minInt200=e.minInt192=e.minInt184=e.minInt176=e.minInt168=e.minInt160=e.minInt152=e.minInt144=e.minInt136=e.minInt128=e.minInt120=e.minInt112=e.minInt104=e.minInt96=e.minInt88=e.minInt80=e.minInt72=e.minInt64=e.minInt56=e.minInt48=e.minInt40=e.minInt32=e.minInt24=e.minInt16=e.minInt8=e.maxUint256=e.maxUint248=e.maxUint240=e.maxUint232=e.maxUint224=e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=void 0,e.EnsAvatarUriResolutionError=e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarInvalidNftUriError=e.SizeOverflowError=e.InvalidHexValueError=e.InvalidHexBooleanError=e.InvalidBytesBooleanError=e.IntegerOutOfRangeError=e.SliceOffsetOutOfBoundsError=e.SizeExceedsPaddingSizeError=e.RawContractError=e.CounterfactualDeploymentFailedError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=e.InvalidChainIdError=e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=e.BundleFailedError=e.BlockNotFoundError=e.setErrorConfig=e.BaseError=e.InvalidAddressError=e.UnsupportedPackedAbiType=e.InvalidDefinitionTypeError=e.InvalidArrayError=e.InvalidAbiEncodingTypeError=e.InvalidAbiDecodingTypeError=e.DecodeLogTopicsMismatch=e.DecodeLogDataMismatch=e.BytesSizeMismatchError=e.AbiFunctionSignatureNotFoundError=e.AbiFunctionOutputsNotFoundError=e.AbiFunctionNotFoundError=e.AbiEventSignatureNotFoundError=e.AbiEventSignatureEmptyTopicsError=e.AbiEventNotFoundError=e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingLengthMismatchError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingArrayLe
48ngthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=void 0,e.UnsupportedProviderMethodError=e.UnsupportedNonOptionalCapabilityError=e.UnsupportedChainIdError=e.UnknownRpcError=e.UnknownBundleIdError=e.UnauthorizedProviderError=e.TransactionRejectedRpcError=e.SwitchChainError=e.RpcError=e.ResourceUnavailableRpcError=e.ResourceNotFoundRpcError=e.ProviderRpcError=e.ProviderDisconnectedError=e.ParseRpcError=e.MethodNotSupportedRpcError=e.MethodNotFoundRpcError=e.LimitExceededRpcError=e.JsonRpcVersionUnsupportedError=e.InvalidRequestRpcError=e.InvalidParamsRpcError=e.InvalidInputRpcError=e.InternalRpcError=e.DuplicateIdError=e.ChainDisconnectedError=e.BundleTooLargeError=e.AtomicReadyWalletRejectedUpgradeError=e.AtomicityNotSupportedError=e.WebSocketRequestError=e.TimeoutError=e.SocketClosedError=e.RpcRequestError=e.HttpRequestError=e.UnknownNodeError=e.TransactionTypeNotSupportedError=e.TipAboveFeeCapError=e.NonceTooLowError=e.NonceTooHighError=e.NonceMaxValueError=e.IntrinsicGasTooLowError=e.IntrinsicGasTooHighError=e.InsufficientFundsError=e.FeeCapTooLowError=e.FeeCapTooHighError=e.ExecutionRevertedError=e.FilterTypeNotSupportedError=e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=e.EstimateGasExecutionError=e.EnsInvalidChainIdError=void 0,e.toBlobs=e.toBlobSidecars=e.sidecarsToVersionedHashes=e.fromBlobs=e.commitmentToVersionedHash=e.commitmentsToVersionedHashes=e.blobsToProofs=e.blobsToCommitments=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.checksumAddress=e.prepareEncodeFunctionData=e.parseEventLogs=e.getAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeDeployData=e.decodeAbiParameters=e.EIP1193ProviderRpcError=e.InvalidDecimalNumberError=e.InvalidStructTypeError=e.InvalidPrimaryTypeError=e.InvalidDomainError=e.UrlRequiredError=e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializedTransactionError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.StateAssignmentConflictError=e.AccountStateConflictError=e.UserRejectedRequestError=void 0,e.getContractError=e.toCoinType=e.namehash=e.labelhash=e.toRlp=e.hexToRlp=e.bytesToRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=void 0,e.recoverTypedDataAddress=e.recoverTransactionAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseSignature=e.hexToSignature=e.parseErc8010Signature=e.parseErc6492Signature=e.parseCompactSignature=e.hexToCompactSignature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashDomain=e.hashMessage=e.compactSignatureToSignature=e.withTimeout=e.withRetry=e.withCache=e.nonceManager=e.createNonceManager=e.setupKzg=e.defineKzg=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=e.ripemd160=e.keccak256=e.isHash=e.rpcTransactionType=e.formatTransactionRequest=e.defineTransactionRequest=e.formatTransactionReceipt=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.formatBlock=e.defineBlock=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=e.validateTypedData=e.serializeTypedData=e.getTypesForEIP712Domain=e.domainSeparator=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.toPrefixedMessage=e.signatureToCompactSignature=e.serializeSignature=e.signatureToHex=e.serializeErc8010Signature=e.serializeErc6492Signature=e.serializeCompactSignature=e.compactSignatureToHex=void 0;var t=Qu();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return t.CircularReferenceError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return t.InvalidAbiItemError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return t.InvalidAbiParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return t.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return t.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return t.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return t.InvalidModifierError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return t.InvalidParameterError}}),Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return t.InvalidParenthesisError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return t.InvalidSignatureError}}),Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return t.InvalidStructSignatureError}}),Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return t.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return t.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return t.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return t.parseAbiParameters}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return t.SolidityProtectedKeywordError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return t.UnknownSignatureError}}),Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return t.UnknownTypeError}});var n=j6();Object.defineProperty(e,"getContract",{enumerable:!0,get:function(){return n.getContract}});var r=z_();Object.defineProperty(e,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return r.WaitForCallsStatusTimeoutError}});var o=jd();Object.defineProperty(e,"createClient",{enumerable:!0,get:function(){return o.createClient}}),Object.defineProperty(e,"rpcSchema",{enumerable:!0,get:function(){return o.rpcSchema}});var s=H5();Object.defineProperty(e,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var i=bE();Object.defineProperty(e,"createTestClient",{enumerable:!0,get:function(){return i.createTestClient}});var c=TE();Object.defineProperty(e,"createWalletClient",{enumerable:!0,get:function(){return c.createWalletClient}});var u=Wv();Object.defineProperty(e,"publicActions",{enumerable:!0,get:function(){return u.publicActions}});var d=Kv();Object.defineProperty(e,"testActions",{enumerable:!0,get:function(){return d.testActions}});var l=Yv();Object.defineProperty(e,"walletActions",{enumerable:!0,get:function(){return l.walletActions}});var f=Eo();Object.defineProperty(e,"createTransport",{enumerable:!0,get:function(){return f.createTransport}});var _=BE();Object.defineProperty(e,"custom",{enumerable:!0,get:function(){return _.custom}});var T=xE();Object.defineProperty(e,"fallback",{enumerable:!0,get:function(){return T.fallback}}),Object.defineProperty(e,"shouldThrow",{enumerable:!0,get:function(){return T.
48shouldThrow}});var w=RE();Object.defineProperty(e,"http",{enumerable:!0,get:function(){return w.http}});var p=OE();Object.defineProperty(e,"webSocket",{enumerable:!0,get:function(){return p.webSocket}});var B=Sr();Object.defineProperty(e,"erc20Abi",{enumerable:!0,get:function(){return B.erc20Abi}}),Object.defineProperty(e,"erc20Abi_bytes32",{enumerable:!0,get:function(){return B.erc20Abi_bytes32}}),Object.defineProperty(e,"erc721Abi",{enumerable:!0,get:function(){return B.erc721Abi}}),Object.defineProperty(e,"erc1155Abi",{enumerable:!0,get:function(){return B.erc1155Abi}}),Object.defineProperty(e,"erc4626Abi",{enumerable:!0,get:function(){return B.erc4626Abi}}),Object.defineProperty(e,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return B.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return B.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"multicall3Abi",{enumerable:!0,get:function(){return B.multicall3Abi}});var j=Dv();Object.defineProperty(e,"ethAddress",{enumerable:!0,get:function(){return j.ethAddress}}),Object.defineProperty(e,"zeroAddress",{enumerable:!0,get:function(){return j.zeroAddress}});var h=A0();Object.defineProperty(e,"zeroHash",{enumerable:!0,get:function(){return h.zeroHash}});var P=lo();Object.defineProperty(e,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(e,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return P.deploylessCallViaFactoryBytecode}}),Object.defineProperty(e,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}}),Object.defineProperty(e,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return P.erc6492SignatureValidatorByteCode}});var a=Zf();Object.defineProperty(e,"maxInt8",{enumerable:!0,get:function(){return a.maxInt8}}),Object.defineProperty(e,"maxInt16",{enumerable:!0,get:function(){return a.maxInt16}}),Object.defineProperty(e,"maxInt24",{enumerable:!0,get:function(){return a.maxInt24}}),Object.defineProperty(e,"maxInt32",{enumerable:!0,get:function(){return a.maxInt32}}),Object.defineProperty(e,"maxInt40",{enumerable:!0,get:function(){return a.maxInt40}}),Object.defineProperty(e,"maxInt48",{enumerable:!0,get:function(){return a.maxInt48}}),Object.defineProperty(e,"maxInt56",{enumerable:!0,get:function(){return a.maxInt56}}),Object.defineProperty(e,"maxInt64",{enumerable:!0,get:function(){return a.maxInt64}}),Object.defineProperty(e,"maxInt72",{enumerable:!0,get:function(){return a.maxInt72}}),Object.defineProperty(e,"maxInt80",{enumerable:!0,get:function(){return a.maxInt80}}),Object.defineProperty(e,"maxInt88",{enumerable:!0,get:function(){return a.maxInt88}}),Object.defineProperty(e,"maxInt96",{enumerable:!0,get:function(){return a.maxInt96}}),Object.defineProperty(e,"maxInt104",{enumerable:!0,get:function(){return a.maxInt104}}),Object.defineProperty(e,"maxInt112",{enumerable:!0,get:function(){return a.maxInt112}}),Object.defineProperty(e,"maxInt120",{enumerable:!0,get:function(){return a.maxInt120}}),Object.defineProperty(e,"maxInt128",{enumerable:!0,get:function(){return a.maxInt128}}),Object.defineProperty(e,"maxInt136",{enumerable:!0,get:function(){return a.maxInt136}}),Object.defineProperty(e,"maxInt144",{enumerable:!0,get:function(){return a.maxInt144}}),Object.defineProperty(e,"maxInt152",{enumerable:!0,get:function(){return a.maxInt152}}),Object.defineProperty(e,"maxInt160",{enumerable:!0,get:function(){return a.maxInt160}}),Object.defineProperty(e,"maxInt168",{enumerable:!0,get:function(){return a.maxInt168}}),Object.defineProperty(e,"maxInt176",{enumerable:!0,get:function(){return a.maxInt176}}),Object.defineProperty(e,"maxInt184",{enumerable:!0,get:function(){return a.maxInt184}}),Object.defineProperty(e,"maxInt192",{enumerable:!0,get:function(){return a.maxInt192}}),Object.defineProperty(e,"maxInt200",{enumerable:!0,get:function(){return a.maxInt200}}),Object.defineProperty(e,"maxInt208",{enumerable:!0,get:function(){return a.maxInt208}}),Object.defineProperty(e,"maxInt216",{enumerable:!0,get:function(){return a.maxInt216}}),Object.defineProperty(e,"maxInt224",{enumerable:!0,get:function(){return a.maxInt224}}),Object.defineProperty(e,"maxInt232",{enumerable:!0,get:function(){return a.maxInt232}}),Object.defineProperty(e,"maxInt240",{enumerable:!0,get:function(){return a.maxInt240}}),Object.defineProperty(e,"maxInt248",{enumerable:!0,get:function(){return a.maxInt248}}),Object.defineProperty(e,"maxInt256",{enumerable:!0,get:function(){return a.maxInt256}}),Object.defineProperty(e,"maxUint8",{enumerable:!0,get:function(){return a.maxUint8}}),Object.defineProperty(e,"maxUint16",{enumerable:!0,get:function(){return a.maxUint16}}),Object.defineProperty(e,"maxUint24",{enumerable:!0,get:function(){return a.maxUint24}}
48),Object.defineProperty(e,"maxUint32",{enumerable:!0,get:function(){return a.maxUint32}}),Object.defineProperty(e,"maxUint40",{enumerable:!0,get:function(){return a.maxUint40}}),Object.defineProperty(e,"maxUint48",{enumerable:!0,get:function(){return a.maxUint48}}),Object.defineProperty(e,"maxUint56",{enumerable:!0,get:function(){return a.maxUint56}}),Object.defineProperty(e,"maxUint64",{enumerable:!0,get:function(){return a.maxUint64}}),Object.defineProperty(e,"maxUint72",{enumerable:!0,get:function(){return a.maxUint72}}),Object.defineProperty(e,"maxUint80",{enumerable:!0,get:function(){return a.maxUint80}}),Object.defineProperty(e,"maxUint88",{enumerable:!0,get:function(){return a.maxUint88}}),Object.defineProperty(e,"maxUint96",{enumerable:!0,get:function(){return a.maxUint96}}),Object.defineProperty(e,"maxUint104",{enumerable:!0,get:function(){return a.maxUint104}}),Object.defineProperty(e,"maxUint112",{enumerable:!0,get:function(){return a.maxUint112}}),Object.defineProperty(e,"maxUint120",{enumerable:!0,get:function(){return a.maxUint120}}),Object.defineProperty(e,"maxUint128",{enumerable:!0,get:function(){return a.maxUint128}}),Object.defineProperty(e,"maxUint136",{enumerable:!0,get:function(){return a.maxUint136}}),Object.defineProperty(e,"maxUint144",{enumerable:!0,get:function(){return a.maxUint144}}),Object.defineProperty(e,"maxUint152",{enumerable:!0,get:function(){return a.maxUint152}}),Object.defineProperty(e,"maxUint160",{enumerable:!0,get:function(){return a.maxUint160}}),Object.defineProperty(e,"maxUint168",{enumerable:!0,get:function(){return a.maxUint168}}),Object.defineProperty(e,"maxUint176",{enumerable:!0,get:function(){return a.maxUint176}}),Object.defineProperty(e,"maxUint184",{enumerable:!0,get:function(){return a.maxUint184}}),Object.defineProperty(e,"maxUint192",{enumerable:!0,get:function(){return a.maxUint192}}),Object.defineProperty(e,"maxUint200",{enumerable:!0,get:function(){return a.maxUint200}}),Object.defineProperty(e,"maxUint208",{enumerable:!0,get:function(){return a.maxUint208}}),Object.defineProperty(e,"maxUint216",{enumerable:!0,get:function(){return a.maxUint216}}),Object.defineProperty(e,"maxUint224",{enumerable:!0,get:function(){return a.maxUint224}}),Object.defineProperty(e,"maxUint232",{enumerable:!0,get:function(){return a.maxUint232}}),Object.defineProperty(e,"maxUint240",{enumerable:!0,get:function(){return a.maxUint240}}),Object.defineProperty(e,"maxUint248",{enumerable:!0,get:function(){return a.maxUint248}}),Object.defineProperty(e,"maxUint256",{enumerable:!0,get:function(){return a.maxUint256}}),Object.defineProperty(e,"minInt8",{enumerable:!0,get:function(){return a.minInt8}}),Object.defineProperty(e,"minInt16",{enumerable:!0,get:function(){return a.minInt16}}),Object.defineProperty(e,"minInt24",{enumerable:!0,get:function(){return a.minInt24}}),Object.defineProperty(e,"minInt32",{enumerable:!0,get:function(){return a.minInt32}}),Object.defineProperty(e,"minInt40",{enumerable:!0,get:function(){return a.minInt40}}),Object.defineProperty(e,"minInt48",{enumerable:!0,get:function(){return a.minInt48}}),Object.defineProperty(e,"minInt56",{enumerable:!0,get:function(){return a.minInt56}}),Object.defineProperty(e,"minInt64",{enumerable:!0,get:function(){return a.minInt64}}),Object.defineProperty(e,"minInt72",{enumerable:!0,get:function(){return a.minInt72}}),Object.defineProperty(e,"minInt80",{enumerable:!0,get:function(){return a.minInt80}}),Object.defineProperty(e,"minInt88",{enumerable:!0,get:function(){return a.minInt88}}),Object.defineProperty(e,"minInt96",{enumerable:!0,get:function(){return a.minInt96}}),Object.defineProperty(e,"minInt104",{enumerable:!0,get:function(){return a.minInt104}}),Object.defineProperty(e,"minInt112",{enumerable:!0,get:function(){return a.minInt112}}),Object.defineProperty(e,"minInt120",{enumerable:!0,get:function(){return a.minInt120}}),Object.defineProperty(e,"minInt128",{enumerable:!0,get:function(){return a.minInt128}}),Object.defineProperty(e,"minInt136",{enumerable:!0,get:function(){return a.minInt136}}),Object.defineProperty(e,"minInt144",{enumerable:!0,get:function(){return a.minInt144}}),Object.defineProperty(e,"minInt152",{enumerable:!0,get:function(){return a.minInt152}}),Object.defineProperty(e,"minInt160",{enumerable:!0,get:function(){return a.minInt160}}),Object.defineProperty(e,"minInt168",{enumerable:!0,get:function(){return a.minInt168}}),Object.defineProperty(e,"minInt176",{enumerable:!0,get:function(){return a.minInt176}}),Object.defineProperty(e,"minInt184",{enumerable:!0,get:function(){return a.minInt184}}),Object.defineProperty(e,"minInt192",{enumerable:!0,get:function(){return a.minInt192}}),Object.defineProperty(e,"minInt200",{enumerable:!0,get:function(){return a.minInt200}}),Object.defineProperty(e,"minInt208",{enumerable:!0,get:function(){return a.minInt208}}),Object.defineProperty(e,"minInt216",{enumerable:!0,get:function(){return a.minInt216}}),Object.defineProperty(e,"minInt224",{enumerable:!0,get:function(){return a.minInt224}}),Object.defineProperty(e,"minInt232",{enumerable:!0,get:function(){return a.minInt232}}),Object.defineProperty(e,"minInt240",{enumerable:!0,get:function(){return a.minInt240}}),Object.defineProperty(e,"minInt248",{enumerable:!0,get:function(){return a.minInt248}}),Object.defineProperty(e,"minInt256",{enumerable:!0,get:function(){return a.minInt256}});var v=mv();Object.defineProperty(e,"presignMessagePrefix",{enumerable:!0,get:function(){return v.presignMessagePrefix}});var b=to();Object.defineProperty(e,"etherUnits",{enumerable:!0,get:function(){return b.etherUnits}}),Object.defineProperty(e,"gweiUnits",{enumerable:!0,get:function(){return b.gweiUnits}}),Object.defineProperty(e,"weiUnits",{enumerable:!0,get:function(){return b.weiUnits}});var m=Ce();Object.defineProperty(e,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return m.AbiConstructorNotFoundError}}),Object.defineProperty(e,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return m.AbiConstructorParamsNotFoundError}}),Object.defineProperty(e,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return m.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(e,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return m.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(e,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return m.AbiDecodingZeroDataError}}
48),Object.defineProperty(e,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return m.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return m.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(e,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return m.AbiEncodingLengthMismatchError}}),Object.defineProperty(e,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return m.AbiErrorInputsNotFoundError}}),Object.defineProperty(e,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return m.AbiErrorNotFoundError}}),Object.defineProperty(e,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return m.AbiErrorSignatureNotFoundError}}),Object.defineProperty(e,"AbiEventNotFoundError",{enumerable:!0,get:function(){return m.AbiEventNotFoundError}}),Object.defineProperty(e,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return m.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(e,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return m.AbiEventSignatureNotFoundError}}),Object.defineProperty(e,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return m.AbiFunctionNotFoundError}}),Object.defineProperty(e,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return m.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(e,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return m.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(e,"BytesSizeMismatchError",{enumerable:!0,get:function(){return m.BytesSizeMismatchError}}),Object.defineProperty(e,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return m.DecodeLogDataMismatch}}),Object.defineProperty(e,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return m.DecodeLogTopicsMismatch}}),Object.defineProperty(e,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return m.InvalidAbiDecodingTypeError}}),Object.defineProperty(e,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return m.InvalidAbiEncodingTypeError}}),Object.defineProperty(e,"InvalidArrayError",{enumerable:!0,get:function(){return m.InvalidArrayError}}),Object.defineProperty(e,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return m.InvalidDefinitionTypeError}}),Object.defineProperty(e,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return m.UnsupportedPackedAbiType}});var A=Ot();Object.defineProperty(e,"InvalidAddressError",{enumerable:!0,get:function(){return A.InvalidAddressError}});var y=ue();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return y.BaseError}}),Object.defineProperty(e,"setErrorConfig",{enumerable:!0,get:function(){return y.setErrorConfig}});var E=Yf();Object.defineProperty(e,"BlockNotFoundError",{enumerable:!0,get:function(){return E.BlockNotFoundError}});var x=F_();Object.defineProperty(e,"BundleFailedError",{enumerable:!0,get:function(){return x.BundleFailedError}});var O=bo();Object.defineProperty(e,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return O.ChainDoesNotSupportContract}}),Object.defineProperty(e,"ChainMismatchError",{enumerable:!0,get:function(){return O.ChainMismatchError}}),Object.defineProperty(e,"ChainNotFoundError",{enumerable:!0,get:function(){return O.ChainNotFoundError}}),Object.defineProperty(e,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return O.ClientChainNotConfiguredError}}),Object.defineProperty(e,"InvalidChainIdError",{enumerable:!0,get:function(){return O.InvalidChainIdError}});var R=wr();Object.defineProperty(e,"CallExecutionError",{enumerable:!0,get:function(){return R.CallExecutionError}}),Object.defineProperty(e,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return R.ContractFunctionExecutionError}}),Object.defineProperty(e,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return R.ContractFunctionRevertedError}}),Object.defineProperty(e,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return R.ContractFunctionZeroDataError}}),Object.defineProperty(e,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return R.CounterfactualDeploymentFailedError}}),Object.defineProperty(e,"RawContractError",{enumerable:!0,get:function(){return R.RawContractError}});var k=ed();Object.defineProperty(e,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return k.SizeExceedsPaddingSizeError}}),Object.defineProperty(e,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return k.SliceOffsetOutOfBoundsError}});var N=On();Object.defineProperty(e,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return N.IntegerOutOfRangeError}}),Object.defineProperty(e,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return N.InvalidBytesBooleanError}}),Object.defineProperty(e,"InvalidHexBooleanError",{enumerable:!0,get:function(){return N.InvalidHexBooleanError}}),Object.defineProperty(e,"InvalidHexValueError",{enumerable:!0,get:function(){return N.InvalidHexValueError}}),Object.defineProperty(e,"SizeOverflowError",{enumerable:!0,get:function(){return N.SizeOverflowError}});var H=g0();Object.defineProperty(e,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return H.EnsAvatarInvalidNftUriError}}),Object.defineProperty(e,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return H.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(e,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return H.EnsAvatarUriResolutionError}}),Object.defineProperty(e,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return H.EnsInvalidChainIdError}});var g=A_();Object.defineProperty(e,"EstimateGasExecutionError",{enumerable:!0,get:function(){return g.EstimateGasExecutionError}});var M=cd();Object.defineProperty(e,"BaseFeeScalarError",{enumerable:!0,get:function(){return M.BaseFeeScalarError}}),Object.defineProperty(e,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return M.Eip1559FeesNotSupportedError}}),Object.defineProperty(e,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return M.MaxFeePerGasTooLowError}});var S=h_();Object.defineProperty(e,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return S.FilterTypeNotSupportedError}});var I=sr();Object.defineProperty(e,"ExecutionRevertedError",{enumerable:!0,get:function(){return I.ExecutionRevertedError}}),Object.defineProperty(e,"FeeCapTooHighError",{enumerable:!0,get:function(){return I.FeeCapTooHighError}}),Object.defineProperty(e,"FeeCapTooLowError",{enumerable:!0,get:function(){return I.FeeCapTooLowError}}),Object.defineProperty(e,"InsufficientFundsError",{enumerable:!0,get:function(){return I.InsufficientFundsError}}),Object.defineProperty(e,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return I.IntrinsicGasTooHighError}}),Object.defineProperty(e,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return I.IntrinsicGasTooLowError}}),Object.defineProperty(e,"NonceMaxValueError",{enumerable:!0,get:function(){return I.NonceMaxValueError}}),Object.defineProperty(e,"NonceTooHighError",{enumerable:!0,get:function(){return I.NonceTooHighError}}),Object.defineProperty(e,"NonceTooLowError",{enumerable:!0,get:function(){return I.NonceTooLowError}}),Object.defineProperty(e,"TipAboveFeeCapError",{enumerable:!0,get:function(){return I.TipAboveFeeCapError}}),Object.defineProperty(e,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return I.TransactionTypeNotSupportedError}}),Object.defineProperty(e,"UnknownNodeError",{enumerable:!0,get:function(){return I.UnknownNodeError}});var C=qt();Object.defineProperty(e,"HttpRequestError",{enumerable:!0,get:function(){return C.HttpRequestError}}),Object.defineProperty(e,"RpcRequestError",{enumerable:!0,get:function(){return C.RpcRequestError}}),Object.defineProperty(e,"SocketClosedError",{enumerable:!0,get:function(){return C.SocketClosedError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return C.TimeoutError}}),Object.defineProperty(e,"WebSocketRequestError",{enumerable:!0,get:function(){return C.WebSocketRequestError}});var q=Pr();Object.defineProperty(e,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return q.AtomicityNotSupportedError}}),Object.defineProperty(e,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return q.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(e,"BundleTooLargeError",{enumerable:!0,get:function(){return q.BundleTooLargeError}}),Object.defineProperty(e,"ChainDisconnectedError",{enumerable:!0,get:function(){return q.ChainDisconnectedError}}),Object.defineProperty(e,"DuplicateIdError",{enumerable:!0,get:function(){return q.DuplicateIdError}}),Object.defineProperty(e,"InternalRpcError",{enumerable:!0,get:function(){return q.InternalRpcError}}),Object.defineProperty(e,"InvalidInputRpcError",{enumerable:!0,get:function(){return q.InvalidInputRpcError}}),Object.defineProperty(e,"InvalidParamsRpcError",{enumerable:!0,get:function(){return q.InvalidParamsRpcError}}),Object.defineProperty(e,"InvalidRequestRpcError",{enumerable:!0,get:function(){return q.InvalidRequestRpcError}}),Object.defineProperty(e,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return q.JsonRpcVersionUnsupportedError}}),Object.defineProperty(e,"LimitExceededRpcError",{enumerable:!0,get:function(){return q.LimitExceededRpcError}}),Object.defineProperty(e,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return q.MethodNotFoundRpcError}}),Object.defineProperty(e,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return q.MethodNotSupportedRpcError}}),Object.defineProperty(e,"ParseRpcError",{enumerable:!0,get:function(){return q.ParseRpcError}}),Object.defineProperty(e,"ProviderDisconnectedError",{enumerable:!0,get:function(){return q.ProviderDisconnectedError}}),Object.defineProperty(e,"ProviderRpcError",{enumerable:!0,get:function(){return q.ProviderRpcError}}),Object.defineProperty(e,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return q.ResourceNotFoundRpcError}}),Object.defineProperty(e,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return q.ResourceUnavailableRpcError}}),Object.defineProperty(e,"RpcError",{enumerable:!0,get:function(){return q.RpcError}}),Object.defineProperty(e,"SwitchChainError",{enumerable:!0,get:function(){return q.SwitchChainError}}),Object.defineProperty(e,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return q.TransactionRejectedRpcError}}),Object.defineProperty(e,"UnauthorizedProviderError",{enumerable:!0,get:function(){return q.UnauthorizedProviderError}}),Object.defineProperty(e,"UnknownBundleIdError",{enumerable:!0,get:function(){return q.UnknownBundleIdError}}),Object.defineProperty(e,"UnknownRpcError",{enumerable:!0,get:function(){return q.UnknownRpcError}}),Object.defineProperty(e,"UnsupportedChainIdError",{enumerable:!0,get:function(){return q.UnsupportedChainIdError}}),Object.defineProperty(e,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return q.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(e,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return q.UnsupportedProviderMethodError}}),Object.defineProperty(e,"UserRejectedRequestError",{enumerable:!0,get:function(){return q.UserRejectedRequestError}});var $=Gf();Object.defineProperty(e,"AccountStateConflictError",{enumerable:!0,get:function(){return $.AccountStateConflictError}}
48),Object.defineProperty(e,"StateAssignmentConflictError",{enumerable:!0,get:function(){return $.StateAssignmentConflictError}});var L=wt();Object.defineProperty(e,"FeeConflictError",{enumerable:!0,get:function(){return L.FeeConflictError}}),Object.defineProperty(e,"InvalidLegacyVError",{enumerable:!0,get:function(){return L.InvalidLegacyVError}}),Object.defineProperty(e,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return L.InvalidSerializableTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return L.InvalidSerializedTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return L.InvalidSerializedTransactionTypeError}}),Object.defineProperty(e,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return L.InvalidStorageKeySizeError}}),Object.defineProperty(e,"TransactionExecutionError",{enumerable:!0,get:function(){return L.TransactionExecutionError}}),Object.defineProperty(e,"TransactionNotFoundError",{enumerable:!0,get:function(){return L.TransactionNotFoundError}}),Object.defineProperty(e,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return L.TransactionReceiptNotFoundError}}),Object.defineProperty(e,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return L.WaitForTransactionReceiptTimeoutError}});var F=H0();Object.defineProperty(e,"UrlRequiredError",{enumerable:!0,get:function(){return F.UrlRequiredError}});var U=yv();Object.defineProperty(e,"InvalidDomainError",{enumerable:!0,get:function(){return U.InvalidDomainError}}),Object.defineProperty(e,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return U.InvalidPrimaryTypeError}}),Object.defineProperty(e,"InvalidStructTypeError",{enumerable:!0,get:function(){return U.InvalidStructTypeError}});var z=kv();Object.defineProperty(e,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return z.InvalidDecimalNumberError}});var Y=CE();Object.defineProperty(e,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return Y.ProviderRpcError}});var W=Er();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return W.decodeAbiParameters}});var V=qE();Object.defineProperty(e,"decodeDeployData",{enumerable:!0,get:function(){return V.decodeDeployData}});var X=id();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return X.decodeErrorResult}});var ne=uo();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return ne.decodeEventLog}});var K=a0();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return K.decodeFunctionData}});var Z=dr();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return Z.decodeFunctionResult}});var ee=Ct();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return ee.encodeAbiParameters}});var re=mo();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return re.encodeDeployData}});var te=c0();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return te.encodeErrorResult}});var Q=en();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return Q.encodeEventTopics}});var J=mt();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return J.encodeFunctionData}});var de=u0();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return de.encodeFunctionResult}});var Se=X_();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return Se.encodePacked}});var he=or();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return he.getAbiItem}});var le=fo();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return le.parseEventLogs}});var Ee=g_();Object.defineProperty(e,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return Ee.prepareEncodeFunctionData}});var pe=Et();Object.defineProperty(e,"checksumAddress",{enumerable:!0,get:function(){return pe.checksumAddress}}),Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return pe.getAddress}});var Le=Q_();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return Le.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return Le.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return Le.getCreateAddress}});var He=bt();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return He.isAddress}});var De=Mt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return De.isAddressEqual}});var Xe=fd();Object.defineProperty(e,"blobsToCommitments",{enumerable:!0,get:function(){return Xe.blobsToCommitments}});var Ge=ld();Object.defineProperty(e,"blobsToProofs",{enumerable:!0,get:function(){return Ge.blobsToProofs}});var ke=e0();Object.defineProperty(e,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return ke.commitmentsToVersionedHashes}});var Be=Qf();Object.defineProperty(e,"commitmentToVersionedHash",{enumerable:!0,get:function(){return Be.commitmentToVersionedHash}});var Qe=ME();Object.defineProperty(e,"fromBlobs",{enumerable:!0,get:function(){return Qe.fromBlobs}});var Ve=HE();Object.defineProperty(e,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return Ve.sidecarsToVersionedHashes}});var Fn=bd();Object.defineProperty(e,"toBlobSidecars",{enumerable:!0,get:function(){return Fn.toBlobSidecars}});var wo=R_();Object.defineProperty(e,"toBlobs",{enumerable:!0,get:function(){return wo.toBlobs}});var Br=d0();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return Br.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return Br.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return Br.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return Br.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return Br.offchainLookupSignature}});var Po=vd();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return Po.assertCurrentChain}});var kd=nv();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return kd.defineChain}});var $d=iv();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return $d.extractChain}});var jo=Ir();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return jo.getChainContractAddress}});var Ln=We();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return Ln.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return Ln.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return Ln.concatHex}});var Nd=p0();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return Nd.isBytes}});var Fd=at();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return Fd.isHex}});var Un=_r();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return Un.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return Un.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return Un.padHex}});var Ld=ft();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return Ld.size}}
48);var zn=At();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return zn.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return zn.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return zn.sliceHex}});var Ud=ir();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return Ud.trim}});var xr=Df();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return xr.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return xr.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return xr.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return xr.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return xr.fromBytes}});var Rr=Fe();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return Rr.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return Rr.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return Rr.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return Rr.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return Rr.hexToString}});var zd=v0();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return zd.fromRlp}});var Or=Ae();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Or.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Or.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Or.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Or.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Or.toBytes}});var Cr=ie();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return Cr.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return Cr.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return Cr.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return Cr.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return Cr.toHex}});var Dn=oo();Object.defineProperty(e,"bytesToRlp",{enumerable:!0,get:function(){return Dn.bytesToRlp}}),Object.defineProperty(e,"hexToRlp",{enumerable:!0,get:function(){return Dn.hexToRlp}}),Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return Dn.toRlp}});var Dd=V_();Object.defineProperty(e,"labelhash",{enumerable:!0,get:function(){return Dd.labelhash}});var Gd=h0();Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return Gd.namehash}});var Gn=kE();Object.defineProperty(e,"toCoinType",{enumerable:!0,get:function(){return Gn.toCoinType}});var Vd=jr();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return Vd.getContractError}});var Ao=ud();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return Ao.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return Ao.formatBlock}});var Wd=ur();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return Wd.formatLog}});var Vn=co();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return Vn.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return Vn.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return Vn.transactionType}});var So=Pd();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return So.defineTransactionReceipt}}),Object.defineProperty(e,"formatTransactionReceipt",{enumerable:!0,get:function(){return So.formatTransactionReceipt}});var sn=ar();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return sn.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return sn.formatTransactionRequest}}),Object.defineProperty(e,"rpcTransactionType",{enumerable:!0,get:function(){return sn.rpcTransactionType}});var Kd=E0();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return Kd.isHash}});var Zd=lt();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return Zd.keccak256}});var Yd=ov();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Yd.ripemd160}});var Jd=Xf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Jd.sha256}});var Xd=sv();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return Xd.toEventHash}});var Io=Cn();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return Io.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return Io.toEventSelector}});var k0=av();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return k0.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return k0.toEventSignature}});var t2=cv();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return t2.toFunctionHash}});var $0=Qr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return $0.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return $0.toFunctionSelector}});var N0=uv();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return N0.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return N0.toFunctionSignature}});var r2=Jv();Object.defineProperty(e,"defineKzg",{enumerable:!0,get:function(){return r2.defineKzg}});var n2=$E();Object.defineProperty(e,"setupKzg",{enumerable:!0,get:function(){return n2.setupKzg}});var F0=dv();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return F0.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return F0.nonceManager}});var i2=k_();Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return i2.withCache}});var o2=wd();Object.defineProperty(e,"withRetry",{enumerable:!0,get:function(){return o2.withRetry}});var s2=w0();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return s2.withTimeout}});var a2=NE();Object.defineProperty(e,"compactSignatureToSignature",{enumerable:!0,get:function(){return a2.compactSignatureToSignature}});var c2=go();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return c2.hashMessage}});var Qd=po();Object.defineProperty(e,"hashDomain",{enumerable:!0,get:function(){return Qd.hashDomain}}),Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return Qd.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Qd.hashTypedData}
48});var u2=S0();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return u2.isErc6492Signature}});var d2=x0();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return d2.isErc8010Signature}});var L0=FE();Object.defineProperty(e,"hexToCompactSignature",{enumerable:!0,get:function(){return L0.parseCompactSignature}}),Object.defineProperty(e,"parseCompactSignature",{enumerable:!0,get:function(){return L0.parseCompactSignature}});var f2=xv();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return f2.parseErc6492Signature}});var l2=Rv();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return l2.parseErc8010Signature}});var U0=LE();Object.defineProperty(e,"hexToSignature",{enumerable:!0,get:function(){return U0.parseSignature}}),Object.defineProperty(e,"parseSignature",{enumerable:!0,get:function(){return U0.parseSignature}});var b2=Ar();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return b2.recoverAddress}});var m2=R0();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return m2.recoverMessageAddress}});var h2=Wf();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return h2.recoverPublicKey}});var y2=UE();Object.defineProperty(e,"recoverTransactionAddress",{enumerable:!0,get:function(){return y2.recoverTransactionAddress}});var g2=O0();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return g2.recoverTypedDataAddress}});var z0=zE();Object.defineProperty(e,"compactSignatureToHex",{enumerable:!0,get:function(){return z0.serializeCompactSignature}}),Object.defineProperty(e,"serializeCompactSignature",{enumerable:!0,get:function(){return z0.serializeCompactSignature}});var p2=Ov();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return p2.serializeErc6492Signature}});var _2=Cv();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return _2.serializeErc8010Signature}});var D0=Gv();Object.defineProperty(e,"signatureToHex",{enumerable:!0,get:function(){return D0.serializeSignature}}),Object.defineProperty(e,"serializeSignature",{enumerable:!0,get:function(){return D0.serializeSignature}});var v2=DE();Object.defineProperty(e,"signatureToCompactSignature",{enumerable:!0,get:function(){return v2.signatureToCompactSignature}});var E2=hv();Object.defineProperty(e,"toPrefixedMessage",{enumerable:!0,get:function(){return E2.toPrefixedMessage}});var w2=qv();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return w2.verifyHash}});var P2=Mv();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return P2.verifyMessage}});var j2=Hv();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return j2.verifyTypedData}});var A2=Ye();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return A2.stringify}});var S2=cr();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return S2.assertRequest}});var ef=Ad();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return ef.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return ef.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return ef.assertTransactionLegacy}});var I2=C0();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return I2.getSerializedTransactionType}});var T2=md();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return T2.getTransactionType}});var B2=q0();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return B2.parseTransaction}});var x2=_0();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return x2.serializeAccessList}});var R2=Sd();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return R2.serializeTransaction}});var To=Id();Object.defineProperty(e,"domainSeparator",{enumerable:!0,get:function(){return To.domainSeparator}}),Object.defineProperty(e,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return To.getTypesForEIP712Domain}}),Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return To.seri
48alizeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return To.validateTypedData}});var O2=ro();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return O2.formatEther}});var C2=tn();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return C2.formatGwei}});var q2=od();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return q2.formatUnits}});var M2=$v();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return M2.parseEther}});var H2=Nv();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return H2.parseGwei}});var k2=Md();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return k2.parseUnits}})})(sf)),sf}var Zr={},Jp;function VE(){if(Jp)return Zr;Jp=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.MAGIC_VALUE_BYTES=Zr.MAGIC_VALUE=void 0;const e="0x1626ba7e";Zr.MAGIC_VALUE=e;const t="0x20c13b0b";return Zr.MAGIC_VALUE_BYTES=t,Zr}var Zu={},Ji={},Yr={},Xp;function Xv(){if(Xp)return Yr;Xp=1,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.PermissionsError=Yr.PERMISSIONS_REQUEST_REJECTED=void 0,Yr.PERMISSIONS_REQUEST_REJECTED=4001;class e extends Error{constructor(n,r,o){super(n),this.code=r,this.data=o,Object.setPrototypeOf(this,e.prototype)}}return Yr.PermissionsError=e,Yr}var Qp;function Qv(){if(Qp)return Ji;Qp=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.Wallet=void 0;const e=Xr(),t=Xv();
48class n{constructor(o){this.communicator=o}async getPermissions(){return(await this.communicator.send(e.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(o){if(!this.isPermissionRequestValid(o))throw new t.PermissionsError("Permissions request is invalid",t.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(e.Methods.wallet_requestPermissions,o)).data}catch{throw new t.PermissionsError("Permissions rejected",t.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(o){return o.every(s=>typeof s=="object"?Object.keys(s).every(i=>!!Object.values(e.RestrictedMethods).includes(i)):!1)}}return Ji.Wallet=n,Ji}var e_;function WE(){if(e_)return Zu;e_=1,Object.defineProperty(Zu,"__esModule",{value:!0});const e=Qv(),t=Xv(),n=(o,s)=>s.some(i=>i.parentCapability===o),r=()=>(o,s,i)=>{const c=i.value;return i.value=async function(){const u=new e.Wallet(this.communicator);let d=await u.getPermissions();if(n(s,d)||(d=await u.requestPermissions([{[s]:{}}])),!n(s,d))throw new t.PermissionsError("Permissions rejected",t.PERMISSIONS_REQUEST_REJECTED);return c.apply(this)},i};return Zu.default=r,Zu}var t_;function KE(){if(t_)return Ut;t_=1;var e=Ut&&Ut.__decorate||function(d,l,f,_){var T=arguments.length,w=T<3?l:_===null?_=Object.getOwnPropertyDescriptor(l,f):_,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(d,l,f,_);else for(var B=d.length-1;B>=0;B--)(p=d[B])&&(w=(T<3?p(w):T>3?p(l,f,w):p(l,f))||w);return T>3&&w&&Object.defineProperty(l,f,w),w},t=Ut&&Ut.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Safe=void 0;const n=GE(),r=VE(),o=Xr(),s=Nf(),i=$f(),c=t(WE());class u{constructor(l){this.communicator=l}async getChainInfo(){return(await this.communicator.send(o.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(o.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:l="usd"}={}){return(await this.communicator.send(o.Methods.getSafeBalances,{currency:l})).data}async check1271Signature(l,f="0x"){const _=await this.getInfo(),T=(0,n.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[l,f]}),w={call:s.RPC_CALLS.eth_call,params:[{to:_.safeAddress,data:T},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,w)).data.slice(0,10).toLowerCase()===r.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(l,f="0x"){const _=await this.getInfo(),T=(0,n.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[l,f]}),w={call:s.RPC_CALLS.eth_call,params:[{to:_.safeAddress,data:T},"latest"]};try{return(await this.communicator.send(o.Methods.rpcCall,w)).data.slice(0,10).toLowerCase()===r.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(l){return(0,n.hashMessage)(l)}calculateTypedMessageHash(l){const f=typeof l.domain.chainId=="object"?l.domain.chainId.toNumber():Number(l.domain.chainId);let _=l.primaryType;if(!_){const T=Object.values(l.types),w=Object.keys(l.types).filter(p=>T.every(B=>B.every(({type:j})=>j.replace("[","").replace("]","")!==p)));if(w.length===0||w.length>1)throw new Error("Please specify primaryType");_=w[0]}return(0,n.hashTypedData)({message:l.message,domain:{...l.domain,chainId:f,verifyingContract:l.domain.verifyingContract,salt:l.domain.salt},types:l.types,primaryType:_})}async getOffChainSignature(l){return(await this.communicator.send(o.Methods.getOffChainSignature,l)).data}async isMessageSigned(l,f="0x"){let _;if(typeof l=="string"&&(_=async()=>{const T=this.calculateMessageHash(l);return await this.isMessageHashSigned(T,f)}),(0,i.isObjectEIP712TypedData)(l)&&(_=async()=>{const T=this.calculateTypedMessageHash(l);return await this.isMessageHashSigned(T,f)}),_)return await _();throw new Error("Invalid message type")}async isMessageHashSigned(l,f="0x"){const _=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const T of _)if(await T(l,f))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(o.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(o.Methods.requestAddressBook,void 0)).data}}return Ut.Safe=u,e([(0,c.default)()],u.prototype,"requestAddressBook",null),Ut}var r_;function n_(){if(r_)return an;r_=1;var e=an&&an.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(an,"__esModule",{value:!0});const t=e(W2()),n=X2(),r=Q2(),o=KE(),s=Qv();class i{constructor(u={}){const{allowedDomains:d=null,debug:l=!1}=u;this.communicator=new t.default(d,l),this.eth=new r.Eth(this.communicator),this.txs=new n.TXs(this.communicator),this.safe=new o.Safe(this.communicator),this.wallet=new s.Wallet(this.communicator)}}return an.default=i,an}var i_;function ZE(){return i_||(i_=1,(function(e){var t=Lt&&Lt.__createBinding||(Object.create?(function(i,c,u,d){d===void 0&&(d=u);var l=Object.getOwnPropertyDescriptor(c,u);(!l||("get"in l?!c.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(i,d,l)}):(function(i,c,u,d){d===void 0&&(d=u),i[d]=c[u]})),n=Lt&&Lt.__exportStar||function(i,c){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(c,u)&&t(c,i,u)},r=Lt&&Lt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};
48Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const o=r(n_());e.default=o.default,n(n_(),e),n($f(),e),n(Xr(),e),n(u_(),e);var s=c_();Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}}),n(Nf(),e)})(Lt)),Lt}var Jr={},o_;function YE(){if(o_)return Jr;o_=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.numberToHex=Jr.getLowerCase=void 0;function e(n){return n&&n.toLowerCase()}Jr.getLowerCase=e;function t(n){return`0x${n.toString(16)}`}return Jr.numberToHex=t,Jr}var s_;function JE(){if(s_)return Wn;s_=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.SafeAppProvider=void 0;const e=ZE(),t=L2(),n=YE();class r extends t.EventEmitter{constructor(s,i){super(),this.submittedTxs=new Map,this.safe=s,this.sdk=i}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(s){var u,d,l,f;const{method:i,params:c=[]}=s;switch(i){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,n.numberToHex)(this.chainId);case"personal_sign":{const[B,j]=c;if(this.safe.safeAddress.toLowerCase()!==j.toLowerCase())throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(B);return("signature"in h?h.signature:void 0)||"0x"}case"eth_sign":{const[B,j]=c;if(this.safe.safeAddress.toLowerCase()!==B.toLowerCase()||!j.startsWith("0x"))throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(j);return("signature"in h?h.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[B,j]=c,h=typeof j=="string"?JSON.parse(j):j;if(this.safe.safeAddress.toLowerCase()!==B.toLowerCase())throw new Error("The address is invalid");const P=await this.sdk.txs.signTypedMessage(h);return("signature"in P?P.signature:void 0)||"0x"}case"eth_sendTransaction":const _={...c[0],value:c[0].value||"0",data:c[0].data||"0x"};typeof _.gas=="string"&&_.gas.startsWith("0x")&&(_.gas=parseInt(_.gas,16));const T=await this.sdk.txs.send({txs:[_],params:{safeTxGas:_.gas}});return this.submittedTxs.set(T.safeTxHash,{from:this.safe.safeAddress,hash:T.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:_.data,value:_.value,to:_.to,blockHash:null,blockNumber:null,transactionIndex:null}),T.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,n.getLowerCase)(c[0]),c[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,n.getLowerCase)(c[0]),c[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,n.getLowerCase)(c[0]),c[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,n.getLowerCase)(c[0]),c[1],c[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([c[0],c[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([c[0],c[1]]);case"eth_getTransactionByHash":let p=c[0];try{p=(await this.sdk.txs.getBySafeTxHash(p)).txHash||p}catch{}return this.submittedTxs.has(p)?this.submittedTxs.get(p):this.sdk.eth.getTransactionByHash([p]).then(B=>(B&&(B.hash=c[0]),B));case"eth_getTransactionReceipt":{let B=c[0];try{B=(await this.sdk.txs.getBySafeTxHash(B)).txHash||B}catch{}return this.sdk.eth.getTransactionReceipt([B]).then(j=>(j&&(j.transactionHash=c[0]),j))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(c[0]);case"eth_call":return this.sdk.eth.call([c[0],c[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([c[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(c[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([c[0]]);case"wallet_sendCalls":{const{from:B,calls:j,chainId:h}=c[0];if(h!==(0,n.numberToHex)(this.chainId))throw new Error(`Safe is not on chain ${h}`);if(B!==this.safe.safeAddress)throw Error("Invalid from address");const P=j.map((b,m)=>{if(!b.to)throw new Error(`Invalid call #${m}: missing "to" field`);return{to:b.to,data:b.data??"0x",value:b.value??(0,n.numberToHex)(0)}}),{safeTxHash:a}=await this.sdk.txs.send({txs:P});return{id:a}}case"wallet_getCallsStatus":{const B=c[0],j={[e.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[e.TransactionStatus.AWAITING_EXECUTION]:100,[e.TransactionStatus.SUCCESS]:200,[e.TransactionStatus.CANCELLED]:400,[e.TransactionStatus.FAILED]:500},h=await this.sdk.txs.getBySafeTxHash(B),P={version:"1.0",id:B,chainId:(0,n.numberToHex)(this.chainId),status:j[h.txStatus]};if(!h.txHash)return P;const a=await this.sdk.eth.getTransactionReceipt([h.txHash]);if(!a)return P;const v=((d=(u=h.txData)==null?void 0:u.dataDecoded)==null?void 0:d.method)!=="multiSend"?1:((f=(l=h.txData.dataDecoded.parameters)==null?void 0:l[0].valueDecoded)==null?void 0:f.length)??1,b=Number(a.blockNumber),m=Number(a.gasUsed);return P.receipts=Array(v).fill({logs:a.logs,status:(0,n.numberToHex)(h.txStatus===e.TransactionStatus.SUCCESS?1:0),blockHash:a.blockHash,blockNumber:(0,n.numberToHex)(b),gasUsed:(0,n.numberToHex)(m),transactionHash:h.txHash}),P}case"wallet_showCallsStatus":throw new Error(`"${s.method}" not supported`);case"wallet_getCapabilities":return{[(0,n.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}
48}};default:throw Error(`"${s.method}" not implemented`)}}send(s,i){s||i("Undefined request"),this.request(s).then(c=>i(null,{jsonrpc:"2.0",id:s.id,result:c})).catch(c=>i(c,null))}}return Wn.SafeAppProvider=r,Wn}var a_;function XE(){return a_||(a_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=JE();Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return t.SafeAppProvider}})})(tf)),tf}var e2=XE();const QE=N2(e2),nw=U2({__proto__:null,default:QE},[e2]);export{nw as i};
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.