PageSourceSearch

https://aerodrome.finance/assets/index-pH2snnd-.js

js aerodrome.finance collected 2026-09-24 19:55:27 UTC 420,326 bytes, 44 lines download raw bytes

1import{e8 as Dh,em as Uh,dB as Lh}from"./index-Chd_Wa1n.js";import{r as zh}from"./index-BozP5vQt.js";import{r as Gh,a as Tr,b as Dg}from"./sha3-Bk1ffKuE.js";import{g as bd}from"./index-BbP3371Q.js";function Vh(e,r){for(var t=0;t<r.length;t++){const n=r[t];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Gu={},Mr={},tt={},lr={},Ft={},Fr={},xr={},md;function Ug(){if(md)return xr;md=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.getSDKVersion=void 0;const e=()=>"9.1.0";return xr.getSDKVersion=e,xr}var kr={},gd;function Wh(){if(gd)return kr;gd=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.generateRequestId=void 0;const e=n=>n.toString(16).padStart(2,"0"),r=n=>{const a=new Uint8Array(n/2);return window.crypto.getRandomValues(a),Array.from(a,e).join("")},t=()=>typeof window<"u"?r(10):new Date().getTime().toString(36);return kr.generateRequestId=t,kr}var yd;function Lg(){if(yd)return Fr;yd=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.MessageFormatter=void 0;const e=Ug(),r=Wh();class t{}return Fr.MessageFormatter=t,t.makeRequest=(n,a)=>({id:(0,r.generateRequestId)(),method:n,params:a,env:{sdkVersion:(0,e.getSDKVersion)()}}),t.makeResponse=(n,a,i)=>({id:n,success:!0,version:i,data:a}),t.makeErrorResponse=(n,a,i)=>({id:n,success:!1,error:a,version:i}),Fr}var xt={},hd;function Xt(){if(hd)return xt;hd=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.RestrictedMethods=xt.Methods=void 0;var e;(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(e||(xt.Methods=e={}));var r;return(function(t){t.requestAddressBook="requestAddressBook"})(r||(xt.RestrictedMethods=r={})),xt}var pd;function Kh(){return pd||(pd=1,(function(e){var r=Ft&&Ft.__createBinding||(Object.create?(function(i,o,s,u){u===void 0&&(u=s);var d=Object.getOwnPropertyDescriptor(o,s);(!d||("get"in d?!o.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,u,d)}):(function(i,o,s,u){u===void 0&&(u=s),i[u]=o[s]})),t=Ft&&Ft.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,i,s)};Object.defineProperty(e,"__esModule",{value:!0});const n=Lg();class a{constructor(o=null,s=!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 c=!d,f=!this.isServer&&l===window.parent,h=typeof d.version<"u"&&parseInt(d.version.split(".")[0]),y=typeof h=="number"&&h>=1;let b=!0;return Array.isArray(this.allowedOrigins)&&(b=this.allowedOrigins.find(p=>p.test(u))!==void 0),!c&&f&&y&&b},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=n.MessageFormatter.makeRequest(u,d);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(l,"*"),new Promise((c,f)=>{this.callbacks.set(l.id,h=>{if(!h.success){f(new Error(h.error));return}c(h)})})},this.allowedOrigins=o,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=a,t(Xt(),e)})(Ft)),Ft}var Hr={},kt={},$r={},_d;function Zh(){if(_d)return $r;
1_d=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.isObjectEIP712TypedData=void 0;const e=r=>typeof r=="object"&&r!=null&&"domain"in r&&"types"in r&&"message"in r;return $r.isObjectEIP712TypedData=e,$r}var Vu={},vd;function Yh(){return vd||(vd=1,Object.defineProperty(Vu,"__esModule",{value:!0})),Vu}var Wu={},Ed;function Jh(){return Ed||(Ed=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var r=zh();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})})(Wu)),Wu}var Ku={},jd;function Xh(){return jd||(jd=1,Object.defineProperty(Ku,"__esModule",{value:!0}),Xt()),Ku}var Pd;function yc(){return Pd||(Pd=1,(function(e){var r=kt&&kt.__createBinding||(Object.create?(function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}):(function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]})),t=kt&&kt.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&r(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),t(Zh(),e),t(Yh(),e),t(Jh(),e),t(Xh(),e)})(kt)),kt}var wd;function Qh(){if(wd)return Hr;wd=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.TXs=void 0;const e=Xt(),r=yc();class t{constructor(a){this.communicator=a}async getBySafeTxHash(a){if(!a)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:a})).data}async signMessage(a){const i={message:a};return(await this.communicator.send(e.Methods.signMessage,i)).data}async signTypedMessage(a){if(!(0,r.isObjectEIP712TypedData)(a))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:a})).data}async send({txs:a,params:i}){if(!a||!a.length)throw new Error("No transactions were passed");const o={txs:a,params:i};return(await this.communicator.send(e.Methods.sendTransactions,o)).data}}return Hr.TXs=t,Hr}var Nr={},Dr={},Td;function hc(){return Td||(Td=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.RPC_CALLS=void 0,Dr.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"}),Dr}var Ad;function ep(){if(Ad)return Nr;
1Ad=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.Eth=void 0;const e=hc(),r=Xt(),t={defaultBlockParam:(a="latest")=>a,returnFullTxObjectParam:(a=!1)=>a,blockNumberToHex:a=>Number.isInteger(a)?`0x${a.toString(16)}`:a};class n{constructor(i){this.communicator=i,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,t.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,t.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,t.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,t.blockNumberToHex,t.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,t.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[t.blockNumberToHex,t.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,t.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=o=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([o]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(i){const{call:o,formatters:s}=i;return async u=>{s&&Array.isArray(u)&&s.forEach((c,f)=>{c&&(u[f]=c(u[f]))});const d={call:o,params:u||[]};return(await this.communicator.send(r.Methods.rpcCall,d)).data}}}return Nr.Eth=n,Nr}var rt={},Zu={},Yu={},Ur={},Lr={},Id;function tp(){return Id||(Id=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.version=void 0,Lr.version="1.0.5"),Lr}var Od;function Ar(){if(Od)return Ur;
1Od=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.BaseError=void 0;const e=tp();class r extends Error{constructor(n,a={}){const i=a.cause instanceof r?a.cause.details:a.cause?.message?a.cause.message:a.details,o=a.cause instanceof r&&a.cause.docsPath||a.docsPath,s=[n||"An error occurred.","",...a.metaMessages?[...a.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...i?[`Details: ${i}`]:[],`Version: abitype@${e.version}`].join(`
2`);super(s),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"}),a.cause&&(this.cause=a.cause),this.details=i,this.docsPath=o,this.metaMessages=a.metaMessages,this.shortMessage=n}}return Ur.BaseError=r,Ur}var Zn={},Sd;function rp(){if(Sd)return Zn;Sd=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.narrow=e;function e(r){return r}return Zn}var Yn={},Jn={},Xn={},Qn={},Ke={},Rd;function Vs(){if(Rd)return Ke;Rd=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.isTupleRegex=Ke.integerRegex=Ke.bytesRegex=void 0,Ke.execTyped=e;function e(r,t){return r.exec(t)?.groups}return Ke.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ke.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)?$/,Ke.isTupleRegex=/^\(.+?\).*?$/,Ke}var Bd;function zg(){if(Bd)return Qn;Bd=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.formatAbiParameter=t;const e=Vs(),r=/^tuple(?<array>(\[(\d*)\])*)$/;function t(n){let a=n.type;if(r.test(n.type)&&"components"in n){a="(";const i=n.components.length;for(let s=0;s<i;s++){const u=n.components[s];a+=t(u),s<i-1&&(a+=", ")}const o=(0,e.execTyped)(r,n.type);return a+=`)${o?.array??""}`,t({...n,type:a})}return"indexed"in n&&n.indexed&&(a=`${a} indexed`),n.name?`${a} ${n.name}`:a}return Qn}var Cd;function Gg(){if(Cd)return Xn;Cd=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.formatAbiParameters=r;const e=zg();function r(t){let n="";const a=t.length;for(let i=0;i<a;i++){const o=t[i];n+=(0,e.formatAbiParameter)(o),i!==a-1&&(n+=", ")}return n}return Xn}var qd;function Vg(){if(qd)return Jn;qd=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.formatAbiItem=r;const e=Gg();function r(t){return t.type==="function"?`function ${t.name}(${(0,e.formatAbiParameters)(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${t.outputs.length?` returns (${(0,e.formatAbiParameters)(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${(0,e.formatAbiParameters)(t.inputs)})`:t.type==="error"?`error ${t.name}(${(0,e.formatAbiParameters)(t.inputs)})`:t.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?"fallback()":"receive() external payable"}return Jn}var Md;function np(){if(Md)return Yn;Md=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.formatAbi=r;const e=Vg();function r(t){const n=[],a=t.length;for(let i=0;i<a;i++){const o=t[i],s=(0,e.formatAbiItem)(o);n.push(s)}return n}return Yn}var ea={},ye={},Fd;function Ir(){if(Fd)return ye;Fd=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.functionModifiers=ye.eventModifiers=ye.modifiers=void 0,ye.isErrorSignature=t,ye.execErrorSignature=n,ye.isEventSignature=i,ye.execEventSignature=o,ye.isFunctionSignature=u,ye.execFunctionSignature=d,ye.isStructSignature=c,ye.execStructSignature=f,ye.isConstructorSignature=y,ye.execConstructorSignature=b,ye.isFallbackSignature=v,ye.isReceiveSignature=E;const e=Vs(),r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function t(g){return r.test(g)}function n(g){return(0,e.execTyped)(r,g)}const a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function i(g){return a.test(g)}function o(g){return(0,e.execTyped)(a,g)}const s=/^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(g){return s.test(g)}function d(g){return(0,e.execTyped)(s,g)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function c(g){return l.test(g)}function f(g){return(0,e.execTyped)(l,g)}const h=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function y(g){return h.test(g)}function b(g){return(0,e.execTyped)(h,g)}const p=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function v(g){return p.test(g)}const m=/^receive\(\) external payable$/;function E(g){return m.test(g)}return ye.modifiers=new Set(["memory","indexed","storage","calldata"]),ye.eventModifiers=new Set(["indexed"]),ye.functionModifiers=new Set(["calldata","memory","storage"]),ye}var ta={},nt={},xd;function Ws(){if(xd)return nt;
2xd=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.UnknownSolidityTypeError=nt.UnknownTypeError=nt.InvalidAbiItemError=void 0;const e=Ar();class r extends e.BaseError{constructor({signature:i}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(i,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}nt.InvalidAbiItemError=r;class t extends e.BaseError{constructor({type:i}){super("Unknown type.",{metaMessages:[`Type "${i}" 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"})}}nt.UnknownTypeError=t;class n extends e.BaseError{constructor({type:i}){super("Unknown type.",{metaMessages:[`Type "${i}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return nt.UnknownSolidityTypeError=n,nt}var Ee={},kd;function wn(){if(kd)return Ee;kd=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InvalidAbiTypeParameterError=Ee.InvalidFunctionModifierError=Ee.InvalidModifierError=Ee.SolidityProtectedKeywordError=Ee.InvalidParameterError=Ee.InvalidAbiParametersError=Ee.InvalidAbiParameterError=void 0;const e=Ar();class r 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"})}}Ee.InvalidAbiParameterError=r;class t 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"})}}Ee.InvalidAbiParametersError=t;class n extends e.BaseError{constructor({param:d}){super("Invalid ABI parameter.",{details:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}Ee.InvalidParameterError=n;class a 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"})}}Ee.SolidityProtectedKeywordError=a;class i extends e.BaseError{constructor({param:d,type:l,modifier:c}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${c}" not allowed${l?` in "${l}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}Ee.InvalidModifierError=i;class o extends e.BaseError{constructor({param:d,type:l,modifier:c}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${c}" not allowed${l?` in "${l}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${c}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}Ee.InvalidFunctionModifierError=o;class s 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 Ee.InvalidAbiTypeParameterError=s,Ee}var at={},Hd;function pc(){if(Hd)return at;
2Hd=1,Object.defineProperty(at,"__esModule",{value:!0}),at.InvalidStructSignatureError=at.UnknownSignatureError=at.InvalidSignatureError=void 0;const e=Ar();class r extends e.BaseError{constructor({signature:i,type:o}){super(`Invalid ${o} signature.`,{details:i}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}at.InvalidSignatureError=r;class t extends e.BaseError{constructor({signature:i}){super("Unknown signature.",{details:i}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}at.UnknownSignatureError=t;class n extends e.BaseError{constructor({signature:i}){super("Invalid struct signature.",{details:i,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return at.InvalidStructSignatureError=n,at}var zr={},$d;function Wg(){if($d)return zr;$d=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.CircularReferenceError=void 0;const e=Ar();class r extends e.BaseError{constructor({type:n}){super("Circular reference detected.",{metaMessages:[`Struct "${n}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return zr.CircularReferenceError=r,zr}var ot={},Gr={},Nd;function Kg(){if(Nd)return Gr;Nd=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.InvalidParenthesisError=void 0;const e=Ar();class r extends e.BaseError{constructor({current:n,depth:a}){super("Unbalanced parentheses.",{metaMessages:[`"${n.trim()}" has too many ${a>0?"opening":"closing"} parentheses.`],details:`Depth "${a}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return Gr.InvalidParenthesisError=r,Gr}var fr={},Dd;function ap(){if(Dd)return fr;Dd=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.parameterCache=void 0,fr.getParameterCacheKey=e;function e(r,t){return t?`${t}:${r}`:r}return fr.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}]]),fr}var Ud;function wr(){if(Ud)return ot;
2Ud=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.parseSignature=s,ot.parseAbiParameter=c,ot.splitParameters=f,ot.isSolidityType=h,ot.isSolidityKeyword=b,ot.isValidDataLocation=p;const e=Vs(),r=Ws(),t=wn(),n=pc(),a=Kg(),i=ap(),o=Ir();function s(v,m={}){if((0,o.isFunctionSignature)(v)){const E=(0,o.execFunctionSignature)(v);if(!E)throw new n.InvalidSignatureError({signature:v,type:"function"});const g=f(E.parameters),_=[],j=g.length;for(let A=0;A<j;A++)_.push(c(g[A],{modifiers:o.functionModifiers,structs:m,type:"function"}));const P=[];if(E.returns){const A=f(E.returns),T=A.length;for(let S=0;S<T;S++)P.push(c(A[S],{modifiers:o.functionModifiers,structs:m,type:"function"}))}return{name:E.name,type:"function",stateMutability:E.stateMutability??"nonpayable",inputs:_,outputs:P}}if((0,o.isEventSignature)(v)){const E=(0,o.execEventSignature)(v);if(!E)throw new n.InvalidSignatureError({signature:v,type:"event"});const g=f(E.parameters),_=[],j=g.length;for(let P=0;P<j;P++)_.push(c(g[P],{modifiers:o.eventModifiers,structs:m,type:"event"}));return{name:E.name,type:"event",inputs:_}}if((0,o.isErrorSignature)(v)){const E=(0,o.execErrorSignature)(v);if(!E)throw new n.InvalidSignatureError({signature:v,type:"error"});const g=f(E.parameters),_=[],j=g.length;for(let P=0;P<j;P++)_.push(c(g[P],{structs:m,type:"error"}));return{name:E.name,type:"error",inputs:_}}if((0,o.isConstructorSignature)(v)){const E=(0,o.execConstructorSignature)(v);if(!E)throw new n.InvalidSignatureError({signature:v,type:"constructor"});const g=f(E.parameters),_=[],j=g.length;for(let P=0;P<j;P++)_.push(c(g[P],{structs:m,type:"constructor"}));return{type:"constructor",stateMutability:E.stateMutability??"nonpayable",inputs:_}}if((0,o.isFallbackSignature)(v))return{type:"fallback"};if((0,o.isReceiveSignature)(v))return{type:"receive",stateMutability:"payable"};throw new n.UnknownSignatureError({signature:v})}const u=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,d=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,l=/^u?int$/;function c(v,m){const E=(0,i.getParameterCacheKey)(v,m?.type);if(i.parameterCache.has(E))return i.parameterCache.get(E);const g=e.isTupleRegex.test(v),_=(0,e.execTyped)(g?d:u,v);if(!_)throw new t.InvalidParameterError({param:v});if(_.name&&b(_.name))throw new t.SolidityProtectedKeywordError({param:v,name:_.name});const j=_.name?{name:_.name}:{},P=_.modifier==="indexed"?{indexed:!0}:{},A=m?.structs??{};let T,S={};if(g){T="tuple";const F=f(_.type),O=[],w=F.length;for(let I=0;I<w;I++)O.push(c(F[I],{structs:A}));S={components:O}}else if(_.type in A)T="tuple",S={components:A[_.type]};else if(l.test(_.type))T=`${_.type}256`;else if(T=_.type,m?.type!=="struct"&&!h(T))throw new r.UnknownSolidityTypeError({type:T});if(_.modifier){if(!m?.modifiers?.has?.(_.modifier))throw new t.InvalidModifierError({param:v,type:m?.type,modifier:_.modifier});if(o.functionModifiers.has(_.modifier)&&!p(T,!!_.array))throw new t.InvalidFunctionModifierError({param:v,type:m?.type,modifier:_.modifier})}const B={type:`${T}${_.array??""}`,...j,...P,...S};return i.parameterCache.set(E,B),B}function f(v,m=[],E="",g=0){const _=v.trim().length;for(let j=0;j<_;j++){const P=v[j],A=v.slice(j+1);switch(P){case",":return g===0?f(A,[...m,E.trim()]):f(A,m,`${E}${P}`,g);case"(":return f(A,m,`${E}${P}`,g+1);case")":return f(A,m,`${E}${P}`,g-1);default:return f(A,m,`${E}${P}`,g)}}if(E==="")return m;if(g!==0)throw new a.InvalidParenthesisError({current:E,depth:g});return m.push(E.trim()),m}function h(v){return v==="address"||v==="bool"||v==="function"||v==="string"||e.bytesRegex.test(v)||e.integerRegex.test(v)}const y=/^(?: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 b(v){return v==="address"||v==="bool"||v==="function"||v==="string"||v==="tuple"||e.bytesRegex.test(v)||e.integerRegex.test(v)||y.test(v)}function p(v,m){return m||v==="bytes"||v==="string"||v==="tuple"}return ot}var Ld;function Ks(){if(Ld)return ta;Ld=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.parseStructs=s;const e=Vs(),r=Ws(),t=wn(),n=pc(),a=Wg(),i=Ir(),o=wr();function s(l){const c={},f=l.length;for(let p=0;p<f;p++){const v=l[p];if(!(0,i.isStructSignature)(v))continue;const m=(0,i.execStructSignature)(v);if(!m)throw new n.InvalidSignatureError({signature:v,type:"struct"});const E=m.properties.split(";"),g=[],_=E.length;for(let j=0;j<_;j++){const A=E[j].trim();if(!A)continue;const T=(0,o.parseAbiParameter)(A,{type:"struct"});g.push(T)}if(!g.length)throw new n.InvalidStructSignatureError({signature:v});c[m.name]=g}const h={},y=Object.entries(c),b=y.length;for(let p=0;p<b;p++){const[v,m]=y[p];h[v]=d(m,c)}return h}const u=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(l,c,f=new Set){const h=[],y=l.length;for(let b=0;b<y;b++){const p=l[b];if(e.isTupleRegex.test(p.type))h.push(p);else{const m=(0,e.execTyped)(u,p.type);if(!m?.type)throw new t.InvalidAbiTypeParameterError({abiParameter:p});const{array:E,type:g}=m;if(g in c){if(f.has(g))throw new a.CircularReferenceError({type:g});h.push({...p,type:`tuple${E??""}`,components:d(c[g]??[],c,new Set([...f,g]))})}else if((0,o.isSolidityType)(g))h.push(p);else throw new r.UnknownTypeError({type:g})}}return h}return ta}var zd;
2function op(){if(zd)return ea;zd=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.parseAbi=n;const e=Ir(),r=Ks(),t=wr();function n(a){const i=(0,r.parseStructs)(a),o=[],s=a.length;for(let u=0;u<s;u++){const d=a[u];(0,e.isStructSignature)(d)||o.push((0,t.parseSignature)(d,i))}return o}return ea}var ra={},Gd;function ip(){if(Gd)return ra;Gd=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.parseAbiItem=a;const e=Ws(),r=Ir(),t=Ks(),n=wr();function a(i){let o;if(typeof i=="string")o=(0,n.parseSignature)(i);else{const s=(0,t.parseStructs)(i),u=i.length;for(let d=0;d<u;d++){const l=i[d];if(!(0,r.isStructSignature)(l)){o=(0,n.parseSignature)(l,s);break}}}if(!o)throw new e.InvalidAbiItemError({signature:i});return o}return ra}var na={},Vd;function sp(){if(Vd)return na;Vd=1,Object.defineProperty(na,"__esModule",{value:!0}),na.parseAbiParameter=a;const e=wn(),r=Ir(),t=Ks(),n=wr();function a(i){let o;if(typeof i=="string")o=(0,n.parseAbiParameter)(i,{modifiers:r.modifiers});else{const s=(0,t.parseStructs)(i),u=i.length;for(let d=0;d<u;d++){const l=i[d];if(!(0,r.isStructSignature)(l)){o=(0,n.parseAbiParameter)(l,{modifiers:r.modifiers,structs:s});break}}}if(!o)throw new e.InvalidAbiParameterError({param:i});return o}return na}var aa={},Wd;function up(){if(Wd)return aa;Wd=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.parseAbiParameters=i;const e=wn(),r=Ir(),t=Ks(),n=wr(),a=wr();function i(o){const s=[];if(typeof o=="string"){const u=(0,n.splitParameters)(o),d=u.length;for(let l=0;l<d;l++)s.push((0,a.parseAbiParameter)(u[l],{modifiers:r.modifiers}))}else{const u=(0,t.parseStructs)(o),d=o.length;for(let l=0;l<d;l++){const c=o[l];if((0,r.isStructSignature)(c))continue;const f=(0,n.splitParameters)(c),h=f.length;for(let y=0;y<h;y++)s.push((0,a.parseAbiParameter)(f[y],{modifiers:r.modifiers,structs:u}))}}if(s.length===0)throw new e.InvalidAbiParametersError({params:o});return s}return aa}var Kd;function Zs(){return Kd||(Kd=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 r=Ar();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return r.BaseError}});var t=rp();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return t.narrow}});var n=np();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return n.formatAbi}});var a=Vg();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return a.formatAbiItem}});var i=zg();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return i.formatAbiParameter}});var o=Gg();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return o.formatAbiParameters}});var s=op();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return s.parseAbi}});var u=ip();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return u.parseAbiItem}});var d=sp();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var l=up();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return l.parseAbiParameters}});var c=Ws();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return c.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return c.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return c.UnknownSolidityTypeError}});var f=wn();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return f.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return f.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return f.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return f.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return f.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return f.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return f.InvalidAbiParameterError}});var h=pc();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return h.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return h.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return h.UnknownSignatureError}});var y=Kg();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return y.InvalidParenthesisError}});var b=Wg();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return b.CircularReferenceError}})})(Yu)),Yu}var br={},oa={},Zd;function ue(){if(Zd)return oa;Zd=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.getAction=e;function e(r,t,n){const a=r[t.name];if(typeof a=="function")return a;const i=r[n];return typeof i=="function"?i:o=>t(r,o)}return oa}var ia={},sa={},J={},Vr={},Yd;
2function _t(){if(Yd)return Vr;Yd=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.formatAbiItem=r,Vr.formatAbiParams=t;const e=me();function r(a,{includeName:i=!1}={}){if(a.type!=="function"&&a.type!=="event"&&a.type!=="error")throw new e.InvalidDefinitionTypeError(a.type);return`${a.name}(${t(a.inputs,{includeName:i})})`}function t(a,{includeName:i=!1}={}){return a?a.map(o=>n(o,{includeName:i})).join(i?", ":","):""}function n(a,{includeName:i}){return a.type.startsWith("tuple")?`(${t(a.components,{includeName:i})})${a.type.slice(5)}`:a.type+(i&&a.name?` ${a.name}`:"")}return Vr}var ua={},ca={},Jd;function je(){if(Jd)return ca;Jd=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.isHex=e;function e(r,{strict:t=!0}={}){return!r||typeof r!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}return ca}var Xd;function Be(){if(Xd)return ua;Xd=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.size=r;const e=je();function r(t){return(0,e.isHex)(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}return ua}var Wr={},it={},Kr={},Qd;
2function cp(){return Qd||(Qd=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.version=void 0,Kr.version="2.18.2"),Kr}var el;function Ys(){if(el)return it;el=1,Object.defineProperty(it,"__esModule",{value:!0}),it.getVersion=it.getUrl=it.getContractAddress=void 0;const e=cp(),r=a=>a;it.getContractAddress=r;const t=a=>a;it.getUrl=t;const n=()=>`viem@${e.version}`;return it.getVersion=n,it}var tl;function ne(){if(tl)return Wr;tl=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.BaseError=void 0;const e=Ys();class r extends Error{constructor(a,i={}){super(),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:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,e.getVersion)()});const o=i.cause instanceof r?i.cause.details:i.cause?.message?i.cause.message:i.details,s=i.cause instanceof r&&i.cause.docsPath||i.docsPath;this.message=[a||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...s?[`Docs: ${i.docsBaseUrl??"https://viem.sh"}${s}${i.docsSlug?`#${i.docsSlug}`:""}`]:[],...o?[`Details: ${o}`]:[],`Version: ${this.version}`].join(`
3`),i.cause&&(this.cause=i.cause),this.details=o,this.docsPath=s,this.metaMessages=i.metaMessages,this.shortMessage=a}walk(a){return t(this,a)}}Wr.BaseError=r;function t(n,a){return a?.(n)?n:n&&typeof n=="object"&&"cause"in n?t(n.cause,a):a?null:n}return Wr}var rl;function me(){if(rl)return J;rl=1,Object.defineProperty(J,"__esModule",{value:!0}),J.UnsupportedPackedAbiType=J.InvalidDefinitionTypeError=J.InvalidArrayError=J.InvalidAbiDecodingTypeError=J.InvalidAbiEncodingTypeError=J.DecodeLogTopicsMismatch=J.DecodeLogDataMismatch=J.BytesSizeMismatchError=J.AbiItemAmbiguityError=J.AbiFunctionSignatureNotFoundError=J.AbiFunctionOutputsNotFoundError=J.AbiFunctionNotFoundError=J.AbiEventNotFoundError=J.AbiEventSignatureNotFoundError=J.AbiEventSignatureEmptyTopicsError=J.AbiErrorSignatureNotFoundError=J.AbiErrorNotFoundError=J.AbiErrorInputsNotFoundError=J.AbiEncodingLengthMismatchError=J.AbiEncodingBytesSizeMismatchError=J.AbiEncodingArrayLengthMismatchError=J.AbiDecodingZeroDataError=J.AbiDecodingDataSizeTooSmallError=J.AbiDecodingDataSizeInvalidError=J.AbiConstructorParamsNotFoundError=J.AbiConstructorNotFoundError=void 0;const e=_t(),r=Be(),t=ne();class n extends t.BaseError{constructor({docsPath:w}){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:w}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}J.AbiConstructorNotFoundError=n;class a extends t.BaseError{constructor({docsPath:w}){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:w}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}J.AbiConstructorParamsNotFoundError=a;class i extends t.BaseError{constructor({data:w,size:I}){super([`Data size of ${I}
5 bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(`
6`),{metaMessages:[`Data: ${w} (${I} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeInvalidError"})}}J.AbiDecodingDataSizeInvalidError=i;class o extends t.BaseError{constructor({data:w,params:I,size:M}){super([`Data size of ${M} bytes is too small for given parameters.`].join(`
7`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(I,{includeName:!0})})`,`Data:   ${w} (${M} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"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=w,this.params=I,this.size=M}}J.AbiDecodingDataSizeTooSmallError=o;class s extends t.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}J.AbiDecodingZeroDataError=s;class u extends t.BaseError{constructor({expectedLength:w,givenLength:I,type:M}){super([`ABI encoding array length mismatch for type ${M}.`,`Expected length: ${w}`,`Given length: ${I}`].join(`
8`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}J.AbiEncodingArrayLengthMismatchError=u;class d extends t.BaseError{constructor({expectedSize:w,value:I}){super(`Size of bytes "${I}" (bytes${(0,r.size)(I)}) does not match expected size (bytes${w}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}J.AbiEncodingBytesSizeMismatchError=d;class l extends t.BaseError{constructor({expectedLength:w,givenLength:I}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${w}`,`Given length (values): ${I}`].join(`
9`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}J.AbiEncodingLengthMismatchError=l;class c extends t.BaseError{constructor(w,{docsPath:I}){super([`Arguments (\`args\`) were provided to "${w}", but "${w}" 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:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorInputsNotFoundError"})}}J.AbiErrorInputsNotFoundError=c;class f extends t.BaseError{constructor(w,{docsPath:I}={}){super([`Error ${w?`"${w}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
11`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorNotFoundError"})}}J.AbiErrorNotFoundError=f;class h extends t.BaseError{constructor(w,{docsPath:I}){super([`Encoded error signature "${w}" 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=${w}.`].join(`
12`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=w}}J.AbiErrorSignatureNotFoundError=h;class y extends t.BaseError{constructor({docsPath:w}){super("Cannot extract event signature from empty topics.",{docsPath:w}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}J.AbiEventSignatureEmptyTopicsError=y;class b extends t.BaseError{constructor(w,{docsPath:I}){super([`Encoded event signature "${w}" 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=${w}.`].join(`
13`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}J.AbiEventSignatureNotFoundError=b;class p extends t.BaseError{constructor(w,{docsPath:I}={}){super([`Event ${w?`"${w}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
14`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}J.AbiEventNotFoundError=p;class v extends t.BaseError{constructor(w,{docsPath:I}={}){super([`Function ${w?`"${w}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
15`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}J.AbiFunctionNotFoundError=v;class m extends t.BaseError{constructor(w,{docsPath:I}){super([`Function "${w}" 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:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}J.AbiFunctionOutputsNotFoundError=m;class E extends t.BaseError{constructor(w,{docsPath:I}){super([`Encoded function signature "${w}" 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=${w}.`].join(`
17`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionSignatureNotFoundError"})}}J.AbiFunctionSignatureNotFoundError=E;class g extends t.BaseError{constructor(w,I){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${w.type}\` in \`${(0,e.formatAbiItem)(w.abiItem)}\`, and`,`\`${I.type}\` in \`${(0,e.formatAbiItem)(I.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:"AbiItemAmbiguityError"})}}J.AbiItemAmbiguityError=g;class _ extends t.BaseError{constructor({expectedSize:w,givenSize:I}){super(`Expected bytes${w}, got bytes${I}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}J.BytesSizeMismatchError=_;class j extends t.BaseError{constructor({abiItem:w,data:I,params:M,size:R}){super([`Data size of ${R} bytes is too small for non-indexed event parameters.`].join(`
18`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(M,{includeName:!0})})`,`Data:   ${I} (${R} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"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=w,this.data=I,this.params=M,this.size=R}}J.DecodeLogDataMismatch=j;class P extends t.BaseError{constructor({abiItem:w,param:I}){super([`Expected a topic for indexed event parameter${I.name?` "${I.name}"`:""} on event "${(0,e.formatAbiItem)(w,{includeName:!0})}".`].join(`
19`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=w}}J.DecodeLogTopicsMismatch=P;class A extends t.BaseError{constructor(w,{docsPath:I}){super([`Type "${w}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
20`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}J.InvalidAbiEncodingTypeError=A;class T extends t.BaseError{constructor(w,{docsPath:I}){super([`Type "${w}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
21`),{docsPath:I}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}J.InvalidAbiDecodingTypeError=T;class S extends t.BaseError{constructor(w){super([`Value "${w}" is not a valid array.`].join(`
22`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}J.InvalidArrayError=S;class B extends t.BaseError{constructor(w){super([`"${w}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
23`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}J.InvalidDefinitionTypeError=B;class F extends t.BaseError{constructor(w){super(`Type "${w}" is not supported for packed encoding.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedPackedAbiType"})}}return J.UnsupportedPackedAbiType=F,J}var Zr={},nl;function Zg(){if(nl)return Zr;
23nl=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.FilterTypeNotSupportedError=void 0;const e=ne();class r extends e.BaseError{constructor(n){super(`Filter type "${n}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}return Zr.FilterTypeNotSupportedError=r,Zr}var Pt={},mr={},st={},al;function Js(){if(al)return st;al=1,Object.defineProperty(st,"__esModule",{value:!0}),st.InvalidBytesLengthError=st.SizeExceedsPaddingSizeError=st.SliceOffsetOutOfBoundsError=void 0;const e=ne();class r extends e.BaseError{constructor({offset:i,position:o,size:s}){super(`Slice ${o==="start"?"starting":"ending"} at offset "${i}" is out-of-bounds (size: ${s}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}st.SliceOffsetOutOfBoundsError=r;class t extends e.BaseError{constructor({size:i,targetSize:o,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${i}) exceeds padding size (${o}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}st.SizeExceedsPaddingSizeError=t;class n extends e.BaseError{constructor({size:i,targetSize:o,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} is expected to be ${o} ${s} long, but is ${i} ${s} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}return st.InvalidBytesLengthError=n,st}var ol;function At(){if(ol)return mr;ol=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.pad=r,mr.padHex=t,mr.padBytes=n;const e=Js();function r(a,{dir:i,size:o=32}={}){return typeof a=="string"?t(a,{dir:i,size:o}):n(a,{dir:i,size:o})}function t(a,{dir:i,size:o=32}={}){if(o===null)return a;const s=a.replace("0x","");if(s.length>o*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(s.length/2),targetSize:o,type:"hex"});return`0x${s[i==="right"?"padEnd":"padStart"](o*2,"0")}`}function n(a,{dir:i,size:o=32}={}){if(o===null)return a;
23if(a.length>o)throw new e.SizeExceedsPaddingSizeError({size:a.length,targetSize:o,type:"bytes"});const s=new Uint8Array(o);for(let u=0;u<o;u++){const d=i==="right";s[d?u:o-u-1]=a[d?u:a.length-u-1]}return s}return mr}var ut={},Oe={},il;function Tn(){if(il)return Oe;il=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.SizeOverflowError=Oe.InvalidHexValueError=Oe.InvalidHexBooleanError=Oe.InvalidBytesBooleanError=Oe.IntegerOutOfRangeError=void 0;const e=ne();class r extends e.BaseError{constructor({max:s,min:u,signed:d,size:l,value:c}){super(`Number "${c}" is not in safe ${l?`${l*8}-bit ${d?"signed":"unsigned"} `:""}integer range ${s?`(${u} to ${s})`:`(above ${u})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}Oe.IntegerOutOfRangeError=r;class t extends e.BaseError{constructor(s){super(`Bytes value "${s}" is not a valid boolean. 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:"InvalidBytesBooleanError"})}}Oe.InvalidBytesBooleanError=t;class n extends e.BaseError{constructor(s){super(`Hex value "${s}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}Oe.InvalidHexBooleanError=n;class a extends e.BaseError{constructor(s){super(`Hex value "${s}" is an odd length (${s.length}). It must be an even length.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexValueError"})}}Oe.InvalidHexValueError=a;class i extends e.BaseError{constructor({givenSize:s,maxSize:u}){super(`Size cannot exceed ${u} bytes. Given size: ${s} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}return Oe.SizeOverflowError=i,Oe}var da={},sl;function It(){if(sl)return da;sl=1,Object.defineProperty(da,"__esModule",{value:!0}),da.trim=e;function e(r,{dir:t="left"}={}){let n=typeof r=="string"?r.replace("0x",""):r,a=0;for(let i=0;i<n.length-1&&n[t==="left"?i:n.length-i-1].toString()==="0";i++)a++;return n=t==="left"?n.slice(a):n.slice(0,n.length-a),typeof r=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}return da}var ul;function _e(){if(ul)return ut;ul=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.assertSize=a,ut.fromHex=i,ut.hexToBigInt=o,ut.hexToBool=s,ut.hexToNumber=u,ut.hexToString=d;const e=Tn(),r=Be(),t=It(),n=de();function a(l,{size:c}){if((0,r.size)(l)>c)throw new e.SizeOverflowError({givenSize:(0,r.size)(l),maxSize:c})}function i(l,c){const f=typeof c=="string"?{to:c}:c,h=f.to;return h==="number"?u(l,f):h==="bigint"?o(l,f):h==="string"?d(l,f):h==="boolean"?s(l,f):(0,n.hexToBytes)(l,f)}function o(l,c={}){const{signed:f}=c;c.size&&a(l,{size:c.size});const h=BigInt(l);if(!f)return h;const y=(l.length-2)/2,b=(1n<<BigInt(y)*8n-1n)-1n;return h<=b?h:h-BigInt(`0x${"f".padStart(y*2,"f")}`)-1n}function s(l,c={}){let f=l;if(c.size&&(a(f,{size:c.size}),f=(0,t.trim)(f)),(0,t.trim)(f)==="0x00")return!1;if((0,t.trim)(f)==="0x01")return!0;throw new e.InvalidHexBooleanError(f)}function u(l,c={}){return Number(o(l,c))}function d(l,c={}){let f=(0,n.hexToBytes)(l);return c.size&&(a(f,{size:c.size}),f=(0,t.trim)(f,{dir:"right"})),new TextDecoder().decode(f)}return ut}var wt={},cl;function W(){if(cl)return wt;cl=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.toHex=a,wt.boolToHex=i,wt.bytesToHex=o,wt.numberToHex=s,wt.stringToHex=d;const e=Tn(),r=At(),t=_e(),n=Array.from({length:256},(l,c)=>c.toString(16).padStart(2,"0"));function a(l,c={}){return typeof l=="number"||typeof l=="bigint"?s(l,c):typeof l=="string"?d(l,c):typeof l=="boolean"?i(l,c):o(l,c)}function i(l,c={}){const f=`0x${Number(l)}`;return typeof c.size=="number"?((0,t.assertSize)(f,{size:c.size}),(0,r.pad)(f,{size:c.size})):f}function o(l,c={}){let f="";for(let y=0;y<l.length;y++)f+=n[l[y]];const h=`0x${f}`;return typeof c.size=="number"?((0,t.assertSize)(h,{size:c.size}),(0,r.pad)(h,{dir:"right",size:c.size})):h}function s(l,c={}){const{signed:f,size:h}=c,y=BigInt(l);let b;h?f?b=(1n<<BigInt(h)*8n-1n)-1n:b=2n**(BigInt(h)*8n)-1n:typeof l=="number"&&(b=BigInt(Number.MAX_SAFE_INTEGER));const p=typeof b=="bigint"&&f?-b-1n:0;if(b&&y>b||y<p){const m=typeof l=="bigint"?"n":"";throw new e.IntegerOutOfRangeError({max:b?`${b}${m}`:void 0,min:`${p}${m}`,signed:f,size:h,value:`${l}${m}`})}const v=`0x${(f&&y<0?(1n<<BigInt(h*8))+BigInt(y):y).toString(16)}`;return h?(0,r.pad)(v,{size:h}):v}const u=new TextEncoder;function d(l,c={}){const f=u.encode(l);return o(f,c)}return wt}var dl;function de(){if(dl)return Pt;
23dl=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.toBytes=o,Pt.boolToBytes=s,Pt.hexToBytes=l,Pt.numberToBytes=c,Pt.stringToBytes=f;const e=ne(),r=je(),t=At(),n=_e(),a=W(),i=new TextEncoder;function o(h,y={}){return typeof h=="number"||typeof h=="bigint"?c(h,y):typeof h=="boolean"?s(h,y):(0,r.isHex)(h)?l(h,y):f(h,y)}function s(h,y={}){const b=new Uint8Array(1);return b[0]=Number(h),typeof y.size=="number"?((0,n.assertSize)(b,{size:y.size}),(0,t.pad)(b,{size:y.size})):b}const u={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(h){if(h>=u.zero&&h<=u.nine)return h-u.zero;if(h>=u.A&&h<=u.F)return h-(u.A-10);if(h>=u.a&&h<=u.f)return h-(u.a-10)}function l(h,y={}){let b=h;y.size&&((0,n.assertSize)(b,{size:y.size}),b=(0,t.pad)(b,{dir:"right",size:y.size}));let p=b.slice(2);p.length%2&&(p=`0${p}`);const v=p.length/2,m=new Uint8Array(v);for(let E=0,g=0;E<v;E++){const _=d(p.charCodeAt(g++)),j=d(p.charCodeAt(g++));if(_===void 0||j===void 0)throw new e.BaseError(`Invalid byte sequence ("${p[g-2]}${p[g-1]}" in "${p}").`);m[E]=_*16+j}return m}function c(h,y){const b=(0,a.numberToHex)(h,y);return l(b)}function f(h,y={}){const b=i.encode(h);return typeof y.size=="number"?((0,n.assertSize)(b,{size:y.size}),(0,t.pad)(b,{dir:"right",size:y.size})):b}return Pt}var la={},ll;function Ae(){if(ll)return la;ll=1,Object.defineProperty(la,"__esModule",{value:!0}),la.keccak256=a;const e=Gh(),r=je(),t=de(),n=W();function a(i,o){const s=o||"hex",u=(0,e.keccak_256)((0,r.isHex)(i,{strict:!1})?(0,t.toBytes)(i):i);return s==="bytes"?u:(0,n.toHex)(u)}return la}var Yr={},fa={},ba={},fl;function dp(){if(fl)return ba;fl=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.hashSignature=n;const e=de(),r=Ae(),t=a=>(0,r.keccak256)((0,e.toBytes)(a));function n(a){return t(a)}return ba}var Jr={},ma={},bl;function lp(){if(bl)return ma;bl=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.normalizeSignature=r;const e=ne();function r(t){let n=!0,a="",i=0,o="",s=!1;for(let u=0;u<t.length;u++){const d=t[u];if(["(",")",","].includes(d)&&(n=!0),d==="("&&i++,d===")"&&i--,!!n){if(i===0){if(d===" "&&["event","function",""].includes(o))o="";else if(o+=d,d===")"){s=!0;break}continue}if(d===" "){t[u-1]!==","&&a!==","&&a!==",("&&(a="",n=!1);continue}o+=d,a+=d}}if(!s)throw new e.BaseError("Unable to normalize signature.");return o}return ma}var ml;function _c(){if(ml)return Jr;ml=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.toSignature=void 0;const e=Zs(),r=lp(),t=n=>{const a=typeof n=="string"?n:(0,e.formatAbiItem)(n);return(0,r.normalizeSignature)(a)};return Jr.toSignature=t,Jr}var gl;function Xs(){if(gl)return fa;gl=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.toSignatureHash=t;const e=dp(),r=_c();function t(n){return(0,e.hashSignature)((0,r.toSignature)(n))}return fa}var yl;function An(){if(yl)return Yr;yl=1,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.toEventSelector=void 0;const e=Xs();return Yr.toEventSelector=e.toSignatureHash,Yr}var Xr={},Qr={},hl;function Ge(){if(hl)return Qr;hl=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.InvalidAddressError=void 0;const e=ne();class r extends e.BaseError{constructor({address:n}){super(`Address "${n}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}return Qr.InvalidAddressError=r,Qr}var Ju={},en={},pl;function Qs(){if(pl)return en;pl=1,Object.defineProperty(en,"__esModule",{value:!0}),en.LruMap=void 0;class e extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}set(t,n){return super.set(t,n),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}return en.LruMap=e,en}var tn={},_l;function ke(){if(_l)return tn;_l=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.checksumAddress=o,tn.getAddress=s;const e=Ge(),r=de(),t=Ae(),n=Qs(),a=Ce(),i=new n.LruMap(8192);function o(u,d){if(i.has(`${u}.${d}`))return i.get(`${u}.${d}`);const l=d?`${d}${u.toLowerCase()}`:u.substring(2).toLowerCase(),c=(0,t.keccak256)((0,r.stringToBytes)(l),"bytes"),f=(d?l.substring(`${d}0x`.length):l).split("");for(let y=0;y<40;y+=2)c[y>>1]>>4>=8&&f[y]&&(f[y]=f[y].toUpperCase()),(c[y>>1]&15)>=8&&f[y+1]&&(f[y+1]=f[y+1].toUpperCase());const h=`0x${f.join("")}`;return i.set(`${u}.${d}`,h),h}function s(u,d){if(!(0,a.isAddress)(u,{strict:!1}))throw new e.InvalidAddressError({address:u});return o(u,d)}return tn}var vl;function Ce(){return vl||(vl=1,(function(e){Object.defineProperty(e,"__esMo
23dule",{value:!0}),e.isAddressCache=void 0,e.isAddress=a;const r=Qs(),t=ke(),n=/^0x[a-fA-F0-9]{40}$/;e.isAddressCache=new r.LruMap(8192);function a(i,o){const{strict:s=!0}=o??{},u=`${i}.${s}`;if(e.isAddressCache.has(u))return e.isAddressCache.get(u);const d=n.test(i)?i.toLowerCase()===i?!0:s?(0,t.checksumAddress)(i)===i:!0:!1;return e.isAddressCache.set(u,d),d}})(Ju)),Ju}var gr={},El;function Ie(){if(El)return gr;El=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.concat=e,gr.concatBytes=r,gr.concatHex=t;function e(n){return typeof n[0]=="string"?t(n):r(n)}function r(n){let a=0;for(const s of n)a+=s.length;const i=new Uint8Array(a);let o=0;for(const s of n)i.set(s,o),o+=s.length;return i}function t(n){return`0x${n.reduce((a,i)=>a+i.replace("0x",""),"")}`}return gr}var yr={},jl;function Ve(){if(jl)return yr;jl=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.slice=n,yr.sliceBytes=o,yr.sliceHex=s;const e=Js(),r=je(),t=Be();function n(u,d,l,{strict:c}={}){return(0,r.isHex)(u,{strict:!1})?s(u,d,l,{strict:c}):o(u,d,l,{strict:c})}function a(u,d){if(typeof d=="number"&&d>0&&d>(0,t.size)(u)-1)throw new e.SliceOffsetOutOfBoundsError({offset:d,position:"start",size:(0,t.size)(u)})}function i(u,d,l){if(typeof d=="number"&&typeof l=="number"&&(0,t.size)(u)!==l-d)throw new e.SliceOffsetOutOfBoundsError({offset:l,position:"end",size:(0,t.size)(u)})}function o(u,d,l,{strict:c}={}){a(u,d);const f=u.slice(d,l);return c&&i(f,d,l),f}function s(u,d,l,{strict:c}={}){a(u,d);const f=`0x${u.replace("0x","").slice((d??0)*2,(l??u.length)*2)}`;return c&&i(f,d,l),f}return yr}var Pl;function We(){if(Pl)return Xr;Pl=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.encodeAbiParameters=d,Xr.getArrayComponents=g;const e=me(),r=Ge(),t=ne(),n=Ce(),a=Ie(),i=At(),o=Be(),s=Ve(),u=W();function d(_,j){if(_.length!==j.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:_.length,givenLength:j.length});const P=l({params:_,values:j}),A=f(P);return A.length===0?"0x":A}function l({params:_,values:j}){const P=[];for(let A=0;A<_.length;A++)P.push(c({param:_[A],value:j[A]}));return P}function c({param:_,value:j}){const P=g(_.type);if(P){const[A,T]=P;return y(j,{length:A,param:{..._,type:T}})}if(_.type==="tuple")return E(j,{param:_});if(_.type==="address")return h(j);if(_.type==="bool")return p(j);if(_.type.startsWith("uint")||_.type.startsWith("int")){const A=_.type.startsWith("int");return v(j,{signed:A})}if(_.type.startsWith("bytes"))return b(j,{param:_});if(_.type==="string")return m(j);throw new e.InvalidAbiEncodingTypeError(_.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function f(_){let j=0;for(let S=0;S<_.length;S++){const{dynamic:B,encoded:F}=_[S];B?j+=32:j+=(0,o.size)(F)}const P=[],A=[];let T=0;for(let S=0;S<_.length;S++){const{dynamic:B,encoded:F}=_[S];B?(P.push((0,u.numberToHex)(j+T,{size:32})),A.push(F),T+=(0,o.size)(F)):P.push(F)}return(0,a.concat)([...P,...A])}function h(_){if(!(0,n.isAddress)(_))throw new r.InvalidAddressError({address:_});return{dynamic:!1,encoded:(0,i.padHex)(_.toLowerCase())}}function y(_,{length:j,param:P}){const A=j===null;if(!Array.isArray(_))throw new e.InvalidArrayError(_);if(!A&&_.length!==j)throw new e.AbiEncodingArrayLengthMismatchError({expectedLength:j,givenLength:_.length,type:`${P.type}[${j}]`});let T=!1;const S=[];for(let B=0;B<_.length;B++){const F=c({param:P,value:_[B]});F.dynamic&&(T=!0),S.push(F)}if(A||T){const B=f(S);if(A){const F=(0,u.numberToHex)(S.length,{size:32});return{dynamic:!0,encoded:S.length>0?(0,a.concat)([F,B]):F}}if(T)return{dynamic:!0,encoded:B}}return{dynamic:!1,encoded:(0,a.concat)(S.map(({encoded:B})=>B))}}function b(_,{param:j}){const[,P]=j.type.split("bytes"),A=(0,o.size)(_);if(!P){let T=_;return A%32!==0&&(T=(0,i.padHex)(T,{dir:"right",size:Math.ceil((_.length-2)/2/32)*32})),{dynamic:!0,encoded:(0,a.concat)([(0,i.padHex)((0,u.numberToHex)(A,{size:32})),T])}}if(A!==Number.parseInt(P))throw new e.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(P),value:_});return{dynamic:!1,encoded:(0,i.padHex)(_,{dir:"right"})}}function p(_){if(typeof _!="boolean")throw new t.BaseError(`Invalid boolean value: "${_}" (type: ${typeof _}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,i.padHex)((0,u.boolToHex)(_))}}function v(_,{signed:j}){return{dynamic:!1,encoded:(0,u.numberToHex)(_,{size:32,signed:j})}}function m(_){const j=(0,u.stringToHex)(_),P=Math.ceil((0,o.size)(j)/32),A=[];for(let T=0;T<P;T++)A.push((0,i.padHex)((0,s.slice)(j,T*32,(T+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,a.concat)([(0,i.padHex)((0,u.numberToHex)((0,o.size)(j),{size:32})),...A])}}function E(_,{param:j}){let P=!1;const A=[];for(let T=0;T<j.components.length;T++){const S=j.components[T],B=Array.isArray(_)?T:S.name,F=c({param:S,value:_[B]});A.push(F),F.dynamic&&(P=!0)}return{dynamic:P,encoded:P?f(A):(0,a.concat)(A.map(({encoded:T})=>T))}}function g(_){const j=_.match(/^(.*)\[(\d+)?\]$/);return j?[j[2]?Number(j[2]):null,j[1]]:void 0}return Xr}var hr={},rn={},wl;function Qt(){if(wl)return rn;wl=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.toFunctionSelector=void 0;const e=Ve(),r=Xs(),t=n=>(0,e.slice)((0,r.toSignatureHash)(n),0,4);return rn.toFunctionSelector=t,rn}var Tl;function Ze(){if(Tl)return hr;
23Tl=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.getAbiItem=i,hr.isArgOfType=o,hr.getAmbiguousTypes=s;const e=me(),r=je(),t=Ce(),n=An(),a=Qt();function i(u){const{abi:d,args:l=[],name:c}=u,f=(0,r.isHex)(c,{strict:!1}),h=d.filter(b=>f?b.type==="function"?(0,a.toFunctionSelector)(b)===c:b.type==="event"?(0,n.toEventSelector)(b)===c:!1:"name"in b&&b.name===c);if(h.length===0)return;if(h.length===1)return h[0];let y;for(const b of h){if(!("inputs"in b))continue;if(!l||l.length===0){if(!b.inputs||b.inputs.length===0)return b;continue}if(!b.inputs||b.inputs.length===0||b.inputs.length!==l.length)continue;if(l.every((v,m)=>{const E="inputs"in b&&b.inputs[m];return E?o(v,E):!1})){if(y&&"inputs"in y&&y.inputs){const v=s(b.inputs,y.inputs,l);if(v)throw new e.AbiItemAmbiguityError({abiItem:b,type:v[0]},{abiItem:y,type:v[1]})}y=b}}return y||h[0]}function o(u,d){const l=typeof u,c=d.type;switch(c){case"address":return(0,t.isAddress)(u,{strict:!1});case"bool":return l==="boolean";case"function":return l==="string";case"string":return l==="string";default:return c==="tuple"&&"components"in d?Object.values(d.components).every((f,h)=>o(Object.values(u)[h],f)):/^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(c)?l==="number"||l==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(c)?l==="string"||u instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(c)?Array.isArray(u)&&u.every(f=>o(f,{...d,type:c.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function s(u,d,l){for(const c in u){const f=u[c],h=d[c];if(f.type==="tuple"&&h.type==="tuple"&&"components"in f&&"components"in h)return s(f.components,h.components,l[c]);const y=[f.type,h.type];if(y.includes("address")&&y.includes("bytes20")?!0:y.includes("address")&&y.includes("string")?(0,t.isAddress)(l[c],{strict:!1}):y.includes("address")&&y.includes("bytes")?(0,t.isAddress)(l[c],{strict:!1}):!1)return y}}return hr}var Al;function er(){if(Al)return sa;Al=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.encodeEventTopics=d;const e=me(),r=Zg(),t=de(),n=Ae(),a=An(),i=We(),o=_t(),s=Ze(),u="/docs/contract/encodeEventTopics";function d(c){const{abi:f,eventName:h,args:y}=c;let b=f[0];if(h){const E=(0,s.getAbiItem)({abi:f,name:h});if(!E)throw new e.AbiEventNotFoundError(h,{docsPath:u});b=E}if(b.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:u});const p=(0,o.formatAbiItem)(b),v=(0,a.toEventSelector)(p);let m=[];
23if(y&&"inputs"in b){const E=b.inputs?.filter(_=>"indexed"in _&&_.indexed),g=Array.isArray(y)?y:Object.values(y).length>0?E?.map(_=>y[_.name])??[]:[];g.length>0&&(m=E?.map((_,j)=>Array.isArray(g[j])?g[j].map((P,A)=>l({param:_,value:g[j][A]})):g[j]?l({param:_,value:g[j]}):null)??[])}return[v,...m]}function l({param:c,value:f}){if(c.type==="string"||c.type==="bytes")return(0,n.keccak256)((0,t.toBytes)(f));if(c.type==="tuple"||c.type.match(/^(.*)\[(\d+)?\]$/))throw new r.FilterTypeNotSupportedError(c.type);return(0,i.encodeAbiParameters)([c],[f])}return sa}var ga={},Il;function eu(){if(Il)return ga;Il=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.createFilterRequestScope=e;function e(r,{method:t}){const n={};return r.transport.type==="fallback"&&r.transport.onResponse?.(({method:a,response:i,status:o,transport:s})=>{o==="success"&&t===a&&(n[i]=s.request)}),(a=>n[a]||r.request)}return ga}var Ol;function vc(){if(Ol)return ia;Ol=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.createContractEventFilter=n;const e=er(),r=W(),t=eu();async function n(a,i){const{address:o,abi:s,args:u,eventName:d,fromBlock:l,strict:c,toBlock:f}=i,h=(0,t.createFilterRequestScope)(a,{method:"eth_newFilter"}),y=d?(0,e.encodeEventTopics)({abi:s,args:u,eventName:d}):void 0,b=await a.request({method:"eth_newFilter",params:[{address:o,fromBlock:typeof l=="bigint"?(0,r.numberToHex)(l):l,toBlock:typeof f=="bigint"?(0,r.numberToHex)(f):f,topics:y}]});return{abi:s,args:u,eventName:d,id:b,request:h(b),strict:!!c,type:"event"}}return ia}var ya={},ha={},Sl;function qe(){if(Sl)return ha;Sl=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.parseAccount=e;function e(r){return typeof r=="string"?{address:r,type:"json-rpc"}:r}return ha}var pa={},_a={},Rl;function Yg(){if(Rl)return _a;Rl=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.prepareEncodeFunctionData=i;const e=me(),r=Qt(),t=_t(),n=Ze(),a="/docs/contract/encodeFunctionData";function i(o){const{abi:s,args:u,functionName:d}=o;let l=s[0];if(d){const c=(0,n.getAbiItem)({abi:s,args:u,name:d});if(!c)throw new e.AbiFunctionNotFoundError(d,{docsPath:a});l=c}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:a});return{abi:[l],functionName:(0,r.toFunctionSelector)((0,t.formatAbiItem)(l))}}return _a}var Bl;function Ye(){if(Bl)return pa;Bl=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.encodeFunctionData=n;const e=Ie(),r=We(),t=Yg();function n(a){const{args:i}=a,{abi:o,functionName:s}=a.abi.length===1&&a.functionName?.startsWith("0x")?a:(0,t.prepareEncodeFunctionData)(a),u=o[0],d=s,l="inputs"in u&&u.inputs?(0,r.encodeAbiParameters)(u.inputs,i??[]):void 0;return(0,e.concatHex)([d,l??"0x"])}return pa}var va={},we={},ct={},Cl;function Ec(){return Cl||(Cl=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.solidityPanic=ct.solidityError=ct.panicReasons=void 0,ct.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."},ct.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},ct.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),ct}var Ea={},ja={},Pa={},dt={},ql;function Jg(){if(ql)return dt;
23ql=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.RecursiveReadLimitExceededError=dt.PositionOutOfBoundsError=dt.NegativeOffsetError=void 0;const e=ne();class r extends e.BaseError{constructor({offset:i}){super(`Offset \`${i}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}dt.NegativeOffsetError=r;class t extends e.BaseError{constructor({length:i,position:o}){super(`Position \`${o}\` is out of bounds (\`0 < position < ${i}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}dt.PositionOutOfBoundsError=t;class n extends e.BaseError{constructor({count:i,limit:o}){super(`Recursive read limit of \`${o}\` exceeded (recursive read count: \`${i}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}return dt.RecursiveReadLimitExceededError=n,dt}var Ml;function In(){if(Ml)return Pa;Ml=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.createCursor=t;const e=Jg(),r={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(n){if(n<0||n>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:n})},decrementPosition(n){if(n<0)throw new e.NegativeOffsetError({offset:n});const a=this.position-n;this.assertPosition(a),this.position=a},getReadCount(n){return this.positionReadCount.get(n||this.position)||0},incrementPosition(n){if(n<0)throw new e.NegativeOffsetError({offset:n});const a=this.position+n;this.assertPosition(a),this.position=a},inspectByte(n){const a=n??this.position;return this.assertPosition(a),this.bytes[a]},inspectBytes(n,a){const i=a??this.position;return this.assertPosition(i+n-1),this.bytes.subarray(i,i+n)},inspectUint8(n){const a=n??this.position;return this.assertPosition(a),this.bytes[a]},inspectUint16(n){const a=n??this.position;return this.assertPosition(a+1),this.dataView.getUint16(a)},inspectUint24(n){const a=n??this.position;return this.assertPosition(a+2),(this.dataView.getUint16(a)<<8)+this.dataView.getUint8(a+2)},inspectUint32(n){const a=n??this.position;return this.assertPosition(a+3),this.dataView.getUint32(a)},pushByte(n){this.assertPosition(this.position),this.bytes[this.position]=n,this.position++},pushBytes(n){this.assertPosition(this.position+n.length-1),this.bytes.set(n,this.position),this.position+=n.length},pushUint8(n){this.assertPosition(this.position),this.bytes[this.position]=n,this.position++},pushUint16(n){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,n),this.position+=2},pushUint24(n){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,n>>8),this.dataView.setUint8(this.position+2,n&255),this.position+=3},pushUint32(n){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,n),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const n=this.inspectByte();return this.position++,n},readBytes(n,a){this.assertReadLimit(),this._touch();const i=this.inspectBytes(n);return this.position+=a??n,i},readUint8(){this.assertReadLimit(),this._touch();const n=this.inspectUint8();return this.position+=1,n},readUint16(){this.assertReadLimit(),this._touch();const n=this.inspectUint16();return this.position+=2,n},readUint24(){this.assertReadLimit(),this._touch();const n=this.inspectUint24();return this.position+=3,n},readUint32(){this.assertReadLimit(),this._touch();const n=this.inspectUint32();return this.position+=4,n},get remaining(){return this.bytes.length-this.position},setPosition(n){const a=this.position;return this.assertPosition(n),this.position=n,()=>this.position=a},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const n=this.getReadCount();this.positionReadCount.set(this.position,n+1),n>0&&this.recursiveReadCount++}};function t(n,{recursiveReadLimit:a=8192}={}){const i=Object.create(r);return i.bytes=n,i.dataView=new DataView(n.buffer,n.byteOffset,n.byteLength),i.positionReadCount=new Map,i.recursiveReadLimit=a,i}return Pa}var Tt={},Fl;function jc(){if(Fl)return Tt;
23Fl=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.fromBytes=a,Tt.bytesToBigInt=i,Tt.bytesToBool=o,Tt.bytesToNumber=s,Tt.bytesToString=u;const e=Tn(),r=It(),t=_e(),n=W();function a(d,l){const c=typeof l=="string"?{to:l}:l,f=c.to;return f==="number"?s(d,c):f==="bigint"?i(d,c):f==="boolean"?o(d,c):f==="string"?u(d,c):(0,n.bytesToHex)(d,c)}function i(d,l={}){typeof l.size<"u"&&(0,t.assertSize)(d,{size:l.size});const c=(0,n.bytesToHex)(d,l);return(0,t.hexToBigInt)(c,l)}function o(d,l={}){let c=d;if(typeof l.size<"u"&&((0,t.assertSize)(c,{size:l.size}),c=(0,r.trim)(c)),c.length>1||c[0]>1)throw new e.InvalidBytesBooleanError(c);return!!c[0]}function s(d,l={}){typeof l.size<"u"&&(0,t.assertSize)(d,{size:l.size});const c=(0,n.bytesToHex)(d,l);return(0,t.hexToNumber)(c,l)}function u(d,l={}){let c=d;return typeof l.size<"u"&&((0,t.assertSize)(c,{size:l.size}),c=(0,r.trim)(c,{dir:"right"})),new TextDecoder().decode(c)}return Tt}var xl;function Ot(){if(xl)return ja;xl=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.decodeAbiParameters=l;const e=me(),r=ke(),t=In(),n=Be(),a=Ve(),i=It(),o=jc(),s=de(),u=W(),d=We();function l(j,P){const A=typeof P=="string"?(0,s.hexToBytes)(P):P,T=(0,t.createCursor)(A);if((0,n.size)(A)===0&&j.length>0)throw new e.AbiDecodingZeroDataError;if((0,n.size)(P)&&(0,n.size)(P)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof P=="string"?P:(0,u.bytesToHex)(P),params:j,size:(0,n.size)(P)});let S=0;const B=[];for(let F=0;F<j.length;++F){const O=j[F];T.setPosition(S);const[w,I]=c(T,O,{staticPosition:0});S+=I,B.push(w)}return B}function c(j,P,{staticPosition:A}){const T=(0,d.getArrayComponents)(P.type);if(T){const[S,B]=T;return b(j,{...P,type:B},{length:S,staticPosition:A})}if(P.type==="tuple")return E(j,P,{staticPosition:A});if(P.type==="address")return y(j);if(P.type==="bool")return p(j);if(P.type.startsWith("bytes"))return v(j,P,{staticPosition:A});if(P.type.startsWith("uint")||P.type.startsWith("int"))return m(j,P);if(P.type==="string")return g(j,{staticPosition:A});throw new e.InvalidAbiDecodingTypeError(P.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const f=32,h=32;function y(j){const P=j.readBytes(32);return[(0,r.checksumAddress)((0,u.bytesToHex)((0,a.sliceBytes)(P,-20))),32]}function b(j,P,{length:A,staticPosition:T}){if(!A){const F=(0,o.bytesToNumber)(j.readBytes(h)),O=T+F,w=O+f;j.setPosition(O);const I=(0,o.bytesToNumber)(j.readBytes(f)),M=_(P);let R=0;const C=[];for(let q=0;q<I;++q){j.setPosition(w+(M?q*32:R));const[x,k]=c(j,P,{staticPosition:w});R+=k,C.push(x)}return j.setPosition(T+32),[C,32]}if(_(P)){const F=(0,o.bytesToNumber)(j.readBytes(h)),O=T+F,w=[];for(let I=0;I<A;++I){j.setPosition(O+I*32);const[M]=c(j,P,{staticPosition:O});w.push(M)}return j.setPosition(T+32),[w,32]}let S=0;const B=[];for(let F=0;F<A;++F){const[O,w]=c(j,P,{staticPosition:T+S});S+=w,B.push(O)}return[B,S]}function p(j){return[(0,o.bytesToBool)(j.readBytes(32),{size:32}),32]}function v(j,P,{staticPosition:A}){const[T,S]=P.type.split("bytes");if(!S){const F=(0,o.bytesToNumber)(j.readBytes(32));j.setPosition(A+F);const O=(0,o.bytesToNumber)(j.readBytes(32));if(O===0)return j.setPosition(A+32),["0x",32];const w=j.readBytes(O);return j.setPosition(A+32),[(0,u.bytesToHex)(w),32]}return[(0,u.bytesToHex)(j.readBytes(Number.parseInt(S),32)),32]}function m(j,P){const A=P.type.startsWith("int"),T=Number.parseInt(P.type.split("int")[1]||"256"),S=j.readBytes(32);return[T>48?(0,o.bytesToBigInt)(S,{signed:A}):(0,o.bytesToNumber)(S,{signed:A}),32]}function E(j,P,{staticPosition:A}){const T=P.components.length===0||P.components.some(({name:F})=>!F),S=T?[]:{};let B=0;if(_(P)){const F=(0,o.bytesToNumber)(j.readBytes(h)),O=A+F;for(let w=0;w<P.components.length;++w){const I=P.components[w];j.setPosition(O+B);const[M,R]=c(j,I,{staticPosition:O});B+=R,S[T?w:I?.name]=M}return j.setPosition(A+32),[S,32]}for(let F=0;F<P.components.length;++F){const O=P.components[F],[w,I]=c(j,O,{staticPosition:A});S[T?F:O?.name]=w,B+=I}return[S,B]}function g(j,{staticPosition:P}){const A=(0,o.bytesToNumber)(j.readBytes(32)),T=P+A;j.setPosition(T);const S=(0,o.bytesToNumber)(j.readBytes(32));if(S===0)return j.setPosition(P+32),["",32];const B=j.readBytes(S,32),F=(0,o.bytesToString)((0,i.trim)(B));return j.setPosition(P+32),[F,32]}function _(j){const{type:P}=j;if(P==="string"||P==="bytes"||P.endsWith("[]"))return!0;
23if(P==="tuple")return j.components?.some(_);const A=(0,d.getArrayComponents)(j.type);return!!(A&&_({...j,type:A[1]}))}return ja}var kl;function tu(){if(kl)return Ea;kl=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.decodeErrorResult=o;const e=Ec(),r=me(),t=Ve(),n=Qt(),a=Ot(),i=_t();function o(s){const{abi:u,data:d}=s,l=(0,t.slice)(d,0,4);if(l==="0x")throw new r.AbiDecodingZeroDataError;const f=[...u||[],e.solidityError,e.solidityPanic].find(h=>h.type==="error"&&l===(0,n.toFunctionSelector)((0,i.formatAbiItem)(h)));if(!f)throw new r.AbiErrorSignatureNotFoundError(l,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:f,args:"inputs"in f&&f.inputs&&f.inputs.length>0?(0,a.decodeAbiParameters)(f.inputs,(0,t.slice)(d,4)):void 0,errorName:f.name}}return Ea}var wa={},nn={},Hl;function Te(){if(Hl)return nn;Hl=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.stringify=void 0;const e=(r,t,n)=>JSON.stringify(r,(a,i)=>{const o=typeof i=="bigint"?i.toString():i;return typeof t=="function"?t(a,o):o},n);return nn.stringify=e,nn}var $l;function Xg(){if($l)return wa;$l=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.formatAbiItemWithArgs=r;const e=Te();function r({abiItem:t,args:n,includeFunctionName:a=!0,includeName:i=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${a?t.name:""}(${t.inputs.map((o,s)=>`${i&&o.name?`${o.name}: `:""}${typeof n[s]=="object"?(0,e.stringify)(n[s]):n[s]}`).join(", ")})`}return wa}var Ta={},lt={},Nl;function On(){return Nl||(Nl=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.weiUnits=lt.gweiUnits=lt.etherUnits=void 0,lt.etherUnits={gwei:9,wei:18},lt.gweiUnits={ether:-9,wei:9},lt.weiUnits={ether:-18,gwei:-9}),lt}var Aa={},Dl;function ru(){if(Dl)return Aa;Dl=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.formatUnits=e;function e(r,t){let n=r.toString();const a=n.startsWith("-");a&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${a?"-":""}${i||"0"}${o?`.${o}`:""}`}return Aa}var Ul;function Sn(){if(Ul)return Ta;Ul=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.formatEther=t;const e=On(),r=ru();function t(n,a="wei"){return(0,r.formatUnits)(n,e.etherUnits[a])}return Ta}var Ia={},Ll;function tr(){if(Ll)return Ia;Ll=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.formatGwei=t;const e=On(),r=ru();function t(n,a="wei"){return(0,r.formatUnits)(n,e.gweiUnits[a])}return Ia}var ft={},zl;function Pc(){if(zl)return ft;zl=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.StateAssignmentConflictError=ft.AccountStateConflictError=void 0,ft.prettyStateMapping=n,ft.prettyStateOverride=a;const e=ne();class r extends e.BaseError{constructor({address:o}){super(`State for account "${o}" is set multiple times.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountStateConflictError"})}}ft.AccountStateConflictError=r;class t extends e.BaseError{constructor(){super("state and stateDiff are set on the same account."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"StateAssignmentConflictError"})}}ft.StateAssignmentConflictError=t;function n(i){return i.reduce((o,{slot:s,value:u})=>`${o}        ${s}: ${u}
24`,"")}function a(i){return i.reduce((o,{address:s,...u})=>{let d=`${o}    ${s}:
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+=n(u.state)),u.stateDiff&&(d+=`      stateDiff:
30`,d+=n(u.stateDiff)),d},`  State Override:
31`).slice(0,-1)}return ft}var be={},Gl;function Me(){if(Gl)return be;Gl=1,Object.defineProperty(be,"__esModule",{value:!0}),be.WaitForTransactionReceiptTimeoutError=be.TransactionReceiptNotFoundError=be.TransactionNotFoundError=be.TransactionExecutionError=be.InvalidStorageKeySizeError=be.InvalidSerializedTransactionError=be.InvalidSerializedTransactionTypeError=be.InvalidSerializableTransactionError=be.InvalidLegacyVError=be.FeeConflictError=void 0,be.prettyPrint=n;const e=Sn(),r=tr(),t=ne();function n(y){const b=Object.entries(y).map(([v,m])=>
31m===void 0||m===!1?null:[v,m]).filter(Boolean),p=b.reduce((v,[m])=>Math.max(v,m.length),0);return b.map(([v,m])=>`  ${`${v}:`.padEnd(p+1)}  ${m}`).join(`
32`)}class a extends t.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`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}be.FeeConflictError=a;class i extends t.BaseError{constructor({v:b}){super(`Invalid \`v\` value "${b}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}be.InvalidLegacyVError=i;class o extends t.BaseError{constructor({transaction:b}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",n(b),"}","","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","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}be.InvalidSerializableTransactionError=o;class s extends t.BaseError{constructor({serializedType:b}){super(`Serialized transaction type "${b}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=b}}be.InvalidSerializedTransactionTypeError=s;class u extends t.BaseError{constructor({attributes:b,serializedTransaction:p,type:v}){const m=Object.entries(b).map(([E,g])=>typeof g>"u"?E:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${v}" was provided.`,{metaMessages:[`Serialized Transaction: "${p}"`,m.length>0?`Missing Attributes: ${m.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"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=p,this.type=v}}be.InvalidSerializedTransactionError=u;class d extends t.BaseError{constructor({storageKey:b}){super(`Size for storage key "${b}" is invalid. Expected 32 bytes. Got ${Math.floor((b.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}be.InvalidStorageKeySizeError=d;class l extends t.BaseError{constructor(b,{account:p,docsPath:v,chain:m,data:E,gas:g,gasPrice:_,maxFeePerGas:j,maxPriorityFeePerGas:P,nonce:A,to:T,value:S}){const B=n({chain:m&&`${m?.name} (id: ${m?.id})`,from:p?.address,to:T,value:typeof S<"u"&&`${(0,e.formatEther)(S)} ${m?.nativeCurrency?.symbol||"ETH"}`,data:E,gas:g,gasPrice:typeof _<"u"&&`${(0,r.formatGwei)(_)} gwei`,maxFeePerGas:typeof j<"u"&&`${(0,r.formatGwei)(j)} gwei`,maxPriorityFeePerGas:typeof P<"u"&&`${(0,r.formatGwei)(P)} gwei`,nonce:A});super(b.shortMessage,{cause:b,docsPath:v,metaMessages:[...b.metaMessages?[...b.metaMessages," "]:[],"Request Arguments:",B].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=b}}be.TransactionExecutionError=l;class c extends t.BaseError{constructor({blockHash:b,blockNumber:p,blockTag:v,hash:m,index:E}){let g="Transaction";v&&E!==void 0&&(g=`Transaction at block time "${v}" at index "${E}"`),b&&E!==void 0&&(g=`Transaction at block hash "${b}" at index "${E}"`),p&&E!==void 0&&(g=`Transaction at block number "${p}" at index "${E}"`),m&&(g=`Transaction with hash "${m}"`),super(`${g} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}be.TransactionNotFoundError=c;class f extends t.BaseError{constructor({hash:b}){super(`Transaction receipt with hash "${b}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}be.TransactionReceiptNotFoundError=f;class h extends t.BaseError{constructor({hash:b}){super(`Timed out while waiting for transaction with hash "${b}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}return be.WaitForTransactionReceiptTimeoutError=h,be}var Vl;
33function rr(){if(Vl)return we;Vl=1,Object.defineProperty(we,"__esModule",{value:!0}),we.RawContractError=we.CounterfactualDeploymentFailedError=we.ContractFunctionZeroDataError=we.ContractFunctionRevertedError=we.ContractFunctionExecutionError=we.CallExecutionError=void 0;const e=qe(),r=Ec(),t=tu(),n=_t(),a=Xg(),i=Ze(),o=Sn(),s=tr(),u=me(),d=ne(),l=Pc(),c=Me(),f=Ys();class h extends d.BaseError{constructor(g,{account:_,docsPath:j,chain:P,data:A,gas:T,gasPrice:S,maxFeePerGas:B,maxPriorityFeePerGas:F,nonce:O,to:w,value:I,stateOverride:M}){const R=_?(0,e.parseAccount)(_):void 0;let C=(0,c.prettyPrint)({from:R?.address,to:w,value:typeof I<"u"&&`${(0,o.formatEther)(I)} ${P?.nativeCurrency?.symbol||"ETH"}`,data:A,gas:T,gasPrice:typeof S<"u"&&`${(0,s.formatGwei)(S)} gwei`,maxFeePerGas:typeof B<"u"&&`${(0,s.formatGwei)(B)} gwei`,maxPriorityFeePerGas:typeof F<"u"&&`${(0,s.formatGwei)(F)} gwei`,nonce:O});M&&(C+=`
34${(0,l.prettyStateOverride)(M)}`),super(g.shortMessage,{cause:g,docsPath:j,metaMessages:[...g.metaMessages?[...g.metaMessages," "]:[],"Raw Call Arguments:",C].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=g}}we.CallExecutionError=h;class y extends d.BaseError{constructor(g,{abi:_,args:j,contractAddress:P,docsPath:A,functionName:T,sender:S}){const B=(0,i.getAbiItem)({abi:_,args:j,name:T}),F=B?(0,a.formatAbiItemWithArgs)({abiItem:B,args:j,includeFunctionName:!1,includeName:!1}):void 0,O=B?(0,n.formatAbiItem)(B,{includeName:!0}):void 0,w=(0,c.prettyPrint)({address:P&&(0,f.getContractAddress)(P),function:O,args:F&&F!=="()"&&`${[...Array(T?.length??0).keys()].map(()=>" ").join("")}${F}`,sender:S});super(g.shortMessage||`An unknown error occurred while executing the contract function "${T}".`,{cause:g,docsPath:A,metaMessages:[...g.metaMessages?[...g.metaMessages," "]:[],w&&"Contract Call:",w].filter(Boolean)}),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}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=_,this.args=j,this.cause=g,this.contractAddress=P,this.functionName=T,this.sender=S}}we.ContractFunctionExecutionError=y;class b extends d.BaseError{constructor({abi:g,data:_,functionName:j,message:P}){let A,T,S,B;if(_&&_!=="0x")try{T=(0,t.decodeErrorResult)({abi:g,data:_});const{abiItem:O,errorName:w,args:I}=T;if(w==="Error")B=I[0];else if(w==="Panic"){const[M]=I;B=r.panicReasons[M]}else{const M=O?(0,n.formatAbiItem)(O,{includeName:!0}):void 0,R=O&&I?(0,a.formatAbiItemWithArgs)({abiItem:O,args:I,includeFunctionName:!1,includeName:!1}):void 0;S=[M?`Error: ${M}`:"",R&&R!=="()"?`       ${[...Array(w?.length??0).keys()].map(()=>" ").join("")}${R}`:""]}}catch(O){A=O}else P&&(B=P);let F;A instanceof u.AbiErrorSignatureNotFoundError&&(F=A.signature,S=[`Unable to decode signature "${F}" 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=${F}.`]),super(B&&B!=="execution reverted"||F?[`The contract function "${j}" reverted with the following ${F?"signature":"reason"}:`,B||F].join(`
35`):`The contract function "${j}" reverted.`,{cause:A,metaMessages:S}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{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=T,this.reason=B,this.signature=F}}we.ContractFunctionRevertedError=b;class p extends d.BaseError{constructor({functionName:g}){super(`The contract function "${g}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${g}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}we.ContractFunctionZeroDataError=p;class v extends d.BaseError{constructor({factory:g}){super(`Deployment for counterfactual contract call failed${g?` for factory "${g}".`:""}`,{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."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CounterfactualDeploymentFailedError"})}}we.CounterfactualDeploymentFailedError=v;class m extends d.BaseError{constructor({data:g,message:_}){super(_||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=g}}return we.RawContractError=m,we}var Q={},De={},Wl;function Je(){if(Wl)return De;
35Wl=1,Object.defineProperty(De,"__esModule",{value:!0}),De.TimeoutError=De.RpcRequestError=De.WebSocketRequestError=De.HttpRequestError=void 0;const e=Te(),r=ne(),t=Ys();class n extends r.BaseError{constructor({body:u,cause:d,details:l,headers:c,status:f,url:h}){super("HTTP request failed.",{cause:d,details:l,metaMessages:[f&&`Status: ${f}`,`URL: ${(0,t.getUrl)(h)}`,u&&`Request body: ${(0,e.stringify)(u)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"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=u,this.headers=c,this.status=f,this.url=h}}De.HttpRequestError=n;class a extends r.BaseError{constructor({body:u,details:d,url:l}){super("WebSocket request failed.",{details:d,metaMessages:[`URL: ${(0,t.getUrl)(l)}`,`Request body: ${(0,e.stringify)(u)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}De.WebSocketRequestError=a;class i extends r.BaseError{constructor({body:u,error:d,url:l}){super("RPC Request failed.",{cause:d,details:d.message,metaMessages:[`URL: ${(0,t.getUrl)(l)}`,`Request body: ${(0,e.stringify)(u)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=d.code}}De.RpcRequestError=i;class o extends r.BaseError{constructor({body:u,url:d}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,t.getUrl)(d)}`,`Request body: ${(0,e.stringify)(u)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}return De.TimeoutError=o,De}var Kl;function nr(){if(Kl)return Q;Kl=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.UnknownRpcError=Q.SwitchChainError=Q.ChainDisconnectedError=Q.ProviderDisconnectedError=Q.UnsupportedProviderMethodError=Q.UnauthorizedProviderError=Q.UserRejectedRequestError=Q.JsonRpcVersionUnsupportedError=Q.LimitExceededRpcError=Q.MethodNotSupportedRpcError=Q.TransactionRejectedRpcError=Q.ResourceUnavailableRpcError=Q.ResourceNotFoundRpcError=Q.InvalidInputRpcError=Q.InternalRpcError=Q.InvalidParamsRpcError=Q.MethodNotFoundRpcError=Q.InvalidRequestRpcError=Q.ParseRpcError=Q.ProviderRpcError=Q.RpcError=void 0;const e=ne(),r=Je(),t=-1;class n extends e.BaseError{constructor(T,{code:S,docsPath:B,metaMessages:F,shortMessage:O}){super(O,{cause:T,docsPath:B,metaMessages:F||T?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=T.name,this.code=T instanceof r.RpcRequestError?T.code:S??t}}Q.RpcError=n;class a extends n{constructor(T,S){super(T,S),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=S.data}}Q.ProviderRpcError=a;class i extends n{constructor(T){super(T,{code:i.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Q.ParseRpcError=i,Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class o extends n{constructor(T){super(T,{code:o.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Q.InvalidRequestRpcError=o,Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class s extends n{constructor(T,{method:S}={}){super(T,{code:s.code,shortMessage:`The method${S?` "${S}"`:""} does not exist / is not available.`}
35),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Q.MethodNotFoundRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends n{constructor(T){super(T,{code:u.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
36`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Q.InvalidParamsRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends n{constructor(T){super(T,{code:d.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Q.InternalRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class l extends n{constructor(T){super(T,{code:l.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
37`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Q.InvalidInputRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class c extends n{constructor(T){super(T,{code:c.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Q.ResourceNotFoundRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class f extends n{constructor(T){super(T,{code:f.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Q.ResourceUnavailableRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class h extends n{constructor(T){super(T,{code:h.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Q.TransactionRejectedRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class y extends n{constructor(T,{method:S}={}){super(T,{code:y.code,shortMessage:`Method${S?` "${S}"`:""} is not implemented.`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Q.MethodNotSupportedRpcError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class b extends n{constructor(T){super(T,{code:b.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Q.LimitExceededRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class p extends n{constructor(T){super(T,{code:p.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Q.JsonRpcVersionUnsupportedError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends a{constructor(T){super(T,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Q.UserRejectedRequestError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class m extends a{constructor(T){super(T,{code:m.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Q.UnauthorizedProviderError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class E extends a{constructor(T,{method:S}={}){super(T,{code:E.code,shortMessage:`The Provider does not support the requested method${S?` " ${S}"`:""}.`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Q.UnsupportedProviderMethodError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class g extends a{constructor(T){super(T,{code:g.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Q.ProviderDisconnectedError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class _ extends a{constructor(T){super(T,{code:_.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Q.ChainDisconnectedError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});
37class j extends a{constructor(T){super(T,{code:j.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Q.SwitchChainError=j,Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class P extends n{constructor(T){super(T,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}return Q.UnknownRpcError=P,Q}var Zl;function Or(){if(Zl)return va;Zl=1,Object.defineProperty(va,"__esModule",{value:!0}),va.getContractError=i;const e=me(),r=ne(),t=rr(),n=nr(),a=3;function i(o,{abi:s,address:u,args:d,docsPath:l,functionName:c,sender:f}){const{code:h,data:y,message:b,shortMessage:p}=o instanceof t.RawContractError?o:o instanceof r.BaseError?o.walk(m=>"data"in m)||o.walk():{},v=o instanceof e.AbiDecodingZeroDataError?new t.ContractFunctionZeroDataError({functionName:c}):[a,n.InternalRpcError.code].includes(h)&&(y||b||p)?new t.ContractFunctionRevertedError({abi:s,data:typeof y=="object"?y.data:y,functionName:c,message:p??b}):o;return new t.ContractFunctionExecutionError(v,{abi:s,args:d,contractAddress:u,docsPath:l,functionName:c,sender:f})}return va}var Oa={},Sa={},an={},Yl;function Qg(){if(Yl)return an;Yl=1,Object.defineProperty(an,"__esModule",{value:!0}),an.EstimateGasExecutionError=void 0;const e=Sn(),r=tr(),t=ne(),n=Me();class a extends t.BaseError{constructor(o,{account:s,docsPath:u,chain:d,data:l,gas:c,gasPrice:f,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:b,to:p,value:v}){const m=(0,n.prettyPrint)({from:s?.address,to:p,value:typeof v<"u"&&`${(0,e.formatEther)(v)} ${d?.nativeCurrency?.symbol||"ETH"}`,data:l,gas:c,gasPrice:typeof f<"u"&&`${(0,r.formatGwei)(f)} gwei`,maxFeePerGas:typeof h<"u"&&`${(0,r.formatGwei)(h)} gwei`,maxPriorityFeePerGas:typeof y<"u"&&`${(0,r.formatGwei)(y)} gwei`,nonce:b});super(o.shortMessage,{cause:o,docsPath:u,metaMessages:[...o.metaMessages?[...o.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=o}}return an.EstimateGasExecutionError=a,an}var se={},Jl;function ar(){if(Jl)return se;Jl=1,Object.defineProperty(se,"__esModule",{value:!0}),se.UnknownNodeError=se.TipAboveFeeCapError=se.TransactionTypeNotSupportedError=se.IntrinsicGasTooLowError=se.IntrinsicGasTooHighError=se.InsufficientFundsError=se.NonceMaxValueError=se.NonceTooLowError=se.NonceTooHighError=se.FeeCapTooLowError=se.FeeCapTooHighError=se.ExecutionRevertedError=void 0;const e=tr(),r=ne();class t extends r.BaseError{constructor({cause:b,message:p}={}){const v=p?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${v?`with reason: ${v}`:"for an unknown reason"}.`,{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}se.ExecutionRevertedError=t,Object.defineProperty(t,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class n extends r.BaseError{constructor({cause:b,maxFeePerGas:p}={}){super(`The fee cap (\`maxFeePerGas\`${p?` = ${(0,e.formatGwei)(p)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}se.FeeCapTooHighError=n,Object.defineProperty(n,"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 a extends r.BaseError{constructor({cause:b,maxFeePerGas:p}={}){super(`The fee cap (\`maxFeePerGas\`${p?` = ${(0,e.formatGwei)(p)}`:""} gwei) cannot be lower than the block base fee.`,{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}se.FeeCapTooLowError=a,Object.defineProperty(a,"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 i extends r.BaseError{constructor({cause:b,nonce:p}={}){super(`Nonce provided for the transaction ${p?`(${p}) `:""}is higher than the next one expected.`,{cause:b}
37),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}se.NonceTooHighError=i,Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class o extends r.BaseError{constructor({cause:b,nonce:p}={}){super([`Nonce provided for the transaction ${p?`(${p}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
38`),{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}se.NonceTooLowError=o,Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class s extends r.BaseError{constructor({cause:b,nonce:p}={}){super(`Nonce provided for the transaction ${p?`(${p}) `:""}exceeds the maximum allowed nonce.`,{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}se.NonceMaxValueError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class u extends r.BaseError{constructor({cause:b}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
39`),{cause:b,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."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}se.InsufficientFundsError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class d extends r.BaseError{constructor({cause:b,gas:p}={}){super(`The amount of gas ${p?`(${p}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}se.IntrinsicGasTooHighError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class l extends r.BaseError{constructor({cause:b,gas:p}={}){super(`The amount of gas ${p?`(${p}) `:""}provided for the transaction is too low.`,{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}se.IntrinsicGasTooLowError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class c extends r.BaseError{constructor({cause:b}){super("The transaction type is not supported for this chain.",{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}se.TransactionTypeNotSupportedError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class f extends r.BaseError{constructor({cause:b,maxPriorityFeePerGas:p,maxFeePerGas:v}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${p?` = ${(0,e.formatGwei)(p)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${v?` = ${(0,e.formatGwei)(v)} gwei`:""}).`].join(`
40`),{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}se.TipAboveFeeCapError=f,Object.defineProperty(f,"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 h extends r.BaseError{constructor({cause:b}){super(`An error occurred while executing: ${b?.shortMessage}`,{cause:b}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}return se.UnknownNodeError=h,se}var on={},Xl;
40function nu(){if(Xl)return on;Xl=1,Object.defineProperty(on,"__esModule",{value:!0}),on.containsNodeError=a,on.getNodeError=i;const e=ne(),r=ar(),t=Je(),n=nr();function a(o){return o instanceof n.TransactionRejectedRpcError||o instanceof n.InvalidInputRpcError||o instanceof t.RpcRequestError&&o.code===r.ExecutionRevertedError.code}function i(o,s){const u=(o.details||"").toLowerCase(),d=o instanceof e.BaseError?o.walk(l=>l.code===r.ExecutionRevertedError.code):o;return d instanceof e.BaseError?new r.ExecutionRevertedError({cause:o,message:d.details}):r.ExecutionRevertedError.nodeMessage.test(u)?new r.ExecutionRevertedError({cause:o,message:o.details}):r.FeeCapTooHighError.nodeMessage.test(u)?new r.FeeCapTooHighError({cause:o,maxFeePerGas:s?.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(u)?new r.FeeCapTooLowError({cause:o,maxFeePerGas:s?.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(u)?new r.NonceTooHighError({cause:o,nonce:s?.nonce}):r.NonceTooLowError.nodeMessage.test(u)?new r.NonceTooLowError({cause:o,nonce:s?.nonce}):r.NonceMaxValueError.nodeMessage.test(u)?new r.NonceMaxValueError({cause:o,nonce:s?.nonce}):r.InsufficientFundsError.nodeMessage.test(u)?new r.InsufficientFundsError({cause:o}):r.IntrinsicGasTooHighError.nodeMessage.test(u)?new r.IntrinsicGasTooHighError({cause:o,gas:s?.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(u)?new r.IntrinsicGasTooLowError({cause:o,gas:s?.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(u)?new r.TransactionTypeNotSupportedError({cause:o}):r.TipAboveFeeCapError.nodeMessage.test(u)?new r.TipAboveFeeCapError({cause:o,maxFeePerGas:s?.maxFeePerGas,maxPriorityFeePerGas:s?.maxPriorityFeePerGas}):new r.UnknownNodeError({cause:o})}return on}var Ql;function ey(){if(Ql)return Sa;Ql=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.getEstimateGasError=n;const e=Qg(),r=ar(),t=nu();function n(a,{docsPath:i,...o}){const s=(()=>{const u=(0,t.getNodeError)(a,o);return u instanceof r.UnknownNodeError?a:u})();return new e.EstimateGasExecutionError(s,{docsPath:i,...o})}return Sa}var Ra={},ef;function Rn(){if(ef)return Ra;ef=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.extract=e;function e(r,{format:t}){if(!t)return{};const n={};function a(o){const s=Object.keys(o);for(const u of s)u in r&&(n[u]=r[u]),o[u]&&typeof o[u]=="object"&&!Array.isArray(o[u])&&a(o[u])}const i=t(r||{});return a(i),n}return Ra}var Xu={},Ba={},tf;function Bn(){if(tf)return Ba;tf=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.defineFormatter=e;function e(r,t){return({exclude:n,format:a})=>({exclude:n,format:i=>{const o=t(i);if(n)for(const s of n)delete o[s];return{...o,...a(i)}},type:r})}return Ba}var rf;function or(){return rf||(rf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.rpcTransactionType=void 0,e.formatTransactionRequest=n;const r=W(),t=Bn();e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3"};function n(a){const i={};return typeof a.accessList<"u"&&(i.accessList=a.accessList),typeof a.blobVersionedHashes<"u"&&(i.blobVersionedHashes=a.blobVersionedHashes),typeof a.blobs<"u"&&(typeof a.blobs[0]!="string"?i.blobs=a.blobs.map(o=>(0,r.bytesToHex)(o)):i.blobs=a.blobs),typeof a.data<"u"&&(i.data=a.data),typeof a.from<"u"&&(i.from=a.from),typeof a.gas<"u"&&(i.gas=(0,r.numberToHex)(a.gas)),typeof a.gasPrice<"u"&&(i.gasPrice=(0,r.numberToHex)(a.gasPrice)),typeof a.maxFeePerBlobGas<"u"&&(i.maxFeePerBlobGas=(0,r.numberToHex)(a.maxFeePerBlobGas)),typeof a.maxFeePerGas<"u"&&(i.maxFeePerGas=(0,r.numberToHex)(a.maxFeePerGas)),typeof a.maxPriorityFeePerGas<"u"&&(i.maxPriorityFeePerGas=(0,r.numberToHex)(a.maxPriorityFeePerGas)),typeof a.nonce<"u"&&(i.nonce=(0,r.numberToHex)(a.nonce)),typeof a.to<"u"&&(i.to=a.to),typeof a.type<"u"&&(i.type=e.rpcTransactionType[a.type]),typeof a.value<"u"&&(i.value=(0,r.numberToHex)(a.value)),i}e.defineTransactionRequest=(0,t.defineFormatter)("transactionRequest",n)})(Xu)),Xu}var pr={},nf;function ty(){if(nf)return pr;nf=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.serializeStateMapping=i,pr.serializeAccountStateOverride=o,pr.serializeStateOverride=s;
40const e=Ge(),r=Js(),t=Pc(),n=Ce(),a=W();function i(u){if(!(!u||u.length===0))return u.reduce((d,{slot:l,value:c})=>{if(l.length!==66)throw new r.InvalidBytesLengthError({size:l.length,targetSize:66,type:"hex"});if(c.length!==66)throw new r.InvalidBytesLengthError({size:c.length,targetSize:66,type:"hex"});return d[l]=c,d},{})}function o(u){const{balance:d,nonce:l,state:c,stateDiff:f,code:h}=u,y={};if(h!==void 0&&(y.code=h),d!==void 0&&(y.balance=(0,a.numberToHex)(d)),l!==void 0&&(y.nonce=(0,a.numberToHex)(l)),c!==void 0&&(y.state=i(c)),f!==void 0){if(y.state)throw new t.StateAssignmentConflictError;y.stateDiff=i(f)}return y}function s(u){if(!u)return;const d={};for(const{address:l,...c}of u){if(!(0,n.isAddress)(l,{strict:!1}))throw new e.InvalidAddressError({address:l});if(d[l])throw new t.AccountStateConflictError({address:l});d[l]=o(c)}return d}return pr}var Ca={},af;function ir(){if(af)return Ca;af=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.assertRequest=i;const e=qe(),r=Ge(),t=ar(),n=Me(),a=Ce();function i(o){const{account:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:l,to:c}=o,f=s?(0,e.parseAccount)(s):void 0;if(f&&!(0,a.isAddress)(f.address))throw new r.InvalidAddressError({address:f.address});if(c&&!(0,a.isAddress)(c))throw new r.InvalidAddressError({address:c});if(typeof u<"u"&&(typeof d<"u"||typeof l<"u"))throw new n.FeeConflictError;if(d&&d>2n**256n-1n)throw new t.FeeCapTooHighError({maxFeePerGas:d});if(l&&d&&l>d)throw new t.TipAboveFeeCapError({maxFeePerGas:d,maxPriorityFeePerGas:l})}return Ca}var Qu={},sn={},bt={},of;function au(){if(of)return bt;of=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.MaxFeePerGasTooLowError=bt.Eip1559FeesNotSupportedError=bt.BaseFeeScalarError=void 0;const e=tr(),r=ne();class t extends r.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}bt.BaseFeeScalarError=t;class n extends r.BaseError{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}bt.Eip1559FeesNotSupportedError=n;class a extends r.BaseError{constructor({maxPriorityFeePerGas:o}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,e.formatGwei)(o)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}return bt.MaxFeePerGasTooLowError=a,bt}var un={},qa={},cn={},sf;function wc(){if(sf)return cn;sf=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.BlockNotFoundError=void 0;const e=ne();class r extends e.BaseError{constructor({blockHash:n,blockNumber:a}){let i="Block";n&&(i=`Block at hash "${n}"`),a&&(i=`Block at number "${a}"`),super(`${i} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}return cn.BlockNotFoundError=r,cn}var _r={},ec={},uf;function Cn(){return uf||(uf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.transactionType=void 0,e.formatTransaction=n;const r=_e(),t=Bn();e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844"};function n(a){const i={...a,blockHash:a.blockHash?a.blockHash:null,blockNumber:a.blockNumber?BigInt(a.blockNumber):null,chainId:a.chainId?(0,r.hexToNumber)(a.chainId):void 0,gas:a.gas?BigInt(a.gas):void 0,gasPrice:a.gasPrice?BigInt(a.gasPrice):void 0,maxFeePerBlobGas:a.maxFeePerBlobGas?BigInt(a.maxFeePerBlobGas):void 0,maxFeePerGas:a.maxFeePerGas?BigInt(a.maxFeePerGas):void 0,maxPriorityFeePerGas:a.maxPriorityFeePerGas?BigInt(a.maxPriorityFeePerGas):void 0,nonce:a.nonce?(0,r.hexToNumber)(a.nonce):void 0,to:a.to?a.to:null,transactionIndex:a.transactionIndex?Number(a.transactionIndex):null,type:a.type?e.transactionType[a.type]:void 0,typeHex:a.type?a.type:void 0,value:a.value?BigInt(a.value):void 0,v:a.v?BigInt(a.v):void 0};return i.yParity=(()=>{if(a.yParity)return Number(a.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,t.defineFormatter)("transaction",n)})(ec)),ec}var cf;function ou(){if(cf)return _r;
40cf=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.defineBlock=void 0,_r.formatBlock=t;const e=Bn(),r=Cn();function t(n){const a=n.transactions?.map(i=>typeof i=="string"?i:(0,r.formatTransaction)(i));return{...n,baseFeePerGas:n.baseFeePerGas?BigInt(n.baseFeePerGas):null,blobGasUsed:n.blobGasUsed?BigInt(n.blobGasUsed):void 0,difficulty:n.difficulty?BigInt(n.difficulty):void 0,excessBlobGas:n.excessBlobGas?BigInt(n.excessBlobGas):void 0,gasLimit:n.gasLimit?BigInt(n.gasLimit):void 0,gasUsed:n.gasUsed?BigInt(n.gasUsed):void 0,hash:n.hash?n.hash:null,logsBloom:n.logsBloom?n.logsBloom:null,nonce:n.nonce?n.nonce:null,number:n.number?BigInt(n.number):null,size:n.size?BigInt(n.size):void 0,timestamp:n.timestamp?BigInt(n.timestamp):void 0,transactions:a,totalDifficulty:n.totalDifficulty?BigInt(n.totalDifficulty):null}}return _r.defineBlock=(0,e.defineFormatter)("block",t),_r}var df;function Sr(){if(df)return qa;df=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.getBlock=n;const e=wc(),r=W(),t=ou();async function n(a,{blockHash:i,blockNumber:o,blockTag:s,includeTransactions:u}={}){const d=s??"latest",l=u??!1,c=o!==void 0?(0,r.numberToHex)(o):void 0;let f=null;if(i?f=await a.request({method:"eth_getBlockByHash",params:[i,l]},{dedupe:!0}):f=await a.request({method:"eth_getBlockByNumber",params:[c||d,l]},{dedupe:!!c}),!f)throw new e.BlockNotFoundError({blockHash:i,blockNumber:o});return(a.chain?.formatters?.block?.format||t.formatBlock)(f)}return qa}var Ma={},lf;function Tc(){if(lf)return Ma;lf=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.getGasPrice=e;async function e(r){const t=await r.request({method:"eth_gasPrice"});return BigInt(t)}return Ma}var ff;function ry(){if(ff)return un;ff=1,Object.defineProperty(un,"__esModule",{value:!0}),un.estimateMaxPriorityFeePerGas=i,un.internal_estimateMaxPriorityFeePerGas=o;const e=au(),r=_e(),t=ue(),n=Sr(),a=Tc();async function i(s,u){return o(s,u)}async function o(s,u){const{block:d,chain:l=s.chain,request:c}=u||{};if(typeof l?.fees?.defaultPriorityFee=="function"){const f=d||await(0,t.getAction)(s,n.getBlock,"getBlock")({});return l.fees.defaultPriorityFee({block:f,client:s,request:c})}if(typeof l?.fees?.defaultPriorityFee<"u")return l?.fees?.defaultPriorityFee;try{const f=await s.request({method:"eth_maxPriorityFeePerGas"});return(0,r.hexToBigInt)(f)}catch{const[f,h]=await Promise.all([d?Promise.resolve(d):(0,t.getAction)(s,n.getBlock,"getBlock")({}),(0,t.getAction)(s,a.getGasPrice,"getGasPrice")({})]);if(typeof f.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const y=h-f.baseFeePerGas;return y<0n?0n:y}}return un}var bf;function ny(){if(bf)return sn;bf=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.estimateFeesPerGas=i,sn.internal_estimateFeesPerGas=o;const e=au(),r=ue(),t=ry(),n=Sr(),a=Tc();async function i(s,u){return o(s,u)}async function o(s,u){const{block:d,chain:l=s.chain,request:c,type:f="eip1559"}=u||{},h=await(async()=>typeof l?.fees?.baseFeeMultiplier=="function"?l.fees.baseFeeMultiplier({block:d,client:s,request:c}):l?.fees?.baseFeeMultiplier??1.2)();if(h<1)throw new e.BaseFeeScalarError;const b=10**(h.toString().split(".")[1]?.length??0),p=E=>E*BigInt(Math.ceil(h*b))/BigInt(b),v=d||await(0,r.getAction)(s,n.getBlock,"getBlock")({});if(typeof l?.fees?.estimateFeesPerGas=="function"){const E=await l.fees.estimateFeesPerGas({block:d,client:s,multiply:p,request:c,type:f});if(E!==null)return E}if(f==="eip1559"){if(typeof v.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const E=typeof c?.maxPriorityFeePerGas=="bigint"?c.maxPriorityFeePerGas:await(0,t.internal_estimateMaxPriorityFeePerGas)(s,{block:v,chain:l,request:c}),g=p(v.baseFeePerGas);return{maxFeePerGas:c?.maxFeePerGas??g+E,maxPriorityFeePerGas:E}}return{gasPrice:c?.gasPrice??p(await(0,r.getAction)(s,a.getGasPrice,"getGasPrice")({}))}}return sn}var Fa={},mf;function Ac(){if(mf)return Fa;mf=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.getTransactionCount=t;const e=_e(),r=W();async function t(n,{address:a,blockTag:i="latest",blockNumber:o}){const s=await n.request({method:"eth_getTransactionCount",params:[a,o?(0,r.numberToHex)(o):i]},{dedupe:!!o});return(0,e.hexToNumber)(s)}return Fa}var xa={},gf;
40function iu(){if(gf)return xa;gf=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.blobsToCommitments=t;const e=de(),r=W();function t(n){const{kzg:a}=n,i=n.to??(typeof n.blobs[0]=="string"?"hex":"bytes"),o=typeof n.blobs[0]=="string"?n.blobs.map(u=>(0,e.hexToBytes)(u)):n.blobs,s=[];for(const u of o)s.push(Uint8Array.from(a.blobToKzgCommitment(u)));return i==="bytes"?s:s.map(u=>(0,r.bytesToHex)(u))}return xa}var ka={},yf;function su(){if(yf)return ka;yf=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.blobsToProofs=t;const e=de(),r=W();function t(n){const{kzg:a}=n,i=n.to??(typeof n.blobs[0]=="string"?"hex":"bytes"),o=typeof n.blobs[0]=="string"?n.blobs.map(d=>(0,e.hexToBytes)(d)):n.blobs,s=typeof n.commitments[0]=="string"?n.commitments.map(d=>(0,e.hexToBytes)(d)):n.commitments,u=[];for(let d=0;d<o.length;d++){const l=o[d],c=s[d];u.push(Uint8Array.from(a.computeBlobKzgProof(l,c)))}return i==="bytes"?u:u.map(d=>(0,r.bytesToHex)(d))}return ka}var Ha={},$a={},Na={},Ht={},mt={},hf;function ay(){if(hf)return mt;hf=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.HashMD=mt.Maj=mt.Chi=void 0;const e=Dg(),r=Tr();function t(o,s,u,d){if(typeof o.setBigUint64=="function")return o.setBigUint64(s,u,d);const l=BigInt(32),c=BigInt(4294967295),f=Number(u>>l&c),h=Number(u&c),y=d?4:0,b=d?0:4;o.setUint32(s+y,f,d),o.setUint32(s+b,h,d)}const n=(o,s,u)=>o&s^~o&u;mt.Chi=n;const a=(o,s,u)=>o&s^o&u^s&u;mt.Maj=a;class i extends r.Hash{constructor(s,u,d,l){super(),this.blockLen=s,this.outputLen=u,this.padOffset=d,this.isLE=l,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(s),this.view=(0,r.createView)(this.buffer)}update(s){(0,e.exists)(this);const{view:u,buffer:d,blockLen:l}=this;s=(0,r.toBytes)(s);const c=s.length;for(let f=0;f<c;){const h=Math.min(l-this.pos,c-f);if(h===l){const y=(0,r.createView)(s);for(;l<=c-f;f+=l)this.process(y,f);continue}d.set(s.subarray(f,f+h),this.pos),this.pos+=h,f+=h,this.pos===l&&(this.process(u,0),this.pos=0)}return this.length+=s.length,this.roundClean(),this}digestInto(s){(0,e.exists)(this),(0,e.output)(s,this),this.finished=!0;const{buffer:u,view:d,blockLen:l,isLE:c}=this;let{pos:f}=this;u[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>l-f&&(this.process(d,0),f=0);for(let v=f;v<l;v++)u[v]=0;t(d,l-8,BigInt(this.length*8),c),this.process(d,0);const h=(0,r.createView)(s),y=this.outputLen;if(y%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const b=y/4,p=this.get();if(b>p.length)throw new Error("_sha2: outputLen bigger than state");for(let v=0;v<b;v++)h.setUint32(4*v,p[v],c)}digest(){const{buffer:s,outputLen:u}=this;this.digestInto(s);const d=s.slice(0,u);return this.destroy(),d}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:u,buffer:d,length:l,finished:c,destroyed:f,pos:h}=this;return s.length=l,s.pos=h,s.finished=c,s.destroyed=f,l%u&&s.buffer.set(d),s}}return mt.HashMD=i,mt}var pf;function oy(){if(pf)return Ht;pf=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.sha224=Ht.sha256=void 0;const e=ay(),r=Tr(),t=new Uint32Array([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]),n=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class i extends e.HashMD{constructor(){super(64,32,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,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){const{A:u,B:d,C:l,D:c,E:f,F:h,G:y,H:b}=this;return[u,d,l,c,f,h,y,b]}
40set(u,d,l,c,f,h,y,b){this.A=u|0,this.B=d|0,this.C=l|0,this.D=c|0,this.E=f|0,this.F=h|0,this.G=y|0,this.H=b|0}process(u,d){for(let m=0;m<16;m++,d+=4)a[m]=u.getUint32(d,!1);for(let m=16;m<64;m++){const E=a[m-15],g=a[m-2],_=(0,r.rotr)(E,7)^(0,r.rotr)(E,18)^E>>>3,j=(0,r.rotr)(g,17)^(0,r.rotr)(g,19)^g>>>10;a[m]=j+a[m-7]+_+a[m-16]|0}let{A:l,B:c,C:f,D:h,E:y,F:b,G:p,H:v}=this;for(let m=0;m<64;m++){const E=(0,r.rotr)(y,6)^(0,r.rotr)(y,11)^(0,r.rotr)(y,25),g=v+E+(0,e.Chi)(y,b,p)+t[m]+a[m]|0,j=((0,r.rotr)(l,2)^(0,r.rotr)(l,13)^(0,r.rotr)(l,22))+(0,e.Maj)(l,c,f)|0;v=p,p=b,b=y,y=h+g|0,h=f,f=c,c=l,l=g+j|0}l=l+this.A|0,c=c+this.B|0,f=f+this.C|0,h=h+this.D|0,y=y+this.E|0,b=b+this.F|0,p=p+this.G|0,v=v+this.H|0,this.set(l,c,f,h,y,b,p,v)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class o extends i{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return Ht.sha256=(0,r.wrapConstructor)(()=>new i),Ht.sha224=(0,r.wrapConstructor)(()=>new o),Ht}var _f;function Ic(){if(_f)return Na;_f=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.sha256=a;const e=oy(),r=je(),t=de(),n=W();function a(i,o){const s=o||"hex",u=(0,e.sha256)((0,r.isHex)(i,{strict:!1})?(0,t.toBytes)(i):i);return s==="bytes"?u:(0,n.toHex)(u)}return Na}var vf;function Oc(){if(vf)return $a;vf=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.commitmentToVersionedHash=t;const e=W(),r=Ic();function t(n){const{commitment:a,version:i=1}=n,o=n.to??(typeof a=="string"?"hex":"bytes"),s=(0,r.sha256)(a,"bytes");return s.set([i],0),o==="bytes"?s:(0,e.bytesToHex)(s)}return $a}var Ef;function Sc(){if(Ef)return Ha;Ef=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.commitmentsToVersionedHashes=r;const e=Oc();function r(t){const{commitments:n,version:a}=t,i=t.to??(typeof n[0]=="string"?"hex":"bytes"),o=[];for(const s of n)o.push((0,e.commitmentToVersionedHash)({commitment:s,to:i,version:a}));return o}return Ha}var Da={},Ua={},tc={},jf;function fp(){return jf||(jf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxBytesPerTransaction=e.bytesPerBlob=e.fieldElementsPerBlob=e.bytesPerFieldElement=void 0;const r=6;e.bytesPerFieldElement=32,e.fieldElementsPerBlob=4096,e.bytesPerBlob=e.bytesPerFieldElement*e.fieldElementsPerBlob,e.maxBytesPerTransaction=e.bytesPerBlob*r-1-1*e.fieldElementsPerBlob*r})(tc)),tc}var Ue={},dn={},Pf;function iy(){return Pf||(Pf=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.versionedHashVersionKzg=void 0,dn.versionedHashVersionKzg=1),dn}var wf;function sy(){if(wf)return Ue;wf=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.InvalidVersionedHashVersionError=Ue.InvalidVersionedHashSizeError=Ue.EmptyBlobError=Ue.BlobSizeTooLargeError=void 0;const e=iy(),r=ne();class t extends r.BaseError{constructor({maxSize:s,size:u}){super("Blob size is too large.",{metaMessages:[`Max: ${s} bytes`,`Given: ${u} bytes`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlobSizeTooLargeError"})}}Ue.BlobSizeTooLargeError=t;class n extends r.BaseError{constructor(){super("Blob data must not be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EmptyBlobError"})}}Ue.EmptyBlobError=n;class a extends r.BaseError{constructor({hash:s,size:u}){super(`Versioned hash "${s}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${u}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidVersionedHashSizeError"})}}Ue.InvalidVersionedHashSizeError=a;class i extends r.BaseError{constructor({hash:s,version:u}){super(`Versioned hash "${s}" version is invalid.`,{metaMessages:[`Expected: ${e.versionedHashVersionKzg}`,`Received: ${u}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidVersionedHashVersionError"})}}return Ue.InvalidVersionedHashVersionError=i,Ue}var Tf;function uy(){if(Tf)return Ua;Tf=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.toBlobs=o;const e=fp(),r=sy(),t=In(),n=Be(),a=de(),i=W();
40function o(s){const u=s.to??(typeof s.data=="string"?"hex":"bytes"),d=typeof s.data=="string"?(0,a.hexToBytes)(s.data):s.data,l=(0,n.size)(d);if(!l)throw new r.EmptyBlobError;if(l>e.maxBytesPerTransaction)throw new r.BlobSizeTooLargeError({maxSize:e.maxBytesPerTransaction,size:l});const c=[];let f=!0,h=0;for(;f;){const y=(0,t.createCursor)(new Uint8Array(e.bytesPerBlob));let b=0;for(;b<e.fieldElementsPerBlob;){const p=d.slice(h,h+(e.bytesPerFieldElement-1));if(y.pushByte(0),y.pushBytes(p),p.length<31){y.pushByte(128),f=!1;break}b++,h+=31}c.push(y)}return u==="bytes"?c.map(y=>y.bytes):c.map(y=>(0,i.bytesToHex)(y.bytes))}return Ua}var Af;function uu(){if(Af)return Da;Af=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.toBlobSidecars=n;const e=iu(),r=su(),t=uy();function n(a){const{data:i,kzg:o,to:s}=a,u=a.blobs??(0,t.toBlobs)({data:i,to:s}),d=a.commitments??(0,e.blobsToCommitments)({blobs:u,kzg:o,to:s}),l=a.proofs??(0,r.blobsToProofs)({blobs:u,commitments:d,kzg:o,to:s}),c=[];for(let f=0;f<u.length;f++)c.push({blob:u[f],commitment:d[f],proof:l[f]});return c}return Da}var La={},If;function cu(){if(If)return La;If=1,Object.defineProperty(La,"__esModule",{value:!0}),La.getTransactionType=r;const e=Me();function r(t){if(t.type)return t.type;if(typeof t.blobs<"u"||typeof t.blobVersionedHashes<"u"||typeof t.maxFeePerBlobGas<"u"||typeof t.sidecars<"u")return"eip4844";if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new e.InvalidSerializableTransactionError({transaction:t})}return La}var za={},Of;function qn(){if(Of)return za;Of=1,Object.defineProperty(za,"__esModule",{value:!0}),za.getChainId=r;const e=_e();async function r(t){const n=await t.request({method:"eth_chainId"},{dedupe:!0});return(0,e.hexToNumber)(n)}return za}var Sf;function du(){return Sf||(Sf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultParameters=void 0,e.prepareTransactionRequest=b;const r=qe(),t=ny(),n=Rc(),a=Sr(),i=Ac(),o=au(),s=iu(),u=su(),d=Sc(),l=uu(),c=ue(),f=ir(),h=cu(),y=qn();e.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"];async function b(p,v){const{account:m=p.account,blobs:E,chain:g,gas:_,kzg:j,nonce:P,parameters:A=e.defaultParameters,type:T}=v,S=m?(0,r.parseAccount)(m):void 0,B={...v,...S?{from:S?.address}:{}};let F;async function O(){return F||(F=await(0,c.getAction)(p,a.getBlock,"getBlock")({blockTag:"latest"}),F)}let w;async function I(){return w||(g?g.id:typeof v.chainId<"u"?v.chainId:(w=await(0,c.getAction)(p,y.getChainId,"getChainId")({}),w))}if((A.includes("blobVersionedHashes")||A.includes("sidecars"))&&E&&j){const M=(0,s.blobsToCommitments)({blobs:E,kzg:j});if(A.includes("blobVersionedHashes")){const R=(0,d.commitmentsToVersionedHashes)({commitments:M,to:"hex"});B.blobVersionedHashes=R}if(A.includes("sidecars")){const R=(0,u.blobsToProofs)({blobs:E,commitments:M,kzg:j}),C=(0,l.toBlobSidecars)({blobs:E,commitments:M,proofs:R,to:"hex"});B.sidecars=C}}if(A.includes("chainId")&&(B.chainId=await I()),A.includes("nonce")&&typeof P>"u"&&S)if(S.nonceManager){const M=await I();B.nonce=await S.nonceManager.consume({address:S.address,chainId:M,client:p})}else B.nonce=await(0,c.getAction)(p,i.getTransactionCount,"getTransactionCount")({address:S.address,blockTag:"pending"});if((A.includes("fees")||A.includes("type"))&&typeof T>"u")try{B.type=(0,h.getTransactionType)(B)}catch{const M=await O();B.type=typeof M?.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(A.includes("fees"))if(B.type!=="legacy"&&B.type!=="eip2930"){if(typeof B.maxFeePerGas>"u"||typeof B.maxPriorityFeePerGas>"u"){const M=await O(),{maxFeePerGas:R,maxPriorityFeePerGas:C}=await(0,t.internal_estimateFeesPerGas)(p,{block:M,chain:g,request:B});if(typeof v.maxPriorityFeePerGas>"u"&&v.maxFeePerGas&&v.maxFeePerGas<C)throw new o.MaxFeePerGasTooLowError({maxPriorityFeePerGas:C});B.maxPriorityFeePerGas=C,B.maxFeePerGas=R}}else{if(typeof v.maxFeePerGas<"u"||typeof v.maxPriorityFeePerGas<"u")throw new o.Eip1559FeesNotSupportedError;const M=await O(),{gasPrice:R}=await(0,t.internal_estimateFeesPerGas)(p,{block:M,chain:g,request:B,type:"legacy"});B.gasPrice=R}return A.includes("gas")&&typeof _>"u"&&(B.gas=await(0,c.getAction)(p,n.estimateGas,"estimateGas")({...B,account:S?{address:S.address,type:"json-rpc"}:void 0})),(0,f.assertRequest)(B),delete B.parameters,B}})(Qu)),Qu}var Rf;function Rc(){if(Rf)return Oa;Rf=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.estimateGas=u;const e=qe(),r=W(),t=ey(),n=Rn(),a=or(),i=ty(),o=ir(),s=du();async function u(d,l){const c=l.account??d.account,f=c?(0,e.parseAccount)(c):void 0;try{const{accessList:h,blobs:y,blobVersionedHashes:b,blockNumber:p,blockTag:v,data:m,gas:E,gasPrice:g,maxFeePerBlobGas:_,maxFeePerGas:j,maxPriorityFeePerGas:P,nonce:A,to:T,value:S,stateOverride:B,...F}=await(0,s.prepareTransactionRequest)(d,{...l,parameters:f?.type==="local"?void 0:["blobVersionedHashes"]}),w=(p?(0,r.numberToHex)(p):void 0)||v,I=(0,i.serializeStateOverride)(B);(0,o.assertRequest)(l);const M=d.chain?.formatters?.transactionRequest?.format,C=(M||a.formatTransactionRequest)({...(0,n.extract)(F,{format:M}),from:f?.address,accessList:h,blobs:y,blobVersionedHashes:b,data:m,gas:E,gasPrice:g,maxFeePerBlobGas:_,maxFeePerGas:j,maxPriorityFeePerGas:P,nonce:A,to:T,value:S}),q=await d.request({method:"eth_estimateGas",params:I?[C,w??"latest",I]:w?[C,w]:[C]});return BigInt(q)}catch(h){throw(0,t.getEstimateGasError)(h,{...l,account:f,chain:d.chain})}}return Oa}var Bf;function cy(){if(Bf)return ya;Bf=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.estimateContractGas=i;const e=qe(),r=Ye(),t=Or(),n=ue(),a=Rc();async function i(o,s){const{abi:u,address:d,args:l,functionName:c,...f}=s,h=(0,r.encodeFunctionData)({abi:u,args:l,functionName:c});try{return await(0,n.getAction)(o,a.estimateGas,"estimateGas")({data:h,to:d,...f})}catch(y){const b=f.account?(0,e.parseAccount)(f.account):void 0;throw(0,t.getContractError)(y,{abi:u,address:d,args:l,docsPath:"/docs/contract/estimateContractGas",functionName:c,sender:b?.address})}}return ya}var Ga={},Va={},Wa={},Ka={},Cf;
40function vt(){if(Cf)return Ka;Cf=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.isAddressEqual=t;const e=Ge(),r=Ce();function t(n,a){if(!(0,r.isAddress)(n,{strict:!1}))throw new e.InvalidAddressError({address:n});if(!(0,r.isAddress)(a,{strict:!1}))throw new e.InvalidAddressError({address:a});return n.toLowerCase()===a.toLowerCase()}return Ka}var Za={},qf;function Mn(){if(qf)return Za;qf=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.decodeEventLog=s;const e=me(),r=Be(),t=An(),n=Jg(),a=Ot(),i=_t(),o="/docs/contract/decodeEventLog";function s(d){const{abi:l,data:c,strict:f,topics:h}=d,y=f??!0,[b,...p]=h;if(!b)throw new e.AbiEventSignatureEmptyTopicsError({docsPath:o});const v=l.find(A=>A.type==="event"&&b===(0,t.toEventSelector)((0,i.formatAbiItem)(A)));if(!(v&&"name"in v)||v.type!=="event")throw new e.AbiEventSignatureNotFoundError(b,{docsPath:o});const{name:m,inputs:E}=v,g=E?.some(A=>!("name"in A&&A.name));let _=g?[]:{};const j=E.filter(A=>"indexed"in A&&A.indexed);for(let A=0;A<j.length;A++){const T=j[A],S=p[A];if(!S)throw new e.DecodeLogTopicsMismatch({abiItem:v,param:T});_[g?A:T.name||A]=u({param:T,value:S})}const P=E.filter(A=>!("indexed"in A&&A.indexed));if(P.length>0){if(c&&c!=="0x")try{const A=(0,a.decodeAbiParameters)(P,c);if(A)if(g)_=[..._,...A];else for(let T=0;T<P.length;T++)_[P[T].name]=A[T]}catch(A){if(y)throw A instanceof e.AbiDecodingDataSizeTooSmallError||A instanceof n.PositionOutOfBoundsError?new e.DecodeLogDataMismatch({abiItem:v,data:c,params:P,size:(0,r.size)(c)}):A}else if(y)throw new e.DecodeLogDataMismatch({abiItem:v,data:"0x",params:P,size:0})}return{eventName:m,args:Object.values(_).length>0?_:void 0}}function u({param:d,value:l}){return d.type==="string"||d.type==="bytes"||d.type==="tuple"||d.type.match(/^(.*)\[(\d+)?\]$/)?l:((0,a.decodeAbiParameters)([d],l)||[])[0]}return Za}var Mf;function Fn(){if(Mf)return Wa;Mf=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.parseEventLogs=o;const e=me(),r=vt(),t=de(),n=Ae(),a=Mn(),i=Ze();function o(u){const{abi:d,args:l,logs:c,strict:f=!0}=u,h=(()=>{if(u.eventName)return Array.isArray(u.eventName)?u.eventName:[u.eventName]})();return c.map(y=>{try{const b=(0,i.getAbiItem)({abi:d,name:y.topics[0]});if(!b)return null;const p=(0,a.decodeEventLog)({...y,abi:[b],strict:f});return h&&!h.includes(p.eventName)||!s({args:p.args,inputs:b.inputs,matchArgs:l})?null:{...p,...y}}catch(b){let p,v;if(b instanceof e.AbiEventSignatureNotFoundError)return null;if(b instanceof e.DecodeLogDataMismatch||b instanceof e.DecodeLogTopicsMismatch){if(f)return null;p=b.abiItem.name,v=b.abiItem.inputs?.some(m=>!("name"in m&&m.name))}return{...y,args:v?[]:{},eventName:p}}}).filter(Boolean)}function s(u){const{args:d,inputs:l,matchArgs:c}=u;if(!c)return!0;if(!d)return!1;function f(h,y,b){try{return h.type==="address"?(0,r.isAddressEqual)(y,b):h.type==="string"||h.type==="bytes"?(0,n.keccak256)((0,t.toBytes)(y))===b:y===b}catch{return!1}}return Array.isArray(d)&&Array.isArray(c)?c.every((h,y)=>{if(!h)return!0;const b=l[y];return b?(Array.isArray(h)?h:[h]).some(v=>f(b,v,d[y])):!1}):typeof d=="object"&&!Array.isArray(d)&&typeof c=="object"&&!Array.isArray(c)?Object.entries(c).every(([h,y])=>{if(!y)return!0;const b=l.find(v=>v.name===h);return b?(Array.isArray(y)?y:[y]).some(v=>f(b,v,d[h])):!1}):!1}return Wa}var Ya={},Ff;function St(){if(Ff)return Ya;Ff=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.formatLog=e;function e(r,{args:t,eventName:n}={}){return{...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,logIndex:r.logIndex?Number(r.logIndex):null,transactionHash:r.transactionHash?r.transactionHash:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,...n?{args:t,eventName:n}:{}}}return Ya}var xf;function Bc(){if(xf)return Va;xf=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.getLogs=a;const e=er(),r=Fn(),t=W(),n=St();async function a(i,{address:o,blockHash:s,fromBlock:u,toBlock:d,event:l,events:c,args:f,strict:h}={}){const y=h??!1,b=c??(l?[l]:void 0);let p=[];b&&(p=[b.flatMap(g=>(0,e.encodeEventTopics)({abi:[g],eventName:g.name,args:c?void 0:f}))],l&&(p=p[0]));let v;s?v=await i.request({method:"eth_getLogs",params:[{address:o,topics:p,blockHash:s}]}):v=await i.request({method:"eth_getLogs",params:[{address:o,topics:p,fromBlock:typeof u=="bigint"?(0,t.numberToHex)(u):u,toBlock:typeof d=="bigint"?(0,t.numberToHex)(d):d}]});const m=v.map(E=>
40(0,n.formatLog)(E));return b?(0,r.parseEventLogs)({abi:b,args:f,logs:m,strict:y}):m}return Va}var kf;function Cc(){if(kf)return Ga;kf=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.getContractEvents=n;const e=Ze(),r=ue(),t=Bc();async function n(a,i){const{abi:o,address:s,args:u,blockHash:d,eventName:l,fromBlock:c,toBlock:f,strict:h}=i,y=l?(0,e.getAbiItem)({abi:o,name:l}):void 0,b=y?void 0:o.filter(p=>p.type==="event");return(0,r.getAction)(a,t.getLogs,"getLogs")({address:s,args:u,blockHash:d,event:y,events:b,fromBlock:c,toBlock:f,strict:h})}return Ga}var Ja={},Xa={},Hf;function Rt(){if(Hf)return Xa;Hf=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.decodeFunctionResult=a;const e=me(),r=Ot(),t=Ze(),n="/docs/contract/decodeFunctionResult";function a(i){const{abi:o,args:s,functionName:u,data:d}=i;let l=o[0];if(u){const f=(0,t.getAbiItem)({abi:o,args:s,name:u});if(!f)throw new e.AbiFunctionNotFoundError(u,{docsPath:n});l=f}if(l.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:n});if(!l.outputs)throw new e.AbiFunctionOutputsNotFoundError(l.name,{docsPath:n});const c=(0,r.decodeAbiParameters)(l.outputs,d);if(c&&c.length>1)return c;if(c&&c.length===1)return c[0]}return Xa}var ln={},fe={},$f;function sr(){if($f)return fe;$f=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.erc4626Abi=fe.erc721Abi=fe.erc20Abi_bytes32=fe.erc20Abi=fe.universalSignatureValidatorAbi=fe.smartAccountAbi=fe.addressResolverAbi=fe.textResolverAbi=fe.universalResolverReverseAbi=fe.universalResolverResolveAbi=fe.multicall3Abi=void 0,fe.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"}];const e=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}];return fe.universalResolverResolveAbi=[...e,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",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"}]}],fe.universalResolverReverseAbi=[...e,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],fe.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],fe.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"}]}],fe.smartAccountAbi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],fe.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}
40],fe.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"}]}],fe.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"}]}
40],fe.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:"tokeId",type:"uint256"}],outputs:[]}],fe.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"}],fe}var fn={},Nf;function bp(){return Nf||(Nf=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.aggregate3Signature=void 0,fn.aggregate3Signature="0x82ad56cb"),fn}var gt={},Df;
40function dy(){return Df||(Df=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.universalSignatureValidatorByteCode=gt.deploylessCallViaFactoryBytecode=gt.deploylessCallViaBytecodeBytecode=void 0,gt.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",gt.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",gt.universalSignatureValidatorByteCode="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b56
405b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b60008060006060848
4060312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"),gt}var Se={},Uf;function xn(){if(Uf)return Se;Uf=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.InvalidChainIdError=Se.ClientChainNotConfiguredError=Se.ChainNotFoundError=Se.ChainMismatchError=Se.ChainDoesNotSupportContract=void 0;const e=ne();class r extends e.BaseError{constructor({blockNumber:s,chain:u,contract:d}){super(`Chain "${u.name}" does not support contract "${d.name}".`,{metaMessages:["This could be due to any of the following:",...s&&d.blockCreated&&d.blockCreated>s?[`- The contract "${d.name}" was not deployed until block ${d.blockCreated} (current block ${s}).`]:[`- The chain does not have the contract "${d.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}Se.ChainDoesNotSupportContract=r;class t extends e.BaseError{constructor({chain:s,currentChainId:u}){super(`The current chain of the wallet (id: ${u}) does not match the target chain for the transaction (id: ${s.id} – ${s.name}).`,{metaMessages:[`Current Chain ID:  ${u}`,`Expected Chain ID: ${s.id} – ${s.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}Se.ChainMismatchError=t;class n 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(`
41`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}Se.ChainNotFoundError=n;class a extends e.BaseError{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}Se.ClientChainNotConfiguredError=a;class i extends e.BaseError{constructor({chainId:s}){super(typeof s=="number"?`Chain ID "${s}
41" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}return Se.InvalidChainIdError=i,Se}var Qa={},Lf;function kn(){if(Lf)return Qa;Lf=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.encodeDeployData=a;const e=me(),r=Ie(),t=We(),n="/docs/contract/encodeDeployData";function a(i){const{abi:o,args:s,bytecode:u}=i;if(!s||s.length===0)return u;const d=o.find(c=>"type"in c&&c.type==="constructor");if(!d)throw new e.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in d))throw new e.AbiConstructorParamsNotFoundError({docsPath:n});if(!d.inputs||d.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:n});const l=(0,t.encodeAbiParameters)(d.inputs,s);return(0,r.concatHex)([u,l])}return Qa}var eo={},zf;function Bt(){if(zf)return eo;zf=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.getChainContractAddress=r;const e=xn();function r({blockNumber:t,chain:n,contract:a}){const i=n?.contracts?.[a];if(!i)throw new e.ChainDoesNotSupportContract({chain:n,contract:{name:a}});if(t&&i.blockCreated&&i.blockCreated>t)throw new e.ChainDoesNotSupportContract({blockNumber:t,chain:n,contract:{name:a,blockCreated:i.blockCreated}});return i.address}return eo}var to={},Gf;function ly(){if(Gf)return to;Gf=1,Object.defineProperty(to,"__esModule",{value:!0}),to.getCallError=n;const e=rr(),r=ar(),t=nu();function n(a,{docsPath:i,...o}){const s=(()=>{const u=(0,t.getNodeError)(a,o);return u instanceof r.UnknownNodeError?a:u})();return new e.CallExecutionError(s,{docsPath:i,...o})}return to}var ro={},Vf;function qc(){if(Vf)return ro;Vf=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.createBatchScheduler=r;const e=new Map;function r({fn:t,id:n,shouldSplitBatch:a,wait:i=0,sort:o}){const s=async()=>{const f=l();u();const h=f.map(({args:y})=>y);h.length!==0&&t(h).then(y=>{o&&Array.isArray(y)&&y.sort(o);for(let b=0;b<f.length;b++){const{pendingPromise:p}=f[b];p.resolve?.([y[b],y])}}).catch(y=>{for(let b=0;b<f.length;b++){const{pendingPromise:p}=f[b];p.reject?.(y)}})},u=()=>e.delete(n),d=()=>l().map(({args:f})=>f),l=()=>e.get(n)||[],c=f=>e.set(n,[...l(),f]);return{flush:u,async schedule(f){const h={},y=new Promise((v,m)=>{h.resolve=v,h.reject=m});return a?.([...d(),f])&&s(),l().length>0?(c({args:f,pendingPromise:h}),y):(c({args:f,pendingPromise:h}),setTimeout(s,i),y)}}}return ro}var rc={},yt={},Wf;function mp(){if(Wf)return yt;Wf=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.OffchainLookupSenderMismatchError=yt.OffchainLookupResponseMalformedError=yt.OffchainLookupError=void 0;const e=Te(),r=ne(),t=Ys();class n extends r.BaseError{constructor({callbackSelector:s,cause:u,data:d,extraData:l,sender:c,urls:f}){super(u.shortMessage||"An error occurred while fetching for an offchain result.",{cause:u,metaMessages:[...u.metaMessages||[],u.metaMessages?.length?"":[],"Offchain Gateway Call:",f&&["  Gateway URL(s):",...f.map(h=>`    ${(0,t.getUrl)(h)}`)],`  Sender: ${c}`,`  Data: ${d}`,`  Callback selector: ${s}`,`  Extra data: ${l}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}yt.OffchainLookupError=n;class a extends r.BaseError{constructor({result:s,url:u}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,t.getUrl)(u)}`,`Response: ${(0,e.stringify)(s)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}yt.OffchainLookupResponseMalformedError=a;class i extends r.BaseError{constructor({sender:s,to:u}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${u}`,`OffchainLookup sender address: ${s}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}return yt.OffchainLookupSenderMismatchError=i,yt}var Kf;function Mc(){return Kf||(Kf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offchainLookupAbiItem=e.offchainLookupSignature=void 0,e.offchainLookup=l,e.ccipRequest=c;const r=Hn(),t=mp(),n=Je(),a=tu(),i=We(),o=vt(),s=Ie(),u=je(),d=Te();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 l(f,{blockNumber:h,blockTag:y,data:b,to:p}){const{args:v}=(0,a.decodeErrorResult)({data:b,abi:[e.offchainLookupAbiItem]}),[m,E,g,_,j]=v,{ccipRead:P}=f,A=P&&typeof P?.request=="function"?P.request:c;try{if(!(0,o.isAddressEqual)(p,m))throw new t.OffchainLookupSenderMismatchError({sender:m,to:p});const T=await A({data:g,sender:m,urls:E}),{data:S}=await(0,r.call)(f,{blockNumber:h,blockTag:y,data:(0,s.concat)([_,(0,i.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[T,j])]),to:p});return S}catch(T){throw new t.OffchainLookupError({callbackSelector:_,cause:T,data:b,extraData:j,sender:m,urls:E})}}async function c({data:f,sender:h,urls:y}){let b=new Error("An unknown error occurred.");for(let p=0;p<y.length;p++){const v=y[p],m=v.includes("{data}")?"GET":"POST",E=m==="POST"?{data:f,sender:h}:void 0;try{const g=await fetch(v.replace("{sender}",h).replace("{data}",f),{body:JSON.stringify(E),method:m});let _;if(g.headers.get("Content-Type")?.startsWith("application/json")?_=(await g.json()).data:_=await g.text(),!g.ok){b=new n.HttpRequestError({body:E,details:_?.error?(0,d.stringify)(_.error):g.statusText,headers:g.headers,status:g.status,url:v});continue}if(!(0,u.isHex)(_)){b=new t.OffchainLookupResponseMalformedError({result:_,url:v});continue}return _}catch(g){b=new n.HttpRequestError({body:E,details:g.message,url:v})}}throw b}})(rc)),rc}var Zf;function Hn(){if(Zf)return ln;Zf=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.call=E,ln.getRevertErrorData=A;const e=Zs(),r=qe(),t=sr(),n=bp(),a=dy(),i=ne(),o=xn(),s=rr(),u=Rt(),d=kn(),l=Ye(),c=Bt(),f=W(),h=ly(),y=Rn(),b=or(),p=qc(),v=ty(),m=ir();async function E(T,S){const{account:B=T.account,batch:F=!!T.batch?.multicall,blockNumber:O,blockTag:w="latest",accessList:I,blobs:M,code:R,data:C,factory:q,factoryData:x,gas:k,gasPrice:$,maxFeePerBlobGas:U,maxFeePerGas:z,maxPriorityFeePerGas:L,nonce:G,to:Z,value:Y,stateOverride:K,...ie}=S,oe=B?(0,r.parseAccount)(B):void 0;if(R&&(q||x))throw new i.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(R&&Z)throw new i.BaseError("Cannot provide both `code` & `to` as parameters.");const ce=R&&C,V=q&&x&&Z&&C,D=ce||V,N=ce?j({code:R,data:C}):V?P({data:C,factory:q,factoryData:x,to:Z}):C;try{(0,m.assertRequest)(S);const X=(O?(0,f.numberToHex)(O):void 0)||w,ae=(0,v.serializeStateOverride)(K),le=T.chain?.formatters?.transactionRequest?.format,he=(le||b.formatTransactionRequest)({...(0,y.extract)(ie,{format:le}),from:oe?.address,accessList:I,blobs:M,data:N,gas:k,gasPrice:$,maxFeePerBlobGas:U,maxFeePerGas:z,maxPriorityFeePerGas:L,nonce:G,to:D?void 0:Z,value:Y});if(F&&g({request:he})&&!ae)try{return await _(T,{...he,blockNumber:O,blockTag:w})}catch(ve){if(!(ve instanceof o.ClientChainNotConfiguredError)&&!(ve instanceof o.ChainDoesNotSupportContract))throw ve}const pe=await T.request({method:"eth_call",params:ae?[he,X,ae]:[he,X]});return pe==="0x"?{data:void 0}:{data:pe}}catch(re){const X=A(re),{offchainLookup:ae,offchainLookupSignature:le}=await Promise.resolve().then(()=>Mc());if(T.ccipRead!==!1&&X?.slice(0,10)===le&&Z)return{data:await ae(T,{data:X,to:Z})};throw D&&X?.slice(0,10)==="0x101bb98d"?new s.CounterfactualDeploymentFailedError({factory:q}):(0,h.getCallError)(re,{...S,account:oe,chain:T.chain})}}function g({request:T}){const{data:S,to:B,...F}=T;return!(!S||S.startsWith(n.aggregate3Signature)||!B||Object.values(F).filter(O=>typeof O<"u").length>0)}async function _(T,S){const{batchSize:B=1024,wait:F=0}=typeof T.batch?.multicall=="object"?T.batch.multicall:{},{blockNumber:O,blockTag:w="latest",data:I,multicallAddress:M,to:R}=S;let C=M;if(!C){if(!T.chain)throw new o.ClientChainNotConfiguredError;C=(0,c.getChainContractAddress)({blockNumber:O,chain:T.chain,contract:"multicall3"})}const x=(O?(0,f.numberToHex)(O):void 0)||w,{schedule:k}=(0,p.createBatchScheduler)({id:`${T.uid}.${x}`,wait:F,shouldSplitBatch(z){return z.reduce((G,{data:Z})=>G+(Z.length-2),0)>B*2},fn:async z=>{const L=z.map(Y=>
41({allowFailure:!0,callData:Y.data,target:Y.to})),G=(0,l.encodeFunctionData)({abi:t.multicall3Abi,args:[L],functionName:"aggregate3"}),Z=await T.request({method:"eth_call",params:[{data:G,to:C},x]});return(0,u.decodeFunctionResult)({abi:t.multicall3Abi,args:[L],functionName:"aggregate3",data:Z||"0x"})}}),[{returnData:$,success:U}]=await k({data:I,to:R});if(!U)throw new s.RawContractError({data:$});return $==="0x"?{data:void 0}:{data:$}}function j(T){const{code:S,data:B}=T;return(0,d.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(bytes, bytes)"]),bytecode:a.deploylessCallViaBytecodeBytecode,args:[S,B]})}function P(T){const{data:S,factory:B,factoryData:F,to:O}=T;return(0,d.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:a.deploylessCallViaFactoryBytecode,args:[O,S,B,F]})}function A(T){if(!(T instanceof i.BaseError))return;const S=T.walk();return typeof S?.data=="object"?S.data?.data:S.data}return ln}var Yf;function Et(){if(Yf)return Ja;Yf=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.readContract=i;const e=Rt(),r=Ye(),t=Or(),n=ue(),a=Hn();async function i(o,s){const{abi:u,address:d,args:l,functionName:c,...f}=s,h=(0,r.encodeFunctionData)({abi:u,args:l,functionName:c});try{const{data:y}=await(0,n.getAction)(o,a.call,"call")({...f,data:h,to:d});return(0,e.decodeFunctionResult)({abi:u,args:l,functionName:c,data:y||"0x"})}catch(y){throw(0,t.getContractError)(y,{abi:u,address:d,args:l,docsPath:"/docs/contract/readContract",functionName:c})}}return Ja}var no={},Jf;function fy(){if(Jf)return no;Jf=1,Object.defineProperty(no,"__esModule",{value:!0}),no.simulateContract=o;const e=qe(),r=Rt(),t=Ye(),n=Or(),a=ue(),i=Hn();async function o(s,u){const{abi:d,address:l,args:c,dataSuffix:f,functionName:h,...y}=u,b=y.account?(0,e.parseAccount)(y.account):s.account,p=(0,t.encodeFunctionData)({abi:d,args:c,functionName:h});try{const{data:v}=await(0,a.getAction)(s,i.call,"call")({batch:!1,data:`${p}${f?f.replace("0x",""):""}`,to:l,...y,account:b}),m=(0,r.decodeFunctionResult)({abi:d,args:c,functionName:h,data:v||"0x"}),E=d.filter(g=>"name"in g&&g.name===u.functionName);return{result:m,request:{abi:E,address:l,args:c,dataSuffix:f,functionName:h,...y,account:b}}}catch(v){throw(0,n.getContractError)(v,{abi:d,address:l,args:c,docsPath:"/docs/contract/simulateContract",functionName:h,sender:b?.address})}}return no}var ao={},nc={},Xf;function Rr(){return Xf||(Xf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cleanupCache=e.listenersCache=void 0,e.observe=t,e.listenersCache=new Map,e.cleanupCache=new Map;let r=0;function t(n,a,i){const o=++r,s=()=>e.listenersCache.get(n)||[],u=()=>{const h=s();e.listenersCache.set(n,h.filter(y=>y.id!==o))},d=()=>{const h=e.cleanupCache.get(n);s().length===1&&h&&h(),u()},l=s();if(e.listenersCache.set(n,[...l,{id:o,fns:a}]),l&&l.length>0)return d;const c={};for(const h in a)c[h]=((...y)=>{const b=s();if(b.length!==0)for(const p of b)p.fns[h]?.(...y)});const f=i(c);return typeof f=="function"&&e.cleanupCache.set(n,f),d}})(nc)),nc}var oo={},io={},Qf;function Fc(){if(Qf)return io;Qf=1,Object.defineProperty(io,"__esModule",{value:!0}),io.wait=e;async function e(r){return new Promise(t=>setTimeout(t,r))}return io}var eb;function $n(){if(eb)return oo;eb=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.poll=r;const e=Fc();function r(t,{emitOnBegin:n,initialWaitTime:a,interval:i}){let o=!0;const s=()=>o=!1;return(async()=>{let d;n&&(d=await t({unpoll:s}));const l=await a?.(d)??i;await(0,e.wait)(l);const c=async()=>{o&&(await t({unpoll:s}),await(0,e.wait)(i),c())};c()})(),s}return oo}var bn={},ac={},tb;function gp(){return tb||(tb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.responseCache=e.promiseCache=void 0,e.getCache=r,e.withCache=t,e.promiseCache=new Map,e.responseCache=new Map;function r(n){const a=(s,u)=>({clear:()=>u.delete(s),get:()=>u.get(s),set:d=>u.set(s,d)}),i=a(n,e.promiseCache),o=a(n,e.responseCache);return{clear:()=>{i.clear(),o.clear()},promise:i,response:o}}async function t(n,{cacheKey:a,cacheTime:i=Number.POSITIVE_INFINITY}){const o=r(a),s=o.response.get();if(s&&i>0&&new Date().getTime()-s.created.getTime()<i)return s.data;let u=o.promise.get();u||(u=n(),o.promise.set(u));try{const d=await u;return o.response.set({created:new Date,data:d}),d}finally{o.promise.clear()}}})(ac)),ac}var rb;function Nn(){if(rb)return bn;rb=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.getBlockNumberCache=t,bn.getBlockNumber=n;const e=gp(),r=a=>`blockNumber.${a}`;function t(a){return(0,e.getCache)(r(a))}async function n(a,{cacheTime:i=a.cacheTime}={}){const o=await(0,e.withCache)(()=>a.request({method:"eth_blockNumber"}),{cacheKey:r(a.uid),cacheTime:i});return BigInt(o)}return bn}var so={},nb;function lu(){if(nb)return so;nb=1,Object.defineProperty(so,"__esModule",{value:!0}),so.getFilterChanges=t;const e=Fn(),r=St();async function t(n,{filter:a}){const i="strict"in a&&a.strict,o=await a.request({method:"eth_getFilterChanges",params:[a.id]});if(typeof o[0]=="string")return o;const s=o.map(u=>(0,r.formatLog)(u));return!("abi"in a)||!a.abi?s:(0,e.parseEventLogs)({abi:a.abi,logs:s,strict:i})}return so}var uo={},ab;function fu(){if(ab)return uo;ab=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.uninstallFilter=e;async function e(r,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}return uo}var ob;function by(){if(ob)return ao;ob=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.watchContractEvent=y;const e=me(),r=nr(),t=Mn(),n=er(),a=St(),i=ue(),o=Rr(),s=$n(),u=Te(),d=vc(),l=Nn(),c=Cc(),f=lu(),h=fu();function y(b,p){const{abi:v,address:m,args:E,batch:g=!0,eventName:_,fromBlock:j,onError:P,onLogs:A,poll:T,pollingInterval:S=b.pollingInterval,strict:B}=p;return(typeof T<"u"?T:typeof j=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="fallback"&&b.transport.transports[0].c
41onfig.type==="webSocket"))?(()=>{const I=B??!1,M=(0,u.stringify)(["watchContractEvent",m,E,g,b.uid,_,S,I,j]);return(0,o.observe)(M,{onLogs:A,onError:P},R=>{let C;j!==void 0&&(C=j-1n);let q,x=!1;const k=(0,s.poll)(async()=>{if(!x){try{q=await(0,i.getAction)(b,d.createContractEventFilter,"createContractEventFilter")({abi:v,address:m,args:E,eventName:_,strict:I,fromBlock:j})}catch{}x=!0;return}try{let $;if(q)$=await(0,i.getAction)(b,f.getFilterChanges,"getFilterChanges")({filter:q});else{const U=await(0,i.getAction)(b,l.getBlockNumber,"getBlockNumber")({});C&&C<U?$=await(0,i.getAction)(b,c.getContractEvents,"getContractEvents")({abi:v,address:m,args:E,eventName:_,fromBlock:C+1n,toBlock:U,strict:I}):$=[],C=U}if($.length===0)return;if(g)R.onLogs($);else for(const U of $)R.onLogs([U])}catch($){q&&$ instanceof r.InvalidInputRpcError&&(x=!1),R.onError?.($)}},{emitOnBegin:!0,interval:S});return async()=>{q&&await(0,i.getAction)(b,h.uninstallFilter,"uninstallFilter")({filter:q}),k()}})})():(()=>{const I=B??!1,M=(0,u.stringify)(["watchContractEvent",m,E,g,b.uid,_,S,I]);let R=!0,C=()=>R=!1;return(0,o.observe)(M,{onLogs:A,onError:P},q=>((async()=>{try{const x=(()=>{if(b.transport.type==="fallback"){const U=b.transport.transports.find(z=>z.config.type==="webSocket");return U?U.value:b.transport}return b.transport})(),k=_?(0,n.encodeEventTopics)({abi:v,eventName:_,args:E}):[],{unsubscribe:$}=await x.subscribe({params:["logs",{address:m,topics:k}],onData(U){if(!R)return;const z=U.result;try{const{eventName:L,args:G}=(0,t.decodeEventLog)({abi:v,data:z.data,topics:z.topics,strict:B}),Z=(0,a.formatLog)(z,{args:G,eventName:L});q.onLogs([Z])}catch(L){let G,Z;if(L instanceof e.DecodeLogDataMismatch||L instanceof e.DecodeLogTopicsMismatch){if(B)return;G=L.abiItem.name,Z=L.abiItem.inputs?.some(K=>!("name"in K&&K.name))}const Y=(0,a.formatLog)(z,{args:Z?[]:{},eventName:G});q.onLogs([Y])}},onError(U){q.onError?.(U)}});C=$,R||C()}catch(x){P?.(x)}})(),()=>C()))})()}return ao}var co={},lo={},$t={},ib;function bu(){if(ib)return $t;ib=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.AccountTypeNotSupportedError=$t.AccountNotFoundError=void 0;const e=ne();class r extends e.BaseError{constructor({docsPath:a}={}){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(`
42`),{docsPath:a,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}$t.AccountNotFoundError=r;class t extends e.BaseError{constructor({docsPath:a,metaMessages:i,type:o}){super(`Account type "${o}" is not supported.`,{docsPath:a,metaMessages:i}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountTypeNotSupportedError"})}}return $t.AccountTypeNotSupportedError=t,$t}var fo={},sb;function mu(){if(sb)return fo;sb=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.assertCurrentChain=r;const e=xn();function r({chain:t,currentChainId:n}){if(!t)throw new e.ChainNotFoundError;if(n!==t.id)throw new e.ChainMismatchError({chain:t,currentChainId:n})}return fo}var bo={},ub;function my(){if(ub)return bo;ub=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.getTransactionError=n;const e=ar(),r=Me(),t=nu();function n(a,{docsPath:i,...o}){const s=(()=>{const u=(0,t.getNodeError)(a,o);return u instanceof e.UnknownNodeError?a:u})();return new r.TransactionExecutionError(s,{docsPath:i,...o})}return bo}var mo={},cb;function xc(){if(cb)return mo;cb=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.sendRawTransaction=e;async function e(r,{serializedTransaction:t}){return r.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}return mo}var db;function kc(){if(db)return lo;db=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.sendTransaction=c;const e=qe(),r=bu(),t=mu(),n=my(),a=Rn(),i=or(),o=ue(),s=ir(),u=qn(),d=du(),l=xc();async function c(f,h){const{account:y=f.account,chain:b=f.chain,accessList:p,blobs:v,data:m,gas:E,gasPrice:g,maxFeePerBlobGas:_,maxFeePerGas:j,maxPriorityFeePerGas:P,nonce:A,to:T,value:S,...B}=h;if(!y)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const F=(0,e.parseAccount)(y);try{(0,s.assertRequest)(h);let O;if(b!==null&&(O=await(0,o.getAction)(f,u.getChainId,"getChainId")({}),(0,t.assertCurrentChain)({currentChainId:O,chain:b})),F.type==="json-rpc"){const w=f.chain?.formatters?.transactionRequest?.format,M=(w||i.formatTransactionRequest)({...(0,a.extract)(B,{format:w}),accessList:p,blobs:v,chainId:O,data:m,from:F.address,gas:E,gasPrice:g,maxFeePerBlobGas:_,maxFeePerGas:j,maxPriorityFeePerGas:P,nonce:A,to:T,value:S});return await f.request({method:"eth_sendTransaction",params:[M]},{retryCount:0})}if(F.type==="local"){const w=await(0,o.getAction)(f,d.prepareTransactionRequest,"prepareTransactionRequest")({account:F,accessList:p,blobs:v,chain:b,chainId:O,data:m,gas:E,gasPrice:g,maxFeePerBlobGas:_,maxFeePerGas:j,maxPriorityFeePerGas:P,nonce:A,parameters:[...d.defaultParameters,"sidecars"],to:T,value:S,...B}),I=b?.serializers?.transaction,M=await F.signTransaction(w,{seri
42alizer:I});return await(0,o.getAction)(f,l.sendRawTransaction,"sendRawTransaction")({serializedTransaction:M})}throw F.type==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Error("incompatible account type.")}catch(O){throw O instanceof r.AccountTypeNotSupportedError?O:(0,n.getTransactionError)(O,{...h,account:F,chain:h.chain||void 0})}}return lo}var lb;function gy(){if(lb)return co;lb=1,Object.defineProperty(co,"__esModule",{value:!0}),co.writeContract=n;const e=Ye(),r=ue(),t=kc();async function n(a,i){const{abi:o,address:s,args:u,dataSuffix:d,functionName:l,...c}=i,f=(0,e.encodeFunctionData)({abi:o,args:u,functionName:l});return(0,r.getAction)(a,t.sendTransaction,"sendTransaction")({data:`${f}${d?d.replace("0x",""):""}`,to:s,...c})}return co}var fb;function yp(){if(fb)return br;fb=1,Object.defineProperty(br,"__esModule",{value:!0}),br.getContract=u,br.getFunctionParameters=d,br.getEventParameters=l;const e=ue(),r=vc(),t=cy(),n=Cc(),a=Et(),i=fy(),o=by(),s=gy();function u({abi:c,address:f,client:h}){const y=h,[b,p]=y?"public"in y&&"wallet"in y?[y.public,y.wallet]:"public"in y?[y.public,void 0]:"wallet"in y?[void 0,y.wallet]:[y,y]:[void 0,void 0],v=b!=null,m=p!=null,E={};let g=!1,_=!1,j=!1;for(const P of c)if(P.type==="function"?P.stateMutability==="view"||P.stateMutability==="pure"?g=!0:_=!0:P.type==="event"&&(j=!0),g&&_&&j)break;return v&&(g&&(E.read=new Proxy({},{get(P,A){return(...T)=>{const{args:S,options:B}=d(T);return(0,e.getAction)(b,a.readContract,"readContract")({abi:c,address:f,functionName:A,args:S,...B})}}})),_&&(E.simulate=new Proxy({},{get(P,A){return(...T)=>{const{args:S,options:B}=d(T);return(0,e.getAction)(b,i.simulateContract,"simulateContract")({abi:c,address:f,functionName:A,args:S,...B})}}})),j&&(E.createEventFilter=new Proxy({},{get(P,A){return(...T)=>{const S=c.find(O=>O.type==="event"&&O.name===A),{args:B,options:F}=l(T,S);return(0,e.getAction)(b,r.createContractEventFilter,"createContractEventFilter")({abi:c,address:f,eventName:A,args:B,...F})}}}),E.getEvents=new Proxy({},{get(P,A){return(...T)=>{const S=c.find(O=>O.type==="event"&&O.name===A),{args:B,options:F}=l(T,S);return(0,e.getAction)(b,n.getContractEvents,"getContractEvents")({abi:c,address:f,eventName:A,args:B,...F})}}}),E.watchEvent=new Proxy({},{get(P,A){return(...T)=>{const S=c.find(O=>O.type==="event"&&O.name===A),{args:B,options:F}=l(T,S);return(0,e.getAction)(b,o.watchContractEvent,"watchContractEvent")({abi:c,address:f,eventName:A,args:B,...F})}}}))),m&&_&&(E.write=new Proxy({},{get(P,A){return(...T)=>{const{args:S,options:B}=d(T);return(0,e.getAction)(p,s.writeContract,"writeContract")({abi:c,address:f,functionName:A,args:S,...B})}}})),(v||m)&&_&&(E.estimateGas=new Proxy({},{get(P,A){return(...T)=>{const{args:S,options:B}=d(T),F=b??p;return(0,e.getAction)(F,t.estimateContractGas,"estimateContractGas")({abi:c,address:f,functionName:A,args:S,...B,account:B.account??p.account})}}})),E.address=f,E.abi=c,E}function d(c){const f=c.length&&Array.isArray(c[0]),h=f?c[0]:[],y=(f?c[1]:c[0])??{};return{args:h,options:y}}function l(c,f){let h=!1;Array.isArray(c[0])?h=!0:c.length===1?h=f.inputs.some(p=>p.indexed):c.length===2&&(h=!0);const y=h?c[0]:void 0,b=(h?c[1]:c[0])??{};return{args:y,options:b}}return br}var mn={},go={},bb;function yy(){if(bb)return go;bb=1,Object.defineProperty(go,"__esModule",{value:!0}),go.uid=n;const e=256;let r=e,t;function n(a=11){if(!t||r+a>e*2){t="",r=0;for(let i=0;i<e;i++)t+=(256+Math.random()*256|0).toString(16).substring(1)}return t.substring(r,r+++a)}return go}var mb;function gu(){if(mb)return mn;mb=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.createClient=t,mn.rpcSchema=n;const e=qe(),r=yy();function t(a){const{batch:i,cacheTime:o=a.pollingInterval??4e3,ccipRead:s,key:u="base",name:d="Base Client",pollingInterval:l=4e3,type:c="base"}=a,f=a.chain,h=a.account?(0,e.parseAccount)(a.account):void 0,{config:y,request:b,value:p}=a.transport({chain:f,pollingInterval:l}),v={...y,...p},m={account:h,batch:i,cacheTime:o,ccipRead:s,chain:f,key:u,name:d,pollingInterval:l,request:b,transport:v,type:c,uid:(0,r.uid)()};function E(g){return _=>{const j=_(g);for(const A in m)delete j[A];const P={...g,...j};return Object.assign(P,{extend:E(P)})}}return Object.assign(m,{extend:E(m)})}function n(){return null}return mn}var yo={},ho={},gn={},oc={},gb;function hp(){return gb||(gb=1,(function(e){Object.defineProperty(e,"__esMo
42dule",{value:!0}),e.promiseCache=void 0,e.withDedupe=t;const r=Qs();e.promiseCache=new r.LruMap(8192);function t(n,{enabled:a=!0,id:i}){if(!a||!i)return n();if(e.promiseCache.get(i))return e.promiseCache.get(i);const o=n().finally(()=>e.promiseCache.delete(i));return e.promiseCache.set(i,o),o}})(oc)),oc}var po={},yb;function Hc(){if(yb)return po;yb=1,Object.defineProperty(po,"__esModule",{value:!0}),po.withRetry=r;const e=Fc();function r(t,{delay:n=100,retryCount:a=2,shouldRetry:i=()=>!0}={}){return new Promise((o,s)=>{const u=async({count:d=0}={})=>{const l=async({error:c})=>{const f=typeof n=="function"?n({count:d,error:c}):n;f&&await(0,e.wait)(f),u({count:d+1})};try{const c=await t();o(c)}catch(c){if(d<a&&await i({count:d,error:c}))return l({error:c});s(c)}};u()})}return po}var hb;function hy(){if(hb)return gn;hb=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.buildRequest=u,gn.shouldRetry=d;const e=ne(),r=Je(),t=nr(),n=W(),a=Ae(),i=hp(),o=Hc(),s=Te();function u(l,c={}){return async(f,h={})=>{const{dedupe:y=!1,retryDelay:b=150,retryCount:p=3,uid:v}={...c,...h},m=y?(0,a.keccak256)((0,n.stringToHex)(`${v}.${(0,s.stringify)(f)}`)):void 0;return(0,i.withDedupe)(()=>(0,o.withRetry)(async()=>{try{return await l(f)}catch(E){const g=E;switch(g.code){case t.ParseRpcError.code:throw new t.ParseRpcError(g);case t.InvalidRequestRpcError.code:throw new t.InvalidRequestRpcError(g);case t.MethodNotFoundRpcError.code:throw new t.MethodNotFoundRpcError(g,{method:f.method});case t.InvalidParamsRpcError.code:throw new t.InvalidParamsRpcError(g);case t.InternalRpcError.code:throw new t.InternalRpcError(g);case t.InvalidInputRpcError.code:throw new t.InvalidInputRpcError(g);case t.ResourceNotFoundRpcError.code:throw new t.ResourceNotFoundRpcError(g);case t.ResourceUnavailableRpcError.code:throw new t.ResourceUnavailableRpcError(g);case t.TransactionRejectedRpcError.code:throw new t.TransactionRejectedRpcError(g);case t.MethodNotSupportedRpcError.code:throw new t.MethodNotSupportedRpcError(g,{method:f.method});case t.LimitExceededRpcError.code:throw new t.LimitExceededRpcError(g);case t.JsonRpcVersionUnsupportedError.code:throw new t.JsonRpcVersionUnsupportedError(g);case t.UserRejectedRequestError.code:throw new t.UserRejectedRequestError(g);case t.UnauthorizedProviderError.code:throw new t.UnauthorizedProviderError(g);case t.UnsupportedProviderMethodError.code:throw new t.UnsupportedProviderMethodError(g);case t.ProviderDisconnectedError.code:throw new t.ProviderDisconnectedError(g);case t.ChainDisconnectedError.code:throw new t.ChainDisconnectedError(g);case t.SwitchChainError.code:throw new t.SwitchChainError(g);case 5e3:throw new t.UserRejectedRequestError(g);default:throw E instanceof e.BaseError?E:new t.UnknownRpcError(g)}}},{delay:({count:E,error:g})=>{if(g&&g instanceof r.HttpRequestError){const _=g?.headers?.get("Retry-After");if(_?.match(/\d/))return Number.parseInt(_)*1e3}return~~(1<<E)*b},retryCount:p,shouldRetry:({error:E})=>d(E)}),{enabled:y,id:m})}}function d(l){return"code"in l&&typeof l.code=="number"?l.code===-1||l.code===t.LimitExceededRpcError.code||l.code===t.InternalRpcError.code:l instanceof r.HttpRequestError&&l.status?l.status===403||l.status===408||l.status===4
4213||l.status===429||l.status===500||l.status===502||l.status===503||l.status===504:!0}return gn}var pb;function Dn(){if(pb)return ho;pb=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.createTransport=t;const e=hy(),r=yy();function t({key:n,name:a,request:i,retryCount:o=3,retryDelay:s=150,timeout:u,type:d},l){const c=(0,r.uid)();return{config:{key:n,name:a,request:i,retryCount:o,retryDelay:s,timeout:u,type:d},request:(0,e.buildRequest)(i,{retryCount:o,retryDelay:s,uid:c}),value:l}}return ho}var _b;function pp(){if(_b)return yo;_b=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.custom=r;const e=Dn();function r(t,n={}){const{key:a="custom",name:i="Custom Provider",retryDelay:o}=n;return({retryCount:s})=>(0,e.createTransport)({key:a,name:i,request:t.request.bind(t),retryCount:n.retryCount??s,retryDelay:o,type:"custom"})}return yo}var yn={},vb;function _p(){if(vb)return yn;vb=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.fallback=n,yn.rankTransports=i;const e=nr(),r=Fc(),t=Dn();function n(o,s={}){const{key:u="fallback",name:d="Fallback",rank:l=!1,retryCount:c,retryDelay:f}=s;return(({chain:h,pollingInterval:y=4e3,timeout:b,...p})=>{let v=o,m=()=>{};const E=(0,t.createTransport)({key:u,name:d,async request({method:g,params:_}){const j=async(P=0)=>{const A=v[P]({...p,chain:h,retryCount:0,timeout:b});try{const T=await A.request({method:g,params:_});return m({method:g,params:_,response:T,transport:A,status:"success"}),T}catch(T){if(m({error:T,method:g,params:_,transport:A,status:"error"}),a(T)||P===v.length-1)throw T;return j(P+1)}};return j()},retryCount:c,retryDelay:f,type:"fallback"},{onResponse:g=>m=g,transports:v.map(g=>g({chain:h,retryCount:0}))});if(l){const g=typeof l=="object"?l:{};i({chain:h,interval:g.interval??y,onTransports:_=>v=_,sampleCount:g.sampleCount,timeout:g.timeout,transports:v,weights:g.weights})}return E})}function a(o){return"code"in o&&typeof o.code=="number"&&(o.code===e.TransactionRejectedRpcError.code||o.code===e.UserRejectedRequestError.code||o.code===5e3)}function i({chain:o,interval:s=4e3,onTransports:u,sampleCount:d=10,timeout:l=1e3,transports:c,weights:f={}}){const{stability:h=.7,latency:y=.3}=f,b=[],p=async()=>{const v=await Promise.all(c.map(async g=>{const _=g({chain:o,retryCount:0,timeout:l}),j=Date.now();let P,A;try{await _.request({method:"net_listening"}),A=1}catch{A=0}finally{P=Date.now()}return{latency:P-j,success:A}}));b.push(v),b.length>d&&b.shift();const m=Math.max(...b.map(g=>Math.max(...g.map(({latency:_})=>_)))),E=c.map((g,_)=>{const j=b.map(B=>B[_].latency),A=1-j.reduce((B,F)=>B+F,0)/j.length/m,T=b.map(B=>B[_].success),S=T.reduce((B,F)=>B+F,0)/T.length;return S===0?[0,_]:[y*A+h*S,_]}).sort((g,_)=>_[0]-g[0]);u(E.map(([,g])=>c[g])),await(0,r.wait)(s),p()};p()}return yn}var _o={},hn={},Eb;function $c(){if(Eb)return hn;Eb=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.UrlRequiredError=void 0;const e=ne();class r 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"})}}return hn.UrlRequiredError=r,hn}var vo={},Eo={},jb;function Nc(){if(jb)return Eo;jb=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.withTimeout=e;function e(r,{errorInstance:t=new Error("timed out"),timeout:n,signal:a}){return new Promise((i,o)=>{(async()=>{let s;try{const u=new AbortController;n>0&&(s=setTimeout(()=>{a?u.abort():o(t)},n)),i(await r({signal:u?.signal||null}))}catch(u){u?.name==="AbortError"&&o(t),o(u)}finally{clearTimeout(s)}})()})}return Eo}var pn={},Pb;function py(){if(Pb)return pn;Pb=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.idCache=void 0;function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}return pn.idCache=e(),pn}var wb;function Dc(){if(wb)return vo;wb=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.getHttpRpcClient=a;const e=Je(),r=Nc(),t=Te(),n=py();function a(i,o={}){return{async request(s){const{body:u,onRequest:d=o.onRequest,onResponse:l=o.onResponse,timeout:c=o.timeout??1e4}=s,f={...o.fetchOptions??{},...s.fetchOptions??{}},{headers:h,method:y,signal:b}=f;try{const p=await(0,r.withTimeout)(async({signal:m})=>{const E={...f,body:Array.isArray(u)?(0,t.stringify)(u.map(j=>({jsonrpc:"2.0",id:j.id??n.idCache.take(),...j}))):(0,t.stringify)({jsonrpc:"2.0",id:u.id??n.idCache.take(),...u}),headers:{"Content-Type":"application/json",...h},method:y||"POST",signal:b||(c>0?m:null)}
42,g=new Request(i,E);return d&&await d(g),await fetch(i,E)},{errorInstance:new e.TimeoutError({body:u,url:i}),timeout:c,signal:!0});l&&await l(p);let v;if(p.headers.get("Content-Type")?.startsWith("application/json")?v=await p.json():(v=await p.text(),v=JSON.parse(v||"{}")),!p.ok)throw new e.HttpRequestError({body:u,details:(0,t.stringify)(v.error)||p.statusText,headers:p.headers,status:p.status,url:i});return v}catch(p){throw p instanceof e.HttpRequestError||p instanceof e.TimeoutError?p:new e.HttpRequestError({body:u,cause:p,url:i})}}}}return vo}var Tb;function vp(){if(Tb)return _o;Tb=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.http=i;const e=Je(),r=$c(),t=qc(),n=Dc(),a=Dn();function i(o,s={}){const{batch:u,fetchOptions:d,key:l="http",name:c="HTTP JSON-RPC",onFetchRequest:f,onFetchResponse:h,retryDelay:y}=s;return({chain:b,retryCount:p,timeout:v})=>{const{batchSize:m=1e3,wait:E=0}=typeof u=="object"?u:{},g=s.retryCount??p,_=v??s.timeout??1e4,j=o||b?.rpcUrls.default.http[0];if(!j)throw new r.UrlRequiredError;const P=(0,n.getHttpRpcClient)(j,{fetchOptions:d,onRequest:f,onResponse:h,timeout:_});return(0,a.createTransport)({key:l,name:c,async request({method:A,params:T}){const S={method:A,params:T},{schedule:B}=(0,t.createBatchScheduler)({id:j,wait:E,shouldSplitBatch(I){return I.length>m},fn:I=>P.request({body:I}),sort:(I,M)=>I.id-M.id}),F=async I=>u?B(I):[await P.request({body:I})],[{error:O,result:w}]=await F(S);if(O)throw new e.RpcRequestError({body:S,error:O,url:j});return w},retryCount:g,retryDelay:y,timeout:_,type:"http"},{fetchOptions:d,url:j})}}return _o}var jo={},Po={},wo={},To={},Ab;function Uc(){if(Ab)return To;Ab=1,Object.defineProperty(To,"__esModule",{value:!0}),To.isNullUniversalResolverError=n;const e=Ec(),r=ne(),t=rr();function n(a,i){if(!(a instanceof r.BaseError))return!1;const o=a.walk(s=>s instanceof t.ContractFunctionRevertedError);return o instanceof t.ContractFunctionRevertedError?!!(o.data?.errorName==="ResolverNotFound"||o.data?.errorName==="ResolverWildcardNotSupported"||o.data?.errorName==="ResolverNotContract"||o.data?.errorName==="ResolverError"||o.data?.errorName==="HttpError"||o.reason?.includes("Wildcard on non-extended resolvers is not supported")||i==="reverse"&&o.reason===e.panicReasons[50]):!1}return To}var Ao={},Io={},Ib;function _y(){if(Ib)return Io;Ib=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.encodedLabelToLabelhash=r;const e=je();function r(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const n=`0x${t.slice(1,65)}`;return(0,e.isHex)(n)?n:null}return Io}var Ob;function Lc(){if(Ob)return Ao;Ob=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.namehash=i;const e=Ie(),r=de(),t=W(),n=Ae(),a=_y();function i(o){let s=new Uint8Array(32).fill(0);if(!o)return(0,t.bytesToHex)(s);const u=o.split(".");for(let d=u.length-1;d>=0;d-=1){const l=(0,a.encodedLabelToLabelhash)(u[d]),c=l?(0,r.toBytes)(l):(0,n.keccak256)((0,r.stringToBytes)(u[d]),"bytes");s=(0,n.keccak256)((0,e.concat)([s,c]),"bytes")}return(0,t.bytesToHex)(s)}return Ao}var Oo={},So={},Sb;function Ep(){if(Sb)return So;Sb=1,Object.defineProperty(So,"__esModule",{value:!0}),So.encodeLabelhash=e;function e(r){return`[${r.slice(2)}]`}return So}var Ro={},Rb;function vy(){if(Rb)return Ro;Rb=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.labelhash=a;const e=de(),r=W(),t=Ae(),n=_y();function a(i){const o=new Uint8Array(32).fill(0);return i?(0,n.encodedLabelToLabelhash)(i)||(0,t.keccak256)((0,e.stringToBytes)(i)):(0,r.bytesToHex)(o)}return Ro}var Bb;function yu(){if(Bb)return Oo;Bb=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.packetToBytes=n;const e=de(),r=Ep(),t=vy();function n(a){const i=a.replace(/^\.|\.$/gm,"");if(i.length===0)return new Uint8Array(1);const o=new Uint8Array((0,e.stringToBytes)(i).byteLength+2);let s=0;const u=i.split(".");for(let d=0;d<u.length;d++){let l=(0,e.stringToBytes)(u[d]);l.byteLength>255&&(l=(0,e.stringToBytes)((0,r.encodeLabelhash)((0,t.labelhash)(u[d])))),o[s]=l.length,o.set(l,s+1),s+=l.length+1}return o.byteLength!==s+1?o.slice(0,s+1):o}return Oo}var Cb;function jp(){if(Cb)return wo;Cb=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.getEnsAddress=c;const e=sr(),r=Rt(),t=Ye(),n=Bt(),a=It(),i=W(),o=Uc(),s=Lc(),u=yu(),d=ue(),l=Et();async function c(f,{blockNumber:h,blockTag:y,coinType:b,name:p,gatewayUrls:v,strict:m,universalResolverAddress:E}){let g=E;if(!g){if(!f.chain)throw new Error("client chain not configured. universalResolverAddress is required.");g=(0,n.getChainContractAddress)({blockNumber:h,chain:f.chain,contract:"ensUniversalResolver"})}try{const _=(0,t.encodeFunctionData)({abi:e.addressResolverAbi,functionName:"addr",...b!=null?{args:[(0,s.namehash)(
42p),BigInt(b)]}:{args:[(0,s.namehash)(p)]}}),j={address:g,abi:e.universalResolverResolveAbi,functionName:"resolve",args:[(0,i.toHex)((0,u.packetToBytes)(p)),_],blockNumber:h,blockTag:y},P=(0,d.getAction)(f,l.readContract,"readContract"),A=v?await P({...j,args:[...j.args,v]}):await P(j);if(A[0]==="0x")return null;const T=(0,r.decodeFunctionResult)({abi:e.addressResolverAbi,args:b!=null?[(0,s.namehash)(p),BigInt(b)]:void 0,functionName:"addr",data:A[0]});return T==="0x"||(0,a.trim)(T)==="0x00"?null:T}catch(_){if(m)throw _;if((0,o.isNullUniversalResolverError)(_,"resolve"))return null;throw _}}return wo}var Bo={},Co={},Le={},ze={},qb;function Ey(){if(qb)return ze;qb=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.EnsAvatarUnsupportedNamespaceError=ze.EnsAvatarUriResolutionError=ze.EnsAvatarInvalidNftUriError=ze.EnsAvatarInvalidMetadataError=void 0;const e=ne();class r extends e.BaseError{constructor({data:o}){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(o)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}ze.EnsAvatarInvalidMetadataError=r;class t extends e.BaseError{constructor({reason:o}){super(`ENS NFT avatar URI is invalid. ${o}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}ze.EnsAvatarInvalidNftUriError=t;class n extends e.BaseError{constructor({uri:o}){super(`Unable to resolve ENS avatar URI "${o}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}ze.EnsAvatarUriResolutionError=n;class a extends e.BaseError{constructor({namespace:o}){super(`ENS NFT avatar namespace "${o}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}return ze.EnsAvatarUnsupportedNamespaceError=a,ze}var Mb;function Pp(){if(Mb)return Le;Mb=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.isImageUri=o,Le.getGateway=s,Le.resolveAvatarUri=u,Le.getJsonImage=d,Le.getMetadataAvatarUri=l,Le.parseAvatarUri=c,Le.parseNftUri=f,Le.getNftTokenUri=h;const e=Et(),r=Ey(),t=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,n=/^(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>\/.*)?$/,a=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,i=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function o(y){try{const b=await fetch(y,{method:"HEAD"});return b.status===200?b.headers.get("content-type")?.startsWith("image/"):!1}catch(b){return typeof b=="object"&&typeof b.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(p=>{const v=new Image;v.onload=()=>{p(!0)},v.onerror=()=>{p(!1)},v.src=y})}}function s(y,b){return y?y.endsWith("/")?y.slice(0,-1):y:b}function u({uri:y,gatewayUrls:b}){const p=a.test(y);if(p)return{uri:y,isOnChain:!0,isEncoded:p};const v=s(b?.ipfs,"https://ipfs.io"),m=s(b?.arweave,"https://arweave.net"),E=y.match(t),{protocol:g,subpath:_,target:j,subtarget:P=""}=E?.groups||{},A=g==="ipns:/"||_==="ipns/",T=g==="ipfs:/"||_==="ipfs/"||n.test(y);if(y.startsWith("http")&&!A&&!T){let B=y;return b?.arweave&&(B=y.replace(/https:\/\/arweave.net/g,b?.arweave)),{uri:B,isOnChain:!1,isEncoded:!1}}if((A||T)&&j)return{uri:`${v}/${A?"ipns":"ipfs"}/${j}${P}`,isOnChain:!1,isEncoded:!1};if(g==="ar:/"&&j)return{uri:`${m}/${j}${P||""}`,isOnChain:!1,isEncoded:!1};let S=y.replace(i,"");if(S.startsWith("<svg")&&(S=`data:image/svg+xml;base64,${btoa(S)}`),S.startsWith("data:")||S.startsWith("{"))return{uri:S,isOnChain:!0,isEncoded:!1};throw new r.EnsAvatarUriResolutionError({uri:y})}function d(y){if(typeof y!="object"||!("image"in y)&&!("image_url"in y)&&!("image_data"in y))throw new r.EnsAvatarInvalidMetadataError({data:y});return y.image||y.image_url||y.image_data}async function l({gatewayUrls:y,uri:b}){try{const p=await fetch(b).then(m=>m.json());return await c({gatewayUrls:y,uri:d(p)})}catch{throw new r.EnsAvatarUriResolutionError({uri:b})}}async function c({gatewayUrls:y,uri:b}){const{uri:p,isOnChain:v}=u({uri:b,gatewayUrls:y});if(v||await o(p))return p;throw new r.EnsAvatarUriResolutionError({uri:b})}function f(y){let b=y;b.startsWith("did:nft:")&&(b=b.replace("did:nft:","").replace(/_/g,"/"));const[p,v,m]=b.split("/"),[E,g]=p.split(":"),[_,j]=v.split(":");if(!E||E.toLowerCase()!=="eip155")throw new r.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!g)throw new r.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!j)throw new r.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!m)throw new r.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!_)throw new r.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(g),namespace:_.toLowerCase(),contractAddress:j,tokenID:m}}async function h(y,{nft:b}){if(b.namespace==="erc721")return(0,e.readContract)(y,{address:b.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}
42],functionName:"tokenURI",args:[BigInt(b.tokenID)]});if(b.namespace==="erc1155")return(0,e.readContract)(y,{address:b.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(b.tokenID)]});throw new r.EnsAvatarUnsupportedNamespaceError({namespace:b.namespace})}return Le}var Fb;function wp(){if(Fb)return Co;Fb=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.parseAvatarRecord=r;const e=Pp();async function r(n,{gatewayUrls:a,record:i}){return/eip155:/i.test(i)?t(n,{gatewayUrls:a,record:i}):(0,e.parseAvatarUri)({uri:i,gatewayUrls:a})}async function t(n,{gatewayUrls:a,record:i}){const o=(0,e.parseNftUri)(i),s=await(0,e.getNftTokenUri)(n,{nft:o}),{uri:u,isOnChain:d,isEncoded:l}=(0,e.resolveAvatarUri)({uri:s,gatewayUrls:a});if(d&&(u.includes("data:application/json;base64,")||u.startsWith("{"))){const f=l?atob(u.replace("data:application/json;base64,","")):u,h=JSON.parse(f);return(0,e.parseAvatarUri)({uri:(0,e.getJsonImage)(h),gatewayUrls:a})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),(0,e.getMetadataAvatarUri)({gatewayUrls:a,uri:u.replace(/(?:0x)?{id}/,c)})}return Co}var qo={},xb;function jy(){if(xb)return qo;xb=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.getEnsText=l;const e=sr(),r=Rt(),t=Ye(),n=Bt(),a=W(),i=Uc(),o=Lc(),s=yu(),u=ue(),d=Et();async function l(c,{blockNumber:f,blockTag:h,name:y,key:b,gatewayUrls:p,strict:v,universalResolverAddress:m}){let E=m;if(!E){if(!c.chain)throw new Error("client chain not configured. universalResolverAddress is required.");E=(0,n.getChainContractAddress)({blockNumber:f,chain:c.chain,contract:"ensUniversalResolver"})}try{const g={address:E,abi:e.universalResolverResolveAbi,functionName:"resolve",args:[(0,a.toHex)((0,s.packetToBytes)(y)),(0,t.encodeFunctionData)({abi:e.textResolverAbi,functionName:"text",args:[(0,o.namehash)(y),b]})],blockNumber:f,blockTag:h},_=(0,u.getAction)(c,d.readContract,"readContract"),j=p?await _({...g,args:[...g.args,p]}):await _(g);if(j[0]==="0x")return null;const P=(0,r.decodeFunctionResult)({abi:e.textResolverAbi,functionName:"text",data:j[0]});return P===""?null:P}catch(g){if(v)throw g;if((0,i.isNullUniversalResolverError)(g,"resolve"))return null;throw g}}return qo}var kb;function Tp(){if(kb)return Bo;kb=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.getEnsAvatar=n;const e=wp(),r=ue(),t=jy();async function n(a,{blockNumber:i,blockTag:o,assetGatewayUrls:s,name:u,gatewayUrls:d,str
42ict:l,universalResolverAddress:c}){const f=await(0,r.getAction)(a,t.getEnsText,"getEnsText")({blockNumber:i,blockTag:o,key:"avatar",name:u,universalResolverAddress:c,gatewayUrls:d,strict:l});if(!f)return null;try{return await(0,e.parseAvatarRecord)(a,{record:f,gatewayUrls:s})}catch{return null}}return Bo}var Mo={},Hb;function Ap(){if(Hb)return Mo;Hb=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.getEnsName=s;const e=sr(),r=Bt(),t=W(),n=Uc(),a=yu(),i=ue(),o=Et();async function s(u,{address:d,blockNumber:l,blockTag:c,gatewayUrls:f,strict:h,universalResolverAddress:y}){let b=y;if(!b){if(!u.chain)throw new Error("client chain not configured. universalResolverAddress is required.");b=(0,r.getChainContractAddress)({blockNumber:l,chain:u.chain,contract:"ensUniversalResolver"})}const p=`${d.toLowerCase().substring(2)}.addr.reverse`;try{const v={address:b,abi:e.universalResolverReverseAbi,functionName:"reverse",args:[(0,t.toHex)((0,a.packetToBytes)(p))],blockNumber:l,blockTag:c},m=(0,i.getAction)(u,o.readContract,"readContract"),[E,g]=f?await m({...v,args:[...v.args,f]}):await m(v);return d.toLowerCase()!==g.toLowerCase()?null:E}catch(v){if(h)throw v;if((0,n.isNullUniversalResolverError)(v,"reverse"))return null;throw v}}return Mo}var Fo={},$b;function Ip(){if($b)return Fo;$b=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.getEnsResolver=i;const e=Bt(),r=W(),t=yu(),n=ue(),a=Et();async function i(o,{blockNumber:s,blockTag:u,name:d,universalResolverAddress:l}){let c=l;if(!c){if(!o.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=(0,e.getChainContractAddress)({blockNumber:s,chain:o.chain,contract:"ensUniversalResolver"})}const[f]=await(0,n.getAction)(o,a.readContract,"readContract")({address:c,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,r.toHex)((0,t.packetToBytes)(d))],blockNumber:s,blockTag:u});return f}return Fo}var xo={},Nb;function Op(){if(Nb)return xo;Nb=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.createBlockFilter=r;const e=eu();async function r(t){const n=(0,e.createFilterRequestScope)(t,{method:"eth_newBlockFilter"}),a=await t.request({method:"eth_newBlockFilter"});return{id:a,request:n(a),type:"block"}}return xo}var ko={},Db;function Py(){if(Db)return ko;Db=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.createEventFilter=n;const e=er(),r=W(),t=eu();async function n(a,{address:i,args:o,event:s,events:u,fromBlock:d,strict:l,toBlock:c}={}){const f=u??(s?[s]:void 0),h=(0,t.createFilterRequestScope)(a,{method:"eth_newFilter"});let y=[];f&&(y=[f.flatMap(v=>(0,e.encodeEventTopics)({abi:[v],eventName:v.name,args:o}))],s&&(y=y[0]));const b=await a.request({method:"eth_newFilter",params:[{address:i,fromBlock:typeof d=="bigint"?(0,r.numberToHex)(d):d,toBlock:typeof c=="bigint"?(0,r.numberToHex)(c):c,...y.length?{topics:y}:{}}]});return{abi:f,args:o,eventName:s?s.name:void 0,fromBlock:d,id:b,request:h(b),strict:!!l,toBlock:c,type:"event"}}return ko}var Ho={},Ub;function wy(){if(Ub)return Ho;Ub=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.createPendingTransactionFilter=r;const e=eu();async function r(t){const n=(0,e.createFilterRequestScope)(t,{method:"eth_newPendingTransactionFilter"}),a=await t.request({method:"eth_newPendingTransactionFilter"});return{id:a,request:n(a),type:"transaction"}}return Ho}var $o={},Lb;function Sp(){if(Lb)return $o;Lb=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.getBalance=r;const e=W();async function r(t,{address:n,blockNumber:a,blockTag:i="latest"}){const o=a?(0,e.numberToHex)(a):void 0,s=await t.request({method:"eth_getBalance",params:[n,o||i]});return BigInt(s)}return $o}var No={},zb;function Rp(){if(zb)return No;zb=1,Object.defineProperty(No,"__esModule",{value:!0}),No.getBlobBaseFee=e;async function e(r){const t=await r.request({method:"eth_blobBaseFee"});return BigInt(t)}return No}var Do={},Gb;function Bp(){if(Gb)return Do;Gb=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.getBlockTransactionCount=t;const e=_e(),r=W();async function t(n,{blockHash:a,blockNumber:i,blockTag:o="latest"}={}){const s=i!==void 0?(0,r.numberToHex)(i):void 0;let u;return a?u=await n.request({method:"eth_getBlockTransactionCountByHash",params:[a]},{dedupe:!0}):u=await n.request({method:"eth_getBlockTransactionCountByNumber",params:[s||o]},{dedupe:!!s}),(0,e.hexToNumber)(u)}return Do}var Uo={},Vb;function Ty(){if(Vb)return Uo;Vb=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.getCode=r;const e=W();async function r(t,{address:n,blockNumber:a,blockTag:i="latest"}){const o=a!==void 0?(0,e.numberToHex)(a):void 0,s=await t.request({method:"eth_getCode",params:[n,o||i]},{dedupe:!!o});if(s!=="0x")return s}return Uo}var Lo={},_n={},Wb;function Cp(){if(Wb)return _n;Wb=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.Eip712DomainNotFoundError=void 0;const e=ne();class r extends e.BaseError{constructor({address:n}){super(`No EIP-712 domain found on contract "${n}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${n}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip712DomainNotFoundError"})}}return _n.Eip712DomainNotFoundError=r,_n}var Kb;function qp(){if(Kb)return Lo;Kb=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.getEip712Domain=n;const e=Cp(),r=ue(),t=Et();async function n(i,o){const{address:s,factory:u,factoryData:d}=o;try{const[l,c,f,h,y,b,p]=await(0,r.getAction)(i,t.readContract,"readContract")({abi:a,address:s,functionName:"eip712Domain",factory:u,factoryData:d});return{domain:{name:c,version:f,chainId:Number(h),verifyingContract:y,salt:b},extensions:p,fields:l}}catch(l){const c=l;throw c.name==="ContractFunctionExecutionError"&&c.cause.name==="ContractFunctionZeroDataError"?new e.Eip712DomainNotFoundError({address:s}):c}}const a=[{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 Lo}var zo={},Go={},Zb;function Mp(){if(Zb)return Go;Zb=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.formatFeeHistory=e;function e(r){return{baseFeePerGas:r.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:r.gasUsedRatio,oldestBlock:BigInt(r.oldestBlock),reward:r.reward?.map(t=>t.map(n=>BigInt(n)))}}return Go}var Yb;function Fp(){if(Yb)return zo;Yb=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.getFeeHistory=t;const e=W(),r=Mp();async function t(n,{blockCount:a,blockNumber:i,blockTag:o="latest",rewardPercentiles:s}){const u=i?(0,e.numberToHex)(i):void 0,d=await n.request({method:"eth_feeHistory",params:[(0,e.numberToHex)(a),u||o,s]},{dedupe:!!u});return(0,r.formatFeeHistory)(d)}return zo}var Vo={},Jb;function xp(){if(Jb)return Vo;Jb=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.getFilterLogs=t;const e=Fn(),r=St();async function t(n,{filter:a}){const i=a.strict??!1,s=(await a.request({method:"eth_getFilterLogs",params:[a.id]})).map(u=>(0,r.formatLog)(u));return a.abi?(0,e.parseEventLogs)({abi:a.abi,logs:s,strict:i}):s}return Vo}var Wo={},Ko={},ic={},Zo={},Xb;function Ay(){if(Xb)return Zo;Xb=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.defineChain=e;function e(r){return{formatters:void 0,fees:void 0,serializers:void 0,...r}}return Zo}var Yo={},Qb;function Iy(){if(Qb)return Yo;Qb=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.extractChain=e;function e({chains:r,id:t}){return r.find(n=>n.id===t)}return Yo}var ht={},em;
42function zc(){return em||(em=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.integerRegex=ht.bytesRegex=ht.arrayRegex=void 0,ht.arrayRegex=/^(.*)\[([0-9]*)\]$/,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}var vr={},Jo={},sc={},tm;function Oy(){return tm||(tm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.socketClientCache=void 0,e.getSocketRpcClient=i;const r=Je(),t=qc(),n=Nc(),a=py();e.socketClientCache=new Map;async function i(o){const{getSocket:s,keepAlive:u=!0,key:d="socket",reconnect:l=!0,url:c}=o,{interval:f=3e4}=typeof u=="object"?u:{},{attempts:h=5,delay:y=2e3}=typeof l=="object"?l:{};let b=e.socketClientCache.get(`${d}:${c}`);if(b)return b;let p=0;const{schedule:v}=(0,t.createBatchScheduler)({id:`${d}:${c}`,fn:async()=>{const g=new Map,_=new Map;let j,P,A;async function T(){const S=await s({onClose(){g.clear(),_.clear(),l&&p<h&&setTimeout(async()=>{p++,await T().catch(console.error)},y)},onError(B){j=B;for(const F of g.values())F.onError?.(j);for(const F of _.values())F.onError?.(j);g.clear(),_.clear(),l&&p<h&&setTimeout(async()=>{p++,await T().catch(console.error)},y)},onOpen(){j=void 0,p=0},onResponse(B){const F=B.method==="eth_subscription",O=F?B.params.subscription:B.id,w=F?_:g,I=w.get(O);I&&I.onResponse(B),F||w.delete(O)}});return P=S,u&&(A&&clearInterval(A),A=setInterval(()=>P.ping?.(),f)),S}return await T(),j=void 0,b={close(){A&&clearInterval(A),P.close(),e.socketClientCache.delete(`${d}:${c}`)},get socket(){return P},request({body:S,onError:B,onResponse:F}){j&&B&&B(j);const O=S.id??a.idCache.take(),w=I=>{typeof I.id=="number"&&O!==I.id||(S.method==="eth_subscribe"&&typeof I.result=="string"&&_.set(I.result,{onResponse:w,onError:B}),S.method==="eth_unsubscribe"&&_.delete(S.params?.[0]),F(I))};g.set(O,{onResponse:w,onError:B});try{P.request({body:{jsonrpc:"2.0",id:O,...S}})}catch(I){B?.(I)}},requestAsync({body:S,timeout:B=1e4}){return(0,n.withTimeout)(()=>new Promise((F,O)=>this.request({body:S,onError:O,onResponse:F})),{errorInstance:new r.TimeoutError({body:S,url:c}),timeout:B})},requests:g,subscriptions:_,url:c},e.socketClientCache.set(`${d}:${c}`,b),[b]}}),[m,[E]]=await v();return E}})(sc)),sc}function kp(){if(typeof WebSocket<"u")return WebSocket;if(typeof bd.WebSocket<"u")return bd.WebSocket;if(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 Hp=kp(),$p=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:Hp},Symbol.toStringTag,{value:"Module"})),Np=Dh($p);var rm;function Gc(){if(rm)return Jo;rm=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.getWebSocketRpcClient=t;const e=Je(),r=Oy();async function t(n,a={}){const{keepAlive:i,reconnect:o}=a;return(0,r.getSocketRpcClient)({async getSocket({onClose:s,onError:u,onOpen:d,onResponse:l}){const c=await Promise.resolve().then(()=>Np).then(p=>p.WebSocket),f=new c(n);function h(){s(),f.removeEventListener("close",h),f.removeEventListener("message",y),f.removeEventListener("error",u),f.removeEventListener("open",d)}function y({data:p}){l(JSON.parse(p))}f.addEventListener("close",h),f.addEventListener("message",y),f.addEventListener("error",u),f.addEventListener("open",d),f.readyState===c.CONNECTING&&await new Promise((p,v)=>{f&&(f.onopen=p,f.onerror=v)});const{close:b}=f;return Object.assign(f,{close(){b.bind(f)(),s()},ping(){try{if(f.readyState===f.CLOSED||f.readyState===f.CLOSING)throw new e.WebSocketRequestError({body:{},url:f.url,details:"Socket is closed."});f.send("ping")}catch(p){u(p)}},request({body:p}){if(f.readyState===f.CLOSED||f.readyState===f.CLOSING)throw new e.WebSocketRequestError({body:p,url:f.url,details:"Socket is closed."});return f.send(JSON.stringify(p))}})},keepAlive:i,reconnect:o,url:n})}return Jo}var nm;function Sy(){if(nm)return vr;nm=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.rpc=void 0,vr.getSocket=a;const e=Dc(),r=Gc();function t(i,{body:o,onError:s,onResponse:u}){return i.request({body:o,onError:s,onResponse:u}),i}async function n(i,{body:o,timeout:s=1e4}){return i.requestAsync({body:o,timeout:s}
42)}async function a(i){const o=await(0,r.getWebSocketRpcClient)(i);return Object.assign(o.socket,{requests:o.requests,subscriptions:o.subscriptions})}return vr.rpc={http(i,o){return(0,e.getHttpRpcClient)(i).request(o)},webSocket:t,webSocketAsync:n},vr}var Nt={},Dt={},am;function Un(){if(am)return Dt;am=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.hashTypedData=i,Dt.hashDomain=o,Dt.hashStruct=s,Dt.encodeType=l;const e=We(),r=Ie(),t=W(),n=Ae(),a=hu();function i(h){const{domain:y={},message:b,primaryType:p}=h,v={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:y}),...h.types};(0,a.validateTypedData)({domain:y,message:b,primaryType:p,types:v});const m=["0x1901"];return y&&m.push(o({domain:y,types:v})),p!=="EIP712Domain"&&m.push(s({data:b,primaryType:p,types:v})),(0,n.keccak256)((0,r.concat)(m))}function o({domain:h,types:y}){return s({data:h,primaryType:"EIP712Domain",types:y})}function s({data:h,primaryType:y,types:b}){const p=u({data:h,primaryType:y,types:b});return(0,n.keccak256)(p)}function u({data:h,primaryType:y,types:b}){const p=[{type:"bytes32"}],v=[d({primaryType:y,types:b})];for(const m of b[y]){const[E,g]=f({types:b,name:m.name,type:m.type,value:h[m.name]});p.push(E),v.push(g)}return(0,e.encodeAbiParameters)(p,v)}function d({primaryType:h,types:y}){const b=(0,t.toHex)(l({primaryType:h,types:y}));return(0,n.keccak256)(b)}function l({primaryType:h,types:y}){let b="";const p=c({primaryType:h,types:y});p.delete(h);const v=[h,...Array.from(p).sort()];for(const m of v)b+=`${m}(${y[m].map(({name:E,type:g})=>`${g} ${E}`).join(",")})`;return b}function c({primaryType:h,types:y},b=new Set){const v=h.match(/^\w*/u)?.[0];if(b.has(v)||y[v]===void 0)return b;b.add(v);for(const m of y[v])c({primaryType:m.type,types:y},b);return b}function f({types:h,name:y,type:b,value:p}){if(h[b]!==void 0)return[{type:"bytes32"},(0,n.keccak256)(u({data:p,primaryType:b,types:h}))];if(b==="bytes")return p=`0x${(p.length%2?"0":"")+p.slice(2)}`,[{type:"bytes32"},(0,n.keccak256)(p)];if(b==="string")return[{type:"bytes32"},(0,n.keccak256)((0,t.toHex)(p))];if(b.lastIndexOf("]")===b.length-1){const v=b.slice(0,b.lastIndexOf("[")),m=p.map(E=>f({name:y,type:v,types:h,value:E}));return[{type:"bytes32"},(0,n.keccak256)((0,e.encodeAbiParameters)(m.map(([E])=>E),m.map(([,E])=>E)))]}return[{type:b},p]}return Dt}var om;function hu(){if(om)return Nt;om=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.serializeTypedData=u,Nt.validateTypedData=d,Nt.getTypesForEIP712Domain=l,Nt.domainSeparator=c;const e=me(),r=Ge(),t=Ce(),n=Be(),a=W(),i=zc(),o=Un(),s=Te();function u(f){const{domain:h,message:y,primaryType:b,types:p}=f,v=(g,_)=>{const j={..._};for(const P of g){const{name:A,type:T}=P;T==="address"&&(j[A]=j[A].toLowerCase())}return j},m=p.EIP712Domain?h?v(p.EIP712Domain,h):{}:{},E=(()=>{if(b!=="EIP712Domain")return v(p[b],y)})();return(0,s.stringify)({domain:m,message:E,primaryType:b,types:p})}function d(f){const{domain:h,message:y,primaryType:b,types:p}=f,v=(m,E)=>{for(const g of m){const{name:_,type:j}=g,P=E[_],A=j.match(i.integerRegex);if(A&&(typeof P=="number"||typeof P=="bigint")){const[B,F,O]=A;(0,a.numberToHex)(P,{signed:F==="int",size:Number.parseInt(O)/8})}if(j==="address"&&typeof P=="string"&&!(0,t.isAddress)(P))throw new r.InvalidAddressError({address:P});const T=j.match(i.bytesRegex);if(T){const[B,F]=T;if(F&&(0,n.size)(P)!==Number.parseInt(F))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(F),givenSize:(0,n.size)(P)})}const S=p[j];S&&v(S,P)}};p.EIP712Domain&&h&&v(p.EIP712Domain,h),b!=="EIP712Domain"&&v(p[b],y)}function l({domain:f}){return[typeof f?.name=="string"&&{name:"name",type:"string"},f?.version&&{name:"version",type:"string"},typeof f?.chainId=="number"&&{name:"chainId",type:"uint256"},f?.verifyingContract&&{name:"verifyingContract",type:"address"},f?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function c({domain:f}){return(0,o.hashDomain)({domain:f,types:{EIP712Domain:l({domain:f})}})}return Nt}var Xo={},im;function Ry(){if(im)return Xo;im=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.decodeFunctionData=i;const e=me(),r=Ve(),t=Qt(),n=Ot(),a=_t();function i(o){const{abi:s,data:u}=o,d=(0,r.slice)(u,0,4),l=s.find(c=>c.type==="function"&&d===(0,t.toFunctionSelector)((0,a.formatAbiItem)(c)));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,n.decodeAbiParameters)(l.inputs,(0,r.slice)(u,4)):void 0}}return Xo}var Qo={},sm;function By(){if(sm)return Qo;sm=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.encodeErrorResult=s;const e=me(),r=Ie(),t=Qt(),n=We(),a=_t(),i=Ze(),o="/docs/contract/encodeErrorResult";function s(u){const{abi:d,errorName:l,args:c}=u;let f=d[0];if(l){const p=(0,i.getAbiItem)({abi:d,args:c,name:l});if(!p)throw new e.AbiErrorNotFoundError(l,{docsPath:o});f=p}if(f.type!=="error")throw new e.AbiErrorNotFoundError(void 0,{docsPath:o});const h=(0,a.formatAbiItem)(f),y=(0,t.toFunctionSelector)(h);let b="0x";if(c&&c.length>0){if(!f.inputs)throw new e.AbiErrorInputsNotFoundError(f.name,{docsPath:o});b=(0,n.encodeAbiParameters)(f.inputs,c)}return(0,r.concatHex)([y,b])}return Qo}var ei={},um;function Cy(){if(um)return ei;um=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.encodeFunctionResult=a;const e=me(),r=We(),t=Ze(),n="/docs/contract/encodeFunctionResult";function a(i){const{abi:o,functionName:s,result:u}=i;let d=o[0];if(s){const c=(0,t.getAbiItem)({abi:o,name:s});if(!c)throw new e.AbiFunctionNotFoundError(s,{docsPath:n});d=c}if(d.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:n});if(!d.outputs)throw new e.AbiFunctionOutputsNotFoundError(d.name,{docsPath:n});let l=Array.isArray(u)?u:[u];return d.outputs.length===0&&!l[0]&&(l=[]),(0,r.encodeAbiParameters)(d.outputs,l)}return ei}var ti={},cm;function qy(){if(cm)return ti;cm=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.encodePacked=s;const e=me(),r=Ge(),t=Ce(),n=Ie(),a=At(),i=W(),o=zc();function s(d,l){if(d.length!==l.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:d.length,givenLength:l.length});const c=[];for(let f=0;f<d.length;f++){const h=d[f],y=l[f];c.push(u(h,y))}
42return(0,n.concatHex)(c)}function u(d,l,c=!1){if(d==="address"){const b=l;if(!(0,t.isAddress)(b))throw new r.InvalidAddressError({address:b});return(0,a.pad)(b.toLowerCase(),{size:c?32:null})}if(d==="string")return(0,i.stringToHex)(l);if(d==="bytes")return l;if(d==="bool")return(0,a.pad)((0,i.boolToHex)(l),{size:c?32:1});const f=d.match(o.integerRegex);if(f){const[b,p,v="256"]=f,m=Number.parseInt(v)/8;return(0,i.numberToHex)(l,{size:c?32:m,signed:p==="int"})}const h=d.match(o.bytesRegex);if(h){const[b,p]=h;if(Number.parseInt(p)!==(l.length-2)/2)throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(p),givenSize:(l.length-2)/2});return(0,a.pad)(l,{dir:"right",size:c?32:null})}const y=d.match(o.arrayRegex);if(y&&Array.isArray(l)){const[b,p]=y,v=[];for(let m=0;m<l.length;m++)v.push(u(p,l[m],!0));return v.length===0?"0x":(0,n.concatHex)(v)}throw new e.UnsupportedPackedAbiType(d)}return ti}var ri={},dm;function My(){if(dm)return ri;dm=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.publicKeyToAddress=t;const e=ke(),r=Ae();function t(n){const a=(0,r.keccak256)(`0x${n.substring(4)}`).substring(26);return(0,e.checksumAddress)(`0x${a}`)}return ri}var Er={},ni={},lm;function Vc(){if(lm)return ni;lm=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.isBytes=e;function e(r){return!r||typeof r!="object"||!("BYTES_PER_ELEMENT"in r)?!1:r.BYTES_PER_ELEMENT===1&&r.constructor.name==="Uint8Array"}return ni}var jr={},fm;function pu(){if(fm)return jr;fm=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.toRlp=a,jr.bytesToRlp=i,jr.hexToRlp=o;const e=ne(),r=In(),t=de(),n=W();function a(c,f="hex"){const h=s(c),y=(0,r.createCursor)(new Uint8Array(h.length));return h.encode(y),f==="hex"?(0,n.bytesToHex)(y.bytes):y.bytes}function i(c,f="bytes"){return a(c,f)}function o(c,f="hex"){return a(c,f)}function s(c){return Array.isArray(c)?u(c.map(f=>s(f))):d(c)}function u(c){const f=c.reduce((b,p)=>b+p.length,0),h=l(f);return{length:f<=55?1+f:1+h+f,encode(b){f<=55?b.pushByte(192+f):(b.pushByte(247+h),h===1?b.pushUint8(f):h===2?b.pushUint16(f):h===3?b.pushUint24(f):b.pushUint32(f));for(const{encode:p}of c)p(b)}}}function d(c){const f=typeof c=="string"?(0,t.hexToBytes)(c):c,h=l(f.length);return{length:f.length===1&&f[0]<128?1:f.length<=55?1+f.length:1+h+f.length,encode(b){f.length===1&&f[0]<128?b.pushBytes(f):f.length<=55?(b.pushByte(128+f.length),b.pushBytes(f)):(b.pushByte(183+h),h===1?b.pushUint8(f.length):h===2?b.pushUint16(f.length):h===3?b.pushUint24(f.length):b.pushUint32(f.length),b.pushBytes(f))}}}function l(c){if(c<2**8)return 1;if(c<2**16)return 2;if(c<2**24)return 3;if(c<2**32)return 4;throw new e.BaseError("Length is too large.")}return jr}var bm;function Fy(){if(bm)return Er;bm=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.getContractAddress=u,Er.getCreateAddress=d,Er.getCreate2Address=l;const e=Ie(),r=Vc(),t=At(),n=Ve(),a=de(),i=pu(),o=Ae(),s=ke();function u(c){return c.opcode==="CREATE2"?l(c):d(c)}function d(c){const f=(0,a.toBytes)((0,s.getAddress)(c.from));let h=(0,a.toBytes)(c.nonce);return h[0]===0&&(h=new Uint8Array([])),(0,s.getAddress)(`0x${(0,o.keccak256)((0,i.toRlp)([f,h],"bytes")).slice(26)}`)}function l(c){const f=(0,a.toBytes)((0,s.getAddress)(c.from)),h=(0,t.pad)((0,r.isBytes)(c.salt)?c.salt:(0,a.toBytes)(c.salt),{size:32}),y="bytecodeHash"in c?(0,r.isBytes)(c.bytecodeHash)?c.bytecodeHash:(0,a.toBytes)(c.bytecodeHash):(0,o.keccak256)(c.bytecode,"bytes");return(0,s.getAddress)((0,n.slice)((0,o.keccak256)((0,e.concat)([(0,a.toBytes)("0xff"),f,h,y])),12))}return Er}var uc={},mm;function Wc(){return mm||(mm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionReceipt=e.receiptStatuses=void 0,e.formatTransactionReceipt=i;const r=_e(),t=Bn(),n=St(),a=Cn();e.receiptStatuses={"0x0":"reverted","0x1":"success"};function i(o){const s={...o,blockNumber:o.blockNumber?BigInt(o.blockNumber):null,contractAddress:o.contractAddress?o.contractAddress:null,cumulativeGasUsed:o.cumulativeGasUsed?BigInt(o.cumulativeGasUsed):null,effectiveGasPrice:o.effectiveGasPrice?BigInt(o.effectiveGasPrice):null,gasUsed:o.gasUsed?BigInt(o.gasUsed):null,logs:o.logs?o.logs.map(u=>(0,n.formatLog)(u)):null,to:o.to?o.to:null,transactionIndex:o.transactionIndex?(0,r.hexToNumber)(o.transactionIndex):null,status:o.status?e.receiptStatuses[o.status]:null,type:o.type?a.transactionType[o.type]||o.type:null};return o.blobGasPrice&&(s.blobGasPrice=BigInt(o.blobGasPrice)),o.blobGasUsed&&(s.blobGasUsed=BigInt(o.blobGasUsed)),s}e.defineTransactionReceipt=(0,t.defineFormatter)("transactionReceipt",i)})(uc)),uc}var ai={},gm;function Kc(){if(gm)return ai;gm=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.fromRlp=i;const e=ne(),r=Tn(),t=In(),n=de(),a=W();function i(d,l="hex"){const c=(()=>
42{if(typeof d=="string"){if(d.length>3&&d.length%2!==0)throw new r.InvalidHexValueError(d);return(0,n.hexToBytes)(d)}return d})(),f=(0,t.createCursor)(c,{recursiveReadLimit:Number.POSITIVE_INFINITY});return o(f,l)}function o(d,l="hex"){if(d.bytes.length===0)return l==="hex"?(0,a.bytesToHex)(d.bytes):d.bytes;const c=d.readByte();if(c<128&&d.decrementPosition(1),c<192){const h=s(d,c,128),y=d.readBytes(h);return l==="hex"?(0,a.bytesToHex)(y):y}const f=s(d,c,192);return u(d,f,l)}function s(d,l,c){if(c===128&&l<128)return 1;if(l<=c+55)return l-c;if(l===c+55+1)return d.readUint8();if(l===c+55+2)return d.readUint16();if(l===c+55+3)return d.readUint24();if(l===c+55+4)return d.readUint32();throw new e.BaseError("Invalid RLP prefix")}function u(d,l,c){const f=d.position,h=[];for(;d.position-f<l;)h.push(o(d,c));return h}return ai}var cc={},ym;function xy(){return ym||(ym=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventSignature=void 0;var r=_c();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return r.toSignature}})})(cc)),cc}var dc={},hm;function ky(){return hm||(hm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionSignature=void 0;var r=_c();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return r.toSignature}})})(dc)),dc}var lc={},pm;function Hy(){return pm||(pm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventHash=void 0;var r=Xs();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(lc)),lc}var fc={},_m;function $y(){return _m||(_m=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionHash=void 0;var r=Xs();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(fc)),fc}var oi={},vm;function Zc(){if(vm)return oi;vm=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.isHash=t;const e=je(),r=Be();function t(n){return(0,e.isHex)(n)&&(0,r.size)(n)===32}return oi}var ii={},Ut={},Em;function Dp(){if(Em)return Ut;Em=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.ripemd160=Ut.RIPEMD160=void 0;const e=ay(),r=Tr(),t=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),n=new Uint8Array(new Array(16).fill(0).map((b,p)=>p)),a=n.map(b=>(9*b+5)%16);let i=[n],o=[a];for(let b=0;b<4;b++)for(let p of[i,o])p.push(p[b].map(v=>t[v]));const s=[[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(b=>new Uint8Array(b)),u=i.map((b,p)=>b.map(v=>s[p][v])),d=o.map((b,p)=>b.map(v=>s[p][v])),l=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),c=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function f(b,p,v,m){return b===0?p^v^m:b===1?p&v|~p&m:b===2?(p|~v)^m:b===3?p&m|v&~m:p^(v|~m)}const h=new Uint32Array(16);class y 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:p,h1:v,h2:m,h3:E,h4:g}=this;return[p,v,m,E,g]}set(p,v,m,E,g){this.h0=p|0,this.h1=v|0,this.h2=m|0,this.h3=E|0,this.h4=g|0}process(p,v){for(let F=0;F<16;F++,v+=4)h[F]=p.getUint32(v,!0);let m=this.h0|0,E=m,g=this.h1|0,_=g,j=this.h2|0,P=j,A=this.h3|0,T=A,S=this.h4|0,B=S;for(let F=0;F<5;F++){const O=4-F,w=l[F],I=c[F],M=i[F],R=o[F],C=u[F],q=d[F];for(let x=0;x<16;x++){const k=(0,r.rotl)(m+f(F,g,j,A)+h[M[x]]+w,C[x])+S|0;m=S,S=A,A=(0,r.rotl)(j,10)|0,j=g,g=k}for(let x=0;x<16;x++){const k=(0,r.rotl)(E+f(O,_,P,T)+h[R[x]]+I,q[x])+B|0;E=B,B=T,T=(0,r.rotl)(P,10)|0,P=_,_=k}}this.set(this.h1+j+T|0,this.h2+A+B|0,this.h3+S+E|0,this.h4+m+_|0,this.h0+g+P|0)}roundClean(){h.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}return Ut.RIPEMD160=y,Ut.ripemd160=(0,r.wrapConstructor)(()=>new y),Ut}var jm;function Ny(){if(jm)return ii;jm=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.ripemd160=a;const e=Dp(),r=je(),t=de(),n=W();function a(i,o){const s=o||"hex",u=(0,e.ripemd160)((0,r.isHex)(i,{strict:!1})?(0,t.toBytes)(i):i);return s==="bytes"?u:(0,n.toHex)(u)}return ii}var si={},ui={},bc={},te={},ee={},Pm;
42function Jt(){if(Pm)return ee;Pm=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.validateObject=ee.createHmacDrbg=ee.bitMask=ee.bitSet=ee.bitGet=ee.bitLen=ee.utf8ToBytes=ee.equalBytes=ee.concatBytes=ee.ensureBytes=ee.numberToVarBytesBE=ee.numberToBytesLE=ee.numberToBytesBE=ee.bytesToNumberLE=ee.bytesToNumberBE=ee.hexToBytes=ee.hexToNumber=ee.numberToHexUnpadded=ee.bytesToHex=ee.abytes=ee.isBytes=void 0;const e=BigInt(0),r=BigInt(1),t=BigInt(2);function n(w){return w instanceof Uint8Array||w!=null&&typeof w=="object"&&w.constructor.name==="Uint8Array"}ee.isBytes=n;function a(w){if(!n(w))throw new Error("Uint8Array expected")}ee.abytes=a;const i=Array.from({length:256},(w,I)=>I.toString(16).padStart(2,"0"));function o(w){a(w);let I="";for(let M=0;M<w.length;M++)I+=i[w[M]];return I}ee.bytesToHex=o;function s(w){const I=w.toString(16);return I.length&1?`0${I}`:I}ee.numberToHexUnpadded=s;function u(w){if(typeof w!="string")throw new Error("hex string expected, got "+typeof w);return BigInt(w===""?"0":`0x${w}`)}ee.hexToNumber=u;const d={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function l(w){if(w>=d._0&&w<=d._9)return w-d._0;if(w>=d._A&&w<=d._F)return w-(d._A-10);if(w>=d._a&&w<=d._f)return w-(d._a-10)}function c(w){if(typeof w!="string")throw new Error("hex string expected, got "+typeof w);const I=w.length,M=I/2;if(I%2)throw new Error("padded hex string expected, got unpadded hex of length "+I);const R=new Uint8Array(M);for(let C=0,q=0;C<M;C++,q+=2){const x=l(w.charCodeAt(q)),k=l(w.charCodeAt(q+1));if(x===void 0||k===void 0){const $=w[q]+w[q+1];throw new Error('hex string expected, got non-hex character "'+$+'" at index '+q)}R[C]=x*16+k}return R}ee.hexToBytes=c;function f(w){return u(o(w))}ee.bytesToNumberBE=f;function h(w){return a(w),u(o(Uint8Array.from(w).reverse()))}ee.bytesToNumberLE=h;function y(w,I){return c(w.toString(16).padStart(I*2,"0"))}ee.numberToBytesBE=y;function b(w,I){return y(w,I).reverse()}ee.numberToBytesLE=b;function p(w){return c(s(w))}ee.numberToVarBytesBE=p;function v(w,I,M){let R;if(typeof I=="string")try{R=c(I)}catch(q){throw new Error(`${w} must be valid hex string, got "${I}". Cause: ${q}`)}else if(n(I))R=Uint8Array.from(I);else throw new Error(`${w} must be hex string or Uint8Array`);const C=R.length;if(typeof M=="number"&&C!==M)throw new Error(`${w} expected ${M} bytes, got ${C}`);return R}ee.ensureBytes=v;function m(...w){let I=0;for(let R=0;R<w.length;R++){const C=w[R];a(C),I+=C.length}const M=new Uint8Array(I);for(let R=0,C=0;R<w.length;R++){const q=w[R];M.set(q,C),C+=q.length}return M}ee.concatBytes=m;function E(w,I){if(w.length!==I.length)return!1;let M=0;for(let R=0;R<w.length;R++)M|=w[R]^I[R];return M===0}ee.equalBytes=E;function g(w){if(typeof w!="string")throw new Error(`utf8ToBytes expected string, got ${typeof w}`);return new Uint8Array(new TextEncoder().encode(w))}ee.utf8ToBytes=g;function _(w){let I;for(I=0;w>e;w>>=r,I+=1);return I}ee.bitLen=_;function j(w,I){return w>>BigInt(I)&r}ee.bitGet=j;function P(w,I,M){return w|(M?r:e)<<BigInt(I)}ee.bitSet=P;const A=w=>(t<<BigInt(w-1))-r;ee.bitMask=A;const T=w=>new Uint8Array(w),S=w=>Uint8Array.from(w);function B(w,I,M){if(typeof w!="number"||w<2)throw new Error("hashLen must be a number");if(typeof I!="number"||I<2)throw new Error("qByteLen must be a number");if(typeof M!="function")throw new Error("hmacFn must be a function");let R=T(w),C=T(w),q=0;const x=()=>{R.fill(1),C.fill(0),q=0},k=(...L)=>M(C,R,...L),$=(L=T())=>{C=k(S([0]),L),R=k(),L.length!==0&&(C=k(S([1]),L),R=k())},U=()=>{if(q++>=1e3)throw new Error("drbg: tried 1000 values");let L=0;const G=[];for(;L<I;){R=k();const Z=R.slice();G.push(Z),L+=R.length}return m(...G)};return(L,G)=>{x(),$(L);let Z;for(;!(Z=G(U()));)$();return x(),Z}}ee.createHmacDrbg=B;const F={bigint:w=>typeof w=="bigint",function:w=>typeof w=="function",boolean:w=>typeof w=="boolean",string:w=>typeof w=="string",stringOrUint8Array:w=>typeof w=="string"||n(w),isSafeInteger:w=>Number.isSafeInteger(w),array:w=>Array.isArray(w),field:(w,I)=>I.Fp.isValid(w),hash:w=>typeof w=="function"&&Number.isSafeInteger(w.outputLen)};function O(w,I,M={}){const R=(C,q,x)=>{const k=F[q];
42if(typeof k!="function")throw new Error(`Invalid validator "${q}", expected function`);const $=w[C];if(!(x&&$===void 0)&&!k($,w))throw new Error(`Invalid param ${String(C)}=${$} (${typeof $}), expected ${q}`)};for(const[C,q]of Object.entries(I))R(C,q,!1);for(const[C,q]of Object.entries(M))R(C,q,!0);return w}return ee.validateObject=O,ee}var wm;function _u(){if(wm)return te;wm=1,Object.defineProperty(te,"__esModule",{value:!0}),te.mapHashToField=te.getMinHashLength=te.getFieldBytesLength=te.hashToPrivateScalar=te.FpSqrtEven=te.FpSqrtOdd=te.Field=te.nLength=te.FpIsSquare=te.FpDiv=te.FpInvertBatch=te.FpPow=te.validateField=te.isNegativeLE=te.FpSqrt=te.tonelliShanks=te.invert=te.pow2=te.pow=te.mod=void 0;const e=Jt(),r=BigInt(0),t=BigInt(1),n=BigInt(2),a=BigInt(3),i=BigInt(4),o=BigInt(5),s=BigInt(8);BigInt(9),BigInt(16);function u(O,w){const I=O%w;return I>=r?I:w+I}te.mod=u;function d(O,w,I){if(I<=r||w<r)throw new Error("Expected power/modulo > 0");if(I===t)return r;let M=t;for(;w>r;)w&t&&(M=M*O%I),O=O*O%I,w>>=t;return M}te.pow=d;function l(O,w,I){let M=O;for(;w-- >r;)M*=M,M%=I;return M}te.pow2=l;function c(O,w){if(O===r||w<=r)throw new Error(`invert: expected positive integers, got n=${O} mod=${w}`);let I=u(O,w),M=w,R=r,C=t;for(;I!==r;){const x=M/I,k=M%I,$=R-C*x;M=I,I=k,R=C,C=$}if(M!==t)throw new Error("invert: does not exist");return u(R,w)}te.invert=c;function f(O){const w=(O-t)/n;let I,M,R;for(I=O-t,M=0;I%n===r;I/=n,M++);for(R=n;R<O&&d(R,w,O)!==O-t;R++);if(M===1){const q=(O+t)/i;return function(k,$){const U=k.pow($,q);if(!k.eql(k.sqr(U),$))throw new Error("Cannot find square root");return U}}const C=(I+t)/n;return function(x,k){if(x.pow(k,w)===x.neg(x.ONE))throw new Error("Cannot find square root");let $=M,U=x.pow(x.mul(x.ONE,R),I),z=x.pow(k,C),L=x.pow(k,I);for(;!x.eql(L,x.ONE);){if(x.eql(L,x.ZERO))return x.ZERO;let G=1;for(let Y=x.sqr(L);G<$&&!x.eql(Y,x.ONE);G++)Y=x.sqr(Y);const Z=x.pow(U,t<<BigInt($-G-1));U=x.sqr(Z),z=x.mul(z,Z),L=x.mul(L,U),$=G}return z}}te.tonelliShanks=f;function h(O){if(O%i===a){const w=(O+t)/i;return function(M,R){const C=M.pow(R,w);if(!M.eql(M.sqr(C),R))throw new Error("Cannot find square root");return C}}if(O%s===o){const w=(O-o)/s;return function(M,R){const C=M.mul(R,n),q=M.pow(C,w),x=M.mul(R,q),k=M.mul(M.mul(x,n),q),$=M.mul(x,M.sub(k,M.ONE));if(!M.eql(M.sqr($),R))throw new Error("Cannot find square root");return $}}return f(O)}te.FpSqrt=h;const y=(O,w)=>(u(O,w)&t)===t;te.isNegativeLE=y;const b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function p(O){const w={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},I=b.reduce((M,R)=>(M[R]="function",M),w);return(0,e.validateObject)(O,I)}te.validateField=p;function v(O,w,I){if(I<r)throw new Error("Expected power > 0");if(I===r)return O.ONE;if(I===t)return w;let M=O.ONE,R=w;for(;I>r;)I&t&&(M=O.mul(M,R)),R=O.sqr(R),I>>=t;return M}te.FpPow=v;function m(O,w){const I=new Array(w.length),M=w.reduce((C,q,x)=>O.is0(q)?C:(I[x]=C,O.mul(C,q)),O.ONE),R=O.inv(M);return w.reduceRight((C,q,x)=>O.is0(q)?C:(I[x]=O.mul(C,I[x]),O.mul(C,q)),R),I}te.FpInvertBatch=m;function E(O,w,I){return O.mul(w,typeof I=="bigint"?c(I,O.ORDER):O.inv(I))}te.FpDiv=E;function g(O){const w=(O.ORDER-t)/n;return I=>{const M=O.pow(I,w);return O.eql(M,O.ZERO)||O.eql(M,O.ONE)}}te.FpIsSquare=g;function _(O,w){const I=w!==void 0?w:O.toString(2).length,M=Math.ceil(I/8);return{nBitLength:I,nByteLength:M}}te.nLength=_;function j(O,w,I=!1,M={}){if(O<=r)throw new Error(`Expected Field ORDER > 0, got ${O}`);const{nBitLength:R,nByteLength:C}=_(O,w);if(C>2048)throw new Error("Field lengths over 2048 bytes are not supported");const q=h(O),x=Object.freeze({ORDER:O,BITS:R,BYTES:C,MASK:(0,e.bitMask)(R),ZERO:r,ONE:t,create:k=>u(k,O),isValid:k=>{if(typeof k!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof k}`);return r<=k&&k<O},is0:k=>k===r,isOdd:k=>(k&t)===t,neg:k=>u(-k,O),eql:(k,$)=>k===$,sqr:k=>u(k*k,O),add:(k,$)=>u(k+$,O),sub:(k,$)=>u(k-$,O),mul:(k,$)=>u(k*$,O),pow:(k,$)=>v(x,k,$),div:(k,$)=>u(k*c($,O),O),sqrN:k=>k*k,addN:(k,$)=>k+$,subN:(k,$)=>k-$,mulN:(k,$)=>k*$,inv:k=>c(k,O),sqrt:M.sqrt||(k=>q(x,k)),invertBatch:k=>m(x,k),cmov:(k,$,U)=>U?$:k,toBytes:k=>I?(0,e.numberToBytesLE)(k,C):(0,e.numberToBytesBE)(k,C),fromBytes:k=>{if(k.length!==C)throw new Error(`Fp.fromBytes: expected ${C}, got ${k.length}`);return I?(0,e.bytesToNumberLE)(k):(0,e.bytesToNumberBE)(k)}});return Object.freeze(x)}te.Field=j;function P(O,w){if(!O.isOdd)throw new Error("Field doesn't have isOdd");const I=O.sqrt(w);return O.isOdd(I)?I:O.neg(I)}te.FpSqrtOdd=P;function A(O,w){if(!O.isOdd)throw new Error("Field doesn't have isOdd");const I=O.sqrt(w);return O.isOdd(I)?O.neg(I):I}te.FpSqrtEven=A;function T(O,w,I=!1){O=(0,e.ensureBytes)("privateHash",O);const M=O.length,R=_(w).nByteLength+8;if(R<24||M<R||M>1024)throw new Error(`hashToPrivateScalar: expected ${R}-1024 bytes of input, got ${M}`);const C=I?(0,e.bytesToNumberLE)(O):(0,e.bytesToNumberBE)(O);return u(C,w-t)+t}te.hashToPrivateScalar=T;function S(O){if(typeof O!="bigint")throw new Error("field order must be bigint");const w=O.toString(2).length;return Math.ceil(w/8)}te.getFieldBytesLength=S;function B(O){const w=S(O);return w+Math.ceil(w/2)}te.getMinHashLength=B;function F(O,w,I=!1){const M=O.length,R=S(w),C=B(w);if(M<16||M<C||M>1024)throw new Error(`expected ${C}-1024 bytes of input, got ${M}`);const q=I?(0,e.bytesToNumberBE)(O):(0,e.bytesToNumberLE)(O),x=u(q,w-t)+t;return I?(0,e.numberToBytesLE)(x,R):(0,e.numberToBytesBE)(x,R)}return te.mapHashToField=F,te}var mc={},Lt={},Tm;function Up(){if(Tm)return Lt;
42Tm=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.validateBasic=Lt.wNAF=void 0;const e=_u(),r=Jt(),t=BigInt(0),n=BigInt(1);function a(o,s){const u=(l,c)=>{const f=c.negate();return l?f:c},d=l=>{const c=Math.ceil(s/l)+1,f=2**(l-1);return{windows:c,windowSize:f}};return{constTimeNegate:u,unsafeLadder(l,c){let f=o.ZERO,h=l;for(;c>t;)c&n&&(f=f.add(h)),h=h.double(),c>>=n;return f},precomputeWindow(l,c){const{windows:f,windowSize:h}=d(c),y=[];let b=l,p=b;for(let v=0;v<f;v++){p=b,y.push(p);for(let m=1;m<h;m++)p=p.add(b),y.push(p);b=p.double()}return y},wNAF(l,c,f){const{windows:h,windowSize:y}=d(l);let b=o.ZERO,p=o.BASE;const v=BigInt(2**l-1),m=2**l,E=BigInt(l);for(let g=0;g<h;g++){const _=g*y;let j=Number(f&v);f>>=E,j>y&&(j-=m,f+=n);const P=_,A=_+Math.abs(j)-1,T=g%2!==0,S=j<0;j===0?p=p.add(u(T,c[P])):b=b.add(u(S,c[A]))}return{p:b,f:p}},wNAFCached(l,c,f,h){const y=l._WINDOW_SIZE||1;let b=c.get(l);return b||(b=this.precomputeWindow(l,y),y!==1&&c.set(l,h(b))),this.wNAF(y,b,f)}}}Lt.wNAF=a;function i(o){return(0,e.validateField)(o.Fp),(0,r.validateObject)(o,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(o.n,o.nBitLength),...o,p:o.Fp.ORDER})}return Lt.validateBasic=i,Lt}var Am;function Dy(){return Am||(Am=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapToCurveSimpleSWU=e.SWUFpSqrtRatio=e.weierstrass=e.weierstrassPoints=e.DER=void 0;const r=_u(),t=Jt(),n=Jt(),a=Up();function i(m){const E=(0,a.validateBasic)(m);t.validateObject(E,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:g,Fp:_,a:j}=E;if(g){if(!_.eql(j,_.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof g!="object"||typeof g.beta!="bigint"||typeof g.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...E})}const{bytesToNumberBE:o,hexToBytes:s}=t;e.DER={Err:class extends Error{constructor(E=""){super(E)}},_parseInt(m){const{Err:E}=e.DER;if(m.length<2||m[0]!==2)throw new E("Invalid signature integer tag");const g=m[1],_=m.subarray(2,g+2);if(!g||_.length!==g)throw new E("Invalid signature integer: wrong length");if(_[0]&128)throw new E("Invalid signature integer: negative");if(_[0]===0&&!(_[1]&128))throw new E("Invalid signature integer: unnecessary leading zero");return{d:o(_),l:m.subarray(g+2)}},toSig(m){const{Err:E}=e.DER,g=typeof m=="string"?s(m):m;t.abytes(g);let _=g.length;if(_<2||g[0]!=48)throw new E("Invalid signature tag");if(g[1]!==_-2)throw new E("Invalid signature: incorrect length");const{d:j,l:P}=e.DER._parseInt(g.subarray(2)),{d:A,l:T}=e.DER._parseInt(P);if(T.length)throw new E("Invalid signature: left bytes after parsing");return{r:j,s:A}},hexFromSig(m){const E=B=>Number.parseInt(B[0],16)&8?"00"+B:B,g=B=>{const F=B.toString(16);return F.length&1?`0${F}`:F}
42,_=E(g(m.s)),j=E(g(m.r)),P=_.length/2,A=j.length/2,T=g(P),S=g(A);return`30${g(A+P+4)}02${S}${j}02${T}${_}`}};const u=BigInt(0),d=BigInt(1),l=BigInt(2),c=BigInt(3),f=BigInt(4);function h(m){const E=i(m),{Fp:g}=E,_=E.toBytes||((M,R,C)=>{const q=R.toAffine();return t.concatBytes(Uint8Array.from([4]),g.toBytes(q.x),g.toBytes(q.y))}),j=E.fromBytes||(M=>{const R=M.subarray(1),C=g.fromBytes(R.subarray(0,g.BYTES)),q=g.fromBytes(R.subarray(g.BYTES,2*g.BYTES));return{x:C,y:q}});function P(M){const{a:R,b:C}=E,q=g.sqr(M),x=g.mul(q,M);return g.add(g.add(x,g.mul(M,R)),C)}if(!g.eql(g.sqr(E.Gy),P(E.Gx)))throw new Error("bad generator point: equation left != right");function A(M){return typeof M=="bigint"&&u<M&&M<E.n}function T(M){if(!A(M))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function S(M){const{allowedPrivateKeyLengths:R,nByteLength:C,wrapPrivateKey:q,n:x}=E;if(R&&typeof M!="bigint"){if(t.isBytes(M)&&(M=t.bytesToHex(M)),typeof M!="string"||!R.includes(M.length))throw new Error("Invalid key");M=M.padStart(C*2,"0")}let k;try{k=typeof M=="bigint"?M:t.bytesToNumberBE((0,n.ensureBytes)("private key",M,C))}catch{throw new Error(`private key must be ${C} bytes, hex or bigint, not ${typeof M}`)}return q&&(k=r.mod(k,x)),T(k),k}const B=new Map;function F(M){if(!(M instanceof O))throw new Error("ProjectivePoint expected")}class O{constructor(R,C,q){if(this.px=R,this.py=C,this.pz=q,R==null||!g.isValid(R))throw new Error("x required");if(C==null||!g.isValid(C))throw new Error("y required");if(q==null||!g.isValid(q))throw new Error("z required")}static fromAffine(R){const{x:C,y:q}=R||{};if(!R||!g.isValid(C)||!g.isValid(q))throw new Error("invalid affine point");if(R instanceof O)throw new Error("projective point not allowed");const x=k=>g.eql(k,g.ZERO);return x(C)&&x(q)?O.ZERO:new O(C,q,g.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(R){const C=g.invertBatch(R.map(q=>q.pz));return R.map((q,x)=>q.toAffine(C[x])).map(O.fromAffine)}static fromHex(R){const C=O.fromAffine(j((0,n.ensureBytes)("pointHex",R)));return C.assertValidity(),C}static fromPrivateKey(R){return O.BASE.multiply(S(R))}_setWindowSize(R){this._WINDOW_SIZE=R,B.delete(this)}assertValidity(){if(this.is0()){if(E.allowInfinityPoint&&!g.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:R,y:C}=this.toAffine();if(!g.isValid(R)||!g.isValid(C))throw new Error("bad point: x or y not FE");const q=g.sqr(C),x=P(R);if(!g.eql(q,x))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:R}=this.toAffine();if(g.isOdd)return!g.isOdd(R);throw new Error("Field doesn't support isOdd")}equals(R){F(R);const{px:C,py:q,pz:x}=this,{px:k,py:$,pz:U}=R,z=g.eql(g.mul(C,U),g.mul(k,x)),L=g.eql(g.mul(q,U),g.mul($,x));return z&&L}negate(){return new O(this.px,g.neg(this.py),this.pz)}double(){const{a:R,b:C}=E,q=g.mul(C,c),{px:x,py:k,pz:$}=this;let U=g.ZERO,z=g.ZERO,L=g.ZERO,G=g.mul(x,x),Z=g.mul(k,k),Y=g.mul($,$),K=g.mul(x,k);return K=g.add(K,K),L=g.mul(x,$),L=g.add(L,L),U=g.mul(R,L),z=g.mul(q,Y),z=g.add(U,z),U=g.sub(Z,z),z=g.add(Z,z),z=g.mul(U,z),U=g.mul(K,U),L=g.mul(q,L),Y=g.mul(R,Y),K=g.sub(G,Y),K=g.mul(R,K),K=g.add(K,L),L=g.add(G,G),G=g.add(L,G),G=g.add(G,Y),G=g.mul(G,K),z=g.add(z,G),Y=g.mul(k,$),Y=g.add(Y,Y),G=g.mul(Y,K),U=g.sub(U,G),L=g.mul(Y,Z),L=g.add(L,L),L=g.add(L,L),new O(U,z,L)}add(R){F(R);const{px:C,py:q,pz:x}=this,{px:k,py:$,pz:U}=R;let z=g.ZERO,L=g.ZERO,G=g.ZERO;const Z=E.a,Y=g.mul(E.b,c);let K=g.mul(C,k),ie=g.mul(q,$),oe=g.mul(x,U),ce=g.add(C,q),V=g.add(k,$);ce=g.mul(ce,V),V=g.add(K,ie),ce=g.sub(ce,V),V=g.add(C,x);let D=g.add(k,U);return V=g.mul(V,D),D=g.add(K,oe),V=g.sub(V,D),D=g.add(q,x),z=g.add($,U),D=g.mul(D,z),z=g.add(ie,oe),D=g.sub(D,z),G=g.mul(Z,V),z=g.mul(Y,oe),G=g.add(z,G),z=g.sub(ie,G),G=g.add(ie,G),L=g.mul(z,G),ie=g.add(K,K),ie=g.add(ie,K),oe=g.mul(Z,oe),V=g.mul(Y,V),ie=g.add(ie,oe),oe=g.sub(K,oe),oe=g.mul(Z,oe),V=g.add(V,oe),K=g.mul(ie,V),L=g.add(L,K),K=g.mul(D,V),z=g.mul(ce,z),z=g.sub(z,K),K=g.mul(ce,ie),G=g.mul(D,G),G=g.add(G,K),new O(z,L,G)}subtract(R){return this.add(R.negate())}is0(){return this.equals(O.ZERO)}wNAF(R){return I.wNAFCached(this,B,R,C=>{const q=g.invertBatch(C.map(x=>x.pz));return C.map((x,k)=>x.toAffine(q[k])).map(O.fromAffine)})}multiplyUnsafe(R){const C=O.ZERO;if(R===u)return C;if(T(R),R===d)return this;
42const{endo:q}=E;if(!q)return I.unsafeLadder(this,R);let{k1neg:x,k1:k,k2neg:$,k2:U}=q.splitScalar(R),z=C,L=C,G=this;for(;k>u||U>u;)k&d&&(z=z.add(G)),U&d&&(L=L.add(G)),G=G.double(),k>>=d,U>>=d;return x&&(z=z.negate()),$&&(L=L.negate()),L=new O(g.mul(L.px,q.beta),L.py,L.pz),z.add(L)}multiply(R){T(R);let C=R,q,x;const{endo:k}=E;if(k){const{k1neg:$,k1:U,k2neg:z,k2:L}=k.splitScalar(C);let{p:G,f:Z}=this.wNAF(U),{p:Y,f:K}=this.wNAF(L);G=I.constTimeNegate($,G),Y=I.constTimeNegate(z,Y),Y=new O(g.mul(Y.px,k.beta),Y.py,Y.pz),q=G.add(Y),x=Z.add(K)}else{const{p:$,f:U}=this.wNAF(C);q=$,x=U}return O.normalizeZ([q,x])[0]}multiplyAndAddUnsafe(R,C,q){const x=O.BASE,k=(U,z)=>z===u||z===d||!U.equals(x)?U.multiplyUnsafe(z):U.multiply(z),$=k(this,C).add(k(R,q));return $.is0()?void 0:$}toAffine(R){const{px:C,py:q,pz:x}=this,k=this.is0();R==null&&(R=k?g.ONE:g.inv(x));const $=g.mul(C,R),U=g.mul(q,R),z=g.mul(x,R);if(k)return{x:g.ZERO,y:g.ZERO};if(!g.eql(z,g.ONE))throw new Error("invZ was invalid");return{x:$,y:U}}isTorsionFree(){const{h:R,isTorsionFree:C}=E;if(R===d)return!0;if(C)return C(O,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:R,clearCofactor:C}=E;return R===d?this:C?C(O,this):this.multiplyUnsafe(E.h)}toRawBytes(R=!0){return this.assertValidity(),_(O,this,R)}toHex(R=!0){return t.bytesToHex(this.toRawBytes(R))}}O.BASE=new O(E.Gx,E.Gy,g.ONE),O.ZERO=new O(g.ZERO,g.ONE,g.ZERO);const w=E.nBitLength,I=(0,a.wNAF)(O,E.endo?Math.ceil(w/2):w);return{CURVE:E,ProjectivePoint:O,normPrivateKeyToScalar:S,weierstrassEquation:P,isWithinCurveOrder:A}}e.weierstrassPoints=h;function y(m){const E=(0,a.validateBasic)(m);return t.validateObject(E,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...E})}function b(m){const E=y(m),{Fp:g,n:_}=E,j=g.BYTES+1,P=2*g.BYTES+1;function A(V){return u<V&&V<g.ORDER}function T(V){return r.mod(V,_)}function S(V){return r.invert(V,_)}const{ProjectivePoint:B,normPrivateKeyToScalar:F,weierstrassEquation:O,isWithinCurveOrder:w}=h({...E,toBytes(V,D,N){const re=D.toAffine(),X=g.toBytes(re.x),ae=t.concatBytes;return N?ae(Uint8Array.from([D.hasEvenY()?2:3]),X):ae(Uint8Array.from([4]),X,g.toBytes(re.y))},fromBytes(V){const D=V.length,N=V[0],re=V.subarray(1);if(D===j&&(N===2||N===3)){const X=t.bytesToNumberBE(re);if(!A(X))throw new Error("Point is not on curve");const ae=O(X);let le;try{le=g.sqrt(ae)}catch(pe){const ve=pe instanceof Error?": "+pe.message:"";throw new Error("Point is not on curve"+ve)}const ge=(le&d)===d;return(N&1)===1!==ge&&(le=g.neg(le)),{x:X,y:le}}else if(D===P&&N===4){const X=g.fromBytes(re.subarray(0,g.BYTES)),ae=g.fromBytes(re.subarray(g.BYTES,2*g.BYTES));return{x:X,y:ae}}else throw new Error(`Point of length ${D} was invalid. Expected ${j} compressed bytes or ${P} uncompressed bytes`)}}),I=V=>t.bytesToHex(t.numberToBytesBE(V,E.nByteLength));function M(V){const D=_>>d;return V>D}function R(V){return M(V)?T(-V):V}const C=(V,D,N)=>t.bytesToNumberBE(V.slice(D,N));class q{constructor(D,N,re){this.r=D,this.s=N,this.recovery=re,this.assertValidity()}static fromCompact(D){const N=E.nByteLength;return D=(0,n.ensureBytes)("compactSignature",D,N*2),new q(C(D,0,N),C(D,N,2*N))}static fromDER(D){const{r:N,s:re}=e.DER.toSig((0,n.ensureBytes)("DER",D));return new q(N,re)}assertValidity(){if(!w(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!w(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(D){return new q(this.r,this.s,D)}recoverPublicKey(D){const{r:N,s:re,recovery:X}=this,ae=L((0,n.ensureBytes)("msgHash",D));if(X==null||![0,1,2,3].includes(X))throw new Error("recovery id invalid");const le=X===2||X===3?N+E.n:N;if(le>=g.ORDER)throw new Error("recovery id 2 or 3 invalid");const ge=(X&1)===0?"02":"03",he=B.fromHex(ge+I(le)),pe=S(le),ve=T(-ae*pe),He=T(re*pe),Fe=B.BASE.multiplyAndAddUnsafe(he,ve,He);if(!Fe)throw new Error("point at infinify");return Fe.assertValidity(),Fe}hasHighS(){return M(this.s)}normalizeS(){return this.hasHighS()?new q(this.r,T(-this.s),this.recovery):this}toDERRawBytes(){return t.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return t.hexToBytes(this.toCompactHex())}toCompactHex(){return I(this.r)+I(this.s)}}const x={isValidPrivateKey(V){try{return F(V),!0}catch{return!1}},normPrivateKeyToScalar:F,randomPrivateKey:()=>{const V=r.getMinHashLength(E.n);return r.mapHashToField(E.randomBytes(V),E.n)},precompute(V=8,D=B.BASE){return D._setWindowSize(V),D.multiply(BigInt(3)),D}};function k(V,D=!0){return B.fromPrivateKey(V).toRawBytes(D)}function $(V){const D=t.isBytes(V),N=typeof V=="string",re=(D||N)&&V.length;return D?re===j||re===P:N?re===2*j||re===2*P:V instanceof B}function U(V,D,N=!0){if($(V))throw new Error("first arg must be private key");if(!$(D))throw new Error("second arg must be public key");return B.fromHex(D).multiply(F(V)).toRawBytes(N)}const z=E.bits2int||function(V){const D=t.bytesToNumberBE(V),N=V.length*8
42-E.nBitLength;return N>0?D>>BigInt(N):D},L=E.bits2int_modN||function(V){return T(z(V))},G=t.bitMask(E.nBitLength);function Z(V){if(typeof V!="bigint")throw new Error("bigint expected");if(!(u<=V&&V<G))throw new Error(`bigint expected < 2^${E.nBitLength}`);return t.numberToBytesBE(V,E.nByteLength)}function Y(V,D,N=K){if(["recovered","canonical"].some(xe=>xe in N))throw new Error("sign() legacy options not supported");const{hash:re,randomBytes:X}=E;let{lowS:ae,prehash:le,extraEntropy:ge}=N;ae==null&&(ae=!0),V=(0,n.ensureBytes)("msgHash",V),le&&(V=(0,n.ensureBytes)("prehashed msgHash",re(V)));const he=L(V),pe=F(D),ve=[Z(pe),Z(he)];if(ge!=null&&ge!==!1){const xe=ge===!0?X(g.BYTES):ge;ve.push((0,n.ensureBytes)("extraEntropy",xe))}const He=t.concatBytes(...ve),Fe=he;function Xe(xe){const $e=z(xe);if(!w($e))return;const jt=S($e),Pe=B.BASE.multiply($e).toAffine(),Ne=T(Pe.x);if(Ne===u)return;const Qe=T(jt*T(Fe+Ne*pe));if(Qe===u)return;let cr=(Pe.x===Ne?0:2)|Number(Pe.y&d),dr=Qe;return ae&&M(Qe)&&(dr=R(Qe),cr^=1),new q(Ne,dr,cr)}return{seed:He,k2sig:Xe}}const K={lowS:E.lowS,prehash:!1},ie={lowS:E.lowS,prehash:!1};function oe(V,D,N=K){const{seed:re,k2sig:X}=Y(V,D,N),ae=E;return t.createHmacDrbg(ae.hash.outputLen,ae.nByteLength,ae.hmac)(re,X)}B.BASE._setWindowSize(8);function ce(V,D,N,re=ie){const X=V;if(D=(0,n.ensureBytes)("msgHash",D),N=(0,n.ensureBytes)("publicKey",N),"strict"in re)throw new Error("options.strict was renamed to lowS");const{lowS:ae,prehash:le}=re;let ge,he;try{if(typeof X=="string"||t.isBytes(X))try{ge=q.fromDER(X)}catch(Pe){if(!(Pe instanceof e.DER.Err))throw Pe;ge=q.fromCompact(X)}else if(typeof X=="object"&&typeof X.r=="bigint"&&typeof X.s=="bigint"){const{r:Pe,s:Ne}=X;ge=new q(Pe,Ne)}else throw new Error("PARSE");he=B.fromHex(N)}catch(Pe){if(Pe.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(ae&&ge.hasHighS())return!1;le&&(D=E.hash(D));const{r:pe,s:ve}=ge,He=L(D),Fe=S(ve),Xe=T(He*Fe),xe=T(pe*Fe),$e=B.BASE.multiplyAndAddUnsafe(he,Xe,xe)?.toAffine();return $e?T($e.x)===pe:!1}return{CURVE:E,getPublicKey:k,getSharedSecret:U,sign:oe,verify:ce,ProjectivePoint:B,Signature:q,utils:x}}e.weierstrass=b;function p(m,E){const g=m.ORDER;let _=u;for(let M=g-d;M%l===u;M/=l)_+=d;const j=_,P=l<<j-d-d,A=P*l,T=(g-d)/A,S=(T-d)/l,B=A-d,F=P,O=m.pow(E,T),w=m.pow(E,(T+d)/l);let I=(M,R)=>{let C=O,q=m.pow(R,B),x=m.sqr(q);x=m.mul(x,R);let k=m.mul(M,x);k=m.pow(k,S),k=m.mul(k,q),q=m.mul(k,R),x=m.mul(k,M);let $=m.mul(x,q);k=m.pow($,F);let U=m.eql(k,m.ONE);q=m.mul(x,w),k=m.mul($,C),x=m.cmov(q,x,U),$=m.cmov(k,$,U);for(let z=j;z>d;z--){let L=z-l;L=l<<L-d;let G=m.pow($,L);const Z=m.eql(G,m.ONE);q=m.mul(x,C),C=m.mul(C,C),G=m.mul($,C),x=m.cmov(q,x,Z),$=m.cmov(G,$,Z)}return{isValid:U,value:x}};if(m.ORDER%f===c){const M=(m.ORDER-c)/f,R=m.sqrt(m.neg(E));I=(C,q)=>{let x=m.sqr(q);const k=m.mul(C,q);x=m.mul(x,k);let $=m.pow(x,M);$=m.mul($,k);const U=m.mul($,R),z=m.mul(m.sqr($),q),L=m.eql(z,C);let G=m.cmov(U,$,L);return{isValid:L,value:G}}}return I}e.SWUFpSqrtRatio=p;function v(m,E){if(r.validateField(m),!m.isValid(E.A)||!m.isValid(E.B)||!m.isValid(E.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const g=p(m,E.Z);if(!m.isOdd)throw new Error("Fp.isOdd is not implemented!");return _=>{let j,P,A,T,S,B,F,O;j=m.sqr(_),j=m.mul(j,E.Z),P=m.sqr(j),P=m.add(P,j),A=m.add(P,m.ONE),A=m.mul(A,E.B),T=m.cmov(E.Z,m.neg(P),!m.eql(P,m.ZERO)),T=m.mul(T,E.A),P=m.sqr(A),B=m.sqr(T),S=m.mul(B,E.A),P=m.add(P,S),P=m.mul(P,A),B=m.mul(B,T),S=m.mul(B,E.B),P=m.add(P,S),F=m.mul(j,A);const{isValid:w,value:I}=g(P,B);O=m.mul(j,_),O=m.mul(O,I),F=m.cmov(F,A,w),O=m.cmov(O,I,w);const M=m.isOdd(_)===m.isOdd(O);return O=m.cmov(m.neg(O),O,M),F=m.div(F,T),{x:F,y:O}}}e.mapToCurveSimpleSWU=v})(mc)),mc}var Re={},Im;function Lp(){if(Im)return Re;Im=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.createHasher=Re.isogenyMap=Re.hash_to_field=Re.expand_message_xof=Re.expand_message_xmd=void 0;const e=_u(),r=Jt(),t=r.bytesToNumberBE;function n(c,f){if(c<0||c>=1<<8*f)throw new Error(`bad I2OSP call: value=${c} length=${f}`);const h=Array.from({length:f}).fill(0);for(let y=f-1;y>=0;y--)h[y]=c&255,c>>>=8;return new Uint8Array(h)}function a(c,f){const h=new Uint8Array(c.length);for(let y=0;y<c.length;y++)h[y]=c[y]^f[y];return h}function i(c){if(!Number.isSafeInteger(c))throw new Error("number expected")}function o(c,f,h,y){(0,r.abytes)(c),(0,r.abytes)(f),i(h),f.length>255&&(f=y((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),f)));const{outputLen:b,blockLen:p}=y,v=Math.ceil(h/b);if(v>255)throw new Error("Invalid xmd length");const m=(0,r.concatBytes)(f,n(f.length,1)),E=n(0,p),g=n(h,2),_=new Array(v),j=y((0,r.concatBytes)(E,c,g,n(0,1),m));_[0]=y((0,r.concatBytes)(j,n(1,1),m));for(let A=1;A<=v;A++){const T=[a(j,_[A-1]),n(A+1,1),m];_[A]=y((0,r.concatBytes)(...T))}return(0,r.concatBytes)(..._).slice(0,h)}Re.expand_message_xmd=o;function s(c,f,h,y,b){if((0,r.abytes)(c),(0,r.abytes)(f),i(h),f.length>255){const p=Math.ceil(2*y/8);f=b.create({dkLen:p}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(f).digest()}if(h>65535||f.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return b.create({dkLen:h}).update(c).update(n(h,2)).update(f).update(n(f.length,1)).digest()}Re.expand_message_xof=s;function u(c,f,h){(0,r.validateObject)(h,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:y,k:b,m:p,hash:v,expand:m,DST:E}=h;(0,r.abytes)(c),i(f);const g=typeof E=="string"?(0,r.utf8ToBytes)(E):E,_=y.toString(2).length,j=Math.ceil((_+b)/8),P=f*p*j;let A;if(m==="xmd")A=o(c,g,P,v);else if(m==="xof")A=s(c,g,P,b,v);else if(m==="_internal_pass")A=c;else throw new Error('expand must be "xmd" or "xof"');const T=new Array(f);for(let S=0;S<f;S++){const B=new Array(p);for(let F=0;F<p;F++){const O=j*(F+S*p),w=A.subarray(O,O+j);B[F]=(0,e.mod)(t(w),y)}T[S]=B}return T}Re.hash_to_field=u;function d(c,f){const h=f.map(y=>Array.from(y).reverse());return(y,b)=>{const[p,v,m,E]=h.map(g=>g.reduce((_,j)=>c.add(c.mul(_,y),j)));return y=c.div(p,v),b=c.mul(b,c.div(m,E)),{x:y,y:b}}}Re.isogenyMap=d;function l(c,f,h){if(typeof f!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(y,b){const p=u(y,2,{...h,DST:h.DST,...b}),v=c.fromAffine(f(p[0])),m=c.fromAffine(f(p[1])),E=v.add(m).clearCofactor();return E.assertValidity(),E},encodeToCurve(y,b){const p=u(y,1,{...h,DST:h.encodeDST,...b}),v=c.fromAffine(f(p[0])).clearCofactor();return v.assertValidity(),v}}}return Re.createHasher=l,Re}var zt={},gc={},Om;function zp(){return Om||(Om=1,(function(e){Object.defineProperty(e,"__esMo
42dule",{value:!0}),e.hmac=e.HMAC=void 0;const r=Dg(),t=Tr();class n extends t.Hash{constructor(o,s){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(o);const u=(0,t.toBytes)(s);if(this.iHash=o.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 d=this.blockLen,l=new Uint8Array(d);l.set(u.length>d?o.create().update(u).digest():u);for(let c=0;c<l.length;c++)l[c]^=54;this.iHash.update(l),this.oHash=o.create();for(let c=0;c<l.length;c++)l[c]^=106;this.oHash.update(l),l.fill(0)}update(o){return(0,r.exists)(this),this.iHash.update(o),this}digestInto(o){(0,r.exists)(this),(0,r.bytes)(o,this.outputLen),this.finished=!0,this.iHash.digestInto(o),this.oHash.update(o),this.oHash.digestInto(o),this.destroy()}digest(){const o=new Uint8Array(this.oHash.outputLen);return this.digestInto(o),o}_cloneInto(o){o||(o=Object.create(Object.getPrototypeOf(this),{}));const{oHash:s,iHash:u,finished:d,destroyed:l,blockLen:c,outputLen:f}=this;return o=o,o.finished=d,o.destroyed=l,o.blockLen=c,o.outputLen=f,o.oHash=s._cloneInto(o.oHash),o.iHash=u._cloneInto(o.iHash),o}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const a=(i,o,s)=>new n(i,o).update(s).digest();e.hmac=a,e.hmac.create=(i,o)=>new n(i,o)}
42)(gc)),gc}var Sm;function Gp(){if(Sm)return zt;Sm=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.createCurve=zt.getHash=void 0;const e=zp(),r=Tr(),t=Dy();function n(i){return{hash:i,hmac:(o,...s)=>(0,e.hmac)(i,o,(0,r.concatBytes)(...s)),randomBytes:r.randomBytes}}zt.getHash=n;function a(i,o){const s=u=>(0,t.weierstrass)({...i,...n(u)});return Object.freeze({...s(o),create:s})}return zt.createCurve=a,zt}var Rm;function Ln(){return Rm||(Rm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;const r=oy(),t=Tr(),n=_u(),a=Dy(),i=Jt(),o=Lp(),s=Gp(),u=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),l=BigInt(1),c=BigInt(2),f=(q,x)=>(q+x/c)/x;function h(q){const x=u,k=BigInt(3),$=BigInt(6),U=BigInt(11),z=BigInt(22),L=BigInt(23),G=BigInt(44),Z=BigInt(88),Y=q*q*q%x,K=Y*Y*q%x,ie=(0,n.pow2)(K,k,x)*K%x,oe=(0,n.pow2)(ie,k,x)*K%x,ce=(0,n.pow2)(oe,c,x)*Y%x,V=(0,n.pow2)(ce,U,x)*ce%x,D=(0,n.pow2)(V,z,x)*V%x,N=(0,n.pow2)(D,G,x)*D%x,re=(0,n.pow2)(N,Z,x)*N%x,X=(0,n.pow2)(re,G,x)*D%x,ae=(0,n.pow2)(X,k,x)*K%x,le=(0,n.pow2)(ae,L,x)*V%x,ge=(0,n.pow2)(le,$,x)*Y%x,he=(0,n.pow2)(ge,c,x);if(!y.eql(y.sqr(he),q))throw new Error("Cannot find square root");return he}const y=(0,n.Field)(u,void 0,void 0,{sqrt:h});e.secp256k1=(0,s.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:q=>{const x=d,k=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),$=-l*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),U=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),z=k,L=BigInt("0x100000000000000000000000000000000"),G=f(z*q,x),Z=f(-$*q,x);let Y=(0,n.mod)(q-G*k-Z*U,x),K=(0,n.mod)(-G*$-Z*z,x);const ie=Y>L,oe=K>L;if(ie&&(Y=x-Y),oe&&(K=x-K),Y>L||K>L)throw new Error("splitScalar: Endomorphism failed, k="+q);return{k1neg:ie,k1:Y,k2neg:oe,k2:K}}}},r.sha256);const b=BigInt(0),p=q=>typeof q=="bigint"&&b<q&&q<u,v=q=>typeof q=="bigint"&&b<q&&q<d,m={};function E(q,...x){let k=m[q];if(k===void 0){const $=(0,r.sha256)(Uint8Array.from(q,U=>U.charCodeAt(0)));k=(0,i.concatBytes)($,$),m[q]=k}return(0,r.sha256)((0,i.concatBytes)(k,...x))}const g=q=>q.toRawBytes(!0).slice(1),_=q=>(0,i.numberToBytesBE)(q,32),j=q=>(0,n.mod)(q,u),P=q=>(0,n.mod)(q,d),A=e.secp256k1.ProjectivePoint,T=(q,x,k)=>A.BASE.multiplyAndAddUnsafe(q,x,k);function S(q){let x=e.secp256k1.utils.normPrivateKeyToScalar(q),k=A.fromPrivateKey(x);return{scalar:k.hasEvenY()?x:P(-x),bytes:g(k)}}function B(q){if(!p(q))throw new Error("bad x: need 0 < x < p");const x=j(q*q),k=j(x*q+BigInt(7));let $=h(k);$%c!==b&&($=j(-$));const U=new A(q,$,l);return U.assertValidity(),U}function F(...q){return P((0,i.bytesToNumberBE)(E("BIP0340/challenge",...q)))}function O(q){return S(q).bytes}function w(q,x,k=(0,t.randomBytes)(32)){const $=(0,i.ensureBytes)("message",q),{bytes:U,scalar:z}=S(x),L=(0,i.ensureBytes)("auxRand",k,32),G=_(z^(0,i.bytesToNumberBE)(E("BIP0340/aux",L))),Z=E("BIP0340/nonce",G,U,$),Y=P((0,i.bytesToNumberBE)(Z));if(Y===b)throw new Error("sign failed: k is zero");const{bytes:K,scalar:ie}=S(Y),oe=F(K,U,$),ce=new Uint8Array(64);if(ce.set(K,0),ce.set(_(P(ie+oe*z)),32),!I(ce,$,U))throw new Error("sign: Invalid signature produced");return ce}function I(q,x,k){const $=(0,i.ensureBytes)("signature",q,64),U=(0,i.ensureBytes)("message",x),z=(0,i.ensureBytes)("publicKey",k,32);try{const L=B((0,i.bytesToNumberBE)(z)),G=(0,i.bytesToNumberBE)($.subarray(0,32));if(!p(G))return!1;const Z=(0,i.bytesToNumberBE)($.subarray(32,64));if(!v(Z))return!1;const Y=F(_(G),g(L),U),K=T(L,Z,P(-Y));return!(!K||!K.hasEvenY()||K.toAffine().x!==G)}catch{return!1}}e.schnorr={getPublicKey:O,sign:w,verify:I,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:B,pointToBytes:g,numberToBytesBE:i.numberToBytesBE,bytesToNumberBE:i.bytesToNumberBE,taggedHash:E,mod:n.mod}};const M=(0,o.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a4
4213deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(q=>q.map(x=>BigInt(x)))),R=(0,a.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}),C=(0,o.createHasher)(e.secp256k1.ProjectivePoint,q=>{const{x,y:k}=R(y.create(q[0]));return M(x,k)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256});e.hashToCurve=C.hashToCurve,e.encodeToCurve=C.encodeToCurve})(bc)),bc}var Bm;function Yc(){if(Bm)return ui;Bm=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.recoverPublicKey=n;const e=je(),r=_e(),t=W();async function n({hash:i,signature:o}){const s=(0,e.isHex)(i)?i:(0,t.toHex)(i),{secp256k1:u}=await Promise.resolve().then(()=>Ln());return`0x${(()=>{if(typeof o=="object"&&"r"in o&&"s"in o){const{r:y,s:b,v:p,yParity:v}=o,m=Number(v??p),E=a(m);return new u.Signature((0,r.hexToBigInt)(y),(0,r.hexToBigInt)(b)).addRecoveryBit(E)}const c=(0,e.isHex)(o)?o:(0,t.toHex)(o),f=(0,r.hexToNumber)(`0x${c.slice(130)}`),h=a(f);return u.Signature.fromCompact(c.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(s.substring(2)).toHex(!1)}`}function a(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 ui}var Cm;function ur(){if(Cm)return si;Cm=1,Object.defineProperty(si,"__esModule",{value:!0}),si.recoverAddress=t;const e=My(),r=Yc();async function t({hash:n,signature:a}){return(0,e.publicKeyToAddress)(await(0,r.recoverPublicKey)({hash:n,signature:a}))}return si}var ci={},di={},li={},vn={},qm;function Uy(){return qm||(qm=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.presignMessagePrefix=void 0,vn.presignMessagePrefix=`�Ethereum Signed Message:
43`),vn}var Mm;function Ly(){if(Mm)return li;Mm=1,Object.defineProperty(li,"__esModule",{value:!0}),li.toPrefixedMessage=a;const e=Uy(),r=Ie(),t=Be(),n=W();function a(i){const o=typeof i=="string"?(0,n.stringToHex)(i):typeof i.raw=="string"?i.raw:(0,n.bytesToHex)(i.raw),s=(0,n.stringToHex)(`${e.presignMessagePrefix}${(0,t.size)(o)}`);return(0,r.concat)([s,o])}return li}var Fm;function zn(){if(Fm)return di;Fm=1,Object.defineProperty(di,"__esModule",{value:!0}),di.hashMessage=t;const e=Ae(),r=Ly();function t(n,a){return(0,e.keccak256)((0,r.toPrefixedMessage)(n),a)}return di}var xm;function Jc(){if(xm)return ci;xm=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.recoverMessageAddress=t;const e=zn(),r=ur();async function t({message:n,signature:a}){return(0,r.recoverAddress)({hash:(0,e.hashMessage)(n),signature:a})}return ci}var fi={},km;function Xc(){if(km)return fi;km=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.recoverTypedDataAddress=t;const e=Un(),r=ur();async function t(n){const{domain:a,message:i,primaryType:o,signature:s,types:u}=n;return(0,r.recoverAddress)({hash:(0,e.hashTypedData)({domain:a,message:i,primaryType:o,types:u}),signature:s})}return fi}var bi={},Hm;function zy(){if(Hm)return bi;Hm=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.verifyHash=n;const e=ke(),r=vt(),t=ur();async function n({address:a,hash:i,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(a),await(0,t.recoverAddress)({hash:i,signature:o}))}return bi}var mi={},$m;function Gy(){if($m)return mi;
43$m=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.verifyMessage=n;const e=ke(),r=vt(),t=Jc();async function n({address:a,message:i,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(a),await(0,t.recoverMessageAddress)({message:i,signature:o}))}return mi}var gi={},Nm;function Vy(){if(Nm)return gi;Nm=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.verifyTypedData=n;const e=ke(),r=vt(),t=Xc();async function n(a){const{address:i,domain:o,message:s,primaryType:u,signature:d,types:l}=a;return(0,r.isAddressEqual)((0,e.getAddress)(i),await(0,t.recoverTypedDataAddress)({domain:o,message:s,primaryType:u,signature:d,types:l}))}return gi}var yi={},hi={},Gt={},Dm;function Qc(){return Dm||(Dm=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.zeroHash=Gt.erc6492MagicBytes=void 0,Gt.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",Gt.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),Gt}var Um;function vu(){if(Um)return hi;Um=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.isErc6492Signature=t;const e=Qc(),r=Ve();function t(n){return(0,r.sliceHex)(n,-32)===e.erc6492MagicBytes}return hi}var Lm;function Wy(){if(Lm)return yi;Lm=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.parseErc6492Signature=t;const e=Ot(),r=vu();function t(n){if(!(0,r.isErc6492Signature)(n))return{signature:n};const[a,i,o]=(0,e.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],n);return{address:a,data:i,signature:o}}return yi}var pi={},zm;function ed(){if(zm)return pi;zm=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.serializeErc6492Signature=a;const e=Qc(),r=We(),t=Ie(),n=de();function a(i){const{address:o,data:s,signature:u,to:d="hex"}=i,l=(0,t.concatHex)([(0,r.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[o,s,u]),e.erc6492MagicBytes]);return d==="hex"?l:(0,n.hexToBytes)(l)}return pi}var _i={},Gm;function td(){if(Gm)return _i;Gm=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.getSerializedTransactionType=n;const e=Me(),r=Ve(),t=_e();function n(a){const i=(0,r.sliceHex)(a,0,1);if(i==="0x03")return"eip4844";if(i==="0x02")return"eip1559";if(i==="0x01")return"eip2930";if(i!=="0x"&&(0,t.hexToNumber)(i)>=192)return"legacy";throw new e.InvalidSerializedTransactionTypeError({serializedType:i})}return _i}var Vt={},Vm;function Eu(){if(Vm)return Vt;Vm=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.assertTransactionEIP4844=l,Vt.assertTransactionEIP1559=c,Vt.assertTransactionEIP2930=f,Vt.assertTransactionLegacy=h;const e=iy(),r=Ge(),t=ne(),n=sy(),a=xn(),i=ar(),o=Ce(),s=Be(),u=Ve(),d=_e();function l(y){const{blobVersionedHashes:b}=y;if(b){if(b.length===0)throw new n.EmptyBlobError;for(const p of b){const v=(0,s.size)(p),m=(0,d.hexToNumber)((0,u.slice)(p,0,1));if(v!==32)throw new n.InvalidVersionedHashSizeError({hash:p,size:v});if(m!==e.versionedHashVersionKzg)throw new n.InvalidVersionedHashVersionError({hash:p,version:m})}}c(y)}function c(y){const{chainId:b,maxPriorityFeePerGas:p,maxFeePerGas:v,to:m}=y;if(b<=0)throw new a.InvalidChainIdError({chainId:b});if(m&&!(0,o.isAddress)(m))throw new r.InvalidAddressError({address:m});if(v&&v>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:v});if(p&&v&&p>v)throw new i.TipAboveFeeCapError({maxFeePerGas:v,maxPriorityFeePerGas:p})}function f(y){const{chainId:b,maxPriorityFeePerGas:p,gasPrice:v,maxFeePerGas:m,to:E}=y;if(b<=0)throw new a.InvalidChainIdError({chainId:b});if(E&&!(0,o.isAddress)(E))throw new r.InvalidAddressError({address:E});if(p||m)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(v&&v>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:v})}function h(y){const{chainId:b,maxPriorityFeePerGas:p,gasPrice:v,maxFeePerGas:m,to:E,accessList:g}=y;if(E&&!(0,o.isAddress)(E))throw new r.InvalidAddressError({address:E});if(typeof b<"u"&&b<=0)throw new a.InvalidChainIdError({chainId:b});if(p||m)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(v&&v>2n**256n-1n)throw new i.FeeCapTooHighError({maxFeePerGas:v});if(g)throw new t.BaseError("`accessList` is not a valid Legacy Transaction attribute.")}return Vt}var Pr={},Wm;function rd(){if(Wm)return Pr;
43Wm=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.parseTransaction=f,Pr.toTransactionArray=v,Pr.parseAccessList=m;const e=Ge(),r=Me(),t=Ce(),n=uu(),a=je(),i=At(),o=It(),s=_e(),u=Kc(),d=Zc(),l=Eu(),c=td();function f(g){const _=(0,c.getSerializedTransactionType)(g);return _==="eip1559"?y(g):_==="eip2930"?b(g):_==="eip4844"?h(g):p(g)}function h(g){const _=v(g),j=_.length===4,P=j?_[0]:_,A=j?_.slice(1):[],[T,S,B,F,O,w,I,M,R,C,q,x,k,$]=P,[U,z,L]=A;if(!(P.length===11||P.length===14))throw new r.InvalidSerializedTransactionError({attributes:{chainId:T,nonce:S,maxPriorityFeePerGas:B,maxFeePerGas:F,gas:O,to:w,value:I,data:M,accessList:R,...P.length>9?{v:x,r:k,s:$}:{}},serializedTransaction:g,type:"eip4844"});const G={blobVersionedHashes:q,chainId:(0,s.hexToNumber)(T),type:"eip4844"};return(0,a.isHex)(w)&&w!=="0x"&&(G.to=w),(0,a.isHex)(O)&&O!=="0x"&&(G.gas=(0,s.hexToBigInt)(O)),(0,a.isHex)(M)&&M!=="0x"&&(G.data=M),(0,a.isHex)(S)&&S!=="0x"&&(G.nonce=(0,s.hexToNumber)(S)),(0,a.isHex)(I)&&I!=="0x"&&(G.value=(0,s.hexToBigInt)(I)),(0,a.isHex)(C)&&C!=="0x"&&(G.maxFeePerBlobGas=(0,s.hexToBigInt)(C)),(0,a.isHex)(F)&&F!=="0x"&&(G.maxFeePerGas=(0,s.hexToBigInt)(F)),(0,a.isHex)(B)&&B!=="0x"&&(G.maxPriorityFeePerGas=(0,s.hexToBigInt)(B)),R.length!==0&&R!=="0x"&&(G.accessList=m(R)),U&&z&&L&&(G.sidecars=(0,n.toBlobSidecars)({blobs:U,commitments:z,proofs:L})),(0,l.assertTransactionEIP4844)(G),{...P.length===14?E(P):void 0,...G}}function y(g){const _=v(g),[j,P,A,T,S,B,F,O,w,I,M,R]=_;if(!(_.length===9||_.length===12))throw new r.InvalidSerializedTransactionError({attributes:{chainId:j,nonce:P,maxPriorityFeePerGas:A,maxFeePerGas:T,gas:S,to:B,value:F,data:O,accessList:w,..._.length>9?{v:I,r:M,s:R}:{}},serializedTransaction:g,type:"eip1559"});const C={chainId:(0,s.hexToNumber)(j),type:"eip1559"};return(0,a.isHex)(B)&&B!=="0x"&&(C.to=B),(0,a.isHex)(S)&&S!=="0x"&&(C.gas=(0,s.hexToBigInt)(S)),(0,a.isHex)(O)&&O!=="0x"&&(C.data=O),(0,a.isHex)(P)&&P!=="0x"&&(C.nonce=(0,s.hexToNumber)(P)),(0,a.isHex)(F)&&F!=="0x"&&(C.value=(0,s.hexToBigInt)(F)),(0,a.isHex)(T)&&T!=="0x"&&(C.maxFeePerGas=(0,s.hexToBigInt)(T)),(0,a.isHex)(A)&&A!=="0x"&&(C.maxPriorityFeePerGas=(0,s.hexToBigInt)(A)),w.length!==0&&w!=="0x"&&(C.accessList=m(w)),(0,l.assertTransactionEIP1559)(C),{..._.length===12?E(_):void 0,...C}}function b(g){const _=v(g),[j,P,A,T,S,B,F,O,w,I,M]=_;if(!(_.length===8||_.length===11))throw new r.InvalidSerializedTransactionError({attributes:{chainId:j,nonce:P,gasPrice:A,gas:T,to:S,value:B,data:F,accessList:O,..._.length>8?{v:w,r:I,s:M}:{}},serializedTransaction:g,type:"eip2930"});const R={chainId:(0,s.hexToNumber)(j),type:"eip2930"};return(0,a.isHex)(S)&&S!=="0x"&&(R.to=S),(0,a.isHex)(T)&&T!=="0x"&&(R.gas=(0,s.hexToBigInt)(T)),(0,a.isHex)(F)&&F!=="0x"&&(R.data=F),(0,a.isHex)(P)&&P!=="0x"&&(R.nonce=(0,s.hexToNumber)(P)),(0,a.isHex)(B)&&B!=="0x"&&(R.value=(0,s.hexToBigInt)(B)),(0,a.isHex)(A)&&A!=="0x"&&(R.gasPrice=(0,s.hexToBigInt)(A)),O.length!==0&&O!=="0x"&&(R.accessList=m(O)),(0,l.assertTransactionEIP2930)(R),{..._.length===11?E(_):void 0,...R}}function p(g){const _=(0,u.fromRlp)(g,"hex"),[j,P,A,T,S,B,F,O,w]=_;if(!(_.length===6||_.length===9))throw new r.InvalidSerializedTransactionError({attributes:{nonce:j,gasPrice:P,gas:A,to:T,value:S,data:B,..._.length>6?{v:F,r:O,s:w}:{}},serializedTransaction:g,type:"legacy"});const I={type:"legacy"};
43if((0,a.isHex)(T)&&T!=="0x"&&(I.to=T),(0,a.isHex)(A)&&A!=="0x"&&(I.gas=(0,s.hexToBigInt)(A)),(0,a.isHex)(B)&&B!=="0x"&&(I.data=B),(0,a.isHex)(j)&&j!=="0x"&&(I.nonce=(0,s.hexToNumber)(j)),(0,a.isHex)(S)&&S!=="0x"&&(I.value=(0,s.hexToBigInt)(S)),(0,a.isHex)(P)&&P!=="0x"&&(I.gasPrice=(0,s.hexToBigInt)(P)),(0,l.assertTransactionLegacy)(I),_.length===6)return I;const M=(0,a.isHex)(F)&&F!=="0x"?(0,s.hexToBigInt)(F):0n;if(w==="0x"&&O==="0x")return M>0&&(I.chainId=Number(M)),I;const R=M,C=Number((R-35n)/2n);if(C>0)I.chainId=C;else if(R!==27n&&R!==28n)throw new r.InvalidLegacyVError({v:R});return I.v=R,I.s=w,I.r=O,I.yParity=R%2n===0n?1:0,I}function v(g){return(0,u.fromRlp)(`0x${g.slice(4)}`,"hex")}function m(g){const _=[];for(let j=0;j<g.length;j++){const[P,A]=g[j];if(!(0,t.isAddress)(P,{strict:!1}))throw new e.InvalidAddressError({address:P});_.push({address:P,storageKeys:A.map(T=>(0,d.isHash)(T)?T:(0,o.trim)(T))})}return _}function E(g){const _=g.slice(-3),j=_[0]==="0x"||(0,s.hexToBigInt)(_[0])===0n?27n:28n;return{r:(0,i.padHex)(_[1],{size:32}),s:(0,i.padHex)(_[2],{size:32}),v:j,yParity:j===27n?0:1}}return Pr}var En={},vi={},Km;function nd(){if(Km)return vi;Km=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.serializeAccessList=n;const e=Ge(),r=Me(),t=Ce();function n(a){if(!a||a.length===0)return[];const i=[];for(let o=0;o<a.length;o++){const{address:s,storageKeys:u}=a[o];for(let d=0;d<u.length;d++)if(u[d].length-2!==64)throw new r.InvalidStorageKeySizeError({storageKey:u[d]});if(!(0,t.isAddress)(s,{strict:!1}))throw new e.InvalidAddressError({address:s});i.push([s,u])}return i}return vi}var Zm;function ad(){if(Zm)return En;Zm=1,Object.defineProperty(En,"__esModule",{value:!0}),En.serializeTransaction=f,En.toYParitySignatureArray=v;const e=Me(),r=iu(),t=su(),n=Sc(),a=uu(),i=Ie(),o=It(),s=W(),u=pu(),d=Eu(),l=cu(),c=nd();function f(m,E){const g=(0,l.getTransactionType)(m);return g==="eip1559"?y(m,E):g==="eip2930"?b(m,E):g==="eip4844"?h(m,E):p(m,E)}function h(m,E){const{chainId:g,gas:_,nonce:j,to:P,value:A,maxFeePerBlobGas:T,maxFeePerGas:S,maxPriorityFeePerGas:B,accessList:F,data:O}=m;(0,d.assertTransactionEIP4844)(m);let w=m.blobVersionedHashes,I=m.sidecars;if(m.blobs&&(typeof w>"u"||typeof I>"u")){const k=typeof m.blobs[0]=="string"?m.blobs:m.blobs.map(z=>(0,s.bytesToHex)(z)),$=m.kzg,U=(0,r.blobsToCommitments)({blobs:k,kzg:$});if(typeof w>"u"&&(w=(0,n.commitmentsToVersionedHashes)({commitments:U})),typeof I>"u"){const z=(0,t.blobsToProofs)({blobs:k,commitments:U,kzg:$});I=(0,a.toBlobSidecars)({blobs:k,commitments:U,proofs:z})}}const M=(0,c.serializeAccessList)(F),R=[(0,s.toHex)(g),j?(0,s.toHex)(j):"0x",B?(0,s.toHex)(B):"0x",S?(0,s.toHex)(S):"0x",_?(0,s.toHex)(_):"0x",P??"0x",A?(0,s.toHex)(A):"0x",O??"0x",M,T?(0,s.toHex)(T):"0x",w??[],...v(m,E)],C=[],q=[],x=[];if(I)for(let k=0;k<I.length;k++){const{blob:$,commitment:U,proof:z}=I[k];C.push($),q.push(U),x.push(z)}return(0,i.concatHex)(["0x03",I?(0,u.toRlp)([R,C,q,x]):(0,u.toRlp)(R)])}function y(m,E){const{chainId:g,gas:_,nonce:j,to:P,value:A,maxFeePerGas:T,maxPriorityFeePerGas:S,accessList:B,data:F}=m;(0,d.assertTransactionEIP1559)(m);const O=(0,c.serializeAccessList)(B),w=[(0,s.toHex)(g),j?(0,s.toHex)(j):"0x",S?(0,s.toHex)(S):"0x",T?(0,s.toHex)(T):"0x",_?(0,s.toHex)(_):"0x",P??"0x",A?(0,s.toHex)(A):"0x",F??"0x",O,...v(m,E)];return(0,i.concatHex)(["0x02",(0,u.toRlp)(w)])}function b(m,E){const{chainId:g,gas:_,data:j,nonce:P,to:A,value:T,accessList:S,gasPrice:B}=m;(0,d.assertTransactionEIP2930)(m);const F=(0,c.serializeAccessList)(S),O=[(0,s.toHex)(g),P?(0,s.toHex)(P):"0x",B?(0,s.toHex)(B):"0x",_?(0,s.toHex)(_):"0x",A??"0x",T?(0,s.toHex)(T):"0x",j??"0x",F,...v(m,E)];return(0,i.concatHex)(["0x01",(0,u.toRlp)(O)])}function p(m,E){const{chainId:g=0,gas:_,data:j,nonce:P,to:A,value:T,gasPrice:S}=m;(0,d.assertTransactionLegacy)(m);let B=[P?(0,s.toHex)(P):"0x",S?(0,s.toHex)(S):"0x",_?(0,s.toHex)(_):"0x",A??"0x",T?(0,s.toHex)(T):"0x",j??"0x"];if(E){const F=(()=>{if(E.v>=35n)return(E.v-35n)/2n>0?E.v:27n+(E.v===35n?0n:1n);if(g>0)return BigInt(g*2)+BigInt(35n+E.v-27n);const I=27n+(E.v===27n?0n:1n);if(E.v!==I)throw new e.InvalidLegacyVError({v:E.v});return I})(),O=(0,o.trim)(E.r),w=(0,o.trim)(E.s);B=[...B,(0,s.toHex)(F),O==="0x00"?"0x":O,w==="0x00"?"0x":w]}else g>0&&(B=[...B,(0,s.toHex)(g),"0x","0x"]);return(0,u.toRlp)(B)}function v(m,E){const g=E??m,{v:_,yParity:j}=g;if(typeof g.r>"u")return[];if(typeof g.s>"u")return[];if(typeof _>"u"&&typeof j>"u")return[];const P=(0,o.trim)(g.r),A=(0,o.trim)(g.s);return[typeof j=="number"?j?(0,s.toHex)(1):"0x":_===0n?"0x":_===1n?(0,s.toHex)(1):_===27n?"0x":(0,s.toHex)(1),P==="0x00"?"0x":P,A==="0x00"?"0x":A]}return En}var Ei={},Ym;
43function ju(){if(Ym)return Ei;Ym=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.parseUnits=e;function e(r,t){let[n,a="0"]=r.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),a=a.replace(/(0+)$/,""),t===0)Math.round(+`.${a}`)===1&&(n=`${BigInt(n)+1n}`),a="";else if(a.length>t){const[o,s,u]=[a.slice(0,t-1),a.slice(t-1,t),a.slice(t)],d=Math.round(+`${s}.${u}`);d>9?a=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):a=`${o}${d}`,a.length>t&&(a=a.slice(1),n=`${BigInt(n)+1n}`),a=a.slice(0,t)}else a=a.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${a}`)}return Ei}var ji={},Jm;function Ky(){if(Jm)return ji;Jm=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.parseEther=t;const e=On(),r=ju();function t(n,a="wei"){return(0,r.parseUnits)(n,e.etherUnits[a])}return ji}var Pi={},Xm;function Zy(){if(Xm)return Pi;Xm=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.parseGwei=t;const e=On(),r=ju();function t(n,a="wei"){return(0,r.parseUnits)(n,e.gweiUnits[a])}return Pi}var Wt={},Qm;function Yy(){if(Qm)return Wt;Qm=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.nonceManager=void 0,Wt.createNonceManager=t,Wt.jsonRpc=n;const e=Ac(),r=Qs();function t(a){const{source:i}=a,o=new Map,s=new r.LruMap(8192),u=new Map,d=({address:l,chainId:c})=>`${l}.${c}`;return{async consume({address:l,chainId:c,client:f}){const h=d({address:l,chainId:c}),y=this.get({address:l,chainId:c,client:f});this.increment({address:l,chainId:c});const b=await y;return await i.set({address:l,chainId:c},b),s.set(h,b),b},async increment({address:l,chainId:c}){const f=d({address:l,chainId:c}),h=o.get(f)??0;o.set(f,h+1)},async get({address:l,chainId:c,client:f}){const h=d({address:l,chainId:c});let y=u.get(h);return y||(y=(async()=>{try{const p=await i.get({address:l,chainId:c,client:f}),v=s.get(h)??0;return v>0&&p<=v?v+1:(s.delete(h),p)}finally{this.reset({address:l,chainId:c})}})(),u.set(h,y)),(o.get(h)??0)+await y},reset({address:l,chainId:c}){const f=d({address:l,chainId:c});o.delete(f),u.delete(f)}}}function n(){return{async get(a){const{address:i,client:o}=a;return(0,e.getTransactionCount)(o,{address:i,blockTag:"pending"})},set(){}}}return Wt.nonceManager=t({source:n()}),Wt}var e0;function Vp(){return e0||(e0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAddress=e.getAddress=e.getCreate2Address=e.getCreateAddress=e.getContractAddress=e.publicKeyToAddress=e.parseAccount=e.formatAbiParams=e.formatAbiItem=e.formatAbiItemWithArgs=e.encodePacked=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.getAbiItem=e.parseEventLogs=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.validateTypedData=e.serializeTypedData=e.stringify=e.getWebSocketRpcClient=e.socketClientCache=e.getSocketRpcClient=e.getHttpRpcClient=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.buildRequest=void 0,e.getCallError=e.getNodeError=e.containsNodeError=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBigInt=e.hexToBool=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.stringToHex=e.numberToHex=e.toHex=e.bytesToHex=e.boolToHex=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.toBytes=e.boolToBytes=e.toRlp=e.extract=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.formatLog=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatBlock=e.defineBlock=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.isAddressEqual=void 0,e.nonceManager=e.createNonceManager=e.parseGwei=e.parseEther=e.parseUnits=e.formatUnits=e.formatGwei=e.formatEther=e.serializeAccessList=e.serializeTransaction=e.parseTransaction=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.getTransactionType=e.getSerializedTransactionType=e.serializeErc6492Signature=e.isErc6492Signature=e.parseErc6492Signature=e.hashMessage=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.hashTypedData=e.ripemd160=e.sha256=e.keccak256=e.isHash=e.toFunctionHash=e.toEventHash=e.getFunctionSignature=e.toFunctionSignature=e.getEventSignature=e.toEventSignature=e.getFunctionSelector=e.toFunctionSelector=e.getEventSelector=e.toEventSelector=e.defineFormatter=e.getAction=e.getTransactionError=e.getEstimateGasError=e.getContractError=void 0;var r=hy();Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return r.buildRequest}});var t=Mc();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return t.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return t.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return t.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return t.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return t.offchainLookupSignature}});var n=mu();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return n.assertCurrentChain}});var a=Ay();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return a.defineChain}});var i=Iy();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return i.extractChain}});var o=Bt();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return o.getChainContractAddress}});var s=zc();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return s.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return s.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return s.integerRegex}});var u=Sy();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return u.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return u.rpc}});var d=Dc();Object.defineProperty(e,"getHttpRpcClient",{enumerable:!0,get:function(){return d.getHttpRpcClient}});var l=Oy();Object.defineProperty(e,"getSocketRpcClient",{enumerable:!0,get:function(){return l.getSocketRpcClient}}),Object.defineProperty(e,"socketClientCache",{enumerable:!0,get:function(){return l.socketClientCache}});var c=Gc();Object.defineProperty(e,"getWebSocketRpcClient",{enumerable:!0,get:function(){return c.getWebSocketRpcClient}});var f=Te();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}});var h=hu();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return h.serializeTypedData}
43}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return h.validateTypedData}});var y=Ot();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return y.decodeAbiParameters}});var b=tu();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return b.decodeErrorResult}});var p=Mn();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return p.decodeEventLog}});var v=Ry();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return v.decodeFunctionData}});var m=Rt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return m.decodeFunctionResult}});var E=We();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return E.encodeAbiParameters}});var g=kn();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return g.encodeDeployData}});var _=By();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return _.encodeErrorResult}});var j=er();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return j.encodeEventTopics}});var P=Ye();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return P.encodeFunctionData}});var A=Cy();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return A.encodeFunctionResult}});var T=Fn();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return T.parseEventLogs}});var S=Ze();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return S.getAbiItem}});var B=Zs();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return B.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return B.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return B.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return B.parseAbiParameters}});var F=qy();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return F.encodePacked}});var O=Xg();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return O.formatAbiItemWithArgs}});var w=_t();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return w.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return w.formatAbiParams}});var I=qe();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return I.parseAccount}});var M=My();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return M.publicKeyToAddress}});var R=Fy();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return R.getContractAddress}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return R.getCreateAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return R.getCreate2Address}});var C=ke();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return C.getAddress}});var q=Ce();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return q.isAddress}});var x=vt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return x.isAddressEqual}});var k=Ie();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return k.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return k.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return k.concatHex}});var $=Vc();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return $.isBytes}});var U=je();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return U.isHex}});var z=At();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return z.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return z.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return z.padHex}});var L=Be();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return L.size}});var G=Ve();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return G.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return G.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return G.sliceHex}});var Z=It();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return Z.trim}});var Y=ou();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return Y.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return Y.formatBlock}});var K=Cn();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return K.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return K.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return K.transactionType}});var ie=St();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return ie.formatLog}});var oe=Wc();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return oe.defineTransactionReceipt}});var ce=or();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return ce.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return ce.formatTransactionRequest}});var V=Rn();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return V.extract}});var D=pu();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return D.toRlp}});var N=de();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return N.boolToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return N.toBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return N.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return N.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return N.str
43ingToBytes}});var re=W();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return re.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return re.bytesToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return re.toHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return re.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return re.stringToHex}});var X=jc();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return X.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return X.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return X.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return X.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return X.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return X.fromBytes}});var ae=_e();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return ae.fromHex}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return ae.hexToBool}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return ae.hexToBigInt}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return ae.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return ae.hexToString}});var le=Kc();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return le.fromRlp}});var ge=nu();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return ge.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return ge.getNodeError}});var he=ly();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return he.getCallError}});var pe=Or();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return pe.getContractError}});var ve=ey();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return ve.getEstimateGasError}});var He=my();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return He.getTransactionError}});var Fe=ue();Object.defineProperty(e,"getAction",{enumerable:!0,get:function(){return Fe.getAction}});var Xe=Bn();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return Xe.defineFormatter}});var xe=An();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return xe.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return xe.toEventSelector}});var $e=Qt();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return $e.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return $e.toFunctionSelector}});var jt=xy();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return jt.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return jt.toEventSignature}});var Pe=ky();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return Pe.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return Pe.toFunctionSignature}});var Ne=Hy();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return Ne.toEventHash}});var Qe=$y();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return Qe.toFunctionHash}});var cr=Zc();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return cr.isHash}});var dr=Ae();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return dr.keccak256}});var Pu=Ic();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Pu.sha256}});var wu=Ny();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return wu.ripemd160}});var Tu=Un();Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Tu.hashTypedData}
43});var Au=ur();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return Au.recoverAddress}});var Gn=Jc();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return Gn.recoverMessageAddress}});var Vn=Yc();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return Vn.recoverPublicKey}});var Br=Xc();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return Br.recoverTypedDataAddress}});var Iu=zy();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return Iu.verifyHash}});var Ou=Gy();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return Ou.verifyMessage}});var Su=Vy();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return Su.verifyTypedData}});var Ru=zn();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return Ru.hashMessage}});var Bu=Wy();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return Bu.parseErc6492Signature}});var Cu=vu();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return Cu.isErc6492Signature}});var qu=ed();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return qu.serializeErc6492Signature}});var Cr=td();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return Cr.getSerializedTransactionType}});var Ct=cu();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return Ct.getTransactionType}});var qt=ir();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return qt.assertRequest}});var et=Eu();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return et.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return et.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return et.assertTransactionLegacy}});var Mt=rd();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return Mt.parseTransaction}});var Mu=ad();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return Mu.serializeTransaction}});var Fu=nd();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return Fu.serializeAccessList}});var xu=Sn();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return xu.formatEther}});var ku=tr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return ku.formatGwei}});var Hu=ru();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return Hu.formatUnits}});var $u=ju();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return $u.parseUnits}});var Nu=Ky();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return Nu.parseEther}});var Du=Zy();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return Du.parseGwei}});var Wn=Yy();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return Wn.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return Wn.nonceManager}})})(ic)),ic}var t0;function Wp(){if(t0)return Ko;t0=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.formatProof=t;const e=Vp();function r(n){return n.map(a=>({...a,value:BigInt(a.value)}))}function t(n){return{...n,balance:n.balance?BigInt(n.balance):void 0,nonce:n.nonce?(0,e.hexToNumber)(n.nonce):void 0,storageProof:n.storageProof?r(n.storageProof):void 0}}return Ko}var r0;function Kp(){if(r0)return Wo;r0=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.getProof=t;const e=W(),r=Wp();async function t(n,{address:a,blockNumber:i,blockTag:o,storageKeys:s}){const u=o??"latest",d=i!==void 0?(0,e.numberToHex)(i):void 0,l=await n.request({method:"eth_getProof",params:[a,s,d||u]});return(0,r.formatProof)(l)}return Wo}var wi={},n0;function Zp(){if(n0)return wi;n0=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.getStorageAt=r;const e=W();async function r(t,{address:n,blockNumber:a,blockTag:i="latest",slot:o}){const s=a!==void 0?(0,e.numberToHex)(a):void 0;return await t.request({method:"eth_getStorageAt",params:[n,o,s||i]})}return wi}var Ti={},a0;function od(){if(a0)return Ti;a0=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.getTransaction=n;const e=Me(),r=W(),t=Cn();async function n(a,{blockHash:i,blockNumber:o,blockTag:s,hash:u,index:d}){const l=s||"latest",c=o!==void 0?(0,r.numberToHex)(o):void 0;let f=null;if(u?f=await a.request({method:"eth_getTransactionByHash",params:[u]},{dedupe:!0}):i?f=await a.request({method:"eth_getTransactionByBlockHashAndIndex",params:[i,(0,r.numberToHex)(d)]},{dedupe:!0}):f=await a.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[c||l,(0,r.numberToHex)(d)]},{dedupe:!!c}),!f)throw new e.TransactionNotFoundError({blockHash:i,blockNumber:o,blockTag:l,hash:u,index:d});return(a.chain?.formatters?.transaction?.format||t.formatTransaction)(f)}return Ti}var Ai={},o0;function Yp(){if(o0)return Ai;o0=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.getTransactionConfirmations=n;const e=ue(),r=Nn(),t=od();async function n(a,{hash:i,transactionReceipt:o}){const[s,u]=await Promise.all([(0,e.getAction)(a,r.getBlockNumber,"getBlockNumber")({}),i?(0,e.getAction)(a,t.getTransaction,"getTransaction")({hash:i}):void 0]),d=o?.blockNumber||u?.blockNumber;return d?s-d+1n:0n}return Ai}var Ii={},i0;function Jy(){if(i0)return Ii;i0=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.getTransactionReceipt=t;const e=Me(),r=Wc();async function t(n,{hash:a}){const i=await n.request({method:"eth_getTransactionReceipt",params:[a]},{dedupe:!0});if(!i)throw new e.TransactionReceiptNotFoundError({hash:a});return(n.chain?.formatters?.transactionReceipt?.format||r.formatTransactionReceipt)(i)}return Ii}var Oi={},s0;function Jp(){if(s0)return Oi;s0=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.multicall=l;const e=sr(),r=me(),t=ne(),n=rr(),a=Rt(),i=Ye(),o=Bt(),s=Or(),u=ue(),d=Et();
43async function l(c,f){const{allowFailure:h=!0,batchSize:y,blockNumber:b,blockTag:p,multicallAddress:v,stateOverride:m}=f,E=f.contracts,g=y??(typeof c.batch?.multicall=="object"&&c.batch.multicall.batchSize||1024);let _=v;if(!_){if(!c.chain)throw new Error("client chain not configured. multicallAddress is required.");_=(0,o.getChainContractAddress)({blockNumber:b,chain:c.chain,contract:"multicall3"})}const j=[[]];let P=0,A=0;for(let B=0;B<E.length;B++){const{abi:F,address:O,args:w,functionName:I}=E[B];try{const M=(0,i.encodeFunctionData)({abi:F,args:w,functionName:I});A+=(M.length-2)/2,g>0&&A>g&&j[P].length>0&&(P++,A=(M.length-2)/2,j[P]=[]),j[P]=[...j[P],{allowFailure:!0,callData:M,target:O}]}catch(M){const R=(0,s.getContractError)(M,{abi:F,address:O,args:w,docsPath:"/docs/contract/multicall",functionName:I});if(!h)throw R;j[P]=[...j[P],{allowFailure:!0,callData:"0x",target:O}]}}const T=await Promise.allSettled(j.map(B=>(0,u.getAction)(c,d.readContract,"readContract")({abi:e.multicall3Abi,address:_,args:[B],blockNumber:b,blockTag:p,functionName:"aggregate3",stateOverride:m}))),S=[];for(let B=0;B<T.length;B++){const F=T[B];if(F.status==="rejected"){if(!h)throw F.reason;for(let w=0;w<j[B].length;w++)S.push({status:"failure",error:F.reason,result:void 0});continue}const O=F.value;for(let w=0;w<O.length;w++){const{returnData:I,success:M}=O[w],{callData:R}=j[B][w],{abi:C,address:q,functionName:x,args:k}=E[S.length];try{if(R==="0x")throw new r.AbiDecodingZeroDataError;if(!M)throw new n.RawContractError({data:I});const $=(0,a.decodeFunctionResult)({abi:C,args:k,data:I,functionName:x});S.push(h?{result:$,status:"success"}:$)}catch($){const U=(0,s.getContractError)($,{abi:C,address:q,args:k,docsPath:"/docs/contract/multicall",functionName:x});if(!h)throw U;S.push({error:U,result:void 0,status:"failure"})}}}if(S.length!==E.length)throw new t.BaseError("multicall results mismatch");return S}return Oi}var Si={},Ri={},Bi={},u0;function Xp(){if(u0)return Bi;u0=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.isBytesEqual=n;const e=Jt(),r=de(),t=je();function n(a,i){const o=(0,t.isHex)(a)?(0,r.toBytes)(a):a,s=(0,t.isHex)(i)?(0,r.toBytes)(i):i;return(0,e.equalBytes)(o,s)}return Bi}var Ci={},c0;function Xy(){if(c0)return Ci;c0=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.serializeSignature=n;const e=Ln(),r=_e(),t=de();function n({r:a,s:i,to:o="hex",v:s,yParity:u}){const d=(()=>{if(u===0||u===1)return u;if(s&&(s===27n||s===28n||s>=35n))return s%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(a),(0,r.hexToBigInt)(i)).toCompactHex()}${d===0?"1b":"1c"}`;return o==="hex"?l:(0,t.hexToBytes)(l)}return Ci}var d0;function id(){if(d0)return Ri;d0=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.verifyHash=p;const e=sr(),r=dy(),t=rr(),n=kn(),a=ke(),i=vt(),o=Xp(),s=je(),u=W(),d=ue(),l=vu(),c=ur(),f=ed(),h=Xy(),y=Hn(),b=Ty();async function p(v,m){const{address:E,factory:g,factoryData:_,hash:j,signature:P,...A}=m,T=(0,s.isHex)(P)?P:typeof P=="object"&&"r"in P&&"s"in P?(0,h.serializeSignature)(P):(0,u.bytesToHex)(P),S=await(async()=>!g&&!_||(0,l.isErc6492Signature)(T)||await(0,d.getAction)(v,b.getCode,"getCode")({address:E})?T:(0,f.serializeErc6492Signature)({address:g,data:_,signature:T}))();try{const{data:B}=await(0,d.getAction)(v,y.call,"call")({data:(0,n.encodeDeployData)({abi:e.universalSignatureValidatorAbi,args:[E,j,S],bytecode:r.universalSignatureValidatorByteCode}),...A});return(0,o.isBytesEqual)(B??"0x0","0x1")}catch(B){try{if((0,i.isAddressEqual)((0,a.getAddress)(E),await(0,c.recoverAddress)({hash:j,signature:P})))return!0}catch{}if(B instanceof t.CallExecutionError)return!1;throw B}}return Ri}var l0;function Qp(){if(l0)return Si;l0=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.verifyMessage=t;const e=zn(),r=id();async function t(n,{address:a,message:i,factory:o,factoryData:s,signature:u,...d}){const l=(0,e.hashMessage)(i);return(0,r.verifyHash)(n,{address:a,factory:o,factoryData:s,hash:l,signature:u,...d})}return Si}var qi={},f0;function e1(){if(f0)return qi;f0=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.verifyTypedData=t;const e=Un(),r=id();async function t(n,a){const{address:i,factory:o,factoryData:s,signature:u,message:d,primaryType:l,types:c,domain:f,...h}=a,y=(0,e.hashTypedData)({message:d,primaryType:l,types:c,domain:f});return(0,r.verifyHash)(n,{address:i,factory:o,factoryData:s,hash:y,signature:u,...h})}return qi}var Mi={},Fi={},b0;function Qy(){if(b0)return Fi;b0=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.watchBlockNumber=o;const e=_e(),r=ue(),t=Rr(),n=$n(),a=Te(),i=Nn();function o(s,{emitOnBegin:u=!1,emitMissed:d=!1,onBlockNumber:l,onError:c,poll:f,pollingInterval:h=s.pollingInterval}){const y=typeof f<"u"?f:!(s.transport.type==="webSocket"||s.transport.type==="fallback"&&s.transport.transports[0].c
43onfig.type==="webSocket");let b;return y?(()=>{const m=(0,a.stringify)(["watchBlockNumber",s.uid,u,d,h]);return(0,t.observe)(m,{onBlockNumber:l,onError:c},E=>(0,n.poll)(async()=>{try{const g=await(0,r.getAction)(s,i.getBlockNumber,"getBlockNumber")({cacheTime:0});if(b){if(g===b)return;if(g-b>1&&d)for(let _=b+1n;_<g;_++)E.onBlockNumber(_,b),b=_}(!b||g>b)&&(E.onBlockNumber(g,b),b=g)}catch(g){E.onError?.(g)}},{emitOnBegin:u,interval:h}))})():(()=>{const m=(0,a.stringify)(["watchBlockNumber",s.uid,u,d]);return(0,t.observe)(m,{onBlockNumber:l,onError:c},E=>{let g=!0,_=()=>g=!1;return(async()=>{try{const j=(()=>{if(s.transport.type==="fallback"){const A=s.transport.transports.find(T=>T.config.type==="webSocket");return A?A.value:s.transport}return s.transport})(),{unsubscribe:P}=await j.subscribe({params:["newHeads"],onData(A){if(!g)return;const T=(0,e.hexToBigInt)(A.result?.number);E.onBlockNumber(T,b),b=T},onError(A){E.onError?.(A)}});_=P,g||_()}catch(j){c?.(j)}})(),()=>_()})})()}return Fi}var m0;function t1(){if(m0)return Mi;m0=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.waitForTransactionReceipt=l;const e=wc(),r=Me(),t=ue(),n=Rr(),a=Hc(),i=Te(),o=Sr(),s=od(),u=Jy(),d=Qy();async function l(c,{confirmations:f=1,hash:h,onReplaced:y,pollingInterval:b=c.pollingInterval,retryCount:p=6,retryDelay:v=({count:E})=>~~(1<<E)*200,timeout:m}){const E=(0,i.stringify)(["waitForTransactionReceipt",c.uid,h]);let g=0,_,j,P,A=!1;return new Promise((T,S)=>{m&&setTimeout(()=>S(new r.WaitForTransactionReceiptTimeoutError({hash:h})),m);const B=(0,n.observe)(E,{onReplaced:y,resolve:T,reject:S},F=>{const O=(0,t.getAction)(c,d.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:b,async onBlockNumber(w){const I=R=>{O(),R(),B()};let M=w;if(!A){g>p&&I(()=>F.reject(new r.WaitForTransactionReceiptTimeoutError({hash:h})));try{if(P){if(f>1&&(!P.blockNumber||M-P.blockNumber+1n<f))return;I(()=>F.resolve(P));return}if(_||(A=!0,await(0,a.withRetry)(async()=>{_=await(0,t.getAction)(c,s.getTransaction,"getTransaction")({hash:h}),_.blockNumber&&(M=_.blockNumber)},{delay:v,retryCount:p}),A=!1),P=await(0,t.getAction)(c,u.getTransactionReceipt,"getTransactionReceipt")({hash:h}),f>1&&(!P.blockNumber||M-P.blockNumber+1n<f))return;I(()=>F.resolve(P))}catch(R){if(R instanceof r.TransactionNotFoundError||R instanceof r.TransactionReceiptNotFoundError){if(!_){A=!1;return}try{j=_,A=!0;const C=await(0,a.withRetry)(()=>(0,t.getAction)(c,o.getBlock,"getBlock")({blockNumber:M,includeTransactions:!0}),{delay:v,retryCount:p,shouldRetry:({error:k})=>k instanceof e.BlockNotFoundError});A=!1;const q=C.transactions.find(({from:k,nonce:$})=>k===j.from&&$===j.nonce);if(!q||(P=await(0,t.getAction)(c,u.getTransactionReceipt,"getTransactionReceipt")({hash:q.hash}),f>1&&(!P.blockNumber||M-P.blockNumber+1n<f)))return;let x="replaced";q.to===j.to&&q.value===j.value?x="repriced":q.from===q.to&&q.value===0n&&(x="cancelled"),I(()=>{F.onReplaced?.({reason:x,replacedTransaction:j,transaction:q,transactionReceipt:P}),F.resolve(P)})}catch(C){I(()=>F.reject(C))}}else I(()=>F.reject(R))}finally{g++}}}})})})}return Mi}var xi={},g0;function r1(){if(g0)return xi;g0=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.watchBlocks=o;const e=ou(),r=ue(),t=Rr(),n=$n(),a=Te(),i=Sr();function o(s,{blockTag:u="latest",emitMissed:d=!1,emitOnBegin:l=!1,onBlock:c,onError:f,includeTransactions:h,poll:y,pollingInterval:b=s.pollingInterval}){const p=typeof y<"u"?y:!(s.transport.type==="webSocket"||s.transport.type==="fallback"&&s.transport.transports[0].c
43onfig.type==="webSocket"),v=h??!1;let m;return p?(()=>{const _=(0,a.stringify)(["watchBlocks",s.uid,u,d,l,v,b]);return(0,t.observe)(_,{onBlock:c,onError:f},j=>(0,n.poll)(async()=>{try{const P=await(0,r.getAction)(s,i.getBlock,"getBlock")({blockTag:u,includeTransactions:v});if(P.number&&m?.number){if(P.number===m.number)return;if(P.number-m.number>1&&d)for(let A=m?.number+1n;A<P.number;A++){const T=await(0,r.getAction)(s,i.getBlock,"getBlock")({blockNumber:A,includeTransactions:v});j.onBlock(T,m),m=T}}(!m?.number||u==="pending"&&!P?.number||P.number&&P.number>m.number)&&(j.onBlock(P,m),m=P)}catch(P){j.onError?.(P)}},{emitOnBegin:l,interval:b}))})():(()=>{let _=!0,j=()=>_=!1;return(async()=>{try{const P=(()=>{if(s.transport.type==="fallback"){const T=s.transport.transports.find(S=>S.config.type==="webSocket");return T?T.value:s.transport}return s.transport})(),{unsubscribe:A}=await P.subscribe({params:["newHeads"],onData(T){if(!_)return;const B=(s.chain?.formatters?.block?.format||e.formatBlock)(T.result);c(B,m),m=B},onError(T){f?.(T)}});j=A,_||j()}catch(P){f?.(P)}})(),()=>j()})()}return xi}var ki={},y0;function n1(){if(y0)return ki;y0=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.watchEvent=y;const e=er(),r=Rr(),t=$n(),n=Te(),a=me(),i=nr(),o=Mn(),s=St(),u=ue(),d=Py(),l=Nn(),c=lu(),f=Bc(),h=fu();function y(b,{address:p,args:v,batch:m=!0,event:E,events:g,fromBlock:_,onError:j,onLogs:P,poll:A,pollingInterval:T=b.pollingInterval,strict:S}){const B=typeof A<"u"?A:typeof _=="bigint"?!0:!(b.transport.type==="webSocket"||b.transport.type==="fallback"&&b.transport.transports[0].c
43onfig.type==="webSocket"),F=S??!1;return B?(()=>{const I=(0,n.stringify)(["watchEvent",p,v,m,b.uid,E,T,_]);return(0,r.observe)(I,{onLogs:P,onError:j},M=>{let R;_!==void 0&&(R=_-1n);let C,q=!1;const x=(0,t.poll)(async()=>{if(!q){try{C=await(0,u.getAction)(b,d.createEventFilter,"createEventFilter")({address:p,args:v,event:E,events:g,strict:F,fromBlock:_})}catch{}q=!0;return}try{let k;if(C)k=await(0,u.getAction)(b,c.getFilterChanges,"getFilterChanges")({filter:C});else{const $=await(0,u.getAction)(b,l.getBlockNumber,"getBlockNumber")({});R&&R!==$?k=await(0,u.getAction)(b,f.getLogs,"getLogs")({address:p,args:v,event:E,events:g,fromBlock:R+1n,toBlock:$}):k=[],R=$}if(k.length===0)return;if(m)M.onLogs(k);else for(const $ of k)M.onLogs([$])}catch(k){C&&k instanceof i.InvalidInputRpcError&&(q=!1),M.onError?.(k)}},{emitOnBegin:!0,interval:T});return async()=>{C&&await(0,u.getAction)(b,h.uninstallFilter,"uninstallFilter")({filter:C}),x()}})})():(()=>{let I=!0,M=()=>I=!1;return(async()=>{try{const R=(()=>{if(b.transport.type==="fallback"){const k=b.transport.transports.find($=>$.config.type==="webSocket");return k?k.value:b.transport}return b.transport})(),C=g??(E?[E]:void 0);let q=[];C&&(q=[C.flatMap($=>(0,e.encodeEventTopics)({abi:[$],eventName:$.name,args:v}))],E&&(q=q[0]));const{unsubscribe:x}=await R.subscribe({params:["logs",{address:p,topics:q}],onData(k){if(!I)return;const $=k.result;try{const{eventName:U,args:z}=(0,o.decodeEventLog)({abi:C??[],data:$.data,topics:$.topics,strict:F}),L=(0,s.formatLog)($,{args:z,eventName:U});P([L])}catch(U){let z,L;if(U instanceof a.DecodeLogDataMismatch||U instanceof a.DecodeLogTopicsMismatch){if(S)return;z=U.abiItem.name,L=U.abiItem.inputs?.some(Z=>!("name"in Z&&Z.name))}const G=(0,s.formatLog)($,{args:L?[]:{},eventName:z});P([G])}},onError(k){j?.(k)}});M=x,I||M()}catch(R){j?.(R)}})(),()=>M()})()}return ki}var Hi={},h0;function a1(){if(h0)return Hi;h0=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.watchPendingTransactions=s;const e=ue(),r=Rr(),t=$n(),n=Te(),a=wy(),i=lu(),o=fu();function s(u,{batch:d=!0,onError:l,onTransactions:c,poll:f,pollingInterval:h=u.pollingInterval}){return(typeof f<"u"?f:u.transport.type!=="webSocket")?(()=>{const v=(0,n.stringify)(["watchPendingTransactions",u.uid,d,h]);return(0,r.observe)(v,{onTransactions:c,onError:l},m=>{let E;const g=(0,t.poll)(async()=>{try{if(!E)try{E=await(0,e.getAction)(u,a.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(j){throw g(),j}const _=await(0,e.getAction)(u,i.getFilterChanges,"getFilterChanges")({filter:E});if(_.length===0)return;if(d)m.onTransactions(_);else for(const j of _)m.onTransactions([j])}catch(_){m.onError?.(_)}},{emitOnBegin:!0,interval:h});return async()=>{E&&await(0,e.getAction)(u,o.uninstallFilter,"uninstallFilter")({filter:E}),g()}})})():(()=>{let v=!0,m=()=>v=!1;return(async()=>{try{const{unsubscribe:E}=await u.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!v)return;const _=g.result;c([_])},onError(g){l?.(g)}});m=E,v||m()}catch(E){l?.(E)}})(),()=>m()})()}return Hi}var $i={},Ni={},p0;function o1(){if(p0)return Ni;p0=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.parseSiweMessage=e;function e(n){const{scheme:a,statement:i,...o}=n.match(r)?.groups??{},{chainId:s,expirationTime:u,issuedAt:d,notBefore:l,requestId:c,...f}=n.match(t)?.groups??{},h=n.split("Resources:")[1]?.split(`
44- `).slice(1);return{...o,...f,...s?{chainId:Number(s)}:{},...u?{expirationTime:new Date(u)}:{},...d?{issuedAt:new Date(d)}:{},...l?{notBefore:new Date(l)}:{},...c?{requestId:c}:{},...h?{resources:h}:{},...a?{scheme:a}:{},...i?{statement:i}:{}}}const r=/^(?:(?<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)?/,t=/(?: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 Ni}var Di={},_0;function i1(){if(_0)return Di;_0=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.validateSiweMessage=r;const e=vt();function r(t){const{address:n,domain:a,message:i,nonce:o,scheme:s,time:u=new Date}=t;if(a&&i.domain!==a||o&&i.nonce!==o||s&&i.scheme!==s||i.expirationTime&&u>=i.expirationTime||i.notBefore&&u<i.notBefore)return!1;try{if(!i.address||n&&!(0,e.isAddressEqual)(i.address,n))return!1}catch{return!1}return!0}return Di}var v0;function s1(){if(v0)return $i;v0=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.verifySiweMessage=a;const e=zn(),r=o1(),t=i1(),n=id();async function a(i,o){const{address:s,domain:u,message:d,nonce:l,scheme:c,signature:f,time:h=new Date,...y}=o,b=(0,r.parseSiweMessage)(d);if(!b.address||!(0,t.validateSiweMessage)({address:s,domain:u,message:b,nonce:l,scheme:c,time:h}))return!1;const v=(0,e.hashMessage)(d);return(0,n.verifyHash)(i,{address:b.address,hash:v,signature:f,...y})}return $i}var E0;function eh(){if(E0)return Po;E0=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.publicActions=V;const e=jp(),r=Tp(),t=Ap(),n=Ip(),a=jy(),i=Hn(),o=Op(),s=vc(),u=Py(),d=wy(),l=cy(),c=ny(),f=Rc(),h=ry(),y=Sp(),b=Rp(),p=Sr(),v=Nn(),m=Bp(),E=qn(),g=Ty(),_=Cc(),j=qp(),P=Fp(),A=lu(),T=xp(),S=Tc(),B=Bc(),F=Kp(),O=Zp(),w=od(),I=Yp(),M=Ac(),R=Jy(),C=Jp(),q=Et(),x=fy(),k=fu(),$=Qp(),U=e1(),z=t1(),L=Qy(),G=r1(),Z=by(),Y=n1(),K=a1(),ie=s1(),oe=du(),ce=xc();function V(D){return{call:N=>(0,i.call)(D,N),createBlockFilter:()=>(0,o.createBlockFilter)(D),createContractEventFilter:N=>(0,s.createContractEventFilter)(D,N),createEventFilter:N=>(0,u.createEventFilter)(D,N),createPendingTransactionFilter:()=>(0,d.createPendingTransactionFilter)(D),estimateContractGas:N=>(0,l.estimateContractGas)(D,N),estimateGas:N=>(0,f.estimateGas)(D,N),getBalance:N=>(0,y.getBalance)(D,N),getBlobBaseFee:()=>(0,b.getBlobBaseFee)(D),getBlock:N=>(0,p.getBlock)(D,N),getBlockNumber:N=>(0,v.getBlockNumber)(D,N),getBlockTransactionCount:N=>(0,m.getBlockTransactionCount)(D,N),getBytecode:N=>(0,g.getCode)(D,N),getChainId:()=>(0,E.getChainId)(D),getCode:N=>(0,g.getCode)(D,N),getContractEvents:N=>(0,_.getContractEvents)(D,N),getEip712Domain:N=>(0,j.getEip712Domain)(D,N),getEnsAddress:N=>(0,e.getEnsAddress)(D,N),getEnsAvatar:N=>(0,r.getEnsAvatar)(D,N),getEnsName:N=>(0,t.getEnsName)(D,N),getEnsResolver:N=>(0,n.getEnsResolver)(D,N),getEnsText:N=>(0,a.getEnsText)(D,N),getFeeHistory:N=>(0,P.getFeeHistory)(D,N),estimateFeesPerGas:N=>(0,c.estimateFeesPerGas)(D,N),getFilterChanges:N=>(0,A.getFilterChanges)(D,N),getFilterLogs:N=>(0,T.getFilterLogs)(D,N),getGasPrice:()=>(0,S.getGasPrice)(D),getLogs:N=>(0,B.getLogs)(D,N),getProof:N=>(0,F.getProof)(D,N),estimateMaxPriorityFeePerGas:N=>(0,h.estimateMaxPriorityFeePerGas)(D,N),getStorageAt:N=>(0,O.getStorageAt)(D,N),getTransaction:N=>(0,w.getTransaction)(D,N),getTransactionConfirmations:N=>(0,I.getTransactionConfirmations)(D,N),getTransactionCount:N=>(0,M.getTransactionCount)(D,N),getTransactionReceipt:N=>(0,R.getTransactionReceipt)(D,N),multicall:N=>(0,C.multicall)(D,N),prepareTransactionRequest:N=>(0,oe.prepareTransactionRequest)(D,N),readContract:N=>(0,q.readContract)(D,N),sendRawTransaction:N=>(0,ce.sendRawTransaction)(D,N),simulateContract:N=>(0,x.simulateContract)(D,N),verifyMessage:N=>(0,$.verifyMessage)(D,N),verifySiweMessage:N=>(0,ie.verifySiweMessage)(D,N),verifyTypedData:N=>(0,U.verifyTypedData)(D,N),uninstallFilter:N=>(0,k.uninstallFilter)(D,N),waitForTransactionReceipt:N=>(0,z.waitForTransactionReceipt)(D,N),watchBlocks:N=>(0,G.watchBlocks)(D,N),watchBlockNumber:N=>(0,L.watchBlockNumber)(D,N),watchContractEvent:N=>(0,Z.watchContractEvent)(D,N),watchEvent:N=>(0,Y.watchEvent)(D,N),watchPendingTransactions:N=>(0,K.watchPendingTransactions)(D,N)}}return Po}var j0;function u1(){if(j0)return jo;j0=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.createPublicClient=t;const e=gu(),r=eh();function t(n){const{key:a="public",name:i="Public Client"}=n;return(0,e.createClient)({...n,key:a,name:i,type:"publicClient"}).extend(r.publicActions)}return jo}var Ui={},Li={},zi={},P0;function c1(){if(P0)return zi;P0=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.dropTransaction=e;async function e(r,{hash:t}){await r.request({method:`${r.mode}_dropTransaction`,params:[t]})}return zi}var Gi={},w0;function d1(){if(w0)return Gi;w0=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.dumpState=e;async function e(r){return r.request({method:`${r.mode}_dumpState`})}return Gi}var Vi={},T0;function l1(){if(T0)return Vi;T0=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.getAutomine=e;async function e(r){return r.mode==="ganache"?await r.request({method:"eth_mining"}):await r.request({method:`${r.mode}_getAutomine`})}return Vi}var Wi={},A0;function f1(){if(A0)return Wi;A0=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.getTxpoolContent=e;async function e(r){return await r.request({method:"txpool_content"})}return Wi}var Ki={},I0;function b1(){if(I0)return Ki;I0=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.getTxpoolStatus=r;const e=_e();async function r(t){const{pending:n,queued:a}=await t.request({method:"txpool_status"});return{pending:(0,e.hexToNumber)(n),queued:(0,e.hexToNumber)(a)}}return Ki}var Zi={},O0;
44function m1(){if(O0)return Zi;O0=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.impersonateAccount=e;async function e(r,{address:t}){await r.request({method:`${r.mode}_impersonateAccount`,params:[t]})}return Zi}var Yi={},S0;function g1(){if(S0)return Yi;S0=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.increaseTime=r;const e=W();async function r(t,{seconds:n}){return await t.request({method:"evm_increaseTime",params:[(0,e.numberToHex)(n)]})}return Yi}var Ji={},R0;function y1(){if(R0)return Ji;R0=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.inspectTxpool=e;async function e(r){return await r.request({method:"txpool_inspect"})}return Ji}var Xi={},B0;function h1(){if(B0)return Xi;B0=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.loadState=e;async function e(r,{state:t}){await r.request({method:`${r.mode}_loadState`,params:[t]})}return Xi}var Qi={},C0;function p1(){if(C0)return Qi;C0=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.mine=r;const e=W();async function r(t,{blocks:n,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:(0,e.numberToHex)(n)}]}):await t.request({method:`${t.mode}_mine`,params:[(0,e.numberToHex)(n),(0,e.numberToHex)(a||0)]})}return Qi}var es={},q0;function _1(){if(q0)return es;q0=1,Object.defineProperty(es,"__esModule",{value:!0}),es.removeBlockTimestampInterval=e;async function e(r){await r.request({method:`${r.mode}_removeBlockTimestampInterval`})}return es}var ts={},M0;function v1(){if(M0)return ts;M0=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.reset=e;async function e(r,{blockNumber:t,jsonRpcUrl:n}={}){await r.request({method:`${r.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:n}}]})}return ts}var rs={},F0;function E1(){if(F0)return rs;F0=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.revert=e;async function e(r,{id:t}){await r.request({method:"evm_revert",params:[t]})}return rs}var ns={},x0;function j1(){if(x0)return ns;x0=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.sendUnsignedTransaction=t;const e=Rn(),r=or();async function t(n,a){const{accessList:i,data:o,from:s,gas:u,gasPrice:d,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:h,value:y,...b}=a,p=n.chain?.formatters?.transactionRequest?.format,m=(p||r.formatTransactionRequest)({...(0,e.extract)(b,{format:p}),accessList:i,data:o,from:s,gas:u,gasPrice:d,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:h,value:y});return await n.request({method:"eth_sendUnsignedTransaction",params:[m]})}return ns}var as={},k0;function P1(){if(k0)return as;k0=1,Object.defineProperty(as,"__esModule",{value:!0}),as.setAutomine=e;async function e(r,t){r.mode==="ganache"?t?await r.request({method:"miner_start"}):await r.request({method:"miner_stop"}):await r.request({method:"evm_setAutomine",params:[t]})}return as}var os={},H0;function w1(){if(H0)return os;H0=1,Object.defineProperty(os,"__esModule",{value:!0}),os.setBalance=r;const e=W();async function r(t,{address:n,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[n,(0,e.numberToHex)(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[n,(0,e.numberToHex)(a)]})}return os}var is={},$0;function T1(){if($0)return is;$0=1,Object.defineProperty(is,"__esModule",{value:!0}),is.setBlockGasLimit=r;const e=W();async function r(t,{gasLimit:n}){await t.request({method:"evm_setBlockGasLimit",params:[(0,e.numberToHex)(n)]})}return is}var ss={},N0;function A1(){if(N0)return ss;N0=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.setBlockTimestampInterval=e;async function e(r,{interval:t}){const n=r.mode==="hardhat"?t*1e3:t;await r.request({method:`${r.mode}_setBlockTimestampInterval`,params:[n]})}return ss}var us={},D0;function I1(){if(D0)return us;D0=1,Object.defineProperty(us,"__esModule",{value:!0}),us.setCode=e;async function e(r,{address:t,bytecode:n}){await r.request({method:`${r.mode}_setCode`,params:[t,n]})}return us}var cs={},U0;function O1(){if(U0)return cs;U0=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.setCoinbase=e;async function e(r,{address:t}){await r.request({method:`${r.mode}_setCoinbase`,params:[t]})}return cs}var ds={},L0;function S1(){if(L0)return ds;L0=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.setIntervalMining=e;async function e(r,{interval:t}){const n=r.mode==="hardhat"?t*1e3:t;await r.request({method:"evm_setIntervalMining",params:[n]})}return ds}var ls={},z0;function R1(){if(z0)return ls;z0=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.setLoggingEnabled=e;async function e(r,t){await r.request({method:`${r.mode}_setLoggingEnabled`,params:[t]})}return ls}var fs={},G0;function B1(){if(G0)return fs;G0=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.setMinGasPrice=r;const e=W();async function r(t,{gasPrice:n}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[(0,e.numberToHex)(n)]})}return fs}var bs={},V0;function C1(){if(V0)return bs;V0=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.setNextBlockBaseFeePerGas=r;const e=W();async function r(t,{baseFeePerGas:n}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[(0,e.numberToHex)(n)]})}return bs}var ms={},W0;function q1(){if(W0)return ms;W0=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.setNextBlockTimestamp=r;const e=W();async function r(t,{timestamp:n}){await t.request({method:"evm_setNextBlockTimestamp",params:[(0,e.numberToHex)(n)]})}return ms}var gs={},K0;function M1(){if(K0)return gs;K0=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.setNonce=r;const e=W();async function r(t,{address:n,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[n,(0,e.numberToHex)(a)]})}return gs}var ys={},Z0;function F1(){if(Z0)return ys;Z0=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.setRpcUrl=e;async function e(r,t){await r.request({method:`${r.mode}_setRpcUrl`,params:[t]})}return ys}var hs={},Y0;function x1(){if(Y0)return hs;Y0=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.setStorageAt=r;const e=W();async function r(t,{address:n,index:a,value:i}){await t.request({method:`${t.mode}_setStorageAt`,params:[n,typeof a=="number"?(0,e.numberToHex)(a):a,i]})}return hs}var ps={},J0;function k1(){if(J0)return ps;J0=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.snapshot=e;async function e(r){return await r.request({method:"evm_snapshot"})}return ps}var _s={},X0;function H1(){if(X0)return _s;X0=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.stopImpersonatingAccount=e;async function e(r,{address:t}){await r.request({method:`${r.mode}_stopImpersonatingAccount`,params:[t]})}return _s}var Q0;function th(){if(Q0)return Li;Q0=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.testActions=w;const e=c1(),r=d1(),t=l1(),n=f1(),a=b1(),i=m1(),o=g1(),s=y1(),u=h1(),d=p1(),l=_1(),c=v1(),f=E1(),h=j1(),y=P1(),b=w1(),p=T1(),v=A1(),m=
44I1(),E=O1(),g=S1(),_=R1(),j=B1(),P=C1(),A=q1(),T=M1(),S=F1(),B=x1(),F=k1(),O=H1();function w({mode:I}){return M=>{const R=M.extend(()=>({mode:I}));return{dropTransaction:C=>(0,e.dropTransaction)(R,C),dumpState:()=>(0,r.dumpState)(R),getAutomine:()=>(0,t.getAutomine)(R),getTxpoolContent:()=>(0,n.getTxpoolContent)(R),getTxpoolStatus:()=>(0,a.getTxpoolStatus)(R),impersonateAccount:C=>(0,i.impersonateAccount)(R,C),increaseTime:C=>(0,o.increaseTime)(R,C),inspectTxpool:()=>(0,s.inspectTxpool)(R),loadState:C=>(0,u.loadState)(R,C),mine:C=>(0,d.mine)(R,C),removeBlockTimestampInterval:()=>(0,l.removeBlockTimestampInterval)(R),reset:C=>(0,c.reset)(R,C),revert:C=>(0,f.revert)(R,C),sendUnsignedTransaction:C=>(0,h.sendUnsignedTransaction)(R,C),setAutomine:C=>(0,y.setAutomine)(R,C),setBalance:C=>(0,b.setBalance)(R,C),setBlockGasLimit:C=>(0,p.setBlockGasLimit)(R,C),setBlockTimestampInterval:C=>(0,v.setBlockTimestampInterval)(R,C),setCode:C=>(0,m.setCode)(R,C),setCoinbase:C=>(0,E.setCoinbase)(R,C),setIntervalMining:C=>(0,g.setIntervalMining)(R,C),setLoggingEnabled:C=>(0,_.setLoggingEnabled)(R,C),setMinGasPrice:C=>(0,j.setMinGasPrice)(R,C),setNextBlockBaseFeePerGas:C=>(0,P.setNextBlockBaseFeePerGas)(R,C),setNextBlockTimestamp:C=>(0,A.setNextBlockTimestamp)(R,C),setNonce:C=>(0,T.setNonce)(R,C),setRpcUrl:C=>(0,S.setRpcUrl)(R,C),setStorageAt:C=>(0,B.setStorageAt)(R,C),snapshot:()=>(0,F.snapshot)(R),stopImpersonatingAccount:C=>(0,O.stopImpersonatingAccount)(R,C)}}}return Li}var eg;function $1(){if(eg)return Ui;eg=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.createTestClient=t;const e=gu(),r=th();function t(n){const{key:a="test",name:i="Test Client",mode:o}=n;return(0,e.createClient)({...n,key:a,name:i,type:"testClient"}).extend(u=>({mode:o,...(0,r.testActions)({mode:o})(u)}))}return Ui}var vs={},Es={},tg;function N1(){if(tg)return Es;tg=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.addChain=r;const e=W();async function r(t,{chain:n}){const{id:a,name:i,nativeCurrency:o,rpcUrls:s,blockExplorers:u}=n;await t.request({method:"wallet_addEthereumChain",params:[{chainId:(0,e.numberToHex)(a),chainName:i,nativeCurrency:o,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}return Es}var js={},rg;function D1(){if(rg)return js;rg=1,Object.defineProperty(js,"__esModule",{value:!0}),js.deployContract=t;const e=kn(),r=kc();function t(n,a){const{abi:i,args:o,bytecode:s,...u}=a,d=(0,e.encodeDeployData)({abi:i,args:o,bytecode:s});return(0,r.sendTransaction)(n,{...u,data:d})}return js}var Ps={},ng;function U1(){if(ng)return Ps;ng=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.getAddresses=r;const e=ke();async function r(t){return t.account?.type==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(a=>(0,e.checksumAddress)(a))}return Ps}var ws={},ag;function L1(){if(ag)return ws;ag=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.getPermissions=e;async function e(r){return await r.request({method:"wallet_getPermissions"},{dedupe:!0})}return ws}var Ts={},og;function z1(){if(og)return Ts;og=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.requestAddresses=r;const e=ke();async function r(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>(0,e.getAddress)(a))}return Ts}var As={},ig;function G1(){if(ig)return As;ig=1,Object.defineProperty(As,"__esModule",{value:!0}),As.requestPermissions=e;async function e(r,t){return r.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}return As}var Is={},sg;function V1(){if(sg)return Is;sg=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.signMessage=n;const e=qe(),r=bu(),t=W();async function n(a,{account:i=a.account,message:o}){if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const s=(0,e.parseAccount)(i);if(s.signMessage)return s.signMessage({message:o});const u=typeof o=="string"?(0,t.stringToHex)(o):o.raw instanceof Uint8Array?(0,t.toHex)(o.raw):o.raw;return a.request({method:"personal_sign",params:[u,s.address]},{retryCount:0})}return Is}var Os={},ug;function W1(){if(ug)return Os;ug=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.signTransaction=u;const e=qe(),r=bu(),t=mu(),n=W(),a=or(),i=ue(),o=ir(),s=qn();async function u(d,l){const{account:c=d.account,chain:f=d.chain,...h}=l;if(!c)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const y=(0,e.parseAccount)(c);(0,o.assertRequest)({account:y,...l});const b=await(0,i.getAction)(d,s.getChainId,"getChainId")({});f!==null&&(0,t.assertCurrentChain)({currentChainId:b,chain:f});const v=(f?.formatters||d.chain?.formatters)?.transactionRequest?.format||a.formatTransactionRequest;return y.signTransaction?y.signTransaction({...h,chainId:b}
44,{serializer:d.chain?.serializers?.transaction}):await d.request({method:"eth_signTransaction",params:[{...v(h),chainId:(0,n.numberToHex)(b),from:y.address}]},{retryCount:0})}return Os}var Ss={},cg;function K1(){if(cg)return Ss;cg=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.signTypedData=n;const e=qe(),r=bu(),t=hu();async function n(a,i){const{account:o=a.account,domain:s,message:u,primaryType:d}=i;if(!o)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const l=(0,e.parseAccount)(o),c={EIP712Domain:(0,t.getTypesForEIP712Domain)({domain:s}),...i.types};if((0,t.validateTypedData)({domain:s,message:u,primaryType:d,types:c}),l.signTypedData)return l.signTypedData({domain:s,message:u,primaryType:d,types:c});const f=(0,t.serializeTypedData)({domain:s,message:u,primaryType:d,types:c});return a.request({method:"eth_signTypedData_v4",params:[l.address,f]},{retryCount:0})}return Ss}var Rs={},dg;function Z1(){if(dg)return Rs;dg=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.switchChain=r;const e=W();async function r(t,{id:n}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,e.numberToHex)(n)}]},{retryCount:0})}return Rs}var Bs={},lg;function Y1(){if(lg)return Bs;lg=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.watchAsset=e;async function e(r,t){return await r.request({method:"wallet_watchAsset",params:t},{retryCount:0})}return Bs}var fg;function rh(){if(fg)return vs;fg=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.walletActions=p;const e=qn(),r=N1(),t=D1(),n=U1(),a=L1(),i=du(),o=z1(),s=G1(),u=xc(),d=kc(),l=V1(),c=W1(),f=K1(),h=Z1(),y=Y1(),b=gy();function p(v){return{addChain:m=>(0,r.addChain)(v,m),deployContract:m=>(0,t.deployContract)(v,m),getAddresses:()=>(0,n.getAddresses)(v),getChainId:()=>(0,e.getChainId)(v),getPermissions:()=>(0,a.getPermissions)(v),prepareTransactionRequest:m=>(0,i.prepareTransactionRequest)(v,m),requestAddresses:()=>(0,o.requestAddresses)(v),requestPermissions:m=>(0,s.requestPermissions)(v,m),sendRawTransaction:m=>(0,u.sendRawTransaction)(v,m),sendTransaction:m=>(0,d.sendTransaction)(v,m),signMessage:m=>(0,l.signMessage)(v,m),signTransaction:m=>(0,c.signTransaction)(v,m),signTypedData:m=>(0,f.signTypedData)(v,m),switchChain:m=>(0,h.switchChain)(v,m),watchAsset:m=>(0,y.watchAsset)(v,m),writeContract:m=>(0,b.writeContract)(v,m)}}return vs}var Cs={},bg;function J1(){if(bg)return Cs;bg=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.createWalletClient=t;const e=gu(),r=rh();function t(n){const{key:a="wallet",name:i="Wallet Client",transport:o}=n;return(0,e.createClient)({...n,key:a,name:i,transport:o,type:"walletClient"}).extend(r.walletActions)}return Cs}var qs={},mg;function X1(){if(mg)return qs;mg=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.webSocket=i;const e=Je(),r=$c(),t=Sy(),n=Gc(),a=Dn();function i(o,s={}){const{keepAlive:u,key:d="webSocket",name:l="WebSocket JSON-RPC",reconnect:c,retryDelay:f}=s;return({chain:h,retryCount:y,timeout:b})=>{const p=s.retryCount??y,v=b??s.timeout??1e4,m=o||h?.rpcUrls.default.webSocket?.[0];if(!m)throw new r.UrlRequiredError;return(0,a.createTransport)({key:d,name:l,async request({method:E,params:g}){const _={method:E,params:g},j=await(0,n.getWebSocketRpcClient)(m,{keepAlive:u,reconnect:c}),{error:P,result:A}=await j.requestAsync({body:_,timeout:v});if(P)throw new e.RpcRequestError({body:_,error:P,url:m});return A},retryCount:p,retryDelay:f,timeout:v,type:"webSocket"},{getSocket(){return(0,t.getSocket)(m)},getRpcClient(){return(0,n.getWebSocketRpcClient)(m)},async subscribe({params:E,onData:g,onError:_}){const j=await(0,n.getWebSocketRpcClient)(m),{result:P}=await new Promise((A,T)=>j.request({body:{method:"eth_subscribe",params:E},onResponse(S){if(S.error){T(S.error),_?.(S.error);return}if(typeof S.id=="number"){A(S);return}S.method==="eth_subscription"&&g(S.params)}}));return{subscriptionId:P,async unsubscribe(){return new Promise(A=>j.request({body:{method:"eth_unsubscribe",params:[P]},onResponse:A}))}}}})}}return qs}var pt={},gg;
44function Q1(){return gg||(gg=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.zeroAddress=pt.entryPoint07Address=pt.entryPoint06Address=void 0,pt.entryPoint06Address="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",pt.entryPoint07Address="0x0000000071727De22E5E9d8BAf0edAc6f37da032",pt.zeroAddress="0x0000000000000000000000000000000000000000"),pt}var H={},yg;function e_(){return yg||(yg=1,Object.defineProperty(H,"__esModule",{value:!0}),H.minInt144=H.minInt136=H.minInt128=H.minInt120=H.minInt112=H.minInt104=H.minInt96=H.minInt88=H.minInt80=H.minInt72=H.minInt64=H.minInt56=H.minInt48=H.minInt40=H.minInt32=H.minInt24=H.minInt16=H.minInt8=H.maxInt256=H.maxInt248=H.maxInt240=H.maxInt232=H.maxInt224=H.maxInt216=H.maxInt208=H.maxInt200=H.maxInt192=H.maxInt184=H.maxInt176=H.maxInt168=H.maxInt160=H.maxInt152=H.maxInt144=H.maxInt136=H.maxInt128=H.maxInt120=H.maxInt112=H.maxInt104=H.maxInt96=H.maxInt88=H.maxInt80=H.maxInt72=H.maxInt64=H.maxInt56=H.maxInt48=H.maxInt40=H.maxInt32=H.maxInt24=H.maxInt16=H.maxInt8=void 0,H.maxUint256=H.maxUint248=H.maxUint240=H.maxUint232=H.maxUint224=H.maxUint216=H.maxUint208=H.maxUint200=H.maxUint192=H.maxUint184=H.maxUint176=H.maxUint168=H.maxUint160=H.maxUint152=H.maxUint144=H.maxUint136=H.maxUint128=H.maxUint120=H.maxUint112=H.maxUint104=H.maxUint96=H.maxUint88=H.maxUint80=H.maxUint72=H.maxUint64=H.maxUint56=H.maxUint48=H.maxUint40=H.maxUint32=H.maxUint24=H.maxUint16=H.maxUint8=H.minInt256=H.minInt248=H.minInt240=H.minInt232=H.minInt224=H.minInt216=H.minInt208=H.minInt200=H.minInt192=H.minInt184=H.minInt176=H.minInt168=H.minInt160=H.minInt152=void 0,H.maxInt8=2n**(8n-1n)-1n,H.maxInt16=2n**(16n-1n)-1n,H.maxInt24=2n**(24n-1n)-1n,H.maxInt32=2n**(32n-1n)-1n,H.maxInt40=2n**(40n-1n)-1n,H.maxInt48=2n**(48n-1n)-1n,H.maxInt56=2n**(56n-1n)-1n,H.maxInt64=2n**(64n-1n)-1n,H.maxInt72=2n**(72n-1n)-1n,H.maxInt80=2n**(80n-1n)-1n,H.maxInt88=2n**(88n-1n)-1n,H.maxInt96=2n**(96n-1n)-1n,H.maxInt104=2n**(104n-1n)-1n,H.maxInt112=2n**(112n-1n)-1n,H.maxInt120=2n**(120n-1n)-1n,H.maxInt128=2n**(128n-1n)-1n,H.maxInt136=2n**(136n-1n)-1n,H.maxInt144=2n**(144n-1n)-1n,H.maxInt152=2n**(152n-1n)-1n,H.maxInt160=2n**(160n-1n)-1n,H.maxInt168=2n**(168n-1n)-1n,H.maxInt176=2n**(176n-1n)-1n,H.maxInt184=2n**(184n-1n)-1n,H.maxInt192=2n**(192n-1n)-1n,H.maxInt200=2n**(200n-1n)-1n,H.maxInt208=2n**(208n-1n)-1n,H.maxInt216=2n**(216n-1n)-1n,H.maxInt224=2n**(224n-1n)-1n,H.maxInt232=2n**(232n-1n)-1n,H.maxInt240=2n**(240n-1n)-1n,H.maxInt248=2n**(248n-1n)-1n,H.maxInt256=2n**(256n-1n)-1n,H.minInt8=-(2n**(8n-1n)),H.minInt16=-(2n**(16n-1n)),H.minInt24=-(2n**(24n-1n)),H.minInt32=-(2n**(32n-1n)),H.minInt40=-(2n**(40n-1n)),H.minInt48=-(2n**(48n-1n)),H.minInt56=-(2n**(56n-1n)),H.minInt64=-(2n**(64n-1n)),H.minInt72=-(2n**(72n-1n)),H.minInt80=-(2n**(80n-1n)),H.minInt88=-(2n**(88n-1n)),H.minInt96=-(2n**(96n-1n)),H.minInt104=-(2n**(104n-1n)),H.minInt112=-(2n**(112n-1n)),H.minInt120=-(2n**(120n-1n)),H.minInt128=-(2n**(128n-1n)),H.minInt136=-(2n**(136n-1n)),H.minInt144=-(2n**(144n-1n)),H.minInt152=-(2n**(152n-1n)),H.minInt160=-(2n**(160n-1n)),H.minInt168=-(2n**(168n-1n)),H.minInt176=-(2n**(176n-1n)),H.minInt184=-(2n**(184n-1n)),H.minInt192=-(2n**(192n-1n)),H.minInt200=-(2n**(200n-1n)),H.minInt208=-(2n**(208n-1n)),H.minInt216=-(2n**(216n-1n)),H.minInt224=-(2n**(224n-1n)),H.minInt232=-(2n**(232n-1n)),H.minInt240=-(2n**(240n-1n)),H.minInt248=-(2n**(248n-1n)),H.minInt256=-(2n**(256n-1n)),H.maxUint8=2n**8n-1n,H.maxUint16=2n**16n-1n,H.maxUint24=2n**24n-1n,H.maxUint32=2n**32n-1n,H.maxUint40=2n**40n-1n,H.maxUint48=2n**48n-1n,H.maxUint56=2n**56n-1n,H.maxUint64=2n**64n-1n,H.maxUint72=2n**72n-1n,H.maxUint80=2n**80n-1n,H.maxUint88=2n**88n-1n,H.maxUint96=2n**96n-1n,H.maxUint104=2n**104n-1n,H.maxUint112=2n**112n-1n,H.maxUint120=2n**120n-1n,H.maxUint128=2n**128n-1n,H.maxUint136=2n**136n-1n,H.maxUint144=2n**144n-1n,H.maxUint152=2n**152n-1n,H.maxUint160=2n**160n-1n,H.maxUint168=2n**168n-1n,H.maxUint176=2n**176n-1n,H.maxUint184=2n**184n-1n,H.maxUint192=2n**192n-1n,H.maxUint200=2n**200n-1n,H.maxUint208=2n**208n-1n,H.maxUint216=2n**216n-1n,H.maxUint224=2n**224n-1n,H.maxUint232=2n**232n-1n,H.maxUint240=2n**240n-1n,H.maxUint248=2n**248n-1n,H.maxUint256=2n**256n-1n),H}var jn={},hg;function t_(){if(hg)return jn;hg=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.ProviderRpcError=void 0;
44class e extends Error{constructor(t,n){super(n),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=t,this.details=n}}return jn.ProviderRpcError=e,jn}var Ms={},pg;function r_(){if(pg)return Ms;pg=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.decodeDeployData=n;const e=me(),r=Ot(),t="/docs/contract/decodeDeployData";function n(a){const{abi:i,bytecode:o,data:s}=a;if(s===o)return{bytecode:o};const u=i.find(l=>"type"in l&&l.type==="constructor");if(!u)throw new e.AbiConstructorNotFoundError({docsPath:t});if(!("inputs"in u))throw new e.AbiConstructorParamsNotFoundError({docsPath:t});if(!u.inputs||u.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:t});return{args:(0,r.decodeAbiParameters)(u.inputs,`0x${s.replace(o,"")}`),bytecode:o}}return Ms}var Fs={},_g;function n_(){if(_g)return Fs;_g=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.compactSignatureToSignature=t;const e=de(),r=W();function t({r:n,yParityAndS:a}){const i=(0,e.hexToBytes)(a),o=i[0]&128?1:0,s=i;return o===1&&(s[0]&=127),{r:n,s:(0,r.bytesToHex)(s),yParity:o}}return Fs}var xs={},vg;function a_(){if(vg)return xs;vg=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.parseCompactSignature=t;const e=Ln(),r=W();function t(n){const{r:a,s:i}=e.secp256k1.Signature.fromCompact(n.slice(2,130));return{r:(0,r.numberToHex)(a,{size:32}),yParityAndS:(0,r.numberToHex)(i,{size:32})}}return xs}var ks={},Eg;function o_(){if(Eg)return ks;Eg=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.parseSignature=t;const e=Ln(),r=W();function t(n){const{r:a,s:i}=e.secp256k1.Signature.fromCompact(n.slice(2,130)),o=+`0x${n.slice(130)}`,[s,u]=(()=>
44{if(o===0||o===1)return[void 0,o];if(o===27)return[BigInt(o),0];if(o===28)return[BigInt(o),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:(0,r.numberToHex)(a,{size:32}),s:(0,r.numberToHex)(i,{size:32}),v:s,yParity:u}:{r:(0,r.numberToHex)(a,{size:32}),s:(0,r.numberToHex)(i,{size:32}),yParity:u}}return ks}var Hs={},jg;function i_(){if(jg)return Hs;jg=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.recoverTransactionAddress=a;const e=Ae(),r=rd(),t=ad(),n=ur();async function a(i){const{serializedTransaction:o,signature:s}=i,u=(0,r.parseTransaction)(o),d=s??{r:u.r,s:u.s,v:u.v,yParity:u.yParity},l=(0,t.serializeTransaction)({...u,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,n.recoverAddress)({hash:(0,e.keccak256)(l),signature:d})}return Hs}var $s={},Pg;function s_(){if(Pg)return $s;Pg=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.signatureToCompactSignature=t;const e=de(),r=W();function t(n){const{r:a,s:i,v:o,yParity:s}=n,u=Number(s??o-27n);let d=i;if(u===1){const l=(0,e.hexToBytes)(i);l[0]|=128,d=(0,r.bytesToHex)(l)}return{r:a,yParityAndS:d}}return $s}var Ns={},wg;function u_(){if(wg)return Ns;wg=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.serializeCompactSignature=t;const e=Ln(),r=_e();function t({r:n,yParityAndS:a}){return`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(n),(0,r.hexToBigInt)(a)).toCompactHex()}`}return Ns}var Ds={},Tg;function c_(){if(Tg)return Ds;Tg=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.sidecarsToVersionedHashes=r;const e=Oc();function r(t){const{sidecars:n,version:a}=t,i=t.to??(typeof n[0].blob=="string"?"hex":"bytes"),o=[];for(const{commitment:s}of n)o.push((0,e.commitmentToVersionedHash)({commitment:s,to:i,version:a}));return o}return Ds}var Us={},Ag;function d_(){if(Ag)return Us;Ag=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.fromBlobs=n;const e=In(),r=de(),t=W();function n(a){const i=a.to??(typeof a.blobs[0]=="string"?"hex":"bytes"),o=typeof a.blobs[0]=="string"?a.blobs.map(c=>(0,r.hexToBytes)(c)):a.blobs,s=o.reduce((c,f)=>c+f.length,0),u=(0,e.createCursor)(new Uint8Array(s));let d=!0;for(const c of o){const f=(0,e.createCursor)(c);for(;d&&f.position<c.length;){f.incrementPosition(1);let h=31;c.length-f.position<31&&(h=c.length-f.position);for(const y in Array.from({length:h})){const b=f.readByte();if(b===128&&!f.inspectBytes(f.remaining).includes(128)){d=!1;break}u.pushByte(b)}}}const l=u.bytes.slice(0,u.position);return i==="hex"?(0,t.bytesToHex)(l):l}return Us}var Ls={},Ig;function nh(){if(Ig)return Ls;Ig=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.defineKzg=e;function e({blobToKzgCommitment:r,computeBlobKzgProof:t}){return{blobToKzgCommitment:r,computeBlobKzgProof:t}}return Ls}var zs={},Og;function l_(){if(Og)return zs;Og=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.setupKzg=r;const e=nh();function r(t,n){try{t.loadTrustedSetup(n)}catch(a){const i=a;if(!i.message.includes("trusted setup is already loaded"))throw i}return(0,e.defineKzg)(t)}return zs}var Sg;function f_(){return Sg||(Sg=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=e.maxInt8=e.weiUnits=e.gweiUnits=e.etherUnits=e.zeroAddress=e.erc4626Abi=e.erc721Abi=e.erc20Abi_bytes32=e.erc20Abi=e.multicall3Abi=e.webSocket=e.createWalletClient=e.createTransport=e.walletActions=e.testActions=e.publicActions=e.createTestClient=e.createPublicClient=e.http=e.fallback=e.custom=e.rpcSchema=e.createClient=e.getContract=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.UnknownSignatureError=e.UnknownTypeError=e.SolidityProtectedKeywordError=e.InvalidStructSignatureError=e.InvalidSignatureError=e.InvalidParenthesisError=e.InvalidParameterError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.InvalidAbiItemError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=e.CircularReferenceError=void 0,e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=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.max
44Int224=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=void 0,e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingLengthMismatchError=e.AbiEncodingArrayLengthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=e.AbiConstructorNotFoundError=e.presignMessagePrefix=e.zeroHash=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=void 0,e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=e.UserRejectedRequestError=e.UnsupportedProviderMethodError=e.UnknownRpcError=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.ChainDisconnectedError=e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=e.CounterfactualDeploymentFailedError=e.RawContractError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=e.BlockNotFoundError=e.BaseError=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=void 0,e.decodeAbiParameters=e.formatLog=e.formatBlock=e.defineBlock=e.namehash=e.labelhash=e.EIP1193ProviderRpcError=e.StateAssignmentConflictError=e.AccountStateConflictError=e.UrlRequiredError=e.SliceOffsetOutOfBoundsError=e.SizeExceedsPaddingSizeError=e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializedTransactionError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.InvalidAddressError=e.WebSocketRequestError=e.TimeoutError=e.RpcRequestError=e.HttpRequestError=e.FilterTypeNotSupportedError=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.EstimateGasExecutionError=e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarInvalidNftUriError=e.EnsAvatarUriResolutionError=e.SizeOverflowError=e.InvalidHexValueError=e.InvalidHexBooleanError=e.IntegerOutOfRangeError=e.InvalidBytesBooleanError=e.InvalidChainIdError=void 0,e.verifyTypedData=e.verifyMessage=e.verifyHash=e.toRlp=e.hexToRlp=e.bytesToRlp=e.serializeSignature=e.signatureToHex=e.serializeCompactSignature=e.compactSignatureToHex=e.signatureToCompactSignature=e.recoverTypedDataAddress=e.recoverTransactionAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseSignature=e.hexToSignature=e.parseCompactSignature=e.hexToCompactSignature=e.compactSignatureToSignature=e.hashTypedData=e.hashDomain=e.getTransactionType=e.getSerializedTransactionType=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAbiItem=e.rpcTransactionType=e.formatTransactionRequest=e.defineTransactionRequest=e.formatTransactionReceipt=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.parseEventLogs=e.encodeFunctionResult=e.prepareEncodeFunctionData=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeDeployData=void 0,e.formatUnits=e.formatGwei=e.formatEther=e.withTimeout=e.withRetry=e.encodePacked=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.concatHex=e.concatBytes=e.concat=e.setupKzg=e.defineKzg=e.toBlobs=e.toBlobSidecars=e.fromBlobs=e.blobsToProofs=e.sidecarsToVersionedHashes=e.commitmentsToVersionedHashes=e.commitmentToVersionedHash=e.blobsToCommitments=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigInt=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.serializeErc6492Signature=e.isErc6492Signature=e.parseErc6492Signature=void 0,e.nonceManager=e.createNonceManager=e.getTypesForEIP712Domain=e.domainSeparator=e.validateTypedData=e.serializeTypedData=e.trim=e.stringify=e.sliceHex=e.sliceBytes=e.slice=e.size=e.serializeTransaction=e.serializeAccessList=e.parseUnits=e.parseTransaction=e.parseGwei=e.parseEther=e.padHex=e.padBytes=e.pad=e.ripemd160=e.sha256=e.keccak256=e.isHex=e.isHash=e.isBytes=e.isAddressEqual=e.isAddress=e.toPrefixedMessage=e.hashMessage=e.toFunctionHash=e.toEventHash=e.getFunctionSignature=e.toFunctionSignature=e.getEventSignature=e.toEventSignature=e.getFunctionSelector=e.toFunctionSelector=e.getEventSelector=e.toEventSelector=e.getContractError=e.getAddress=e.checksumAddress=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=void 0;var r=Zs();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var t=yp();Object.defineProperty(e,"getContract",{enumerable:!0,get:function(){return t.getContract}});var n=gu();Object.defineProperty(e,"createClient",{enumerable:!0,get:function(){return n.createClient}}),Object.defineProperty(e,"rpcSchema",{enumerable:!0,get:function(){return n.rpcSchema}});var a=pp();Object.defineProperty(e,"custom",{enumerable:!0,get:function(){return a.custom}});var i=_p();Object.defineProperty(e,"fallback",{enumerable:!0,get:function(){return i.fallback}});var o=vp();Object.defineProperty(e,"http",{enumerable:!0,get:function(){return o.http}});var s=u1();Object.defineProperty(e,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var u=$1();Object.defineProperty(e,"createTestClient",{enumerable:!0,get:function(){return u.createTestClient}});var d=eh();Object.defineProperty(e,"publicActions",{enumerable:!0,get:function(){return d.publicActions}});var l=th();Object.defineProperty(e,"testActions",{enumerable:!0,get:function(){return l.testActions}});var c=rh();Object.defineProperty(e,"walletActions",{enumerable:!0,get:function(){return c.walletActions}});var f=Dn();Object.defineProperty(e,"createTransport",{enumerable:!0,get:function(){return f.createTransport}});var h=J1();Object.defineProperty(e,"createWalletClient",{enumerable:!0,get:function(){return h.createWalletClient}});var y=X1();Object.defineProperty(e,"webSocket",{enumerable:!0,get:function(){return y.webSocket}});var b=sr();Object.defineProperty(e,"multicall3Abi",{enumerable:!0,get:function(){return b.multicall3Abi}}),Object.defineProperty(e,"erc20Abi",{enumerable:!0,get:function(){return b.erc20Abi}}),Object.defineProperty(e,"erc20Abi_bytes32",{enumerable:!0,get:function(){return b.erc20Abi_bytes32}}
44),Object.defineProperty(e,"erc721Abi",{enumerable:!0,get:function(){return b.erc721Abi}}),Object.defineProperty(e,"erc4626Abi",{enumerable:!0,get:function(){return b.erc4626Abi}});var p=Q1();Object.defineProperty(e,"zeroAddress",{enumerable:!0,get:function(){return p.zeroAddress}});var v=On();Object.defineProperty(e,"etherUnits",{enumerable:!0,get:function(){return v.etherUnits}}),Object.defineProperty(e,"gweiUnits",{enumerable:!0,get:function(){return v.gweiUnits}}),Object.defineProperty(e,"weiUnits",{enumerable:!0,get:function(){return v.weiUnits}});var m=e_();Object.defineProperty(e,"maxInt8",{enumerable:!0,get:function(){return m.maxInt8}}),Object.defineProperty(e,"maxInt16",{enumerable:!0,get:function(){return m.maxInt16}}),Object.defineProperty(e,"maxInt24",{enumerable:!0,get:function(){return m.maxInt24}}),Object.defineProperty(e,"maxInt32",{enumerable:!0,get:function(){return m.maxInt32}}),Object.defineProperty(e,"maxInt40",{enumerable:!0,get:function(){return m.maxInt40}}),Object.defineProperty(e,"maxInt48",{enumerable:!0,get:function(){return m.maxInt48}}),Object.defineProperty(e,"maxInt56",{enumerable:!0,get:function(){return m.maxInt56}}),Object.defineProperty(e,"maxInt64",{enumerable:!0,get:function(){return m.maxInt64}}),Object.defineProperty(e,"maxInt72",{enumerable:!0,get:function(){return m.maxInt72}}),Object.defineProperty(e,"maxInt80",{enumerable:!0,get:function(){return m.maxInt80}}),Object.defineProperty(e,"maxInt88",{enumerable:!0,get:function(){return m.maxInt88}}),Object.defineProperty(e,"maxInt96",{enumerable:!0,get:function(){return m.maxInt96}}),Object.defineProperty(e,"maxInt104",{enumerable:!0,get:function(){return m.maxInt104}}),Object.defineProperty(e,"maxInt112",{enumerable:!0,get:function(){return m.maxInt112}}),Object.defineProperty(e,"maxInt120",{enumerable:!0,get:function(){return m.maxInt120}}),Object.defineProperty(e,"maxInt128",{enumerable:!0,get:function(){return m.maxInt128}}),Object.defineProperty(e,"maxInt136",{enumerable:!0,get:function(){return m.maxInt136}}),Object.defineProperty(e,"maxInt144",{enumerable:!0,get:function(){return m.maxInt144}}),Object.defineProperty(e,"maxInt152",{enumerable:!0,get:function(){return m.maxInt152}}),Object.defineProperty(e,"maxInt160",{enumerable:!0,get:function(){return m.maxInt160}}),Object.defineProperty(e,"maxInt168",{enumerable:!0,get:function(){return m.maxInt168}}),Object.defineProperty(e,"maxInt176",{enumerable:!0,get:function(){return m.maxInt176}}),Object.defineProperty(e,"maxInt184",{enumerable:!0,get:function(){return m.maxInt184}}),Object.defineProperty(e,"maxInt192",{enumerable:!0,get:function(){return m.maxInt192}}),Object.defineProperty(e,"maxInt200",{enumerable:!0,get:function(){return m.maxInt200}}),Object.defineProperty(e,"maxInt208",{enumerable:!0,get:function(){return m.maxInt208}}),Object.defineProperty(e,"maxInt216",{enumerable:!0,get:function(){return m.maxInt216}}),Object.defineProperty(e,"maxInt224",{enumerable:!0,get:function(){return m.maxInt224}}),Object.defineProperty(e,"maxInt232",{enumerable:!0,get:function(){return m.maxInt232}}),Object.defineProperty(e,"maxInt240",{enumerable:!0,get:function(){return m.maxInt240}}),Object.defineProperty(e,"maxInt248",{enumerable:!0,get:function(){return m.maxInt248}}),Object.defineProperty(e,"maxInt256",{enumerable:!0,get:function(){return m.maxInt256}}),Object.defineProperty(e,"maxUint8",{enumerable:!0,get:function(){return m.maxUint8}}),Object.defineProperty(e,"maxUint16",{enumerable:!0,get:function(){return m.maxUint16}}),Object.defineProperty(e,"maxUint24",{enumerable:!0,get:function(){return m.maxUint24}}),Object.defineProperty(e,"maxUint32",{enumerable:!0,get:function(){return m.maxUint32}}),Object.defineProperty(e,"maxUint40",{enumerable:!0,get:function(){return m.maxUint40}}),Object.defineProperty(e,"maxUint48",{enumerable:!0,get:function(){return m.maxUint48}}),Object.defineProperty(e,"maxUint56",{enumerable:!0,get:function(){return m.maxUint56}}),Object.defineProperty(e,"maxUint64",{enumerable:!0,get:function(){return m.maxUint64}}),Object.defineProperty(e,"maxUint72",{enumerable:!0,get:function(){return m.maxUint72}}),Object.defineProperty(e,"maxUint80",{enumerable:!0,get:function(){return m.maxUint80}}),Object.defineProperty(e,"maxUint88",{enumerable:!0,get:function(){return m.maxUint88}}),Object.defineProperty(e,"maxUint96",{enumerable:!0,get:function(){return m.maxUint96}}),Object.defineProperty(e,"maxUint104",{enumerable:!0,get:function(){return m.maxUint104}}),Object.defineProperty(e,"maxUint112",{enumerable:!0,get:function(){return m.maxUint112}}),Object.defineProperty(e,"maxUint120",{enumerable:!0,get:function(){return m.maxUint120}}),Object.defineProperty(e,"maxUint128",{enumerable:!0,get:function(){return m.maxUint128}}),Object.defineProperty(e,"maxUint136",{enumerable:!0,get:function(){return m.maxUint136}}),Object.defineProperty(e,"maxUint144",{enumerable:!0,get:function(){return m.maxUint144}}),Object.defineProperty(e,"maxUint152",{enumerable:!0,get:function(){return m.maxUint152}}),Object.defineProperty(e,"maxUint160",{enumerable:!0,get:function(){return m.maxUint160}}),Object.defineProperty(e,"maxUint168",{enumerable:!0,get:function(){return m.maxUint168}}),Object.defineProperty(e,"maxUint176",{enumerable:!0,get:function(){return m.maxUint176}}),Object.defineProperty(e,"maxUint184",{enumerable:!0,get:function(){return m.maxUint184}}),Object.defineProperty(e,"maxUint192",{enumerable:!0,get:function(){return m.maxUint192}}),Object.defineProperty(e,"maxUint200",{enumerable:!0,get:function(){return m.maxUint200}}),Object.defineProperty(e,"maxUint208",{enumerable:!0,get:function(){return m.maxUint208}}),Object.defineProperty(e,"maxUint216",{enumerable:!0,get:function(){return m.maxUint216}}),Object.defineProperty(e,"maxUint224",{enumerable:!0,get:function(){return m.maxUint224}}),Object.defineProperty(e,"maxUint232",{enumerable:!0,get:function(){return m.maxUint232}}),Object.defineProperty(e,"maxUint240",{enumerable:!0,get:function(){return m.maxUint240}}),Object.defineProperty(e,"maxUint248",{enumerable:!0,get:function(){return m.maxUint248}}),Object.defineProperty(e,"maxUint256",{enumerable:!0,get:function(){return m.maxUint256}}),Object.defineProperty(e,"minInt8",{enumerable:!0,get:function(){return m.minInt8}}),Object.defineProperty(e,"minInt16",{enumerable:!0,get:function(){return m.minInt16}}),Object.defineProperty(e,"minInt24",{enumerable:!0,get:function(){return m.minInt24}}),Object.defineProperty(e,"minInt32",{enumerable:!0,get:function(){return m.minInt32}}),Object.defineProperty(e,"minInt40",{enumerable:!0,get:function(){return m.minInt40}}),Object.defineProperty(e,"minInt48",{enumerable:!0,get:function(){return m.minInt48}}),Object.defineProperty(e,"minInt56",{enumerable:!0,get:function(){return m.minInt56}}),Object.defineProperty(e,"minInt64",{enumerable:!0,get:function(){return m.minInt64}}),Object.defineProperty(e,"minInt72",{enumerable:!0,get:function(){return m.minInt72}}),Object.defineProperty(e,"minInt80",{enumerable:!0,get:function(){return m.minInt80}}),Object.defineProperty(e,"minInt88",{enumerable:!0,get:function(){return m.minInt88}}),Object.defineProperty(e,"minInt96",{enumerable:!0,get:function(){return m.minInt96}}),Object.defineProperty(e,"minInt104",{enumerable:!0,get:function(){return m.minInt104}}),Object.defineProperty(e,"minInt112",{enumerable:!0,get:function(){return m.minInt112}}),Object.defineProperty(e,"minInt120",{enumerable:!0,get:function(){return m.minInt120}}),Object.defineProperty(e,"minInt128",{enumerable:!0,get:function(){return m.minInt128}}),Object.defineProperty(e,"minInt136",{enumerable:!0,get:function(){return m.minInt136}}),Object.defineProperty(e,"minInt144",{enumerable:!0,get:function(){return m.minInt144}}),Object.defineProperty(e,"minInt152",{enumerable:!0,get:function(){return m.minInt152}}),Object.defineProperty(e,"minInt160",{enumerable:!0,get:function(){return m.minInt160}}),Object.defineProperty(e,"minInt168",{enumerable:!0,get:function(){return m.minInt168}}),Object.defineProperty(e,"minInt176",{enumerable:!0,get:function(){return m.minInt176}}),Object.defineProperty(e,"minInt184",{enumerable:!0,get:function(){return m.minInt184}}),Object.defineProperty(e,"minInt192",{enumerable:!0,get:function(){return m.minInt192}}),Object.defineProperty(e,"minInt200",{enumerable:!0,get:function(){return m.minInt200}}),Object.defineProperty(e,"minInt208",{enumerable:!0,get:function(){return m.minInt208}}),Object.defineProperty(e,"minInt216",{enumerable:!0,get:function(){return m.minInt216}}),Object.defineProperty(e,"minInt224",{enumerable:!0,get:function(){return m.minInt224}}),Object.defineProperty(e,"minInt232",{enumerable:!0,get:function(){return m.minInt232}}),Object.defineProperty(e,"minInt240",{enumerable:!0,get:function(){return m.minInt240}}),Object.defineProperty(e,"minInt248",{enumerable:!0,get:function(){return m.minInt248}}),Object.defineProperty(e,"minInt256",{enumerable:!0,get:function(){return m.minInt256}});var E=Qc();Object.defineProperty(e,"zeroHash",{enumerable:!0,get:function(){return E.zeroHash}});var g=Uy();Object.defineProperty(e,"presignMessagePrefix",{enumerable:!0,get:function(){return g.presignMessagePrefix}});var _=me();Object.defineProperty(e,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorNotFoundError}}),Object.defineProperty(e,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorParamsNotFoundError}}),Object.defineProperty(e,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(e,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(e,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return _.AbiDecodingZeroDataError}}
44),Object.defineProperty(e,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(e,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorInputsNotFoundError}}),Object.defineProperty(e,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorNotFoundError}}),Object.defineProperty(e,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorSignatureNotFoundError}}),Object.defineProperty(e,"AbiEventNotFoundError",{enumerable:!0,get:function(){return _.AbiEventNotFoundError}}),Object.defineProperty(e,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return _.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(e,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiEventSignatureNotFoundError}}),Object.defineProperty(e,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionNotFoundError}}),Object.defineProperty(e,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(e,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(e,"BytesSizeMismatchError",{enumerable:!0,get:function(){return _.BytesSizeMismatchError}}),Object.defineProperty(e,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return _.DecodeLogDataMismatch}}),Object.defineProperty(e,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return _.DecodeLogTopicsMismatch}}),Object.defineProperty(e,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiDecodingTypeError}}),Object.defineProperty(e,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiEncodingTypeError}}),Object.defineProperty(e,"InvalidArrayError",{enumerable:!0,get:function(){return _.InvalidArrayError}}),Object.defineProperty(e,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return _.InvalidDefinitionTypeError}}),Object.defineProperty(e,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return _.UnsupportedPackedAbiType}});var j=ne();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return j.BaseError}});var P=wc();Object.defineProperty(e,"BlockNotFoundError",{enumerable:!0,get:function(){return P.BlockNotFoundError}});var A=rr();Object.defineProperty(e,"CallExecutionError",{enumerable:!0,get:function(){return A.CallExecutionError}}),Object.defineProperty(e,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return A.ContractFunctionExecutionError}}),Object.defineProperty(e,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return A.ContractFunctionRevertedError}}),Object.defineProperty(e,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return A.ContractFunctionZeroDataError}}),Object.defineProperty(e,"RawContractError",{enumerable:!0,get:function(){return A.RawContractError}}),Object.defineProperty(e,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return A.CounterfactualDeploymentFailedError}});var T=au();Object.defineProperty(e,"BaseFeeScalarError",{enumerable:!0,get:function(){return T.BaseFeeScalarError}}),Object.defineProperty(e,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return T.Eip1559FeesNotSupportedError}}),Object.defineProperty(e,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return T.MaxFeePerGasTooLowError}});var S=nr();Object.defineProperty(e,"ChainDisconnectedError",{enumerable:!0,get:function(){return S.ChainDisconnectedError}}),Object.defineProperty(e,"InternalRpcError",{enumerable:!0,get:function(){return S.InternalRpcError}}),Object.defineProperty(e,"InvalidInputRpcError",{enumerable:!0,get:function(){return S.InvalidInputRpcError}}),Object.defineProperty(e,"InvalidParamsRpcError",{enumerable:!0,get:function(){return S.InvalidParamsRpcError}}),Object.defineProperty(e,"InvalidRequestRpcError",{enumerable:!0,get:function(){return S.InvalidRequestRpcError}}),Object.defineProperty(e,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return S.JsonRpcVersionUnsupportedError}}),Object.defineProperty(e,"LimitExceededRpcError",{enumerable:!0,get:function(){return S.LimitExceededRpcError}}),Object.defineProperty(e,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return S.MethodNotFoundRpcError}}),Object.defineProperty(e,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return S.MethodNotSupportedRpcError}}),Object.defineProperty(e,"ParseRpcError",{enumerable:!0,get:function(){return S.ParseRpcError}}),Object.defineProperty(e,"ProviderDisconnectedError",{enumerable:!0,get:function(){return S.ProviderDisconnectedError}}),Object.defineProperty(e,"ProviderRpcError",{enumerable:!0,get:function(){return S.ProviderRpcError}}),Object.defineProperty(e,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return S.ResourceNotFoundRpcError}}),Object.defineProperty(e,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return S.ResourceUnavailableRpcError}}),Object.defineProperty(e,"RpcError",{enumerable:!0,get:function(){return S.RpcError}}),Object.defineProperty(e,"SwitchChainError",{enumerable:!0,get:function(){return S.SwitchChainError}}),Object.defineProperty(e,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return S.TransactionRejectedRpcError}}),Object.defineProperty(e,"UnauthorizedProviderError",{enumerable:!0,get:function(){return S.UnauthorizedProviderError}}),Object.defineProperty(e,"UnknownRpcError",{enumerable:!0,get:function(){return S.UnknownRpcError}}),Object.defineProperty(e,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return S.UnsupportedProviderMethodError}}),Object.defineProperty(e,"UserRejectedRequestError",{enumerable:!0,get:function(){return S.UserRejectedRequestError}});var B=xn();Object.defineProperty(e,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return B.ChainDoesNotSupportContract}}),Object.defineProperty(e,"ChainMismatchError",{enumerable:!0,get:function(){return B.ChainMismatchError}}),Object.defineProperty(e,"ChainNotFoundError",{enumerable:!0,get:function(){return B.ChainNotFoundError}}),Object.defineProperty(e,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return B.ClientChainNotConfiguredError}}),Object.defineProperty(e,"InvalidChainIdError",{enumerable:!0,get:function(){return B.InvalidChainIdError}});var F=Tn();Object.defineProperty(e,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return F.InvalidBytesBooleanError}}),Object.defineProperty(e,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return F.IntegerOutOfRangeError}}),Object.defineProperty(e,"InvalidHexBooleanError",{enumerable:!0,get:function(){return F.InvalidHexBooleanError}}),Object.defineProperty(e,"InvalidHexValueError",{enumerable:!0,get:function(){return F.InvalidHexValueError}}),Object.defineProperty(e,"SizeOverflowError",{enumerable:!0,get:function(){return F.SizeOverflowError}});var O=Ey();Object.defineProperty(e,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return O.EnsAvatarUriResolutionError}}),Object.defineProperty(e,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return O.EnsAvatarInvalidNftUriError}}),Object.defineProperty(e,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return O.EnsAvatarUnsupportedNamespaceError}});var w=Qg();Object.defineProperty(e,"EstimateGasExecutionError",{enumerable:!0,get:function(){return w.EstimateGasExecutionError}});var I=ar();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 M=Zg();Object.defineProperty(e,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return M.FilterTypeNotSupportedError}});var R=Je();Object.defineProperty(e,"HttpRequestError",{enumerable:!0,get:function(){return R.HttpRequestError}}),Object.defineProperty(e,"RpcRequestError",{enumerable:!0,get:function(){return R.RpcRequestError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return R.TimeoutError}}),Object.defineProperty(e,"WebSocketRequestError",{enumerable:!0,get:function(){return R.WebSocketRequestError}});var C=Ge();Object.defineProperty(e,"InvalidAddressError",{enumerable:!0,get:function(){return C.InvalidAddressError}});var q=Me();
44Object.defineProperty(e,"FeeConflictError",{enumerable:!0,get:function(){return q.FeeConflictError}}),Object.defineProperty(e,"InvalidLegacyVError",{enumerable:!0,get:function(){return q.InvalidLegacyVError}}),Object.defineProperty(e,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return q.InvalidSerializableTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return q.InvalidSerializedTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return q.InvalidSerializedTransactionTypeError}}),Object.defineProperty(e,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return q.InvalidStorageKeySizeError}}),Object.defineProperty(e,"TransactionExecutionError",{enumerable:!0,get:function(){return q.TransactionExecutionError}}),Object.defineProperty(e,"TransactionNotFoundError",{enumerable:!0,get:function(){return q.TransactionNotFoundError}}),Object.defineProperty(e,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return q.TransactionReceiptNotFoundError}}),Object.defineProperty(e,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return q.WaitForTransactionReceiptTimeoutError}});var x=Js();Object.defineProperty(e,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return x.SizeExceedsPaddingSizeError}}),Object.defineProperty(e,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return x.SliceOffsetOutOfBoundsError}});var k=$c();Object.defineProperty(e,"UrlRequiredError",{enumerable:!0,get:function(){return k.UrlRequiredError}});var $=Pc();Object.defineProperty(e,"AccountStateConflictError",{enumerable:!0,get:function(){return $.AccountStateConflictError}}),Object.defineProperty(e,"StateAssignmentConflictError",{enumerable:!0,get:function(){return $.StateAssignmentConflictError}});var U=t_();Object.defineProperty(e,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return U.ProviderRpcError}});var z=vy();Object.defineProperty(e,"labelhash",{enumerable:!0,get:function(){return z.labelhash}});var L=Lc();Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return L.namehash}});var G=ou();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return G.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return G.formatBlock}});var Z=St();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return Z.formatLog}});var Y=Ot();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return Y.decodeAbiParameters}});var K=r_();Object.defineProperty(e,"decodeDeployData",{enumerable:!0,get:function(){return K.decodeDeployData}});var ie=tu();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return ie.decodeErrorResult}});var oe=Mn();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return oe.decodeEventLog}});var ce=Ry();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return ce.decodeFunctionData}});var V=Rt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return V.decodeFunctionResult}});var D=We();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return D.encodeAbiParameters}});var N=kn();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return N.encodeDeployData}});var re=By();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return re.encodeErrorResult}});var X=er();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return X.encodeEventTopics}});var ae=Ye();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return ae.encodeFunctionData}});var le=Yg();Object.defineProperty(e,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return le.prepareEncodeFunctionData}});var ge=Cy();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return ge.encodeFunctionResult}});var he=Fn();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return he.parseEventLogs}});var pe=Cn();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return pe.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return pe.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return pe.transactionType}});var ve=Wc();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return ve.defineTransactionReceipt}}),Object.defineProperty(e,"formatTransactionReceipt",{enumerable:!0,get:function(){return ve.formatTransactionReceipt}});var He=or();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return He.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return He.formatTransactionRequest}}),Object.defineProperty(e,"rpcTransactionType",{enumerable:!0,get:function(){return He.rpcTransactionType}});var Fe=Ze();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return Fe.getAbiItem}});var Xe=Fy();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return Xe.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return Xe.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return Xe.getCreateAddress}});var xe=td();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return xe.getSerializedTransactionType}});var $e=cu();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return $e.getTransactionType}});var jt=Un();Object.defineProperty(e,"hashDomain",{enumerable:!0,get:function(){return jt.hashDomain}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return jt.hashTypedData}
44});var Pe=n_();Object.defineProperty(e,"compactSignatureToSignature",{enumerable:!0,get:function(){return Pe.compactSignatureToSignature}});var Ne=a_();Object.defineProperty(e,"hexToCompactSignature",{enumerable:!0,get:function(){return Ne.parseCompactSignature}}),Object.defineProperty(e,"parseCompactSignature",{enumerable:!0,get:function(){return Ne.parseCompactSignature}});var Qe=o_();Object.defineProperty(e,"hexToSignature",{enumerable:!0,get:function(){return Qe.parseSignature}}),Object.defineProperty(e,"parseSignature",{enumerable:!0,get:function(){return Qe.parseSignature}});var cr=ur();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return cr.recoverAddress}});var dr=Jc();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return dr.recoverMessageAddress}});var Pu=Yc();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return Pu.recoverPublicKey}});var wu=i_();Object.defineProperty(e,"recoverTransactionAddress",{enumerable:!0,get:function(){return wu.recoverTransactionAddress}});var Tu=Xc();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return Tu.recoverTypedDataAddress}});var Au=s_();Object.defineProperty(e,"signatureToCompactSignature",{enumerable:!0,get:function(){return Au.signatureToCompactSignature}});var Gn=u_();Object.defineProperty(e,"compactSignatureToHex",{enumerable:!0,get:function(){return Gn.serializeCompactSignature}}),Object.defineProperty(e,"serializeCompactSignature",{enumerable:!0,get:function(){return Gn.serializeCompactSignature}});var Vn=Xy();Object.defineProperty(e,"signatureToHex",{enumerable:!0,get:function(){return Vn.serializeSignature}}),Object.defineProperty(e,"serializeSignature",{enumerable:!0,get:function(){return Vn.serializeSignature}});var Br=pu();Object.defineProperty(e,"bytesToRlp",{enumerable:!0,get:function(){return Br.bytesToRlp}}),Object.defineProperty(e,"hexToRlp",{enumerable:!0,get:function(){return Br.hexToRlp}}),Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return Br.toRlp}});var Iu=zy();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return Iu.verifyHash}});var Ou=Gy();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return Ou.verifyMessage}});var Su=Vy();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return Su.verifyTypedData}});var Ru=Wy();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return Ru.parseErc6492Signature}});var Bu=vu();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return Bu.isErc6492Signature}});var Cu=ed();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return Cu.serializeErc6492Signature}});var qu=ir();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return qu.assertRequest}});var Cr=Eu();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Cr.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Cr.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return Cr.assertTransactionLegacy}});var Ct=de();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Ct.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Ct.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Ct.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Ct.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Ct.toBytes}});var qt=W();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return qt.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return qt.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return qt.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return qt.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return qt.toHex}});var et=jc();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return et.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return et.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return et.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return et.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return et.fromBytes}});var Mt=Mc();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return Mt.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return Mt.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return Mt.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return Mt.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return Mt.offchainLookupSignature}});var Mu=iu();Object.defineProperty(e,"blobsToCommitments",{enumerable:!0,get:function(){return Mu.blobsToCommitments}});var Fu=Oc();Object.defineProperty(e,"commitmentToVersionedHash",{enumerable:!0,get:function(){return Fu.commitmentToVersionedHash}});var xu=Sc();Object.defineProperty(e,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return xu.commitmentsToVersionedHashes}});var ku=c_();Object.defineProperty(e,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return ku.sidecarsToVersionedHashes}});var Hu=su();Object.defineProperty(e,"blobsToProofs",{enumerable:!0,get:function(){return Hu.blobsToProofs}});var $u=d_();Object.defineProperty(e,"fromBlobs",{enumerable:!0,get:function(){return $u.fromBlobs}});var Nu=uu();Object.defineProperty(e,"toBlobSidecars",{enumerable:!0,get:function(){return Nu.toBlobSidecars}});var Du=uy();Object.defineProperty(e,"toBlobs",{enumerable:!0,get:function(){return Du.toBlobs}});var Wn=nh();Object.defineProperty(e,"defineKzg",{enumerable:!0,get:function(){return Wn.defineKzg}});var sh=l_();Object.defineProperty(e,"setupKzg",{enumerable:!0,get:function(){return sh.setupKzg}});var Uu=Ie();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return Uu.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return Uu.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return Uu.concatHex}});var uh=mu();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return uh.assertCurrentChain}});var ch=Ay();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return ch.defineChain}});var dh=Iy();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return dh.extractChain}});var lh=Bt();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return lh.getChainContractAddress}});var fh=qy();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return fh.encodePacked}});var bh=Hc();Object.defineProperty(e,"withRetry",{enumerable:!0,get:function(){return bh.withRetry}});var mh=Nc();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return mh.withTimeout}});var gh=Sn();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return gh.formatEther}});var yh=tr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return yh.formatGwei}});var hh=ru();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return hh.formatUnits}});var qr=_e();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return qr.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return qr.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return qr.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return qr.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return qr.hexToString}});var ph=Kc();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return ph.fromRlp}});var sd=ke();Object.defineProperty(e,"checksumAddress",{enumerable:!0,get:function(){return sd.checksumAddress}}),Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return sd.getAddress}});var _h=Or();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return _h.getContractError}});var ud=An();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return ud.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return ud.toEventSelector}});var cd=Qt();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return cd.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return cd.toFunctionSelector}});var dd=xy();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return dd.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return dd.toEventSignature}});var ld=ky();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return ld.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return ld.toFunctionSignature}});var vh=Hy();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return vh.toEventHash}});var Eh=$y();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return Eh.toFunctionHash}});var jh=zn();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return jh.hashMessage}});var Ph=Ly();Object.defineProperty(e,"toPrefixedMessage",{enumerable:!0,get:function(){return Ph.toPrefixedMessage}});var wh=Ce();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return wh.isAddress}});var Th=vt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return Th.isAddressEqual}});var Ah=Vc();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return Ah.isBytes}});var Ih=Zc();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return Ih.isHash}});var Oh=je();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return Oh.isHex}});var Sh=Ae();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return Sh.keccak256}});var Rh=Ic();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Rh.sha256}});var Bh=Ny();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return Bh.ripemd160}});var Lu=At();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return Lu.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return Lu.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return Lu.padHex}});var Ch=Ky();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return Ch.parseEther}});var qh=Zy();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return qh.parseGwei}});var Mh=rd();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return Mh.parseTransaction}});var Fh=ju();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return Fh.parseUnits}});var xh=nd();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return xh.serializeAccessList}});var kh=ad();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return kh.serializeTransaction}});var Hh=Be();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return Hh.size}}
44);var zu=Ve();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return zu.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return zu.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return zu.sliceHex}});var $h=Te();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return $h.stringify}});var Nh=It();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return Nh.trim}});var Kn=hu();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return Kn.serializeTypedData}}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return Kn.validateTypedData}}),Object.defineProperty(e,"domainSeparator",{enumerable:!0,get:function(){return Kn.domainSeparator}}),Object.defineProperty(e,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return Kn.getTypesForEIP712Domain}});var fd=Yy();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return fd.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return fd.nonceManager}})})(Zu)),Zu}var Kt={},Rg;function b_(){if(Rg)return Kt;Rg=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.MAGIC_VALUE_BYTES=Kt.MAGIC_VALUE=void 0;const e="0x1626ba7e";Kt.MAGIC_VALUE=e;const r="0x20c13b0b";return Kt.MAGIC_VALUE_BYTES=r,Kt}var Gs={},Pn={},Zt={},Bg;function ah(){if(Bg)return Zt;Bg=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.PermissionsError=Zt.PERMISSIONS_REQUEST_REJECTED=void 0,Zt.PERMISSIONS_REQUEST_REJECTED=4001;class e extends Error{constructor(t,n,a){super(t),this.code=n,this.data=a,Object.setPrototypeOf(this,e.prototype)}}return Zt.PermissionsError=e,Zt}var Cg;function oh(){if(Cg)return Pn;Cg=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.Wallet=void 0;const e=Xt(),r=ah();class t{constructor(a){this.communicator=a}async getPermissions(){return(await this.communicator.send(e.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(a){if(!this.isPermissionRequestValid(a))throw new r.PermissionsError("Permissions request is invalid",r.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(e.Methods.wallet_requestPermissions,a)).data}catch{throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(a){return a.every(i=>typeof i=="object"?Object.keys(i).every(o=>!!Object.values(e.RestrictedMethods).includes(o)):!1)}}return Pn.Wallet=t,Pn}var qg;function m_(){if(qg)return Gs;qg=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=oh(),r=ah(),t=(a,i)=>i.some(o=>o.parentCapability===a),n=()=>(a,i,o)=>{const s=o.value;return o.value=async function(){const u=new e.Wallet(this.communicator);let d=await u.getPermissions();if(t(i,d)||(d=await u.requestPermissions([{[i]:{}}])),!t(i,d))throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED);return s.apply(this)},o};return Gs.default=n,Gs}var Mg;function g_(){if(Mg)return rt;Mg=1;var e=rt&&rt.__decorate||function(d,l,c,f){var h=arguments.length,y=h<3?l:f===null?f=Object.getOwnPropertyDescriptor(l,c):f,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(d,l,c,f);else for(var p=d.length-1;p>=0;p--)(b=d[p])&&(y=(h<3?b(y):h>3?b(l,c,y):b(l,c))||y);return h>3&&y&&Object.defineProperty(l,c,y),y},r=rt&&rt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(rt,"__esModule",{value:!0}),rt.Safe=void 0;const t=f_(),n=b_(),a=Xt(),i=hc(),o=yc(),s=r(m_());class u{constructor(l){this.communicator=l}async getChainInfo(){return(await this.communicator.send(a.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(a.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:l="usd"}={}){return(await this.communicator.send(a.Methods.getSafeBalances,{currency:l})).data}async check1271Signature(l,c="0x"){const f=await this.getInfo(),h=(0,t.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,c]}),y={call:i.RPC_CALLS.eth_call,params:[{to:f.safeAddress,data:h},"latest"]};try{return(await this.communicator.send(a.Methods.rpcCall,y)).data.slice(0,10).toLowerCase()===n.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(l,c="0x"){const f=await this.getInfo(),h=(0,t.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,c]}),y={call:i.RPC_CALLS.eth_call,params:[{to:f.safeAddress,data:h},"latest"]};try{return(await this.communicator.send(a.Methods.rpcCall,y)).data.slice(0,10).toLowerCase()===n.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(l){return(0,t.hashMessage)(l)}calculateTypedMessageHash(l){const c=typeof l.domain.chainId=="object"?l.domain.chainId.toNumber():Number(l.domain.chainId);let f=l.primaryType;if(!f){const h=Object.values(l.types),y=Object.keys(l.types).filter(b=>h.every(p=>p.every(({type:v})=>v.replace("[","").replace("]","")!==b)));if(y.length===0||y.length>1)throw new Error("Please specify primaryType");f=y[0]}return(0,t.hashTypedData)({message:l.message,domain:{...l.domain,chainId:c,verifyingContract:l.domain.verifyingContract,salt:l.domain.salt},types:l.types,primaryType:f})}async getOffChainSignature(l){return(await this.communicator.send(a.Methods.getOffChainSignature,l)).data}async isMessageSigned(l,c="0x"){let f;if(typeof l=="string"&&(f=async()=>{const h=this.calculateMessageHash(l);return await this.isMessageHashSigned(h,c)}),(0,o.isObjectEIP712TypedData)(l)&&(f=async()=>{const h=this.calculateTypedMessageHash(l);return await this.isMessageHashSigned(h,c)}),f)return await f();throw new Error("Invalid message type")}async isMessageHashSigned(l,c="0x"){const f=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const h of f)if(await h(l,c))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(a.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(a.Methods.requestAddressBook,void 0)).data}}return rt.Safe=u,e([(0,s.default)()],u.prototype,"requestAddressBook",null),rt}var Fg;function xg(){if(Fg)return lr;Fg=1;var e=lr&&lr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};
44Object.defineProperty(lr,"__esModule",{value:!0});const r=e(Kh()),t=Qh(),n=ep(),a=g_(),i=oh();class o{constructor(u={}){const{allowedDomains:d=null,debug:l=!1}=u;this.communicator=new r.default(d,l),this.eth=new n.Eth(this.communicator),this.txs=new t.TXs(this.communicator),this.safe=new a.Safe(this.communicator),this.wallet=new i.Wallet(this.communicator)}}return lr.default=o,lr}var kg;function y_(){return kg||(kg=1,(function(e){var r=tt&&tt.__createBinding||(Object.create?(function(o,s,u,d){d===void 0&&(d=u);var l=Object.getOwnPropertyDescriptor(s,u);(!l||("get"in l?!s.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,d,l)}):(function(o,s,u,d){d===void 0&&(d=u),o[d]=s[u]})),t=tt&&tt.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&r(s,o,u)},n=tt&&tt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const a=n(xg());e.default=a.default,t(xg(),e),t(yc(),e),t(Xt(),e),t(Lg(),e);var i=Ug();Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return i.getSDKVersion}}),t(hc(),e)})(tt)),tt}var Yt={},Hg;function h_(){if(Hg)return Yt;Hg=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.numberToHex=Yt.getLowerCase=void 0;function e(t){return t&&t.toLowerCase()}Yt.getLowerCase=e;function r(t){return`0x${t.toString(16)}`}return Yt.numberToHex=r,Yt}var $g;function p_(){if($g)return Mr;$g=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.SafeAppProvider=void 0;const e=y_(),r=Uh(),t=h_();class n extends r.EventEmitter{constructor(i,o){super(),this.submittedTxs=new Map,this.safe=i,this.sdk=o}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(i){const{method:o,params:s=[]}=i;switch(o){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,t.numberToHex)(this.chainId);case"personal_sign":{const[f,h]=s;if(this.safe.safeAddress.toLowerCase()!==h.toLowerCase())throw new Error("The address or message hash is invalid");const y=await this.sdk.txs.signMessage(f);return("signature"in y?y.signature:void 0)||"0x"}case"eth_sign":{const[f,h]=s;if(this.safe.safeAddress.toLowerCase()!==f.toLowerCase()||!h.startsWith("0x"))throw new Error("The address or message hash is invalid");const y=await this.sdk.txs.signMessage(h);return("signature"in y?y.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[f,h]=s,y=typeof h=="string"?JSON.parse(h):h;if(this.safe.safeAddress.toLowerCase()!==f.toLowerCase())throw new Error("The address is invalid");const b=await this.sdk.txs.signTypedMessage(y);return("signature"in b?b.signature:void 0)||"0x"}case"eth_sendTransaction":const u={...s[0],value:s[0].value||"0",data:s[0].data||"0x"};typeof u.gas=="string"&&u.gas.startsWith("0x")&&(u.gas=parseInt(u.gas,16));const d=await this.sdk.txs.send({txs:[u],params:{safeTxGas:u.gas}});return this.submittedTxs.set(d.safeTxHash,{from:this.safe.safeAddress,hash:d.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:u.data,value:u.value,to:u.to,blockHash:null,blockNumber:null,transactionIndex:null}),d.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,t.getLowerCase)(s[0]),s[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,t.getLowerCase)(s[0]),s[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,t.getLowerCase)(s[0]),s[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,t.getLowerCase)(s[0]),s[1],s[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([s[0],s[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([s[0],s[1]]);case"eth_getTransactionByHash":let c=s[0];try{c=(await this.sdk.txs.getBySafeTxHash(c)).txHash||c}catch{}return this.submittedTxs.has(c)?this.submittedTxs.get(c):this.sdk.eth.getTransactionByHash([c]).then(f=>(f&&(f.hash=s[0]),f));case"eth_getTransactionReceipt":{let f=s[0];try{f=(await this.sdk.txs.getBySafeTxHash(f)).txHash||f}catch{}return this.sdk.eth.getTransactionReceipt([f]).then(h=>(h&&(h.transactionHash=s[0]),h))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(s[0]);case"eth_call":return this.sdk.eth.call([s[0],s[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([s[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(s[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([s[0]]);case"wallet_sendCalls":{const{from:f,calls:h,chainId:y}=s[0];if(y!==(0,t.numberToHex)(this.chainId))throw new Error(`Safe is not on chain ${y}`);if(f!==this.safe.safeAddress)throw Error("Invalid from address");const b=h.map((m,E)=>{if(!m.to)throw new Error(`Invalid call #${E}: missing "to" field`);return{to:m.to,data:m.data??"0x",value:m.value??(0,t.numberToHex)(0)}}),{safeTxHash:p}=await this.sdk.txs.send({txs:b});return{id:p}}case"wallet_getCallsStatus":{const f=s[0],h={[e.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[e.TransactionStatus.AWAITING_EXECUTION]:100,[e.TransactionStatus.SUCCESS]:200,[e.TransactionStatus.CANCELLED]:400,[e.TransactionStatus.FAILED]:500},y=await this.sdk.txs.getBySafeTxHash(f),b={version:"1.0",id:f,chainId:(0,t.numberToHex)(this.chainId),status:h[y.txStatus]};if(!y.txHash)return b;const p=await this.sdk.eth.getTransactionReceipt([y.txHash]);if(!p)return b;const v=y.txData?.dataDecoded?.method!=="multiSend"?1:y.txData.dataDecoded.parameters?.[0].valueDecoded?.length??1,m=Number(p.blockNumber),E=Number(p.gasUsed);return b.receipts=Array(v).fill({logs:p.logs,status:(0,t.numberToHex)(y.txStatus===e.TransactionStatus.SUCCESS?1:0),blockHash:p.blockHash,blockNumber:(0,t.numberToHex)(m),gasUsed:(0,t.numberToHex)(E),transactionHash:y.txHash}),b}case"wallet_showCallsStatus":throw new Error(`"${i.method}" not supported`);case"wallet_getCapabilities":return{[(0,t.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}
44}};default:throw Error(`"${i.method}" not implemented`)}}send(i,o){i||o("Undefined request"),this.request(i).then(s=>o(null,{jsonrpc:"2.0",id:i.id,result:s})).catch(s=>o(s,null))}}return Mr.SafeAppProvider=n,Mr}var Ng;function __(){return Ng||(Ng=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var r=p_();Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return r.SafeAppProvider}})})(Gu)),Gu}var ih=__();const v_=Lh(ih),A_=Vh({__proto__:null,default:v_},[ih]);export{A_ 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.