@ottocode/openclaw-setu 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-0e073jst.mjs +1 -0
- package/dist/chunk-0r9ndr0p.mjs +1 -0
- package/dist/{chunk-jrrt57tv.js → chunk-2pmp70f4.mjs} +5 -6
- package/dist/chunk-3nfjvdhd.mjs +7 -0
- package/dist/chunk-86peddhn.mjs +3 -0
- package/dist/chunk-enz73nmb.mjs +2 -0
- package/dist/chunk-fr00qq96.mjs +2 -0
- package/dist/chunk-fzrjrk1b.mjs +1 -0
- package/dist/chunk-gr14hnnm.mjs +4 -0
- package/dist/chunk-k1btvkaq.mjs +2 -0
- package/dist/chunk-kvpwet74.mjs +1 -0
- package/dist/chunk-kyajbpp1.mjs +1 -0
- package/dist/chunk-nj01dc2r.mjs +1 -0
- package/dist/chunk-r76z42nm.mjs +2 -0
- package/dist/chunk-vw7de3g2.mjs +119 -0
- package/dist/chunk-w1g9nypz.mjs +2 -0
- package/dist/{cli.js → cli.mjs} +6 -7
- package/dist/index.mjs +3 -0
- package/package.json +5 -5
- package/dist/chunk-5kkvddc1.js +0 -4
- package/dist/chunk-8pp4as02.js +0 -2
- package/dist/chunk-by6w3tsf.js +0 -3
- package/dist/chunk-e5qz2vx5.js +0 -2
- package/dist/chunk-esz88g73.js +0 -3
- package/dist/chunk-fc5rfx0b.js +0 -3
- package/dist/chunk-g3ma3sec.js +0 -2
- package/dist/chunk-gtxg1zc6.js +0 -2
- package/dist/chunk-h29x1xqe.js +0 -108
- package/dist/chunk-kn2k3qtn.js +0 -3
- package/dist/chunk-m44tyrbv.js +0 -2
- package/dist/chunk-mbth668g.js +0 -2
- package/dist/chunk-rcdyanw7.js +0 -2
- package/dist/chunk-zy3raqnk.js +0 -3
- package/dist/index.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Oc as a,Pc as b,Qc as c,Rc as d}from"./chunk-2pmp70f4.mjs";import"./chunk-w1g9nypz.mjs";import"./chunk-enz73nmb.mjs";export{a as offchainLookupSignature,b as offchainLookupAbiItem,c as offchainLookup,d as ccipRequest};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as a}from"./chunk-fr00qq96.mjs";import"./chunk-enz73nmb.mjs";export default a();
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import{$c as zY,Vc as EY,Wc as _Y,Yc as OY,Zc as mQ,_c as lQ,cd as LY,fd as pQ,hd as cQ,id as nQ,kd as uQ,rd as oQ,sd as iQ,td as tQ,ud as sQ}from"./chunk-fc5rfx0b.js";import{Fd as f1}from"./chunk-zy3raqnk.js";var PZ="1.2.3";class q extends Error{constructor($,Y={}){let Z=Y.cause instanceof q?Y.cause.details:Y.cause?.message?Y.cause.message:Y.details,Q=Y.cause instanceof q?Y.cause.docsPath||Y.docsPath:Y.docsPath,J=[$||"An error occurred.","",...Y.metaMessages?[...Y.metaMessages,""]:[],...Q?[`Docs: https://abitype.dev${Q}`]:[],...Z?[`Details: ${Z}`]:[],`Version: abitype@${PZ}`].join(`
|
|
1
|
+
import{$c as OY,Tc as mQ,Uc as lQ,Vc as pQ,Wc as cQ,Xc as nQ,Yc as EY,Zc as _Y,ad as uQ,bd as oQ,cd as zY,fd as LY,gd as iQ,id as tQ,jd as sQ}from"./chunk-w1g9nypz.mjs";import{qd as f1}from"./chunk-enz73nmb.mjs";var PZ="1.2.3";class q extends Error{constructor($,Y={}){let Z=Y.cause instanceof q?Y.cause.details:Y.cause?.message?Y.cause.message:Y.details,Q=Y.cause instanceof q?Y.cause.docsPath||Y.docsPath:Y.docsPath,J=[$||"An error occurred.","",...Y.metaMessages?[...Y.metaMessages,""]:[],...Q?[`Docs: https://abitype.dev${Q}`]:[],...Z?[`Details: ${Z}`]:[],`Version: abitype@${PZ}`].join(`
|
|
3
2
|
`);super(J);if(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"}),Y.cause)this.cause=Y.cause;this.details=Z,this.docsPath=Q,this.metaMessages=Y.metaMessages,this.shortMessage=$}}function R($,Y){return $.exec(Y)?.groups}var q0=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,A0=/^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)?$/,p$=/^\(.+?\).*?$/;var xZ=/^tuple(?<array>(\[(\d*)\])*)$/;function c$($){let Y=$.type;if(xZ.test($.type)&&"components"in $){Y="(";let Z=$.components.length;for(let J=0;J<Z;J++){let X=$.components[J];if(Y+=c$(X),J<Z-1)Y+=", "}let Q=R(xZ,$.type);return Y+=`)${Q?.array||""}`,c$({...$,type:Y})}if("indexed"in $&&$.indexed)Y=`${Y} indexed`;if($.name)return`${Y} ${$.name}`;return Y}function $$($){let Y="",Z=$.length;for(let Q=0;Q<Z;Q++){let J=$[Q];if(Y+=c$(J),Q!==Z-1)Y+=", "}return Y}function T0($){if($.type==="function")return`function ${$.name}(${$$($.inputs)})${$.stateMutability&&$.stateMutability!=="nonpayable"?` ${$.stateMutability}`:""}${$.outputs?.length?` returns (${$$($.outputs)})`:""}`;if($.type==="event")return`event ${$.name}(${$$($.inputs)})`;if($.type==="error")return`error ${$.name}(${$$($.inputs)})`;if($.type==="constructor")return`constructor(${$$($.inputs)})${$.stateMutability==="payable"?" payable":""}`;if($.type==="fallback")return`fallback() external${$.stateMutability==="payable"?" payable":""}`;return"receive() external payable"}var yZ=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function bZ($){return yZ.test($)}function hZ($){return R(yZ,$)}var vZ=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function gZ($){return vZ.test($)}function dZ($){return R(vZ,$)}var mZ=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function lZ($){return mZ.test($)}function pZ($){return R(mZ,$)}var cZ=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function t($){return cZ.test($)}function nZ($){return R(cZ,$)}var uZ=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function oZ($){return uZ.test($)}function iZ($){return R(uZ,$)}var tZ=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function sZ($){return tZ.test($)}function rZ($){return R(tZ,$)}var pJ=/^receive\(\) external payable$/;function aZ($){return pJ.test($)}var E0=new Set(["memory","indexed","storage","calldata"]),eZ=new Set(["indexed"]),n$=new Set(["calldata","memory","storage"]);class _0 extends q{constructor({signature:$}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify($,null,2)})`,docsPath:"/api/human#parseabiitem-1"});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class O0 extends q{constructor({type:$}){super("Unknown type.",{metaMessages:[`Type "${$}" 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"})}}class L0 extends q{constructor({type:$}){super("Unknown type.",{metaMessages:[`Type "${$}" is not a valid ABI type.`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class z0 extends q{constructor({params:$}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify($,null,2)})`,docsPath:"/api/human#parseabiparameters-1"});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class R0 extends q{constructor({param:$}){super("Invalid ABI parameter.",{details:$});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class S0 extends q{constructor({param:$,name:Y}){super("Invalid ABI parameter.",{details:$,metaMessages:[`"${Y}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class k0 extends q{constructor({param:$,type:Y,modifier:Z}){super("Invalid ABI parameter.",{details:$,metaMessages:[`Modifier "${Z}" not allowed${Y?` in "${Y}" type`:""}.`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class I0 extends q{constructor({param:$,type:Y,modifier:Z}){super("Invalid ABI parameter.",{details:$,metaMessages:[`Modifier "${Z}" not allowed${Y?` in "${Y}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${Z}" was given.`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class B0 extends q{constructor({abiParameter:$}){super("Invalid ABI parameter.",{details:JSON.stringify($,null,2),metaMessages:["ABI parameter type is invalid."]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class m extends q{constructor({signature:$,type:Y}){super(`Invalid ${Y} signature.`,{details:$});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class j0 extends q{constructor({signature:$}){super("Unknown signature.",{details:$});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class f0 extends q{constructor({signature:$}){super("Invalid struct signature.",{details:$,metaMessages:["No properties exist."]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class P0 extends q{constructor({type:$}){super("Circular reference detected.",{metaMessages:[`Struct "${$}" is a circular reference.`]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class x0 extends q{constructor({current:$,depth:Y}){super("Unbalanced parentheses.",{metaMessages:[`"${$.trim()}" has too many ${Y>0?"opening":"closing"} parentheses.`],details:`Depth "${Y}"`});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function $Q($,Y,Z){let Q="";if(Z)for(let J of Object.entries(Z)){if(!J)continue;let X="";for(let W of J[1])X+=`[${W.type}${W.name?`:${W.name}`:""}]`;Q+=`(${J[0]}{${X}})`}if(Y)return`${Y}:${$}${Q}`;return`${$}${Q}`}var u$=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}]]);function E$($,Y={}){if(lZ($))return cJ($,Y);if(gZ($))return nJ($,Y);if(bZ($))return uJ($,Y);if(oZ($))return oJ($,Y);if(sZ($))return iJ($);if(aZ($))return{type:"receive",stateMutability:"payable"};throw new j0({signature:$})}function cJ($,Y={}){let Z=pZ($);if(!Z)throw new m({signature:$,type:"function"});let Q=L(Z.parameters),J=[],X=Q.length;for(let D=0;D<X;D++)J.push(f(Q[D],{modifiers:n$,structs:Y,type:"function"}));let W=[];if(Z.returns){let D=L(Z.returns),K=D.length;for(let w=0;w<K;w++)W.push(f(D[w],{modifiers:n$,structs:Y,type:"function"}))}return{name:Z.name,type:"function",stateMutability:Z.stateMutability??"nonpayable",inputs:J,outputs:W}}function nJ($,Y={}){let Z=dZ($);if(!Z)throw new m({signature:$,type:"event"});let Q=L(Z.parameters),J=[],X=Q.length;for(let W=0;W<X;W++)J.push(f(Q[W],{modifiers:eZ,structs:Y,type:"event"}));return{name:Z.name,type:"event",inputs:J}}function uJ($,Y={}){let Z=hZ($);if(!Z)throw new m({signature:$,type:"error"});let Q=L(Z.parameters),J=[],X=Q.length;for(let W=0;W<X;W++)J.push(f(Q[W],{structs:Y,type:"error"}));return{name:Z.name,type:"error",inputs:J}}function oJ($,Y={}){let Z=iZ($);if(!Z)throw new m({signature:$,type:"constructor"});let Q=L(Z.parameters),J=[],X=Q.length;for(let W=0;W<X;W++)J.push(f(Q[W],{structs:Y,type:"constructor"}));return{type:"constructor",stateMutability:Z.stateMutability??"nonpayable",inputs:J}}function iJ($){let Y=rZ($);if(!Y)throw new m({signature:$,type:"fallback"});return{type:"fallback",stateMutability:Y.stateMutability??"nonpayable"}}var tJ=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,sJ=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,rJ=/^u?int$/;function f($,Y){let Z=$Q($,Y?.type,Y?.structs);if(u$.has(Z))return u$.get(Z);let Q=p$.test($),J=R(Q?sJ:tJ,$);if(!J)throw new R0({param:$});if(J.name&&eJ(J.name))throw new S0({param:$,name:J.name});let X=J.name?{name:J.name}:{},W=J.modifier==="indexed"?{indexed:!0}:{},D=Y?.structs??{},K,w={};if(Q){K="tuple";let F=L(J.type),C=[],N=F.length;for(let U=0;U<N;U++)C.push(f(F[U],{structs:D}));w={components:C}}else if(J.type in D)K="tuple",w={components:D[J.type]};else if(rJ.test(J.type))K=`${J.type}256`;else if(J.type==="address payable")K="address";else if(K=J.type,Y?.type!=="struct"&&!y0(K))throw new L0({type:K});if(J.modifier){if(!Y?.modifiers?.has?.(J.modifier))throw new k0({param:$,type:Y?.type,modifier:J.modifier});if(n$.has(J.modifier)&&!$X(K,!!J.array))throw new I0({param:$,type:Y?.type,modifier:J.modifier})}let G={type:`${K}${J.array??""}`,...X,...W,...w};return u$.set(Z,G),G}function L($,Y=[],Z="",Q=0){let J=$.trim().length;for(let X=0;X<J;X++){let W=$[X],D=$.slice(X+1);switch(W){case",":return Q===0?L(D,[...Y,Z.trim()]):L(D,Y,`${Z}${W}`,Q);case"(":return L(D,Y,`${Z}${W}`,Q+1);case")":return L(D,Y,`${Z}${W}`,Q-1);default:return L(D,Y,`${Z}${W}`,Q)}}if(Z==="")return Y;if(Q!==0)throw new x0({current:Z,depth:Q});return Y.push(Z.trim()),Y}function y0($){return $==="address"||$==="bool"||$==="function"||$==="string"||q0.test($)||A0.test($)}var aJ=/^(?: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 eJ($){return $==="address"||$==="bool"||$==="function"||$==="string"||$==="tuple"||q0.test($)||A0.test($)||aJ.test($)}function $X($,Y){return Y||$==="bytes"||$==="string"||$==="tuple"}function w$($){let Y={},Z=$.length;for(let W=0;W<Z;W++){let D=$[W];if(!t(D))continue;let K=nZ(D);if(!K)throw new m({signature:D,type:"struct"});let w=K.properties.split(";"),G=[],F=w.length;for(let C=0;C<F;C++){let U=w[C].trim();if(!U)continue;let P=f(U,{type:"struct"});G.push(P)}if(!G.length)throw new f0({signature:D});Y[K.name]=G}let Q={},J=Object.entries(Y),X=J.length;for(let W=0;W<X;W++){let[D,K]=J[W];Q[D]=YQ(K,Y)}return Q}var YX=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function YQ($=[],Y={},Z=new Set){let Q=[],J=$.length;for(let X=0;X<J;X++){let W=$[X];if(p$.test(W.type))Q.push(W);else{let K=R(YX,W.type);if(!K?.type)throw new B0({abiParameter:W});let{array:w,type:G}=K;if(G in Y){if(Z.has(G))throw new P0({type:G});Q.push({...W,type:`tuple${w??""}`,components:YQ(Y[G],Y,new Set([...Z,G]))})}else if(y0(G))Q.push(W);else throw new O0({type:G})}}return Q}function o$($){let Y=w$($),Z=[],Q=$.length;for(let J=0;J<Q;J++){let X=$[J];if(t(X))continue;Z.push(E$(X,Y))}return Z}function ZX($){let Y;if(typeof $==="string")Y=E$($);else{let Z=w$($),Q=$.length;for(let J=0;J<Q;J++){let X=$[J];if(t(X))continue;Y=E$(X,Z);break}}if(!Y)throw new _0({signature:$});return Y}function QX($){let Y=[];if(typeof $==="string"){let Z=L($),Q=Z.length;for(let J=0;J<Q;J++)Y.push(f(Z[J],{modifiers:E0}))}else{let Z=w$($),Q=$.length;for(let J=0;J<Q;J++){let X=$[J];if(t(X))continue;let W=L(X),D=W.length;for(let K=0;K<D;K++)Y.push(f(W[K],{modifiers:E0,structs:Z}))}}if(Y.length===0)throw new z0({params:$});return Y}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var g0=BigInt(0),v0=BigInt(1);function d0($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function m0($){if(!d0($))throw Error("Uint8Array expected")}function o5($,Y){if(typeof Y!=="boolean")throw Error($+" boolean expected, got "+Y)}function i5($){let Y=$.toString(16);return Y.length&1?"0"+Y:Y}function JQ($){if(typeof $!=="string")throw Error("hex string expected, got "+typeof $);return $===""?g0:BigInt("0x"+$)}var XQ=typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function",JX=Array.from({length:256},($,Y)=>Y.toString(16).padStart(2,"0"));function WQ($){if(m0($),XQ)return $.toHex();let Y="";for(let Z=0;Z<$.length;Z++)Y+=JX[$[Z]];return Y}var l={_0:48,_9:57,A:65,F:70,a:97,f:102};function ZQ($){if($>=l._0&&$<=l._9)return $-l._0;if($>=l.A&&$<=l.F)return $-(l.A-10);if($>=l.a&&$<=l.f)return $-(l.a-10);return}function DQ($){if(typeof $!=="string")throw Error("hex string expected, got "+typeof $);if(XQ)return Uint8Array.fromHex($);let Y=$.length,Z=Y/2;if(Y%2)throw Error("hex string expected, got unpadded hex of length "+Y);let Q=new Uint8Array(Z);for(let J=0,X=0;J<Z;J++,X+=2){let W=ZQ($.charCodeAt(X)),D=ZQ($.charCodeAt(X+1));if(W===void 0||D===void 0){let K=$[X]+$[X+1];throw Error('hex string expected, got non-hex character "'+K+'" at index '+X)}Q[J]=W*16+D}return Q}function t5($){return JQ(WQ($))}function s5($){return m0($),JQ(WQ(Uint8Array.from($).reverse()))}function XX($,Y){return DQ($.toString(16).padStart(Y*2,"0"))}function r5($,Y){return XX($,Y).reverse()}function a5($,Y,Z){let Q;if(typeof Y==="string")try{Q=DQ(Y)}catch(X){throw Error($+" must be hex string or Uint8Array, cause: "+X)}else if(d0(Y))Q=Uint8Array.from(Y);else throw Error($+" must be hex string or Uint8Array");let J=Q.length;if(typeof Z==="number"&&J!==Z)throw Error($+" of length "+Z+" expected, got "+J);return Q}function WX(...$){let Y=0;for(let Q=0;Q<$.length;Q++){let J=$[Q];m0(J),Y+=J.length}let Z=new Uint8Array(Y);for(let Q=0,J=0;Q<$.length;Q++){let X=$[Q];Z.set(X,J),J+=X.length}return Z}var b0=($)=>typeof $==="bigint"&&g0<=$;function DX($,Y,Z){return b0($)&&b0(Y)&&b0(Z)&&Y<=$&&$<Z}function e5($,Y,Z,Q){if(!DX(Y,Z,Q))throw Error("expected valid "+$+": "+Z+" <= n < "+Q+", got "+Y)}function $9($){let Y;for(Y=0;$>g0;$>>=v0,Y+=1);return Y}var Y9=($)=>(v0<<BigInt($))-v0,h0=($)=>new Uint8Array($),QQ=($)=>Uint8Array.from($);function Z9($,Y,Z){if(typeof $!=="number"||$<2)throw Error("hashLen must be a number");if(typeof Y!=="number"||Y<2)throw Error("qByteLen must be a number");if(typeof Z!=="function")throw Error("hmacFn must be a function");let Q=h0($),J=h0($),X=0,W=()=>{Q.fill(1),J.fill(0),X=0},D=(...F)=>Z(J,Q,...F),K=(F=h0(0))=>{if(J=D(QQ([0]),F),Q=D(),F.length===0)return;J=D(QQ([1]),F),Q=D()},w=()=>{if(X++>=1000)throw Error("drbg: tried 1000 values");let F=0,C=[];while(F<Y){Q=D();let N=Q.slice();C.push(N),F+=Q.length}return WX(...C)};return(F,C)=>{W(),K(F);let N=void 0;while(!(N=C(w())))K();return W(),N}}var KX={bigint:($)=>typeof $==="bigint",function:($)=>typeof $==="function",boolean:($)=>typeof $==="boolean",string:($)=>typeof $==="string",stringOrUint8Array:($)=>typeof $==="string"||d0($),isSafeInteger:($)=>Number.isSafeInteger($),array:($)=>Array.isArray($),field:($,Y)=>Y.Fp.isValid($),hash:($)=>typeof $==="function"&&Number.isSafeInteger($.outputLen)};function Q9($,Y,Z={}){let Q=(J,X,W)=>{let D=KX[X];if(typeof D!=="function")throw Error("invalid validator function");let K=$[J];if(W&&K===void 0)return;if(!D(K,$))throw Error("param "+String(J)+" is invalid. Expected "+X+", got "+K)};for(let[J,X]of Object.entries(Y))Q(J,X,!1);for(let[J,X]of Object.entries(Z))Q(J,X,!0);return $}function J9($){let Y=new WeakMap;return(Z,...Q)=>{let J=Y.get(Z);if(J!==void 0)return J;let X=$(Z,...Q);return Y.set(Z,X),X}}var KQ="0.1.1";function VQ(){return KQ}class M extends Error{static setStaticOptions($){M.prototype.docsOrigin=$.docsOrigin,M.prototype.showVersion=$.showVersion,M.prototype.version=$.version}constructor($,Y={}){let Z=(()=>{if(Y.cause instanceof M){if(Y.cause.details)return Y.cause.details;if(Y.cause.shortMessage)return Y.cause.shortMessage}if(Y.cause&&"details"in Y.cause&&typeof Y.cause.details==="string")return Y.cause.details;if(Y.cause?.message)return Y.cause.message;return Y.details})(),Q=(()=>{if(Y.cause instanceof M)return Y.cause.docsPath||Y.docsPath;return Y.docsPath})(),J=Y.docsOrigin??M.prototype.docsOrigin,X=`${J}${Q??""}`,W=Boolean(Y.version??M.prototype.showVersion),D=Y.version??M.prototype.version,K=[$||"An error occurred.",...Y.metaMessages?["",...Y.metaMessages]:[],...Z||Q||W?["",Z?`Details: ${Z}`:void 0,Q?`See: ${X}`:void 0,W?`Version: ${D}`:void 0]:[]].filter((w)=>typeof w==="string").join(`
|
|
4
3
|
`);super(K,Y.cause?{cause:Y.cause}:void 0);Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=Y.cause,this.details=Z,this.docs=X,this.docsOrigin=J,this.docsPath=Q,this.shortMessage=$,this.showVersion=W,this.version=D}walk($){return wQ(this,$)}}Object.defineProperty(M,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${VQ()}`}});(()=>{M.setStaticOptions(M.defaultStaticOptions)})();function wQ($,Y){if(Y?.($))return $;if($&&typeof $==="object"&&"cause"in $&&$.cause)return wQ($.cause,Y);return Y?null:$}function G$($,Y){if(Y$($)>Y)throw new c0({givenSize:Y$($),maxSize:Y})}function FQ($,Y){if(typeof Y==="number"&&Y>0&&Y>Y$($)-1)throw new i$({offset:Y,position:"start",size:Y$($)})}function CQ($,Y,Z){if(typeof Y==="number"&&typeof Z==="number"&&Y$($)!==Z-Y)throw new i$({offset:Z,position:"end",size:Y$($)})}var p={zero:48,nine:57,A:65,F:70,a:97,f:102};function l0($){if($>=p.zero&&$<=p.nine)return $-p.zero;if($>=p.A&&$<=p.F)return $-(p.A-10);if($>=p.a&&$<=p.f)return $-(p.a-10);return}function NQ($,Y={}){let{dir:Z,size:Q=32}=Y;if(Q===0)return $;if($.length>Q)throw new n0({size:$.length,targetSize:Q,type:"Bytes"});let J=new Uint8Array(Q);for(let X=0;X<Q;X++){let W=Z==="right";J[W?X:Q-X-1]=$[W?X:$.length-X-1]}return J}function p0($,Y={}){let{dir:Z="left"}=Y,Q=$,J=0;for(let X=0;X<Q.length-1;X++)if(Q[Z==="left"?X:Q.length-X-1].toString()==="0")J++;else break;return Q=Z==="left"?Q.slice(J):Q.slice(0,Q.length-J),Q}function F$($,Y){if(Z$($)>Y)throw new o0({givenSize:Z$($),maxSize:Y})}function HQ($,Y){if(typeof Y==="number"&&Y>0&&Y>Z$($)-1)throw new t$({offset:Y,position:"start",size:Z$($)})}function MQ($,Y,Z){if(typeof Y==="number"&&typeof Z==="number"&&Z$($)!==Z-Y)throw new t$({offset:Z,position:"end",size:Z$($)})}function u0($,Y={}){let{dir:Z,size:Q=32}=Y;if(Q===0)return $;let J=$.replace("0x","");if(J.length>Q*2)throw new i0({size:Math.ceil(J.length/2),targetSize:Q,type:"Hex"});return`0x${J[Z==="right"?"padEnd":"padStart"](Q*2,"0")}`}function UQ($,Y={}){let{dir:Z="left"}=Y,Q=$.replace("0x",""),J=0;for(let X=0;X<Q.length-1;X++)if(Q[Z==="left"?X:Q.length-X-1].toString()==="0")J++;else break;if(Q=Z==="left"?Q.slice(J):Q.slice(0,Q.length-J),Q==="0")return"0x";if(Z==="right"&&Q.length%2===1)return`0x${Q}0`;return`0x${Q}`}function r$($,Y,Z){return JSON.stringify($,(Q,J)=>{if(typeof Y==="function")return Y(Q,J);if(typeof J==="bigint")return J.toString()+"#__bigint";return J},Z)}var GX=new TextDecoder,FX=new TextEncoder;function CX($){if($ instanceof Uint8Array)return;if(!$)throw new _$($);if(typeof $!=="object")throw new _$($);if(!("BYTES_PER_ELEMENT"in $))throw new _$($);if($.BYTES_PER_ELEMENT!==1||$.constructor.name!=="Uint8Array")throw new _$($)}function w9($){if($ instanceof Uint8Array)return $;if(typeof $==="string")return HX($);return NX($)}function NX($){return $ instanceof Uint8Array?$:new Uint8Array($)}function HX($,Y={}){let{size:Z}=Y,Q=$;if(Z)F$($,Z),Q=t0($,Z);let J=Q.slice(2);if(J.length%2)J=`0${J}`;let X=J.length/2,W=new Uint8Array(X);for(let D=0,K=0;D<X;D++){let w=l0(J.charCodeAt(K++)),G=l0(J.charCodeAt(K++));if(w===void 0||G===void 0)throw new M(`Invalid byte sequence ("${J[K-2]}${J[K-1]}" in "${J}").`);W[D]=w<<4|G}return W}function G9($,Y={}){let{size:Z}=Y,Q=FX.encode($);if(typeof Z==="number")return G$(Q,Z),MX(Q,Z);return Q}function MX($,Y){return NQ($,{dir:"right",size:Y})}function Y$($){return $.length}function F9($,Y,Z,Q={}){let{strict:J}=Q;FQ($,Y);let X=$.slice(Y,Z);if(J)CQ(X,Y,Z);return X}function C9($,Y={}){let{size:Z}=Y;if(typeof Z<"u")G$($,Z);let Q=C$($,Y);return s0(Q,Y)}function N9($,Y={}){let{size:Z}=Y,Q=$;if(typeof Z<"u")G$(Q,Z),Q=UX(Q);if(Q.length>1||Q[0]>1)throw new TQ(Q);return Boolean(Q[0])}function H9($,Y={}){let{size:Z}=Y;if(typeof Z<"u")G$($,Z);let Q=C$($,Y);return EQ(Q,Y)}function M9($,Y={}){let{size:Z}=Y,Q=$;if(typeof Z<"u")G$(Q,Z),Q=qX(Q);return GX.decode(Q)}function UX($){return p0($,{dir:"left"})}function qX($){return p0($,{dir:"right"})}function U9($){try{return CX($),!0}catch{return!1}}class TQ extends M{constructor($){super(`Bytes value \`${$}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}class _$ extends M{constructor($){super(`Value \`${typeof $==="object"?r$($):$}\` of type \`${typeof $}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}class c0 extends M{constructor({givenSize:$,maxSize:Y}){super(`Size cannot exceed \`${Y}\` bytes. Given size: \`${$}\` bytes.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class i$ extends M{constructor({offset:$,position:Y,size:Z}){super(`Slice ${Y==="start"?"starting":"ending"} at offset \`${$}\` is out-of-bounds (size: \`${Z}\`).`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}class n0 extends M{constructor({size:$,targetSize:Y,type:Z}){super(`${Z.charAt(0).toUpperCase()}${Z.slice(1).toLowerCase()} size (\`${$}\`) exceeds padding size (\`${Y}\`).`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}var AX=new TextEncoder,TX=Array.from({length:256},($,Y)=>Y.toString(16).padStart(2,"0"));function EX($,Y={}){let{strict:Z=!1}=Y;if(!$)throw new r0($);if(typeof $!=="string")throw new r0($);if(Z){if(!/^0x[0-9a-fA-F]*$/.test($))throw new a0($)}if(!$.startsWith("0x"))throw new a0($)}function q9(...$){return`0x${$.reduce((Y,Z)=>Y+Z.replace("0x",""),"")}`}function A9($){if($ instanceof Uint8Array)return C$($);if(Array.isArray($))return C$(new Uint8Array($));return $}function T9($,Y={}){let Z=`0x${Number($)}`;if(typeof Y.size==="number")return F$(Z,Y.size),_Q(Z,Y.size);return Z}function C$($,Y={}){let Z="";for(let J=0;J<$.length;J++)Z+=TX[$[J]];let Q=`0x${Z}`;if(typeof Y.size==="number")return F$(Q,Y.size),t0(Q,Y.size);return Q}function I($,Y={}){let{signed:Z,size:Q}=Y,J=BigInt($),X;if(Q)if(Z)X=(1n<<BigInt(Q)*8n-1n)-1n;else X=2n**(BigInt(Q)*8n)-1n;else if(typeof $==="number")X=BigInt(Number.MAX_SAFE_INTEGER);let W=typeof X==="bigint"&&Z?-X-1n:0;if(X&&J>X||J<W){let w=typeof $==="bigint"?"n":"";throw new OQ({max:X?`${X}${w}`:void 0,min:`${W}${w}`,signed:Z,size:Q,value:`${$}${w}`})}let K=`0x${(Z&&J<0?BigInt.asUintN(Q*8,BigInt(J)):J).toString(16)}`;if(Q)return _Q(K,Q);return K}function E9($,Y={}){return C$(AX.encode($),Y)}function _Q($,Y){return u0($,{dir:"left",size:Y})}function t0($,Y){return u0($,{dir:"right",size:Y})}function _9($,Y,Z,Q={}){let{strict:J}=Q;HQ($,Y);let X=`0x${$.replace("0x","").slice((Y??0)*2,(Z??$.length)*2)}`;if(J)MQ(X,Y,Z);return X}function Z$($){return Math.ceil(($.length-2)/2)}function O9($){return UQ($,{dir:"left"})}function s0($,Y={}){let{signed:Z}=Y;if(Y.size)F$($,Y.size);let Q=BigInt($);if(!Z)return Q;let J=($.length-2)/2,X=(1n<<BigInt(J)*8n)-1n,W=X>>1n;if(Q<=W)return Q;return Q-X-1n}function EQ($,Y={}){let{signed:Z,size:Q}=Y;if(!Z&&!Q)return Number($);return Number(s0($,Y))}function L9($,Y={}){let{strict:Z=!1}=Y;try{return EX($,{strict:Z}),!0}catch{return!1}}class OQ extends M{constructor({max:$,min:Y,signed:Z,size:Q,value:J}){super(`Number \`${J}\` is not in safe${Q?` ${Q*8}-bit`:""}${Z?" signed":" unsigned"} integer range ${$?`(\`${Y}\` to \`${$}\`)`:`(above \`${Y}\`)`}`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class r0 extends M{constructor($){super(`Value \`${typeof $==="object"?r$($):$}\` of type \`${typeof $}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class a0 extends M{constructor($){super(`Value \`${$}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class o0 extends M{constructor({givenSize:$,maxSize:Y}){super(`Size cannot exceed \`${Y}\` bytes. Given size: \`${$}\` bytes.`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class t$ extends M{constructor({offset:$,position:Y,size:Z}){super(`Slice ${Y==="start"?"starting":"ending"} at offset \`${$}\` is out-of-bounds (size: \`${Z}\`).`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class i0 extends M{constructor({size:$,targetSize:Y,type:Z}){super(`${Z.charAt(0).toUpperCase()}${Z.slice(1).toLowerCase()} size (\`${$}\`) exceeds padding size (\`${Y}\`).`);Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function LQ($){return{address:$.address,amount:I($.amount),index:I($.index),validatorIndex:I($.validatorIndex)}}function zQ($){return{...typeof $.baseFeePerGas==="bigint"&&{baseFeePerGas:I($.baseFeePerGas)},...typeof $.blobBaseFee==="bigint"&&{blobBaseFee:I($.blobBaseFee)},...typeof $.feeRecipient==="string"&&{feeRecipient:$.feeRecipient},...typeof $.gasLimit==="bigint"&&{gasLimit:I($.gasLimit)},...typeof $.number==="bigint"&&{number:I($.number)},...typeof $.prevRandao==="bigint"&&{prevRandao:I($.prevRandao)},...typeof $.time==="bigint"&&{time:I($.time)},...$.withdrawals&&{withdrawals:$.withdrawals.map(LQ)}}}function N$($){if(typeof $==="string")return{address:$,type:"json-rpc"};return $}var e0=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],a$=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],RQ=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],S9=[...RQ,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],k9=[...RQ,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],I9=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],B9=[{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"}]}],j9=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],f9=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];var SQ="0x82ad56cb";var kQ="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",IQ="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",y9="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",BQ="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";var $Y="2.46.1";var YY={getDocsUrl:({docsBaseUrl:$,docsPath:Y="",docsSlug:Z})=>Y?`${$??"https://viem.sh"}${Y}${Z?`#${Z}`:""}`:void 0,version:`viem@${$Y}`};class V extends Error{constructor($,Y={}){let Z=(()=>{if(Y.cause instanceof V)return Y.cause.details;if(Y.cause?.message)return Y.cause.message;return Y.details})(),Q=(()=>{if(Y.cause instanceof V)return Y.cause.docsPath||Y.docsPath;return Y.docsPath})(),J=YY.getDocsUrl?.({...Y,docsPath:Q}),X=[$||"An error occurred.","",...Y.metaMessages?[...Y.metaMessages,""]:[],...J?[`Docs: ${J}`]:[],...Z?[`Details: ${Z}`]:[],...YY.version?[`Version: ${YY.version}`]:[]].join(`
|
|
5
|
-
`);super(X,Y.cause?{cause:Y.cause}:void 0);Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=Z,this.docsPath=Q,this.metaMessages=Y.metaMessages,this.name=Y.name??this.name,this.shortMessage=$,this.version=$Y}walk($){return jQ(this,$)}}function jQ($,Y){if(Y?.($))return $;if($&&typeof $==="object"&&"cause"in $&&$.cause!==void 0)return jQ($.cause,Y);return Y?null:$}class H$ extends V{constructor({blockNumber:$,chain:Y,contract:Z}){super(`Chain "${Y.name}" does not support contract "${Z.name}".`,{metaMessages:["This could be due to any of the following:",...$&&Z.blockCreated&&Z.blockCreated>$?[`- The contract "${Z.name}" was not deployed until block ${Z.blockCreated} (current block ${$}).`]:[`- The chain does not have the contract "${Z.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class LX extends V{constructor({chain:$,currentChainId:Y}){super(`The current chain of the wallet (id: ${Y}) does not match the target chain for the transaction (id: ${$.id}
|
|
4
|
+
`);super(X,Y.cause?{cause:Y.cause}:void 0);Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=Z,this.docsPath=Q,this.metaMessages=Y.metaMessages,this.name=Y.name??this.name,this.shortMessage=$,this.version=$Y}walk($){return jQ(this,$)}}function jQ($,Y){if(Y?.($))return $;if($&&typeof $==="object"&&"cause"in $&&$.cause!==void 0)return jQ($.cause,Y);return Y?null:$}class H$ extends V{constructor({blockNumber:$,chain:Y,contract:Z}){super(`Chain "${Y.name}" does not support contract "${Z.name}".`,{metaMessages:["This could be due to any of the following:",...$&&Z.blockCreated&&Z.blockCreated>$?[`- The contract "${Z.name}" was not deployed until block ${Z.blockCreated} (current block ${$}).`]:[`- The chain does not have the contract "${Z.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class LX extends V{constructor({chain:$,currentChainId:Y}){super(`The current chain of the wallet (id: ${Y}) does not match the target chain for the transaction (id: ${$.id} – ${$.name}).`,{metaMessages:[`Current Chain ID: ${Y}`,`Expected Chain ID: ${$.id} – ${$.name}`],name:"ChainMismatchError"})}}class zX extends V{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(`
|
|
6
5
|
`),{name:"ChainNotFoundError"})}}class e$ extends V{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class RX extends V{constructor({chainId:$}){super(typeof $==="number"?`Chain ID "${$}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}var fQ={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."},$0={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},PQ={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function E($,{includeName:Y=!1}={}){if($.type!=="function"&&$.type!=="event"&&$.type!=="error")throw new ZY($.type);return`${$.name}(${O$($.inputs,{includeName:Y})})`}function O$($,{includeName:Y=!1}={}){if(!$)return"";return $.map((Z)=>SX(Z,{includeName:Y})).join(Y?", ":",")}function SX($,{includeName:Y}){if($.type.startsWith("tuple"))return`(${O$($.components,{includeName:Y})})${$.type.slice(5)}`;return $.type+(Y&&$.name?` ${$.name}`:"")}function B($,{strict:Y=!0}={}){if(!$)return!1;if(typeof $!=="string")return!1;return Y?/^0x[0-9a-fA-F]*$/.test($):$.startsWith("0x")}function A($){if(B($,{strict:!1}))return Math.ceil(($.length-2)/2);return $.length}class QY extends V{constructor({docsPath:$}){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(`
|
|
7
6
|
`),{docsPath:$,name:"AbiConstructorNotFoundError"})}}class Y0 extends V{constructor({docsPath:$}){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(`
|
|
8
7
|
`),{docsPath:$,name:"AbiConstructorParamsNotFoundError"})}}class JY extends V{constructor({data:$,params:Y,size:Z}){super([`Data size of ${Z} bytes is too small for given parameters.`].join(`
|
|
@@ -22,7 +21,7 @@ import{$c as zY,Vc as EY,Wc as _Y,Yc as OY,Zc as mQ,_c as lQ,cd as LY,fd as pQ,h
|
|
|
22
21
|
`),{docsPath:Y,name:"InvalidAbiEncodingType"})}}class FY extends V{constructor($,{docsPath:Y}){super([`Type "${$}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
23
22
|
`),{docsPath:Y,name:"InvalidAbiDecodingType"})}}class S$ extends V{constructor($){super([`Value "${$}" is not a valid array.`].join(`
|
|
24
23
|
`),{name:"InvalidArrayError"})}}class ZY extends V{constructor($){super([`"${$}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
25
|
-
`),{name:"InvalidDefinitionTypeError"})}}class Q0 extends V{constructor({offset:$,position:Y,size:Z}){super(`Slice ${Y==="start"?"starting":"ending"} at offset "${$}" is out-of-bounds (size: ${Z}).`,{name:"SliceOffsetOutOfBoundsError"})}}class J0 extends V{constructor({size:$,targetSize:Y,type:Z}){super(`${Z.charAt(0).toUpperCase()}${Z.slice(1).toLowerCase()} size (${$}) exceeds padding size (${Y}).`,{name:"SizeExceedsPaddingSizeError"})}}class X0 extends V{constructor({size:$,targetSize:Y,type:Z}){super(`${Z.charAt(0).toUpperCase()}${Z.slice(1).toLowerCase()} is expected to be ${Y} ${Z} long, but is ${$} ${Z} long.`,{name:"InvalidBytesLengthError"})}}function y($,Y,Z,{strict:Q}={}){if(B($,{strict:!1}))return xX($,Y,Z,{strict:Q});return CY($,Y,Z,{strict:Q})}function xQ($,Y){if(typeof Y==="number"&&Y>0&&Y>A($)-1)throw new Q0({offset:Y,position:"start",size:A($)})}function yQ($,Y,Z){if(typeof Y==="number"&&typeof Z==="number"&&A($)!==Z-Y)throw new Q0({offset:Z,position:"end",size:A($)})}function CY($,Y,Z,{strict:Q}={}){xQ($,Y);let J=$.slice(Y,Z);if(Q)yQ(J,Y,Z);return J}function xX($,Y,Z,{strict:Q}={}){xQ($,Y);let J=`0x${$.replace("0x","").slice((Y??0)*2,(Z??$.length)*2)}`;if(Q)yQ(J,Y,Z);return J}function s($,{dir:Y,size:Z=32}={}){if(typeof $==="string")return c($,{dir:Y,size:Z});return yX($,{dir:Y,size:Z})}function c($,{dir:Y,size:Z=32}={}){if(Z===null)return $;let Q=$.replace("0x","");if(Q.length>Z*2)throw new J0({size:Math.ceil(Q.length/2),targetSize:Z,type:"hex"});return`0x${Q[Y==="right"?"padEnd":"padStart"](Z*2,"0")}`}function yX($,{dir:Y,size:Z=32}={}){if(Z===null)return $;if($.length>Z)throw new J0({size:$.length,targetSize:Z,type:"bytes"});let Q=new Uint8Array(Z);for(let J=0;J<Z;J++){let X=Y==="right";Q[X?J:Z-J-1]=$[X?J:$.length-J-1]}return Q}class Q$ extends V{constructor({max:$,min:Y,signed:Z,size:Q,value:J}){super(`Number "${J}" is not in safe ${Q?`${Q*8}-bit ${Z?"signed":"unsigned"} `:""}integer range ${$?`(${Y} to ${$})`:`(above ${Y})`}`,{name:"IntegerOutOfRangeError"})}}class NY extends V{constructor($){super(`Bytes value "${$}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class HY extends V{constructor($){super(`Hex value "${$}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class MY extends V{constructor({givenSize:$,maxSize:Y}){super(`Size cannot exceed ${Y} bytes. Given size: ${$} bytes.`,{name:"SizeOverflowError"})}}function n($,{dir:Y="left"}={}){let Z=typeof $==="string"?$.replace("0x",""):$,Q=0;for(let J=0;J<Z.length-1;J++)if(Z[Y==="left"?J:Z.length-J-1].toString()==="0")Q++;else break;if(Z=Y==="left"?Z.slice(Q):Z.slice(0,Z.length-Q),typeof $==="string"){if(Z.length===1&&Y==="right")Z=`${Z}0`;return`0x${Z.length%2===1?`0${Z}`:Z}`}return Z}function z($,{size:Y}){if(A($)>Y)throw new MY({givenSize:A($),maxSize:Y})}function UY($,Y={}){let{signed:Z}=Y;if(Y.size)z($,{size:Y.size});let Q=BigInt($);if(!Z)return Q;let J=($.length-2)/2,X=(1n<<BigInt(J)*8n-1n)-1n;if(Q<=X)return Q;return Q-BigInt(`0x${"f".padStart(J*2,"f")}`)-1n}function F4($,Y={}){let Z=$;if(Y.size)z(Z,{size:Y.size}),Z=n(Z);if(n(Z)==="0x00")return!1;if(n(Z)==="0x01")return!0;throw new HY(Z)}function bQ($,Y={}){let Z=UY($,Y),Q=Number(Z);if(!Number.isSafeInteger(Q))throw new Q$({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:Y.signed,size:Y.size,value:`${Z}n`});return Q}var bX=Array.from({length:256},($,Y)=>Y.toString(16).padStart(2,"0"));function hQ($,Y={}){if(typeof $==="number"||typeof $==="bigint")return H($,Y);if(typeof $==="string")return AY($,Y);if(typeof $==="boolean")return qY($,Y);return j($,Y)}function qY($,Y={}){let Z=`0x${Number($)}`;if(typeof Y.size==="number")return z(Z,{size:Y.size}),s(Z,{size:Y.size});return Z}function j($,Y={}){let Z="";for(let J=0;J<$.length;J++)Z+=bX[$[J]];let Q=`0x${Z}`;if(typeof Y.size==="number")return z(Q,{size:Y.size}),s(Q,{dir:"right",size:Y.size});return Q}function H($,Y={}){let{signed:Z,size:Q}=Y,J=BigInt($),X;if(Q)if(Z)X=(1n<<BigInt(Q)*8n-1n)-1n;else X=2n**(BigInt(Q)*8n)-1n;else if(typeof $==="number")X=BigInt(Number.MAX_SAFE_INTEGER);let W=typeof X==="bigint"&&Z?-X-1n:0;if(X&&J>X||J<W){let K=typeof $==="bigint"?"n":"";throw new Q$({max:X?`${X}${K}`:void 0,min:`${W}${K}`,signed:Z,size:Q,value:`${$}${K}`})}let D=`0x${(Z&&J<0?(1n<<BigInt(Q*8))+BigInt(J):J).toString(16)}`;if(Q)return s(D,{size:Q});return D}var hX=new TextEncoder;function AY($,Y={}){let Z=hX.encode($);return j(Z,Y)}var vX=new TextEncoder;function W0($,Y={}){if(typeof $==="number"||typeof $==="bigint")return dX($,Y);if(typeof $==="boolean")return gX($,Y);if(B($))return D0($,Y);return TY($,Y)}function gX($,Y={}){let Z=new Uint8Array(1);if(Z[0]=Number($),typeof Y.size==="number")return z(Z,{size:Y.size}),s(Z,{size:Y.size});return Z}var u={zero:48,nine:57,A:65,F:70,a:97,f:102};function vQ($){if($>=u.zero&&$<=u.nine)return $-u.zero;if($>=u.A&&$<=u.F)return $-(u.A-10);if($>=u.a&&$<=u.f)return $-(u.a-10);return}function D0($,Y={}){let Z=$;if(Y.size)z(Z,{size:Y.size}),Z=s(Z,{dir:"right",size:Y.size});let Q=Z.slice(2);if(Q.length%2)Q=`0${Q}`;let J=Q.length/2,X=new Uint8Array(J);for(let W=0,D=0;W<J;W++){let K=vQ(Q.charCodeAt(D++)),w=vQ(Q.charCodeAt(D++));if(K===void 0||w===void 0)throw new V(`Invalid byte sequence ("${Q[D-2]}${Q[D-1]}" in "${Q}").`);X[W]=K*16+w}return X}function dX($,Y){let Z=H($,Y);return D0(Z)}function TY($,Y={}){let Z=vX.encode($);if(typeof Y.size==="number")return z(Z,{size:Y.size}),s(Z,{dir:"right",size:Y.size});return Z}var mX=BigInt(0),k$=BigInt(1),lX=BigInt(2),pX=BigInt(7),cX=BigInt(256),nX=BigInt(113),rQ=[],aQ=[],eQ=[];for(let $=0,Y=k$,Z=1,Q=0;$<24;$++){[Z,Q]=[Q,(2*Z+3*Q)%5],rQ.push(2*(5*Q+Z)),aQ.push(($+1)*($+2)/2%64);let J=mX;for(let X=0;X<7;X++)if(Y=(Y<<k$^(Y>>pX)*nX)%cX,Y&lX)J^=k$<<(k$<<BigInt(X))-k$;eQ.push(J)}var $J=uQ(eQ,!0),uX=$J[0],oX=$J[1],gQ=($,Y,Z)=>Z>32?tQ($,Y,Z):oQ($,Y,Z),dQ=($,Y,Z)=>Z>32?sQ($,Y,Z):iQ($,Y,Z);function iX($,Y=24){let Z=new Uint32Array(10);for(let Q=24-Y;Q<24;Q++){for(let W=0;W<10;W++)Z[W]=$[W]^$[W+10]^$[W+20]^$[W+30]^$[W+40];for(let W=0;W<10;W+=2){let D=(W+8)%10,K=(W+2)%10,w=Z[K],G=Z[K+1],F=gQ(w,G,1)^Z[D],C=dQ(w,G,1)^Z[D+1];for(let N=0;N<50;N+=10)$[W+N]^=F,$[W+N+1]^=C}let J=$[2],X=$[3];for(let W=0;W<24;W++){let D=aQ[W],K=gQ(J,X,D),w=dQ(J,X,D),G=rQ[W];J=$[G],X=$[G+1],$[G]=K,$[G+1]=w}for(let W=0;W<50;W+=10){for(let D=0;D<10;D++)Z[D]=$[W+D];for(let D=0;D<10;D++)$[W+D]^=~Z[(D+2)%10]&Z[(D+4)%10]}$[0]^=uX[Q],$[1]^=oX[Q]}zY(Z)}class RY extends cQ{constructor($,Y,Z,Q=!1,J=24){super();if(this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=$,this.suffix=Y,this.outputLen=Z,this.enableXOF=Q,this.rounds=J,EY(Z),!(0<$&&$<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=lQ(this.state)}clone(){return this._cloneInto()}keccak(){LY(this.state32),iX(this.state32,this.rounds),LY(this.state32),this.posOut=0,this.pos=0}update($){OY(this),$=pQ($),_Y($);let{blockLen:Y,state:Z}=this,Q=$.length;for(let J=0;J<Q;){let X=Math.min(Y-this.pos,Q-J);for(let W=0;W<X;W++)Z[this.pos++]^=$[J++];if(this.pos===Y)this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:$,suffix:Y,pos:Z,blockLen:Q}=this;if($[Z]^=Y,(Y&128)!==0&&Z===Q-1)this.keccak();$[Q-1]^=128,this.keccak()}writeInto($){OY(this,!1),_Y($),this.finish();let Y=this.state,{blockLen:Z}=this;for(let Q=0,J=$.length;Q<J;){if(this.posOut>=Z)this.keccak();let X=Math.min(Z-this.posOut,J-Q);$.set(Y.subarray(this.posOut,this.posOut+X),Q),this.posOut+=X,Q+=X}return $}xofInto($){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto($)}xof($){return EY($),this.xofInto(new Uint8Array($))}digestInto($){if(mQ($,this),this.finished)throw Error("digest() was already called");return this.writeInto($),this.destroy(),$}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,zY(this.state)}_cloneInto($){let{blockLen:Y,suffix:Z,outputLen:Q,rounds:J,enableXOF:X}=this;return $||($=new RY(Y,Z,Q,X,J)),$.state32.set(this.state32),$.pos=this.pos,$.posOut=this.posOut,$.finished=this.finished,$.rounds=J,$.suffix=Z,$.outputLen=Q,$.enableXOF=X,$.destroyed=this.destroyed,$}}var tX=($,Y,Z)=>nQ(()=>new RY(Y,$,Z));var YJ=(()=>tX(1,136,32))();function K0($,Y){let Z=Y||"hex",Q=YJ(B($,{strict:!1})?W0($):$);if(Z==="bytes")return Q;return hQ(Q)}var sX=($)=>K0(W0($));function ZJ($){return sX($)}function QJ($){let Y=!0,Z="",Q=0,J="",X=!1;for(let W=0;W<$.length;W++){let D=$[W];if(["(",")",","].includes(D))Y=!0;if(D==="(")Q++;if(D===")")Q--;if(!Y)continue;if(Q===0){if(D===" "&&["event","function",""].includes(J))J="";else if(J+=D,D===")"){X=!0;break}continue}if(D===" "){if($[W-1]!==","&&Z!==","&&Z!==",(")Z="",Y=!1;continue}J+=D,Z+=D}if(!X)throw new V("Unable to normalize signature.");return J}var JJ=($)=>{let Y=(()=>{if(typeof $==="string")return $;return T0($)})();return QJ(Y)};function V0($){return ZJ(JJ($))}var b=($)=>y(V0($),0,4);class S extends V{constructor({address:$}){super(`Address "${$}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class I$ extends Map{constructor($){super();Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=$}get($){let Y=super.get($);if(super.has($)&&Y!==void 0)this.delete($),super.set($,Y);return Y}set($,Y){if(super.set($,Y),this.maxSize&&this.size>this.maxSize){let Z=this.keys().next().value;if(Z)this.delete(Z)}return this}}var rX=/^0x[a-fA-F0-9]{40}$/,SY=new I$(8192);function T($,Y){let{strict:Z=!0}=Y??{},Q=`${$}.${Z}`;if(SY.has(Q))return SY.get(Q);let J=(()=>{if(!rX.test($))return!1;if($.toLowerCase()===$)return!0;if(Z)return B$($)===$;return!0})();return SY.set(Q,J),J}var kY=new I$(8192);function B$($,Y){if(kY.has(`${$}.${Y}`))return kY.get(`${$}.${Y}`);let Z=Y?`${Y}${$.toLowerCase()}`:$.substring(2).toLowerCase(),Q=K0(TY(Z),"bytes"),J=(Y?Z.substring(`${Y}0x`.length):Z).split("");for(let W=0;W<40;W+=2){if(Q[W>>1]>>4>=8&&J[W])J[W]=J[W].toUpperCase();if((Q[W>>1]&15)>=8&&J[W+1])J[W+1]=J[W+1].toUpperCase()}let X=`0x${J.join("")}`;return kY.set(`${$}.${Y}`,X),X}function JW($,Y){if(!T($,{strict:!1}))throw new S({address:$});return B$($,Y)}class w0 extends V{constructor({offset:$}){super(`Offset \`${$}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class IY extends V{constructor({length:$,position:Y}){super(`Position \`${Y}\` is out of bounds (\`0 < position < ${$}\`).`,{name:"PositionOutOfBoundsError"})}}class BY extends V{constructor({count:$,limit:Y}){super(`Recursive read limit of \`${Y}\` exceeded (recursive read count: \`${$}\`).`,{name:"RecursiveReadLimitExceededError"})}}var aX={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 BY({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition($){if($<0||$>this.bytes.length-1)throw new IY({length:this.bytes.length,position:$})},decrementPosition($){if($<0)throw new w0({offset:$});let Y=this.position-$;this.assertPosition(Y),this.position=Y},getReadCount($){return this.positionReadCount.get($||this.position)||0},incrementPosition($){if($<0)throw new w0({offset:$});let Y=this.position+$;this.assertPosition(Y),this.position=Y},inspectByte($){let Y=$??this.position;return this.assertPosition(Y),this.bytes[Y]},inspectBytes($,Y){let Z=Y??this.position;return this.assertPosition(Z+$-1),this.bytes.subarray(Z,Z+$)},inspectUint8($){let Y=$??this.position;return this.assertPosition(Y),this.bytes[Y]},inspectUint16($){let Y=$??this.position;return this.assertPosition(Y+1),this.dataView.getUint16(Y)},inspectUint24($){let Y=$??this.position;return this.assertPosition(Y+2),(this.dataView.getUint16(Y)<<8)+this.dataView.getUint8(Y+2)},inspectUint32($){let Y=$??this.position;return this.assertPosition(Y+3),this.dataView.getUint32(Y)},pushByte($){this.assertPosition(this.position),this.bytes[this.position]=$,this.position++},pushBytes($){this.assertPosition(this.position+$.length-1),this.bytes.set($,this.position),this.position+=$.length},pushUint8($){this.assertPosition(this.position),this.bytes[this.position]=$,this.position++},pushUint16($){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,$),this.position+=2},pushUint24($){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,$>>8),this.dataView.setUint8(this.position+2,$&255),this.position+=3},pushUint32($){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,$),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let $=this.inspectByte();return this.position++,$},readBytes($,Y){this.assertReadLimit(),this._touch();let Z=this.inspectBytes($);return this.position+=Y??$,Z},readUint8(){this.assertReadLimit(),this._touch();let $=this.inspectUint8();return this.position+=1,$},readUint16(){this.assertReadLimit(),this._touch();let $=this.inspectUint16();return this.position+=2,$},readUint24(){this.assertReadLimit(),this._touch();let $=this.inspectUint24();return this.position+=3,$},readUint32(){this.assertReadLimit(),this._touch();let $=this.inspectUint32();return this.position+=4,$},get remaining(){return this.bytes.length-this.position},setPosition($){let Y=this.position;return this.assertPosition($),this.position=$,()=>this.position=Y},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let $=this.getReadCount();if(this.positionReadCount.set(this.position,$+1),$>0)this.recursiveReadCount++}};function XJ($,{recursiveReadLimit:Y=8192}={}){let Z=Object.create(aX);return Z.bytes=$,Z.dataView=new DataView($.buffer??$,$.byteOffset,$.byteLength),Z.positionReadCount=new Map,Z.recursiveReadLimit=Y,Z}function WJ($,Y={}){if(typeof Y.size<"u")z($,{size:Y.size});let Z=j($,Y);return UY(Z,Y)}function DJ($,Y={}){let Z=$;if(typeof Y.size<"u")z(Z,{size:Y.size}),Z=n(Z);if(Z.length>1||Z[0]>1)throw new NY(Z);return Boolean(Z[0])}function h($,Y={}){if(typeof Y.size<"u")z($,{size:Y.size});let Z=j($,Y);return bQ(Z,Y)}function KJ($,Y={}){let Z=$;if(typeof Y.size<"u")z(Z,{size:Y.size}),Z=n(Z,{dir:"right"});return new TextDecoder().decode(Z)}function o($){if(typeof $[0]==="string")return J$($);return eX($)}function eX($){let Y=0;for(let J of $)Y+=J.length;let Z=new Uint8Array(Y),Q=0;for(let J of $)Z.set(J,Q),Q+=J.length;return Z}function J$($){return`0x${$.reduce((Y,Z)=>Y+Z.replace("0x",""),"")}`}var MW=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,VJ=/^(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)?$/;function v($,Y){if($.length!==Y.length)throw new DY({expectedLength:$.length,givenLength:Y.length});let Z=$1({params:$,values:Y}),Q=fY(Z);if(Q.length===0)return"0x";return Q}function $1({params:$,values:Y}){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(jY({param:$[Q],value:Y[Q]}));return Z}function jY({param:$,value:Y}){let Z=G0($.type);if(Z){let[Q,J]=Z;return Z1(Y,{length:Q,param:{...$,type:J}})}if($.type==="tuple")return D1(Y,{param:$});if($.type==="address")return Y1(Y);if($.type==="bool")return J1(Y);if($.type.startsWith("uint")||$.type.startsWith("int")){let Q=$.type.startsWith("int"),[,,J="256"]=VJ.exec($.type)??[];return X1(Y,{signed:Q,size:Number(J)})}if($.type.startsWith("bytes"))return Q1(Y,{param:$});if($.type==="string")return W1(Y);throw new GY($.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function fY($){let Y=0;for(let X=0;X<$.length;X++){let{dynamic:W,encoded:D}=$[X];if(W)Y+=32;else Y+=A(D)}let Z=[],Q=[],J=0;for(let X=0;X<$.length;X++){let{dynamic:W,encoded:D}=$[X];if(W)Z.push(H(Y+J,{size:32})),Q.push(D),J+=A(D);else Z.push(D)}return o([...Z,...Q])}function Y1($){if(!T($))throw new S({address:$});return{dynamic:!1,encoded:c($.toLowerCase())}}function Z1($,{length:Y,param:Z}){let Q=Y===null;if(!Array.isArray($))throw new S$($);if(!Q&&$.length!==Y)throw new XY({expectedLength:Y,givenLength:$.length,type:`${Z.type}[${Y}]`});let J=!1,X=[];for(let W=0;W<$.length;W++){let D=jY({param:Z,value:$[W]});if(D.dynamic)J=!0;X.push(D)}if(Q||J){let W=fY(X);if(Q){let D=H(X.length,{size:32});return{dynamic:!0,encoded:X.length>0?o([D,W]):D}}if(J)return{dynamic:!0,encoded:W}}return{dynamic:!1,encoded:o(X.map(({encoded:W})=>W))}}function Q1($,{param:Y}){let[,Z]=Y.type.split("bytes"),Q=A($);if(!Z){let J=$;if(Q%32!==0)J=c(J,{dir:"right",size:Math.ceil(($.length-2)/2/32)*32});return{dynamic:!0,encoded:o([c(H(Q,{size:32})),J])}}if(Q!==Number.parseInt(Z,10))throw new WY({expectedSize:Number.parseInt(Z,10),value:$});return{dynamic:!1,encoded:c($,{dir:"right"})}}function J1($){if(typeof $!=="boolean")throw new V(`Invalid boolean value: "${$}" (type: ${typeof $}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:c(qY($))}}function X1($,{signed:Y,size:Z=256}){if(typeof Z==="number"){let Q=2n**(BigInt(Z)-(Y?1n:0n))-1n,J=Y?-Q-1n:0n;if($>Q||$<J)throw new Q$({max:Q.toString(),min:J.toString(),signed:Y,size:Z/8,value:$.toString()})}return{dynamic:!1,encoded:H($,{size:32,signed:Y})}}function W1($){let Y=AY($),Z=Math.ceil(A(Y)/32),Q=[];for(let J=0;J<Z;J++)Q.push(c(y(Y,J*32,(J+1)*32),{dir:"right"}));return{dynamic:!0,encoded:o([c(H(A(Y),{size:32})),...Q])}}function D1($,{param:Y}){let Z=!1,Q=[];for(let J=0;J<Y.components.length;J++){let X=Y.components[J],W=Array.isArray($)?J:X.name,D=jY({param:X,value:$[W]});if(Q.push(D),D.dynamic)Z=!0}return{dynamic:Z,encoded:Z?fY(Q):o(Q.map(({encoded:J})=>J))}}function G0($){let Y=$.match(/^(.*)\[(\d+)?\]$/);return Y?[Y[2]?Number(Y[2]):null,Y[1]]:void 0}function U$($,Y){let Z=typeof Y==="string"?D0(Y):Y,Q=XJ(Z);if(A(Z)===0&&$.length>0)throw new L$;if(A(Y)&&A(Y)<32)throw new JY({data:typeof Y==="string"?Y:j(Y),params:$,size:A(Y)});let J=0,X=[];for(let W=0;W<$.length;++W){let D=$[W];Q.setPosition(J);let[K,w]=M$(Q,D,{staticPosition:0});J+=w,X.push(K)}return X}function M$($,Y,{staticPosition:Z}){let Q=G0(Y.type);if(Q){let[J,X]=Q;return V1($,{...Y,type:X},{length:J,staticPosition:Z})}if(Y.type==="tuple")return C1($,Y,{staticPosition:Z});if(Y.type==="address")return K1($);if(Y.type==="bool")return w1($);if(Y.type.startsWith("bytes"))return G1($,Y,{staticPosition:Z});if(Y.type.startsWith("uint")||Y.type.startsWith("int"))return F1($,Y);if(Y.type==="string")return N1($,{staticPosition:Z});throw new FY(Y.type,{docsPath:"/docs/contract/decodeAbiParameters"})}var wJ=32,PY=32;function K1($){let Y=$.readBytes(32);return[B$(j(CY(Y,-20))),32]}function V1($,Y,{length:Z,staticPosition:Q}){if(!Z){let W=h($.readBytes(PY)),D=Q+W,K=D+wJ;$.setPosition(D);let w=h($.readBytes(wJ)),G=j$(Y),F=0,C=[];for(let N=0;N<w;++N){$.setPosition(K+(G?N*32:F));let[U,P]=M$($,Y,{staticPosition:K});F+=P,C.push(U)}return $.setPosition(Q+32),[C,32]}if(j$(Y)){let W=h($.readBytes(PY)),D=Q+W,K=[];for(let w=0;w<Z;++w){$.setPosition(D+w*32);let[G]=M$($,Y,{staticPosition:D});K.push(G)}return $.setPosition(Q+32),[K,32]}let J=0,X=[];for(let W=0;W<Z;++W){let[D,K]=M$($,Y,{staticPosition:Q+J});J+=K,X.push(D)}return[X,J]}function w1($){return[DJ($.readBytes(32),{size:32}),32]}function G1($,Y,{staticPosition:Z}){let[Q,J]=Y.type.split("bytes");if(!J){let W=h($.readBytes(32));$.setPosition(Z+W);let D=h($.readBytes(32));if(D===0)return $.setPosition(Z+32),["0x",32];let K=$.readBytes(D);return $.setPosition(Z+32),[j(K),32]}return[j($.readBytes(Number.parseInt(J,10),32)),32]}function F1($,Y){let Z=Y.type.startsWith("int"),Q=Number.parseInt(Y.type.split("int")[1]||"256",10),J=$.readBytes(32);return[Q>48?WJ(J,{signed:Z}):h(J,{signed:Z}),32]}function C1($,Y,{staticPosition:Z}){let Q=Y.components.length===0||Y.components.some(({name:W})=>!W),J=Q?[]:{},X=0;if(j$(Y)){let W=h($.readBytes(PY)),D=Z+W;for(let K=0;K<Y.components.length;++K){let w=Y.components[K];$.setPosition(D+X);let[G,F]=M$($,w,{staticPosition:D});X+=F,J[Q?K:w?.name]=G}return $.setPosition(Z+32),[J,32]}for(let W=0;W<Y.components.length;++W){let D=Y.components[W],[K,w]=M$($,D,{staticPosition:Z});J[Q?W:D?.name]=K,X+=w}return[J,X]}function N1($,{staticPosition:Y}){let Z=h($.readBytes(32)),Q=Y+Z;$.setPosition(Q);let J=h($.readBytes(32));if(J===0)return $.setPosition(Y+32),["",32];let X=$.readBytes(J,32),W=KJ(n(X));return $.setPosition(Y+32),[W,32]}function j$($){let{type:Y}=$;if(Y==="string")return!0;if(Y==="bytes")return!0;if(Y.endsWith("[]"))return!0;if(Y==="tuple")return $.components?.some(j$);let Z=G0($.type);if(Z&&j$({...$,type:Z[1]}))return!0;return!1}function F0($){let{abi:Y,data:Z}=$,Q=y(Z,0,4);if(Q==="0x")throw new L$;let X=[...Y||[],$0,PQ].find((W)=>W.type==="error"&&Q===b(E(W)));if(!X)throw new z$(Q,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:X,args:"inputs"in X&&X.inputs&&X.inputs.length>0?U$(X.inputs,y(Z,4)):void 0,errorName:X.name}}var g=($,Y,Z)=>JSON.stringify($,(Q,J)=>{let X=typeof J==="bigint"?J.toString():J;return typeof Y==="function"?Y(Q,X):X},Z);function xY({abiItem:$,args:Y,includeFunctionName:Z=!0,includeName:Q=!1}){if(!("name"in $))return;if(!("inputs"in $))return;if(!$.inputs)return;return`${Z?$.name:""}(${$.inputs.map((J,X)=>`${Q&&J.name?`${J.name}: `:""}${typeof Y[X]==="object"?g(Y[X]):Y[X]}`).join(", ")})`}var GJ=V0;function d($){let{abi:Y,args:Z=[],name:Q}=$,J=B(Q,{strict:!1}),X=Y.filter((D)=>{if(J){if(D.type==="function")return b(D)===Q;if(D.type==="event")return GJ(D)===Q;return!1}return"name"in D&&D.name===Q});if(X.length===0)return;if(X.length===1)return X[0];let W;for(let D of X){if(!("inputs"in D))continue;if(!Z||Z.length===0){if(!D.inputs||D.inputs.length===0)return D;continue}if(!D.inputs)continue;if(D.inputs.length===0)continue;if(D.inputs.length!==Z.length)continue;if(Z.every((w,G)=>{let F="inputs"in D&&D.inputs[G];if(!F)return!1;return yY(w,F)})){if(W&&"inputs"in W&&W.inputs){let w=FJ(D.inputs,W.inputs,Z);if(w)throw new wY({abiItem:D,type:w[0]},{abiItem:W,type:w[1]})}W=D}}if(W)return W;return X[0]}function yY($,Y){let Z=typeof $,Q=Y.type;switch(Q){case"address":return T($,{strict:!1});case"bool":return Z==="boolean";case"function":return Z==="string";case"string":return Z==="string";default:{if(Q==="tuple"&&"components"in Y)return Object.values(Y.components).every((J,X)=>{return Z==="object"&&yY(Object.values($)[X],J)});if(/^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(Q))return Z==="number"||Z==="bigint";if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(Q))return Z==="string"||$ instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(Q))return Array.isArray($)&&$.every((J)=>yY(J,{...Y,type:Q.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}}function FJ($,Y,Z){for(let Q in $){let J=$[Q],X=Y[Q];if(J.type==="tuple"&&X.type==="tuple"&&"components"in J&&"components"in X)return FJ(J.components,X.components,Z[Q]);let W=[J.type,X.type];if((()=>{if(W.includes("address")&&W.includes("bytes20"))return!0;if(W.includes("address")&&W.includes("string"))return T(Z[Q],{strict:!1});if(W.includes("address")&&W.includes("bytes"))return T(Z[Q],{strict:!1});return!1})())return W}return}var CJ={gwei:9,wei:18},NJ={ether:-9,wei:9};function C0($,Y){let Z=$.toString(),Q=Z.startsWith("-");if(Q)Z=Z.slice(1);Z=Z.padStart(Y,"0");let[J,X]=[Z.slice(0,Z.length-Y),Z.slice(Z.length-Y)];return X=X.replace(/(0+)$/,""),`${Q?"-":""}${J||"0"}${X?`.${X}`:""}`}function N0($,Y="wei"){return C0($,CJ[Y])}function k($,Y="wei"){return C0($,NJ[Y])}class bY extends V{constructor({address:$}){super(`State for account "${$}" is set multiple times.`,{name:"AccountStateConflictError"})}}class hY extends V{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function HJ($){return $.reduce((Y,{slot:Z,value:Q})=>{return`${Y} ${Z}: ${Q}
|
|
24
|
+
`),{name:"InvalidDefinitionTypeError"})}}class Q0 extends V{constructor({offset:$,position:Y,size:Z}){super(`Slice ${Y==="start"?"starting":"ending"} at offset "${$}" is out-of-bounds (size: ${Z}).`,{name:"SliceOffsetOutOfBoundsError"})}}class J0 extends V{constructor({size:$,targetSize:Y,type:Z}){super(`${Z.charAt(0).toUpperCase()}${Z.slice(1).toLowerCase()} size (${$}) exceeds padding size (${Y}).`,{name:"SizeExceedsPaddingSizeError"})}}class X0 extends V{constructor({size:$,targetSize:Y,type:Z}){super(`${Z.charAt(0).toUpperCase()}${Z.slice(1).toLowerCase()} is expected to be ${Y} ${Z} long, but is ${$} ${Z} long.`,{name:"InvalidBytesLengthError"})}}function y($,Y,Z,{strict:Q}={}){if(B($,{strict:!1}))return xX($,Y,Z,{strict:Q});return CY($,Y,Z,{strict:Q})}function xQ($,Y){if(typeof Y==="number"&&Y>0&&Y>A($)-1)throw new Q0({offset:Y,position:"start",size:A($)})}function yQ($,Y,Z){if(typeof Y==="number"&&typeof Z==="number"&&A($)!==Z-Y)throw new Q0({offset:Z,position:"end",size:A($)})}function CY($,Y,Z,{strict:Q}={}){xQ($,Y);let J=$.slice(Y,Z);if(Q)yQ(J,Y,Z);return J}function xX($,Y,Z,{strict:Q}={}){xQ($,Y);let J=`0x${$.replace("0x","").slice((Y??0)*2,(Z??$.length)*2)}`;if(Q)yQ(J,Y,Z);return J}function s($,{dir:Y,size:Z=32}={}){if(typeof $==="string")return c($,{dir:Y,size:Z});return yX($,{dir:Y,size:Z})}function c($,{dir:Y,size:Z=32}={}){if(Z===null)return $;let Q=$.replace("0x","");if(Q.length>Z*2)throw new J0({size:Math.ceil(Q.length/2),targetSize:Z,type:"hex"});return`0x${Q[Y==="right"?"padEnd":"padStart"](Z*2,"0")}`}function yX($,{dir:Y,size:Z=32}={}){if(Z===null)return $;if($.length>Z)throw new J0({size:$.length,targetSize:Z,type:"bytes"});let Q=new Uint8Array(Z);for(let J=0;J<Z;J++){let X=Y==="right";Q[X?J:Z-J-1]=$[X?J:$.length-J-1]}return Q}class Q$ extends V{constructor({max:$,min:Y,signed:Z,size:Q,value:J}){super(`Number "${J}" is not in safe ${Q?`${Q*8}-bit ${Z?"signed":"unsigned"} `:""}integer range ${$?`(${Y} to ${$})`:`(above ${Y})`}`,{name:"IntegerOutOfRangeError"})}}class NY extends V{constructor($){super(`Bytes value "${$}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class HY extends V{constructor($){super(`Hex value "${$}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class MY extends V{constructor({givenSize:$,maxSize:Y}){super(`Size cannot exceed ${Y} bytes. Given size: ${$} bytes.`,{name:"SizeOverflowError"})}}function n($,{dir:Y="left"}={}){let Z=typeof $==="string"?$.replace("0x",""):$,Q=0;for(let J=0;J<Z.length-1;J++)if(Z[Y==="left"?J:Z.length-J-1].toString()==="0")Q++;else break;if(Z=Y==="left"?Z.slice(Q):Z.slice(0,Z.length-Q),typeof $==="string"){if(Z.length===1&&Y==="right")Z=`${Z}0`;return`0x${Z.length%2===1?`0${Z}`:Z}`}return Z}function z($,{size:Y}){if(A($)>Y)throw new MY({givenSize:A($),maxSize:Y})}function UY($,Y={}){let{signed:Z}=Y;if(Y.size)z($,{size:Y.size});let Q=BigInt($);if(!Z)return Q;let J=($.length-2)/2,X=(1n<<BigInt(J)*8n-1n)-1n;if(Q<=X)return Q;return Q-BigInt(`0x${"f".padStart(J*2,"f")}`)-1n}function F4($,Y={}){let Z=$;if(Y.size)z(Z,{size:Y.size}),Z=n(Z);if(n(Z)==="0x00")return!1;if(n(Z)==="0x01")return!0;throw new HY(Z)}function bQ($,Y={}){let Z=UY($,Y),Q=Number(Z);if(!Number.isSafeInteger(Q))throw new Q$({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:Y.signed,size:Y.size,value:`${Z}n`});return Q}var bX=Array.from({length:256},($,Y)=>Y.toString(16).padStart(2,"0"));function hQ($,Y={}){if(typeof $==="number"||typeof $==="bigint")return H($,Y);if(typeof $==="string")return AY($,Y);if(typeof $==="boolean")return qY($,Y);return j($,Y)}function qY($,Y={}){let Z=`0x${Number($)}`;if(typeof Y.size==="number")return z(Z,{size:Y.size}),s(Z,{size:Y.size});return Z}function j($,Y={}){let Z="";for(let J=0;J<$.length;J++)Z+=bX[$[J]];let Q=`0x${Z}`;if(typeof Y.size==="number")return z(Q,{size:Y.size}),s(Q,{dir:"right",size:Y.size});return Q}function H($,Y={}){let{signed:Z,size:Q}=Y,J=BigInt($),X;if(Q)if(Z)X=(1n<<BigInt(Q)*8n-1n)-1n;else X=2n**(BigInt(Q)*8n)-1n;else if(typeof $==="number")X=BigInt(Number.MAX_SAFE_INTEGER);let W=typeof X==="bigint"&&Z?-X-1n:0;if(X&&J>X||J<W){let K=typeof $==="bigint"?"n":"";throw new Q$({max:X?`${X}${K}`:void 0,min:`${W}${K}`,signed:Z,size:Q,value:`${$}${K}`})}let D=`0x${(Z&&J<0?(1n<<BigInt(Q*8))+BigInt(J):J).toString(16)}`;if(Q)return s(D,{size:Q});return D}var hX=new TextEncoder;function AY($,Y={}){let Z=hX.encode($);return j(Z,Y)}var vX=new TextEncoder;function W0($,Y={}){if(typeof $==="number"||typeof $==="bigint")return dX($,Y);if(typeof $==="boolean")return gX($,Y);if(B($))return D0($,Y);return TY($,Y)}function gX($,Y={}){let Z=new Uint8Array(1);if(Z[0]=Number($),typeof Y.size==="number")return z(Z,{size:Y.size}),s(Z,{size:Y.size});return Z}var u={zero:48,nine:57,A:65,F:70,a:97,f:102};function vQ($){if($>=u.zero&&$<=u.nine)return $-u.zero;if($>=u.A&&$<=u.F)return $-(u.A-10);if($>=u.a&&$<=u.f)return $-(u.a-10);return}function D0($,Y={}){let Z=$;if(Y.size)z(Z,{size:Y.size}),Z=s(Z,{dir:"right",size:Y.size});let Q=Z.slice(2);if(Q.length%2)Q=`0${Q}`;let J=Q.length/2,X=new Uint8Array(J);for(let W=0,D=0;W<J;W++){let K=vQ(Q.charCodeAt(D++)),w=vQ(Q.charCodeAt(D++));if(K===void 0||w===void 0)throw new V(`Invalid byte sequence ("${Q[D-2]}${Q[D-1]}" in "${Q}").`);X[W]=K*16+w}return X}function dX($,Y){let Z=H($,Y);return D0(Z)}function TY($,Y={}){let Z=vX.encode($);if(typeof Y.size==="number")return z(Z,{size:Y.size}),s(Z,{dir:"right",size:Y.size});return Z}var mX=BigInt(0),k$=BigInt(1),lX=BigInt(2),pX=BigInt(7),cX=BigInt(256),nX=BigInt(113),rQ=[],aQ=[],eQ=[];for(let $=0,Y=k$,Z=1,Q=0;$<24;$++){[Z,Q]=[Q,(2*Z+3*Q)%5],rQ.push(2*(5*Q+Z)),aQ.push(($+1)*($+2)/2%64);let J=mX;for(let X=0;X<7;X++)if(Y=(Y<<k$^(Y>>pX)*nX)%cX,Y&lX)J^=k$<<(k$<<BigInt(X))-k$;eQ.push(J)}var $J=mQ(eQ,!0),uX=$J[0],oX=$J[1],gQ=($,Y,Z)=>Z>32?cQ($,Y,Z):lQ($,Y,Z),dQ=($,Y,Z)=>Z>32?nQ($,Y,Z):pQ($,Y,Z);function iX($,Y=24){let Z=new Uint32Array(10);for(let Q=24-Y;Q<24;Q++){for(let W=0;W<10;W++)Z[W]=$[W]^$[W+10]^$[W+20]^$[W+30]^$[W+40];for(let W=0;W<10;W+=2){let D=(W+8)%10,K=(W+2)%10,w=Z[K],G=Z[K+1],F=gQ(w,G,1)^Z[D],C=dQ(w,G,1)^Z[D+1];for(let N=0;N<50;N+=10)$[W+N]^=F,$[W+N+1]^=C}let J=$[2],X=$[3];for(let W=0;W<24;W++){let D=aQ[W],K=gQ(J,X,D),w=dQ(J,X,D),G=rQ[W];J=$[G],X=$[G+1],$[G]=K,$[G+1]=w}for(let W=0;W<50;W+=10){for(let D=0;D<10;D++)Z[D]=$[W+D];for(let D=0;D<10;D++)$[W+D]^=~Z[(D+2)%10]&Z[(D+4)%10]}$[0]^=uX[Q],$[1]^=oX[Q]}zY(Z)}class RY extends tQ{constructor($,Y,Z,Q=!1,J=24){super();if(this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=$,this.suffix=Y,this.outputLen=Z,this.enableXOF=Q,this.rounds=J,EY(Z),!(0<$&&$<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=oQ(this.state)}clone(){return this._cloneInto()}keccak(){LY(this.state32),iX(this.state32,this.rounds),LY(this.state32),this.posOut=0,this.pos=0}update($){OY(this),$=iQ($),_Y($);let{blockLen:Y,state:Z}=this,Q=$.length;for(let J=0;J<Q;){let X=Math.min(Y-this.pos,Q-J);for(let W=0;W<X;W++)Z[this.pos++]^=$[J++];if(this.pos===Y)this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:$,suffix:Y,pos:Z,blockLen:Q}=this;if($[Z]^=Y,(Y&128)!==0&&Z===Q-1)this.keccak();$[Q-1]^=128,this.keccak()}writeInto($){OY(this,!1),_Y($),this.finish();let Y=this.state,{blockLen:Z}=this;for(let Q=0,J=$.length;Q<J;){if(this.posOut>=Z)this.keccak();let X=Math.min(Z-this.posOut,J-Q);$.set(Y.subarray(this.posOut,this.posOut+X),Q),this.posOut+=X,Q+=X}return $}xofInto($){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto($)}xof($){return EY($),this.xofInto(new Uint8Array($))}digestInto($){if(uQ($,this),this.finished)throw Error("digest() was already called");return this.writeInto($),this.destroy(),$}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,zY(this.state)}_cloneInto($){let{blockLen:Y,suffix:Z,outputLen:Q,rounds:J,enableXOF:X}=this;return $||($=new RY(Y,Z,Q,X,J)),$.state32.set(this.state32),$.pos=this.pos,$.posOut=this.posOut,$.finished=this.finished,$.rounds=J,$.suffix=Z,$.outputLen=Q,$.enableXOF=X,$.destroyed=this.destroyed,$}}var tX=($,Y,Z)=>sQ(()=>new RY(Y,$,Z));var YJ=(()=>tX(1,136,32))();function K0($,Y){let Z=Y||"hex",Q=YJ(B($,{strict:!1})?W0($):$);if(Z==="bytes")return Q;return hQ(Q)}var sX=($)=>K0(W0($));function ZJ($){return sX($)}function QJ($){let Y=!0,Z="",Q=0,J="",X=!1;for(let W=0;W<$.length;W++){let D=$[W];if(["(",")",","].includes(D))Y=!0;if(D==="(")Q++;if(D===")")Q--;if(!Y)continue;if(Q===0){if(D===" "&&["event","function",""].includes(J))J="";else if(J+=D,D===")"){X=!0;break}continue}if(D===" "){if($[W-1]!==","&&Z!==","&&Z!==",(")Z="",Y=!1;continue}J+=D,Z+=D}if(!X)throw new V("Unable to normalize signature.");return J}var JJ=($)=>{let Y=(()=>{if(typeof $==="string")return $;return T0($)})();return QJ(Y)};function V0($){return ZJ(JJ($))}var b=($)=>y(V0($),0,4);class S extends V{constructor({address:$}){super(`Address "${$}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class I$ extends Map{constructor($){super();Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=$}get($){let Y=super.get($);if(super.has($)&&Y!==void 0)this.delete($),super.set($,Y);return Y}set($,Y){if(super.set($,Y),this.maxSize&&this.size>this.maxSize){let Z=this.keys().next().value;if(Z)this.delete(Z)}return this}}var rX=/^0x[a-fA-F0-9]{40}$/,SY=new I$(8192);function T($,Y){let{strict:Z=!0}=Y??{},Q=`${$}.${Z}`;if(SY.has(Q))return SY.get(Q);let J=(()=>{if(!rX.test($))return!1;if($.toLowerCase()===$)return!0;if(Z)return B$($)===$;return!0})();return SY.set(Q,J),J}var kY=new I$(8192);function B$($,Y){if(kY.has(`${$}.${Y}`))return kY.get(`${$}.${Y}`);let Z=Y?`${Y}${$.toLowerCase()}`:$.substring(2).toLowerCase(),Q=K0(TY(Z),"bytes"),J=(Y?Z.substring(`${Y}0x`.length):Z).split("");for(let W=0;W<40;W+=2){if(Q[W>>1]>>4>=8&&J[W])J[W]=J[W].toUpperCase();if((Q[W>>1]&15)>=8&&J[W+1])J[W+1]=J[W+1].toUpperCase()}let X=`0x${J.join("")}`;return kY.set(`${$}.${Y}`,X),X}function JW($,Y){if(!T($,{strict:!1}))throw new S({address:$});return B$($,Y)}class w0 extends V{constructor({offset:$}){super(`Offset \`${$}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class IY extends V{constructor({length:$,position:Y}){super(`Position \`${Y}\` is out of bounds (\`0 < position < ${$}\`).`,{name:"PositionOutOfBoundsError"})}}class BY extends V{constructor({count:$,limit:Y}){super(`Recursive read limit of \`${Y}\` exceeded (recursive read count: \`${$}\`).`,{name:"RecursiveReadLimitExceededError"})}}var aX={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 BY({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition($){if($<0||$>this.bytes.length-1)throw new IY({length:this.bytes.length,position:$})},decrementPosition($){if($<0)throw new w0({offset:$});let Y=this.position-$;this.assertPosition(Y),this.position=Y},getReadCount($){return this.positionReadCount.get($||this.position)||0},incrementPosition($){if($<0)throw new w0({offset:$});let Y=this.position+$;this.assertPosition(Y),this.position=Y},inspectByte($){let Y=$??this.position;return this.assertPosition(Y),this.bytes[Y]},inspectBytes($,Y){let Z=Y??this.position;return this.assertPosition(Z+$-1),this.bytes.subarray(Z,Z+$)},inspectUint8($){let Y=$??this.position;return this.assertPosition(Y),this.bytes[Y]},inspectUint16($){let Y=$??this.position;return this.assertPosition(Y+1),this.dataView.getUint16(Y)},inspectUint24($){let Y=$??this.position;return this.assertPosition(Y+2),(this.dataView.getUint16(Y)<<8)+this.dataView.getUint8(Y+2)},inspectUint32($){let Y=$??this.position;return this.assertPosition(Y+3),this.dataView.getUint32(Y)},pushByte($){this.assertPosition(this.position),this.bytes[this.position]=$,this.position++},pushBytes($){this.assertPosition(this.position+$.length-1),this.bytes.set($,this.position),this.position+=$.length},pushUint8($){this.assertPosition(this.position),this.bytes[this.position]=$,this.position++},pushUint16($){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,$),this.position+=2},pushUint24($){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,$>>8),this.dataView.setUint8(this.position+2,$&255),this.position+=3},pushUint32($){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,$),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let $=this.inspectByte();return this.position++,$},readBytes($,Y){this.assertReadLimit(),this._touch();let Z=this.inspectBytes($);return this.position+=Y??$,Z},readUint8(){this.assertReadLimit(),this._touch();let $=this.inspectUint8();return this.position+=1,$},readUint16(){this.assertReadLimit(),this._touch();let $=this.inspectUint16();return this.position+=2,$},readUint24(){this.assertReadLimit(),this._touch();let $=this.inspectUint24();return this.position+=3,$},readUint32(){this.assertReadLimit(),this._touch();let $=this.inspectUint32();return this.position+=4,$},get remaining(){return this.bytes.length-this.position},setPosition($){let Y=this.position;return this.assertPosition($),this.position=$,()=>this.position=Y},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let $=this.getReadCount();if(this.positionReadCount.set(this.position,$+1),$>0)this.recursiveReadCount++}};function XJ($,{recursiveReadLimit:Y=8192}={}){let Z=Object.create(aX);return Z.bytes=$,Z.dataView=new DataView($.buffer??$,$.byteOffset,$.byteLength),Z.positionReadCount=new Map,Z.recursiveReadLimit=Y,Z}function WJ($,Y={}){if(typeof Y.size<"u")z($,{size:Y.size});let Z=j($,Y);return UY(Z,Y)}function DJ($,Y={}){let Z=$;if(typeof Y.size<"u")z(Z,{size:Y.size}),Z=n(Z);if(Z.length>1||Z[0]>1)throw new NY(Z);return Boolean(Z[0])}function h($,Y={}){if(typeof Y.size<"u")z($,{size:Y.size});let Z=j($,Y);return bQ(Z,Y)}function KJ($,Y={}){let Z=$;if(typeof Y.size<"u")z(Z,{size:Y.size}),Z=n(Z,{dir:"right"});return new TextDecoder().decode(Z)}function o($){if(typeof $[0]==="string")return J$($);return eX($)}function eX($){let Y=0;for(let J of $)Y+=J.length;let Z=new Uint8Array(Y),Q=0;for(let J of $)Z.set(J,Q),Q+=J.length;return Z}function J$($){return`0x${$.reduce((Y,Z)=>Y+Z.replace("0x",""),"")}`}var MW=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,VJ=/^(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)?$/;function v($,Y){if($.length!==Y.length)throw new DY({expectedLength:$.length,givenLength:Y.length});let Z=$1({params:$,values:Y}),Q=fY(Z);if(Q.length===0)return"0x";return Q}function $1({params:$,values:Y}){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(jY({param:$[Q],value:Y[Q]}));return Z}function jY({param:$,value:Y}){let Z=G0($.type);if(Z){let[Q,J]=Z;return Z1(Y,{length:Q,param:{...$,type:J}})}if($.type==="tuple")return D1(Y,{param:$});if($.type==="address")return Y1(Y);if($.type==="bool")return J1(Y);if($.type.startsWith("uint")||$.type.startsWith("int")){let Q=$.type.startsWith("int"),[,,J="256"]=VJ.exec($.type)??[];return X1(Y,{signed:Q,size:Number(J)})}if($.type.startsWith("bytes"))return Q1(Y,{param:$});if($.type==="string")return W1(Y);throw new GY($.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function fY($){let Y=0;for(let X=0;X<$.length;X++){let{dynamic:W,encoded:D}=$[X];if(W)Y+=32;else Y+=A(D)}let Z=[],Q=[],J=0;for(let X=0;X<$.length;X++){let{dynamic:W,encoded:D}=$[X];if(W)Z.push(H(Y+J,{size:32})),Q.push(D),J+=A(D);else Z.push(D)}return o([...Z,...Q])}function Y1($){if(!T($))throw new S({address:$});return{dynamic:!1,encoded:c($.toLowerCase())}}function Z1($,{length:Y,param:Z}){let Q=Y===null;if(!Array.isArray($))throw new S$($);if(!Q&&$.length!==Y)throw new XY({expectedLength:Y,givenLength:$.length,type:`${Z.type}[${Y}]`});let J=!1,X=[];for(let W=0;W<$.length;W++){let D=jY({param:Z,value:$[W]});if(D.dynamic)J=!0;X.push(D)}if(Q||J){let W=fY(X);if(Q){let D=H(X.length,{size:32});return{dynamic:!0,encoded:X.length>0?o([D,W]):D}}if(J)return{dynamic:!0,encoded:W}}return{dynamic:!1,encoded:o(X.map(({encoded:W})=>W))}}function Q1($,{param:Y}){let[,Z]=Y.type.split("bytes"),Q=A($);if(!Z){let J=$;if(Q%32!==0)J=c(J,{dir:"right",size:Math.ceil(($.length-2)/2/32)*32});return{dynamic:!0,encoded:o([c(H(Q,{size:32})),J])}}if(Q!==Number.parseInt(Z,10))throw new WY({expectedSize:Number.parseInt(Z,10),value:$});return{dynamic:!1,encoded:c($,{dir:"right"})}}function J1($){if(typeof $!=="boolean")throw new V(`Invalid boolean value: "${$}" (type: ${typeof $}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:c(qY($))}}function X1($,{signed:Y,size:Z=256}){if(typeof Z==="number"){let Q=2n**(BigInt(Z)-(Y?1n:0n))-1n,J=Y?-Q-1n:0n;if($>Q||$<J)throw new Q$({max:Q.toString(),min:J.toString(),signed:Y,size:Z/8,value:$.toString()})}return{dynamic:!1,encoded:H($,{size:32,signed:Y})}}function W1($){let Y=AY($),Z=Math.ceil(A(Y)/32),Q=[];for(let J=0;J<Z;J++)Q.push(c(y(Y,J*32,(J+1)*32),{dir:"right"}));return{dynamic:!0,encoded:o([c(H(A(Y),{size:32})),...Q])}}function D1($,{param:Y}){let Z=!1,Q=[];for(let J=0;J<Y.components.length;J++){let X=Y.components[J],W=Array.isArray($)?J:X.name,D=jY({param:X,value:$[W]});if(Q.push(D),D.dynamic)Z=!0}return{dynamic:Z,encoded:Z?fY(Q):o(Q.map(({encoded:J})=>J))}}function G0($){let Y=$.match(/^(.*)\[(\d+)?\]$/);return Y?[Y[2]?Number(Y[2]):null,Y[1]]:void 0}function U$($,Y){let Z=typeof Y==="string"?D0(Y):Y,Q=XJ(Z);if(A(Z)===0&&$.length>0)throw new L$;if(A(Y)&&A(Y)<32)throw new JY({data:typeof Y==="string"?Y:j(Y),params:$,size:A(Y)});let J=0,X=[];for(let W=0;W<$.length;++W){let D=$[W];Q.setPosition(J);let[K,w]=M$(Q,D,{staticPosition:0});J+=w,X.push(K)}return X}function M$($,Y,{staticPosition:Z}){let Q=G0(Y.type);if(Q){let[J,X]=Q;return V1($,{...Y,type:X},{length:J,staticPosition:Z})}if(Y.type==="tuple")return C1($,Y,{staticPosition:Z});if(Y.type==="address")return K1($);if(Y.type==="bool")return w1($);if(Y.type.startsWith("bytes"))return G1($,Y,{staticPosition:Z});if(Y.type.startsWith("uint")||Y.type.startsWith("int"))return F1($,Y);if(Y.type==="string")return N1($,{staticPosition:Z});throw new FY(Y.type,{docsPath:"/docs/contract/decodeAbiParameters"})}var wJ=32,PY=32;function K1($){let Y=$.readBytes(32);return[B$(j(CY(Y,-20))),32]}function V1($,Y,{length:Z,staticPosition:Q}){if(!Z){let W=h($.readBytes(PY)),D=Q+W,K=D+wJ;$.setPosition(D);let w=h($.readBytes(wJ)),G=j$(Y),F=0,C=[];for(let N=0;N<w;++N){$.setPosition(K+(G?N*32:F));let[U,P]=M$($,Y,{staticPosition:K});F+=P,C.push(U)}return $.setPosition(Q+32),[C,32]}if(j$(Y)){let W=h($.readBytes(PY)),D=Q+W,K=[];for(let w=0;w<Z;++w){$.setPosition(D+w*32);let[G]=M$($,Y,{staticPosition:D});K.push(G)}return $.setPosition(Q+32),[K,32]}let J=0,X=[];for(let W=0;W<Z;++W){let[D,K]=M$($,Y,{staticPosition:Q+J});J+=K,X.push(D)}return[X,J]}function w1($){return[DJ($.readBytes(32),{size:32}),32]}function G1($,Y,{staticPosition:Z}){let[Q,J]=Y.type.split("bytes");if(!J){let W=h($.readBytes(32));$.setPosition(Z+W);let D=h($.readBytes(32));if(D===0)return $.setPosition(Z+32),["0x",32];let K=$.readBytes(D);return $.setPosition(Z+32),[j(K),32]}return[j($.readBytes(Number.parseInt(J,10),32)),32]}function F1($,Y){let Z=Y.type.startsWith("int"),Q=Number.parseInt(Y.type.split("int")[1]||"256",10),J=$.readBytes(32);return[Q>48?WJ(J,{signed:Z}):h(J,{signed:Z}),32]}function C1($,Y,{staticPosition:Z}){let Q=Y.components.length===0||Y.components.some(({name:W})=>!W),J=Q?[]:{},X=0;if(j$(Y)){let W=h($.readBytes(PY)),D=Z+W;for(let K=0;K<Y.components.length;++K){let w=Y.components[K];$.setPosition(D+X);let[G,F]=M$($,w,{staticPosition:D});X+=F,J[Q?K:w?.name]=G}return $.setPosition(Z+32),[J,32]}for(let W=0;W<Y.components.length;++W){let D=Y.components[W],[K,w]=M$($,D,{staticPosition:Z});J[Q?W:D?.name]=K,X+=w}return[J,X]}function N1($,{staticPosition:Y}){let Z=h($.readBytes(32)),Q=Y+Z;$.setPosition(Q);let J=h($.readBytes(32));if(J===0)return $.setPosition(Y+32),["",32];let X=$.readBytes(J,32),W=KJ(n(X));return $.setPosition(Y+32),[W,32]}function j$($){let{type:Y}=$;if(Y==="string")return!0;if(Y==="bytes")return!0;if(Y.endsWith("[]"))return!0;if(Y==="tuple")return $.components?.some(j$);let Z=G0($.type);if(Z&&j$({...$,type:Z[1]}))return!0;return!1}function F0($){let{abi:Y,data:Z}=$,Q=y(Z,0,4);if(Q==="0x")throw new L$;let X=[...Y||[],$0,PQ].find((W)=>W.type==="error"&&Q===b(E(W)));if(!X)throw new z$(Q,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:X,args:"inputs"in X&&X.inputs&&X.inputs.length>0?U$(X.inputs,y(Z,4)):void 0,errorName:X.name}}var g=($,Y,Z)=>JSON.stringify($,(Q,J)=>{let X=typeof J==="bigint"?J.toString():J;return typeof Y==="function"?Y(Q,X):X},Z);function xY({abiItem:$,args:Y,includeFunctionName:Z=!0,includeName:Q=!1}){if(!("name"in $))return;if(!("inputs"in $))return;if(!$.inputs)return;return`${Z?$.name:""}(${$.inputs.map((J,X)=>`${Q&&J.name?`${J.name}: `:""}${typeof Y[X]==="object"?g(Y[X]):Y[X]}`).join(", ")})`}var GJ=V0;function d($){let{abi:Y,args:Z=[],name:Q}=$,J=B(Q,{strict:!1}),X=Y.filter((D)=>{if(J){if(D.type==="function")return b(D)===Q;if(D.type==="event")return GJ(D)===Q;return!1}return"name"in D&&D.name===Q});if(X.length===0)return;if(X.length===1)return X[0];let W;for(let D of X){if(!("inputs"in D))continue;if(!Z||Z.length===0){if(!D.inputs||D.inputs.length===0)return D;continue}if(!D.inputs)continue;if(D.inputs.length===0)continue;if(D.inputs.length!==Z.length)continue;if(Z.every((w,G)=>{let F="inputs"in D&&D.inputs[G];if(!F)return!1;return yY(w,F)})){if(W&&"inputs"in W&&W.inputs){let w=FJ(D.inputs,W.inputs,Z);if(w)throw new wY({abiItem:D,type:w[0]},{abiItem:W,type:w[1]})}W=D}}if(W)return W;return X[0]}function yY($,Y){let Z=typeof $,Q=Y.type;switch(Q){case"address":return T($,{strict:!1});case"bool":return Z==="boolean";case"function":return Z==="string";case"string":return Z==="string";default:{if(Q==="tuple"&&"components"in Y)return Object.values(Y.components).every((J,X)=>{return Z==="object"&&yY(Object.values($)[X],J)});if(/^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(Q))return Z==="number"||Z==="bigint";if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(Q))return Z==="string"||$ instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(Q))return Array.isArray($)&&$.every((J)=>yY(J,{...Y,type:Q.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}}function FJ($,Y,Z){for(let Q in $){let J=$[Q],X=Y[Q];if(J.type==="tuple"&&X.type==="tuple"&&"components"in J&&"components"in X)return FJ(J.components,X.components,Z[Q]);let W=[J.type,X.type];if((()=>{if(W.includes("address")&&W.includes("bytes20"))return!0;if(W.includes("address")&&W.includes("string"))return T(Z[Q],{strict:!1});if(W.includes("address")&&W.includes("bytes"))return T(Z[Q],{strict:!1});return!1})())return W}return}var CJ={gwei:9,wei:18},NJ={ether:-9,wei:9};function C0($,Y){let Z=$.toString(),Q=Z.startsWith("-");if(Q)Z=Z.slice(1);Z=Z.padStart(Y,"0");let[J,X]=[Z.slice(0,Z.length-Y),Z.slice(Z.length-Y)];return X=X.replace(/(0+)$/,""),`${Q?"-":""}${J||"0"}${X?`.${X}`:""}`}function N0($,Y="wei"){return C0($,CJ[Y])}function k($,Y="wei"){return C0($,NJ[Y])}class bY extends V{constructor({address:$}){super(`State for account "${$}" is set multiple times.`,{name:"AccountStateConflictError"})}}class hY extends V{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function HJ($){return $.reduce((Y,{slot:Z,value:Q})=>{return`${Y} ${Z}: ${Q}
|
|
26
25
|
`},"")}function MJ($){return $.reduce((Y,{address:Z,...Q})=>{let J=`${Y} ${Z}:
|
|
27
26
|
`;if(Q.nonce)J+=` nonce: ${Q.nonce}
|
|
28
27
|
`;if(Q.balance)J+=` balance: ${Q.balance}
|
|
@@ -38,5 +37,5 @@ ${MJ(C)}`;super($.shortMessage,{cause:$,docsPath:Z,metaMessages:[...$.metaMessag
|
|
|
38
37
|
`),{cause:$,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(h$,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class v$ extends V{constructor({cause:$,gas:Y}={}){super(`The amount of gas ${Y?`(${Y}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:$,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(v$,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class g$ extends V{constructor({cause:$,gas:Y}={}){super(`The amount of gas ${Y?`(${Y}) `:""}provided for the transaction is too low.`,{cause:$,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(g$,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class d$ extends V{constructor({cause:$}){super("The transaction type is not supported for this chain.",{cause:$,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(d$,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class D$ extends V{constructor({cause:$,maxPriorityFeePerGas:Y,maxFeePerGas:Z}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${Y?` = ${k(Y)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${Z?` = ${k(Z)} gwei`:""}).`].join(`
|
|
39
38
|
`),{cause:$,name:"TipAboveFeeCapError"})}}Object.defineProperty(D$,"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 m$ extends V{constructor({cause:$}){super(`An error occurred while executing: ${$?.shortMessage}`,{cause:$,name:"UnknownNodeError"})}}class H0 extends V{constructor({body:$,cause:Y,details:Z,headers:Q,status:J,url:X}){super("HTTP request failed.",{cause:Y,details:Z,metaMessages:[J&&`Status: ${J}`,`URL: ${X$(X)}`,$&&`Request body: ${g($)}`].filter(Boolean),name:"HttpRequestError"});Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=$,this.headers=Q,this.status=J,this.url=X}}class cY extends V{constructor({body:$,error:Y,url:Z}){super("RPC Request failed.",{cause:Y,details:Y.message,metaMessages:[`URL: ${X$(Z)}`,`Request body: ${g($)}`],name:"RpcRequestError"});Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=Y.code,this.data=Y.data,this.url=Z}}class R1 extends V{constructor({body:$,url:Y}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${X$(Y)}`,`Request body: ${g($)}`],name:"TimeoutError"});Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=Y}}var S1=-1;class _ extends V{constructor($,{code:Y,docsPath:Z,metaMessages:Q,name:J,shortMessage:X}){super(X,{cause:$,docsPath:Z,metaMessages:Q||$?.metaMessages,name:J||"RpcError"});Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=J||$.name,this.code=$ instanceof cY?$.code:Y??S1}}class O extends _{constructor($,Y){super($,Y);Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=Y.data}}class nY extends _{constructor($){super($,{code:nY.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(nY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class uY extends _{constructor($){super($,{code:uY.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(uY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class oY extends _{constructor($,{method:Y}={}){super($,{code:oY.code,name:"MethodNotFoundRpcError",shortMessage:`The method${Y?` "${Y}"`:""} does not exist / is not available.`})}}Object.defineProperty(oY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class iY extends _{constructor($){super($,{code:iY.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
40
39
|
`)})}}Object.defineProperty(iY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class tY extends _{constructor($){super($,{code:tY.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(tY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class sY extends _{constructor($){super($,{code:sY.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
41
|
-
`)})}}Object.defineProperty(sY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32000});class rY extends _{constructor($){super($,{code:rY.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(rY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class aY extends _{constructor($){super($,{code:aY.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(aY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class eY extends _{constructor($){super($,{code:eY.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(eY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class $Z extends _{constructor($,{method:Y}={}){super($,{code:$Z.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${Y?` "${Y}"`:""} is not supported.`})}}Object.defineProperty($Z,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class YZ extends _{constructor($){super($,{code:YZ.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(YZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class ZZ extends _{constructor($){super($,{code:ZZ.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(ZZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class QZ extends O{constructor($){super($,{code:QZ.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(QZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class JZ extends O{constructor($){super($,{code:JZ.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(JZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class XZ extends O{constructor($,{method:Y}={}){super($,{code:XZ.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${Y?` " ${Y}"`:""}.`})}}Object.defineProperty(XZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class WZ extends O{constructor($){super($,{code:WZ.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(WZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class DZ extends O{constructor($){super($,{code:DZ.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(DZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class KZ extends O{constructor($){super($,{code:KZ.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(KZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class VZ extends O{constructor($){super($,{code:VZ.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(VZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class wZ extends O{constructor($){super($,{code:wZ.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(wZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class GZ extends O{constructor($){super($,{code:GZ.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(GZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class FZ extends O{constructor($){super($,{code:FZ.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(FZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class CZ extends O{constructor($){super($,{code:CZ.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(CZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class NZ extends O{constructor($){super($,{code:NZ.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(NZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class HZ extends O{constructor($){super($,{code:HZ.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(HZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class MZ extends O{constructor($){super($,{code:MZ.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(MZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:7000});class k1 extends _{constructor($){super($,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}function OJ($,Y){let Z=($.details||"").toLowerCase(),Q=$ instanceof V?$.walk((J)=>J?.code===r.code):$;if(Q instanceof V)return new r({cause:$,message:Q.details});if(r.nodeMessage.test(Z))return new r({cause:$,message:$.details});if(W$.nodeMessage.test(Z))return new W$({cause:$,maxFeePerGas:Y?.maxFeePerGas});if(P$.nodeMessage.test(Z))return new P$({cause:$,maxFeePerGas:Y?.maxFeePerGas});if(x$.nodeMessage.test(Z))return new x$({cause:$,nonce:Y?.nonce});if(y$.nodeMessage.test(Z))return new y$({cause:$,nonce:Y?.nonce});if(b$.nodeMessage.test(Z))return new b$({cause:$,nonce:Y?.nonce});if(h$.nodeMessage.test(Z))return new h$({cause:$});if(v$.nodeMessage.test(Z))return new v$({cause:$,gas:Y?.gas});if(g$.nodeMessage.test(Z))return new g$({cause:$,gas:Y?.gas});if(d$.nodeMessage.test(Z))return new d$({cause:$});if(D$.nodeMessage.test(Z))return new D$({cause:$,maxFeePerGas:Y?.maxFeePerGas,maxPriorityFeePerGas:Y?.maxPriorityFeePerGas});return new m$({cause:$})}function LJ($,{docsPath:Y,...Z}){let Q=(()=>{let J=OJ($,Z);if(J instanceof m$)return $;return J})();return new vY(Q,{docsPath:Y,...Z})}function zJ($,{format:Y}){if(!Y)return{};let Z={};function Q(X){let W=Object.keys(X);for(let D of W){if(D in $)Z[D]=$[D];if(X[D]&&typeof X[D]==="object"&&!Array.isArray(X[D]))Q(X[D])}}let J=Y($||{});return Q(J),Z}function RJ($,Y){return({exclude:Z,format:Q})=>{return{exclude:Z,format:(J,X)=>{let W=Y(J,X);if(Z)for(let D of Z)delete W[D];return{...W,...Q(J,X)}},type:$}}}var I1={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function UZ($,Y){let Z={};if(typeof $.authorizationList<"u")Z.authorizationList=B1($.authorizationList);if(typeof $.accessList<"u")Z.accessList=$.accessList;if(typeof $.blobVersionedHashes<"u")Z.blobVersionedHashes=$.blobVersionedHashes;if(typeof $.blobs<"u")if(typeof $.blobs[0]!=="string")Z.blobs=$.blobs.map((Q)=>j(Q));else Z.blobs=$.blobs;if(typeof $.data<"u")Z.data=$.data;if($.account)Z.from=$.account.address;if(typeof $.from<"u")Z.from=$.from;if(typeof $.gas<"u")Z.gas=H($.gas);if(typeof $.gasPrice<"u")Z.gasPrice=H($.gasPrice);if(typeof $.maxFeePerBlobGas<"u")Z.maxFeePerBlobGas=H($.maxFeePerBlobGas);if(typeof $.maxFeePerGas<"u")Z.maxFeePerGas=H($.maxFeePerGas);if(typeof $.maxPriorityFeePerGas<"u")Z.maxPriorityFeePerGas=H($.maxPriorityFeePerGas);if(typeof $.nonce<"u")Z.nonce=H($.nonce);if(typeof $.to<"u")Z.to=$.to;if(typeof $.type<"u")Z.type=I1[$.type];if(typeof $.value<"u")Z.value=H($.value);return Z}var T8=RJ("transactionRequest",UZ);function B1($){return $.map((Y)=>({address:Y.address,r:Y.r?H(BigInt(Y.r)):Y.r,s:Y.s?H(BigInt(Y.s)):Y.s,chainId:H(Y.chainId),nonce:H(Y.nonce),...typeof Y.yParity<"u"?{yParity:H(Y.yParity)}:{},...typeof Y.v<"u"&&typeof Y.yParity>"u"?{v:H(Y.v)}:{}}))}function SJ(){let $=()=>{return},Y=()=>{return};return{promise:new Promise((Q,J)=>{$=Q,Y=J}),resolve:$,reject:Y}}var qZ=new Map;function kJ({fn:$,id:Y,shouldSplitBatch:Z,wait:Q=0,sort:J}){let X=async()=>{let G=K();W();let F=G.map(({args:C})=>C);if(F.length===0)return;$(F).then((C)=>{if(J&&Array.isArray(C))C.sort(J);for(let N=0;N<G.length;N++){let{resolve:U}=G[N];U?.([C[N],C])}}).catch((C)=>{for(let N=0;N<G.length;N++){let{reject:U}=G[N];U?.(C)}})},W=()=>qZ.delete(Y),D=()=>K().map(({args:G})=>G),K=()=>qZ.get(Y)||[],w=(G)=>qZ.set(Y,[...K(),G]);return{flush:W,async schedule(G){let{promise:F,resolve:C,reject:N}=SJ();if(Z?.([...D(),G]))X();if(K().length>0)return w({args:G,resolve:C,reject:N}),F;return w({args:G,resolve:C,reject:N}),setTimeout(X,Q),F}}}function IJ($){if(!$||$.length===0)return;return $.reduce((Y,{slot:Z,value:Q})=>{if(Z.length!==66)throw new X0({size:Z.length,targetSize:66,type:"hex"});if(Q.length!==66)throw new X0({size:Q.length,targetSize:66,type:"hex"});return Y[Z]=Q,Y},{})}function j1($){let{balance:Y,nonce:Z,state:Q,stateDiff:J,code:X}=$,W={};if(X!==void 0)W.code=X;if(Y!==void 0)W.balance=H(Y);if(Z!==void 0)W.nonce=H(Z);if(Q!==void 0)W.state=IJ(Q);if(J!==void 0){if(W.state)throw new hY;W.stateDiff=IJ(J)}return W}function BJ($){if(!$)return;let Y={};for(let{address:Z,...Q}of $){if(!T(Z,{strict:!1}))throw new S({address:Z});if(Y[Z])throw new bY({address:Z});Y[Z]=j1(Q)}return Y}var j8=2n**(8n-1n)-1n,f8=2n**(16n-1n)-1n,P8=2n**(24n-1n)-1n,x8=2n**(32n-1n)-1n,y8=2n**(40n-1n)-1n,b8=2n**(48n-1n)-1n,h8=2n**(56n-1n)-1n,v8=2n**(64n-1n)-1n,g8=2n**(72n-1n)-1n,d8=2n**(80n-1n)-1n,m8=2n**(88n-1n)-1n,l8=2n**(96n-1n)-1n,p8=2n**(104n-1n)-1n,c8=2n**(112n-1n)-1n,n8=2n**(120n-1n)-1n,u8=2n**(128n-1n)-1n,o8=2n**(136n-1n)-1n,i8=2n**(144n-1n)-1n,t8=2n**(152n-1n)-1n,s8=2n**(160n-1n)-1n,r8=2n**(168n-1n)-1n,a8=2n**(176n-1n)-1n,e8=2n**(184n-1n)-1n,$2=2n**(192n-1n)-1n,Y2=2n**(200n-1n)-1n,Z2=2n**(208n-1n)-1n,Q2=2n**(216n-1n)-1n,J2=2n**(224n-1n)-1n,X2=2n**(232n-1n)-1n,W2=2n**(240n-1n)-1n,D2=2n**(248n-1n)-1n,K2=2n**(256n-1n)-1n,V2=-(2n**(8n-1n)),w2=-(2n**(16n-1n)),G2=-(2n**(24n-1n)),F2=-(2n**(32n-1n)),C2=-(2n**(40n-1n)),N2=-(2n**(48n-1n)),H2=-(2n**(56n-1n)),M2=-(2n**(64n-1n)),U2=-(2n**(72n-1n)),q2=-(2n**(80n-1n)),A2=-(2n**(88n-1n)),T2=-(2n**(96n-1n)),E2=-(2n**(104n-1n)),_2=-(2n**(112n-1n)),O2=-(2n**(120n-1n)),L2=-(2n**(128n-1n)),z2=-(2n**(136n-1n)),R2=-(2n**(144n-1n)),S2=-(2n**(152n-1n)),k2=-(2n**(160n-1n)),I2=-(2n**(168n-1n)),B2=-(2n**(176n-1n)),j2=-(2n**(184n-1n)),f2=-(2n**(192n-1n)),P2=-(2n**(200n-1n)),x2=-(2n**(208n-1n)),y2=-(2n**(216n-1n)),b2=-(2n**(224n-1n)),h2=-(2n**(232n-1n)),v2=-(2n**(240n-1n)),g2=-(2n**(248n-1n)),d2=-(2n**(256n-1n)),m2=2n**8n-1n,l2=2n**16n-1n,p2=2n**24n-1n,c2=2n**32n-1n,n2=2n**40n-1n,u2=2n**48n-1n,o2=2n**56n-1n,i2=2n**64n-1n,t2=2n**72n-1n,s2=2n**80n-1n,r2=2n**88n-1n,a2=2n**96n-1n,e2=2n**104n-1n,$D=2n**112n-1n,YD=2n**120n-1n,ZD=2n**128n-1n,QD=2n**136n-1n,JD=2n**144n-1n,XD=2n**152n-1n,WD=2n**160n-1n,DD=2n**168n-1n,KD=2n**176n-1n,VD=2n**184n-1n,wD=2n**192n-1n,GD=2n**200n-1n,FD=2n**208n-1n,CD=2n**216n-1n,ND=2n**224n-1n,HD=2n**232n-1n,MD=2n**240n-1n,UD=2n**248n-1n,jJ=2n**256n-1n;function fJ($){let{account:Y,maxFeePerGas:Z,maxPriorityFeePerGas:Q,to:J}=$,X=Y?N$(Y):void 0;if(X&&!T(X.address))throw new S({address:X.address});if(J&&!T(J))throw new S({address:J});if(Z&&Z>jJ)throw new W$({maxFeePerGas:Z});if(Q&&Z&&Q>Z)throw new D$({maxFeePerGas:Z,maxPriorityFeePerGas:Q})}async function PJ($,Y){let{account:Z=$.account,authorizationList:Q,batch:J=Boolean($.batch?.multicall),blockNumber:X,blockTag:W=$.experimental_blockTag??"latest",accessList:D,blobs:K,blockOverrides:w,code:G,data:F,factory:C,factoryData:N,gas:U,gasPrice:P,maxFeePerBlobGas:q$,maxFeePerGas:K$,maxPriorityFeePerGas:A$,nonce:l$,to:V$,value:vJ,stateOverride:gJ,...dJ}=Y,SZ=Z?N$(Z):void 0;if(G&&(C||N))throw new V("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(G&&V$)throw new V("Cannot provide both `code` & `to` as parameters.");let kZ=G&&F,IZ=C&&N&&V$&&F,BZ=kZ||IZ,mJ=(()=>{if(kZ)return xJ({code:G,data:F});if(IZ)return y1({data:F,factory:C,factoryData:N,to:V$});return F})();try{fJ(Y);let T$=(typeof X==="bigint"?H(X):void 0)||W,a=w?zQ(w):void 0,e=BJ(gJ),jZ=$.chain?.formatters?.transactionRequest?.format,U0=(jZ||UZ)({...zJ(dJ,{format:jZ}),accessList:D,account:SZ,authorizationList:Q,blobs:K,data:mJ,gas:U,gasPrice:P,maxFeePerBlobGas:q$,maxFeePerGas:K$,maxPriorityFeePerGas:A$,nonce:l$,to:BZ?void 0:V$,value:vJ},"call");if(J&&P1({request:U0})&&!e&&!a)try{return await x1($,{...U0,blockNumber:X,blockTag:W})}catch(i){if(!(i instanceof e$)&&!(i instanceof H$))throw i}let lJ=(()=>{let i=[U0,T$];if(e&&a)return[...i,e,a];if(e)return[...i,e];if(a)return[...i,{},a];return i})(),fZ=await $.request({method:"eth_call",params:lJ});if(fZ==="0x")return{data:void 0};return{data:fZ}}catch(M0){let T$=b1(M0),{offchainLookup:a,offchainLookupSignature:e}=await import("./chunk-g3ma3sec.js");if($.ccipRead!==!1&&T$?.slice(0,10)===e&&V$)return{data:await a($,{data:T$,to:V$})};if(BZ&&T$?.slice(0,10)==="0x101bb98d")throw new gY({factory:C});throw LJ(M0,{...Y,account:SZ,chain:$.chain})}}function P1({request:$}){let{data:Y,to:Z,...Q}=$;if(!Y)return!1;if(Y.startsWith(SQ))return!1;if(!Z)return!1;if(Object.values(Q).filter((J)=>typeof J<"u").length>0)return!1;return!0}async function x1($,Y){let{batchSize:Z=1024,deployless:Q=!1,wait:J=0}=typeof $.batch?.multicall==="object"?$.batch.multicall:{},{blockNumber:X,blockTag:W=$.experimental_blockTag??"latest",data:D,to:K}=Y,w=(()=>{if(Q)return null;if(Y.multicallAddress)return Y.multicallAddress;if($.chain)return _J({blockNumber:X,chain:$.chain,contract:"multicall3"});throw new e$})(),F=(typeof X==="bigint"?H(X):void 0)||W,{schedule:C}=kJ({id:`${$.uid}.${F}`,wait:J,shouldSplitBatch(P){return P.reduce((K$,{data:A$})=>K$+(A$.length-2),0)>Z*2},fn:async(P)=>{let q$=P.map((l$)=>({allowFailure:!0,callData:l$.data,target:l$.to})),K$=EJ({abi:e0,args:[q$],functionName:"aggregate3"}),A$=await $.request({method:"eth_call",params:[{...w===null?{data:xJ({code:BQ,data:K$})}:{to:w,data:K$}},F]});return qJ({abi:e0,args:[q$],functionName:"aggregate3",data:A$||"0x"})}}),[{returnData:N,success:U}]=await C({data:D,to:K});if(!U)throw new dY({data:N});if(N==="0x")return{data:void 0};return{data:N}}function xJ($){let{code:Y,data:Z}=$;return pY({abi:o$(["constructor(bytes, bytes)"]),bytecode:kQ,args:[Y,Z]})}function y1($){let{data:Y,factory:Z,factoryData:Q,to:J}=$;return pY({abi:o$(["constructor(address, bytes, address, bytes)"]),bytecode:IQ,args:[J,Y,Z,Q]})}function b1($){if(!($ instanceof V))return;let Y=$.walk();return typeof Y?.data==="object"?Y.data?.data:Y.data}class AZ extends V{constructor({callbackSelector:$,cause:Y,data:Z,extraData:Q,sender:J,urls:X}){super(Y.shortMessage||"An error occurred while fetching for an offchain result.",{cause:Y,metaMessages:[...Y.metaMessages||[],Y.metaMessages?.length?"":[],"Offchain Gateway Call:",X&&[" Gateway URL(s):",...X.map((W)=>` ${X$(W)}`)],` Sender: ${J}`,` Data: ${Z}`,` Callback selector: ${$}`,` Extra data: ${Q}`].flat(),name:"OffchainLookupError"})}}class TZ extends V{constructor({result:$,url:Y}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${X$(Y)}`,`Response: ${g($)}`],name:"OffchainLookupResponseMalformedError"})}}class EZ extends V{constructor({sender:$,to:Y}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${Y}`,`OffchainLookup sender address: ${$}`],name:"OffchainLookupSenderMismatchError"})}}function yJ($,Y){if(!T($,{strict:!1}))throw new S({address:$});if(!T(Y,{strict:!1}))throw new S({address:Y});return $.toLowerCase()===Y.toLowerCase()}function bJ($){let{abi:Y,data:Z}=$,Q=y(Z,0,4),J=Y.find((X)=>X.type==="function"&&Q===b(E(X)));if(!J)throw new VY(Q,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:J.name,args:"inputs"in J&&J.inputs&&J.inputs.length>0?U$(J.inputs,y(Z,4)):void 0}}var _Z="/docs/contract/encodeErrorResult";function OZ($){let{abi:Y,errorName:Z,args:Q}=$,J=Y[0];if(Z){let K=d({abi:Y,args:Q,name:Z});if(!K)throw new Z0(Z,{docsPath:_Z});J=K}if(J.type!=="error")throw new Z0(void 0,{docsPath:_Z});let X=E(J),W=b(X),D="0x";if(Q&&Q.length>0){if(!J.inputs)throw new KY(J.name,{docsPath:_Z});D=v(J.inputs,Q)}return J$([W,D])}var LZ="/docs/contract/encodeFunctionResult";function hJ($){let{abi:Y,functionName:Z,result:Q}=$,J=Y[0];if(Z){let W=d({abi:Y,name:Z});if(!W)throw new x(Z,{docsPath:LZ});J=W}if(J.type!=="function")throw new x(void 0,{docsPath:LZ});if(!J.outputs)throw new R$(J.name,{docsPath:LZ});let X=(()=>{if(J.outputs.length===0)return[];if(J.outputs.length===1)return[Q];if(Array.isArray(Q))return Q;throw new S$(Q)})();return v(J.outputs,X)}var zZ="x-batch-gateway:true";async function RZ($){let{data:Y,ccipRequest:Z}=$,{args:[Q]}=bJ({abi:a$,data:Y}),J=[],X=[];return await Promise.all(Q.map(async(W,D)=>{try{X[D]=W.urls.includes(zZ)?await RZ({data:W.data,ccipRequest:Z}):await Z(W),J[D]=!1}catch(K){J[D]=!0,X[D]=h1(K)}})),hJ({abi:a$,functionName:"query",result:[J,X]})}function h1($){if($.name==="HttpRequestError"&&$.status)return OZ({abi:a$,errorName:"HttpError",args:[$.status,$.shortMessage]});return OZ({abi:[$0],errorName:"Error",args:["shortMessage"in $?$.shortMessage:$.message]})}var j6="0x556f1830",v1={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 f6($,{blockNumber:Y,blockTag:Z,data:Q,to:J}){let{args:X}=F0({data:Q,abi:[v1]}),[W,D,K,w,G]=X,{ccipRead:F}=$,C=F&&typeof F?.request==="function"?F.request:g1;try{if(!yJ(J,W))throw new EZ({sender:W,to:J});let N=D.includes(zZ)?await RZ({data:K,ccipRequest:C}):await C({data:K,sender:W,urls:D}),{data:U}=await PJ($,{blockNumber:Y,blockTag:Z,data:o([w,v([{type:"bytes"},{type:"bytes"}],[N,G])]),to:J});return U}catch(N){throw new AZ({callbackSelector:w,cause:N,data:Q,extraData:G,sender:W,urls:D})}}async function g1({data:$,sender:Y,urls:Z}){let Q=Error("An unknown error occurred.");for(let J=0;J<Z.length;J++){let X=Z[J],W=X.includes("{data}")?"GET":"POST",D=W==="POST"?{data:$,sender:Y}:void 0,K=W==="POST"?{"Content-Type":"application/json"}:{};try{let w=await fetch(X.replace("{sender}",Y.toLowerCase()).replace("{data}",$),{body:JSON.stringify(D),headers:K,method:W}),G;if(w.headers.get("Content-Type")?.startsWith("application/json"))G=(await w.json()).data;else G=await w.text();if(!w.ok){Q=new H0({body:D,details:G?.error?g(G.error):w.statusText,headers:w.headers,status:w.status,url:X});continue}if(!B(G)){Q=new TZ({result:G,url:X});continue}return G}catch(w){Q=new H0({body:D,details:w.message,url:X})}}throw Q}
|
|
42
|
-
export{
|
|
40
|
+
`)})}}Object.defineProperty(sY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32000});class rY extends _{constructor($){super($,{code:rY.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."});Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(rY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class aY extends _{constructor($){super($,{code:aY.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(aY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class eY extends _{constructor($){super($,{code:eY.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(eY,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class $Z extends _{constructor($,{method:Y}={}){super($,{code:$Z.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${Y?` "${Y}"`:""} is not supported.`})}}Object.defineProperty($Z,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class YZ extends _{constructor($){super($,{code:YZ.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(YZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class ZZ extends _{constructor($){super($,{code:ZZ.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(ZZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class QZ extends O{constructor($){super($,{code:QZ.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(QZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class JZ extends O{constructor($){super($,{code:JZ.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(JZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class XZ extends O{constructor($,{method:Y}={}){super($,{code:XZ.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${Y?` " ${Y}"`:""}.`})}}Object.defineProperty(XZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class WZ extends O{constructor($){super($,{code:WZ.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(WZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class DZ extends O{constructor($){super($,{code:DZ.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(DZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class KZ extends O{constructor($){super($,{code:KZ.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(KZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class VZ extends O{constructor($){super($,{code:VZ.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(VZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class wZ extends O{constructor($){super($,{code:wZ.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(wZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class GZ extends O{constructor($){super($,{code:GZ.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(GZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class FZ extends O{constructor($){super($,{code:FZ.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(FZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class CZ extends O{constructor($){super($,{code:CZ.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(CZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class NZ extends O{constructor($){super($,{code:NZ.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(NZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class HZ extends O{constructor($){super($,{code:HZ.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(HZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class MZ extends O{constructor($){super($,{code:MZ.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."})}}Object.defineProperty(MZ,"code",{enumerable:!0,configurable:!0,writable:!0,value:7000});class k1 extends _{constructor($){super($,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}function OJ($,Y){let Z=($.details||"").toLowerCase(),Q=$ instanceof V?$.walk((J)=>J?.code===r.code):$;if(Q instanceof V)return new r({cause:$,message:Q.details});if(r.nodeMessage.test(Z))return new r({cause:$,message:$.details});if(W$.nodeMessage.test(Z))return new W$({cause:$,maxFeePerGas:Y?.maxFeePerGas});if(P$.nodeMessage.test(Z))return new P$({cause:$,maxFeePerGas:Y?.maxFeePerGas});if(x$.nodeMessage.test(Z))return new x$({cause:$,nonce:Y?.nonce});if(y$.nodeMessage.test(Z))return new y$({cause:$,nonce:Y?.nonce});if(b$.nodeMessage.test(Z))return new b$({cause:$,nonce:Y?.nonce});if(h$.nodeMessage.test(Z))return new h$({cause:$});if(v$.nodeMessage.test(Z))return new v$({cause:$,gas:Y?.gas});if(g$.nodeMessage.test(Z))return new g$({cause:$,gas:Y?.gas});if(d$.nodeMessage.test(Z))return new d$({cause:$});if(D$.nodeMessage.test(Z))return new D$({cause:$,maxFeePerGas:Y?.maxFeePerGas,maxPriorityFeePerGas:Y?.maxPriorityFeePerGas});return new m$({cause:$})}function LJ($,{docsPath:Y,...Z}){let Q=(()=>{let J=OJ($,Z);if(J instanceof m$)return $;return J})();return new vY(Q,{docsPath:Y,...Z})}function zJ($,{format:Y}){if(!Y)return{};let Z={};function Q(X){let W=Object.keys(X);for(let D of W){if(D in $)Z[D]=$[D];if(X[D]&&typeof X[D]==="object"&&!Array.isArray(X[D]))Q(X[D])}}let J=Y($||{});return Q(J),Z}function RJ($,Y){return({exclude:Z,format:Q})=>{return{exclude:Z,format:(J,X)=>{let W=Y(J,X);if(Z)for(let D of Z)delete W[D];return{...W,...Q(J,X)}},type:$}}}var I1={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function UZ($,Y){let Z={};if(typeof $.authorizationList<"u")Z.authorizationList=B1($.authorizationList);if(typeof $.accessList<"u")Z.accessList=$.accessList;if(typeof $.blobVersionedHashes<"u")Z.blobVersionedHashes=$.blobVersionedHashes;if(typeof $.blobs<"u")if(typeof $.blobs[0]!=="string")Z.blobs=$.blobs.map((Q)=>j(Q));else Z.blobs=$.blobs;if(typeof $.data<"u")Z.data=$.data;if($.account)Z.from=$.account.address;if(typeof $.from<"u")Z.from=$.from;if(typeof $.gas<"u")Z.gas=H($.gas);if(typeof $.gasPrice<"u")Z.gasPrice=H($.gasPrice);if(typeof $.maxFeePerBlobGas<"u")Z.maxFeePerBlobGas=H($.maxFeePerBlobGas);if(typeof $.maxFeePerGas<"u")Z.maxFeePerGas=H($.maxFeePerGas);if(typeof $.maxPriorityFeePerGas<"u")Z.maxPriorityFeePerGas=H($.maxPriorityFeePerGas);if(typeof $.nonce<"u")Z.nonce=H($.nonce);if(typeof $.to<"u")Z.to=$.to;if(typeof $.type<"u")Z.type=I1[$.type];if(typeof $.value<"u")Z.value=H($.value);return Z}var T8=RJ("transactionRequest",UZ);function B1($){return $.map((Y)=>({address:Y.address,r:Y.r?H(BigInt(Y.r)):Y.r,s:Y.s?H(BigInt(Y.s)):Y.s,chainId:H(Y.chainId),nonce:H(Y.nonce),...typeof Y.yParity<"u"?{yParity:H(Y.yParity)}:{},...typeof Y.v<"u"&&typeof Y.yParity>"u"?{v:H(Y.v)}:{}}))}function SJ(){let $=()=>{return},Y=()=>{return};return{promise:new Promise((Q,J)=>{$=Q,Y=J}),resolve:$,reject:Y}}var qZ=new Map;function kJ({fn:$,id:Y,shouldSplitBatch:Z,wait:Q=0,sort:J}){let X=async()=>{let G=K();W();let F=G.map(({args:C})=>C);if(F.length===0)return;$(F).then((C)=>{if(J&&Array.isArray(C))C.sort(J);for(let N=0;N<G.length;N++){let{resolve:U}=G[N];U?.([C[N],C])}}).catch((C)=>{for(let N=0;N<G.length;N++){let{reject:U}=G[N];U?.(C)}})},W=()=>qZ.delete(Y),D=()=>K().map(({args:G})=>G),K=()=>qZ.get(Y)||[],w=(G)=>qZ.set(Y,[...K(),G]);return{flush:W,async schedule(G){let{promise:F,resolve:C,reject:N}=SJ();if(Z?.([...D(),G]))X();if(K().length>0)return w({args:G,resolve:C,reject:N}),F;return w({args:G,resolve:C,reject:N}),setTimeout(X,Q),F}}}function IJ($){if(!$||$.length===0)return;return $.reduce((Y,{slot:Z,value:Q})=>{if(Z.length!==66)throw new X0({size:Z.length,targetSize:66,type:"hex"});if(Q.length!==66)throw new X0({size:Q.length,targetSize:66,type:"hex"});return Y[Z]=Q,Y},{})}function j1($){let{balance:Y,nonce:Z,state:Q,stateDiff:J,code:X}=$,W={};if(X!==void 0)W.code=X;if(Y!==void 0)W.balance=H(Y);if(Z!==void 0)W.nonce=H(Z);if(Q!==void 0)W.state=IJ(Q);if(J!==void 0){if(W.state)throw new hY;W.stateDiff=IJ(J)}return W}function BJ($){if(!$)return;let Y={};for(let{address:Z,...Q}of $){if(!T(Z,{strict:!1}))throw new S({address:Z});if(Y[Z])throw new bY({address:Z});Y[Z]=j1(Q)}return Y}var j8=2n**(8n-1n)-1n,f8=2n**(16n-1n)-1n,P8=2n**(24n-1n)-1n,x8=2n**(32n-1n)-1n,y8=2n**(40n-1n)-1n,b8=2n**(48n-1n)-1n,h8=2n**(56n-1n)-1n,v8=2n**(64n-1n)-1n,g8=2n**(72n-1n)-1n,d8=2n**(80n-1n)-1n,m8=2n**(88n-1n)-1n,l8=2n**(96n-1n)-1n,p8=2n**(104n-1n)-1n,c8=2n**(112n-1n)-1n,n8=2n**(120n-1n)-1n,u8=2n**(128n-1n)-1n,o8=2n**(136n-1n)-1n,i8=2n**(144n-1n)-1n,t8=2n**(152n-1n)-1n,s8=2n**(160n-1n)-1n,r8=2n**(168n-1n)-1n,a8=2n**(176n-1n)-1n,e8=2n**(184n-1n)-1n,$2=2n**(192n-1n)-1n,Y2=2n**(200n-1n)-1n,Z2=2n**(208n-1n)-1n,Q2=2n**(216n-1n)-1n,J2=2n**(224n-1n)-1n,X2=2n**(232n-1n)-1n,W2=2n**(240n-1n)-1n,D2=2n**(248n-1n)-1n,K2=2n**(256n-1n)-1n,V2=-(2n**(8n-1n)),w2=-(2n**(16n-1n)),G2=-(2n**(24n-1n)),F2=-(2n**(32n-1n)),C2=-(2n**(40n-1n)),N2=-(2n**(48n-1n)),H2=-(2n**(56n-1n)),M2=-(2n**(64n-1n)),U2=-(2n**(72n-1n)),q2=-(2n**(80n-1n)),A2=-(2n**(88n-1n)),T2=-(2n**(96n-1n)),E2=-(2n**(104n-1n)),_2=-(2n**(112n-1n)),O2=-(2n**(120n-1n)),L2=-(2n**(128n-1n)),z2=-(2n**(136n-1n)),R2=-(2n**(144n-1n)),S2=-(2n**(152n-1n)),k2=-(2n**(160n-1n)),I2=-(2n**(168n-1n)),B2=-(2n**(176n-1n)),j2=-(2n**(184n-1n)),f2=-(2n**(192n-1n)),P2=-(2n**(200n-1n)),x2=-(2n**(208n-1n)),y2=-(2n**(216n-1n)),b2=-(2n**(224n-1n)),h2=-(2n**(232n-1n)),v2=-(2n**(240n-1n)),g2=-(2n**(248n-1n)),d2=-(2n**(256n-1n)),m2=2n**8n-1n,l2=2n**16n-1n,p2=2n**24n-1n,c2=2n**32n-1n,n2=2n**40n-1n,u2=2n**48n-1n,o2=2n**56n-1n,i2=2n**64n-1n,t2=2n**72n-1n,s2=2n**80n-1n,r2=2n**88n-1n,a2=2n**96n-1n,e2=2n**104n-1n,$D=2n**112n-1n,YD=2n**120n-1n,ZD=2n**128n-1n,QD=2n**136n-1n,JD=2n**144n-1n,XD=2n**152n-1n,WD=2n**160n-1n,DD=2n**168n-1n,KD=2n**176n-1n,VD=2n**184n-1n,wD=2n**192n-1n,GD=2n**200n-1n,FD=2n**208n-1n,CD=2n**216n-1n,ND=2n**224n-1n,HD=2n**232n-1n,MD=2n**240n-1n,UD=2n**248n-1n,jJ=2n**256n-1n;function fJ($){let{account:Y,maxFeePerGas:Z,maxPriorityFeePerGas:Q,to:J}=$,X=Y?N$(Y):void 0;if(X&&!T(X.address))throw new S({address:X.address});if(J&&!T(J))throw new S({address:J});if(Z&&Z>jJ)throw new W$({maxFeePerGas:Z});if(Q&&Z&&Q>Z)throw new D$({maxFeePerGas:Z,maxPriorityFeePerGas:Q})}async function PJ($,Y){let{account:Z=$.account,authorizationList:Q,batch:J=Boolean($.batch?.multicall),blockNumber:X,blockTag:W=$.experimental_blockTag??"latest",accessList:D,blobs:K,blockOverrides:w,code:G,data:F,factory:C,factoryData:N,gas:U,gasPrice:P,maxFeePerBlobGas:q$,maxFeePerGas:K$,maxPriorityFeePerGas:A$,nonce:l$,to:V$,value:vJ,stateOverride:gJ,...dJ}=Y,SZ=Z?N$(Z):void 0;if(G&&(C||N))throw new V("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(G&&V$)throw new V("Cannot provide both `code` & `to` as parameters.");let kZ=G&&F,IZ=C&&N&&V$&&F,BZ=kZ||IZ,mJ=(()=>{if(kZ)return xJ({code:G,data:F});if(IZ)return y1({data:F,factory:C,factoryData:N,to:V$});return F})();try{fJ(Y);let T$=(typeof X==="bigint"?H(X):void 0)||W,a=w?zQ(w):void 0,e=BJ(gJ),jZ=$.chain?.formatters?.transactionRequest?.format,U0=(jZ||UZ)({...zJ(dJ,{format:jZ}),accessList:D,account:SZ,authorizationList:Q,blobs:K,data:mJ,gas:U,gasPrice:P,maxFeePerBlobGas:q$,maxFeePerGas:K$,maxPriorityFeePerGas:A$,nonce:l$,to:BZ?void 0:V$,value:vJ},"call");if(J&&P1({request:U0})&&!e&&!a)try{return await x1($,{...U0,blockNumber:X,blockTag:W})}catch(i){if(!(i instanceof e$)&&!(i instanceof H$))throw i}let lJ=(()=>{let i=[U0,T$];if(e&&a)return[...i,e,a];if(e)return[...i,e];if(a)return[...i,{},a];return i})(),fZ=await $.request({method:"eth_call",params:lJ});if(fZ==="0x")return{data:void 0};return{data:fZ}}catch(M0){let T$=b1(M0),{offchainLookup:a,offchainLookupSignature:e}=await import("./chunk-0e073jst.mjs");if($.ccipRead!==!1&&T$?.slice(0,10)===e&&V$)return{data:await a($,{data:T$,to:V$})};if(BZ&&T$?.slice(0,10)==="0x101bb98d")throw new gY({factory:C});throw LJ(M0,{...Y,account:SZ,chain:$.chain})}}function P1({request:$}){let{data:Y,to:Z,...Q}=$;if(!Y)return!1;if(Y.startsWith(SQ))return!1;if(!Z)return!1;if(Object.values(Q).filter((J)=>typeof J<"u").length>0)return!1;return!0}async function x1($,Y){let{batchSize:Z=1024,deployless:Q=!1,wait:J=0}=typeof $.batch?.multicall==="object"?$.batch.multicall:{},{blockNumber:X,blockTag:W=$.experimental_blockTag??"latest",data:D,to:K}=Y,w=(()=>{if(Q)return null;if(Y.multicallAddress)return Y.multicallAddress;if($.chain)return _J({blockNumber:X,chain:$.chain,contract:"multicall3"});throw new e$})(),F=(typeof X==="bigint"?H(X):void 0)||W,{schedule:C}=kJ({id:`${$.uid}.${F}`,wait:J,shouldSplitBatch(P){return P.reduce((K$,{data:A$})=>K$+(A$.length-2),0)>Z*2},fn:async(P)=>{let q$=P.map((l$)=>({allowFailure:!0,callData:l$.data,target:l$.to})),K$=EJ({abi:e0,args:[q$],functionName:"aggregate3"}),A$=await $.request({method:"eth_call",params:[{...w===null?{data:xJ({code:BQ,data:K$})}:{to:w,data:K$}},F]});return qJ({abi:e0,args:[q$],functionName:"aggregate3",data:A$||"0x"})}}),[{returnData:N,success:U}]=await C({data:D,to:K});if(!U)throw new dY({data:N});if(N==="0x")return{data:void 0};return{data:N}}function xJ($){let{code:Y,data:Z}=$;return pY({abi:o$(["constructor(bytes, bytes)"]),bytecode:kQ,args:[Y,Z]})}function y1($){let{data:Y,factory:Z,factoryData:Q,to:J}=$;return pY({abi:o$(["constructor(address, bytes, address, bytes)"]),bytecode:IQ,args:[J,Y,Z,Q]})}function b1($){if(!($ instanceof V))return;let Y=$.walk();return typeof Y?.data==="object"?Y.data?.data:Y.data}class AZ extends V{constructor({callbackSelector:$,cause:Y,data:Z,extraData:Q,sender:J,urls:X}){super(Y.shortMessage||"An error occurred while fetching for an offchain result.",{cause:Y,metaMessages:[...Y.metaMessages||[],Y.metaMessages?.length?"":[],"Offchain Gateway Call:",X&&[" Gateway URL(s):",...X.map((W)=>` ${X$(W)}`)],` Sender: ${J}`,` Data: ${Z}`,` Callback selector: ${$}`,` Extra data: ${Q}`].flat(),name:"OffchainLookupError"})}}class TZ extends V{constructor({result:$,url:Y}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${X$(Y)}`,`Response: ${g($)}`],name:"OffchainLookupResponseMalformedError"})}}class EZ extends V{constructor({sender:$,to:Y}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${Y}`,`OffchainLookup sender address: ${$}`],name:"OffchainLookupSenderMismatchError"})}}function yJ($,Y){if(!T($,{strict:!1}))throw new S({address:$});if(!T(Y,{strict:!1}))throw new S({address:Y});return $.toLowerCase()===Y.toLowerCase()}function bJ($){let{abi:Y,data:Z}=$,Q=y(Z,0,4),J=Y.find((X)=>X.type==="function"&&Q===b(E(X)));if(!J)throw new VY(Q,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:J.name,args:"inputs"in J&&J.inputs&&J.inputs.length>0?U$(J.inputs,y(Z,4)):void 0}}var _Z="/docs/contract/encodeErrorResult";function OZ($){let{abi:Y,errorName:Z,args:Q}=$,J=Y[0];if(Z){let K=d({abi:Y,args:Q,name:Z});if(!K)throw new Z0(Z,{docsPath:_Z});J=K}if(J.type!=="error")throw new Z0(void 0,{docsPath:_Z});let X=E(J),W=b(X),D="0x";if(Q&&Q.length>0){if(!J.inputs)throw new KY(J.name,{docsPath:_Z});D=v(J.inputs,Q)}return J$([W,D])}var LZ="/docs/contract/encodeFunctionResult";function hJ($){let{abi:Y,functionName:Z,result:Q}=$,J=Y[0];if(Z){let W=d({abi:Y,name:Z});if(!W)throw new x(Z,{docsPath:LZ});J=W}if(J.type!=="function")throw new x(void 0,{docsPath:LZ});if(!J.outputs)throw new R$(J.name,{docsPath:LZ});let X=(()=>{if(J.outputs.length===0)return[];if(J.outputs.length===1)return[Q];if(Array.isArray(Q))return Q;throw new S$(Q)})();return v(J.outputs,X)}var zZ="x-batch-gateway:true";async function RZ($){let{data:Y,ccipRequest:Z}=$,{args:[Q]}=bJ({abi:a$,data:Y}),J=[],X=[];return await Promise.all(Q.map(async(W,D)=>{try{X[D]=W.urls.includes(zZ)?await RZ({data:W.data,ccipRequest:Z}):await Z(W),J[D]=!1}catch(K){J[D]=!0,X[D]=h1(K)}})),hJ({abi:a$,functionName:"query",result:[J,X]})}function h1($){if($.name==="HttpRequestError"&&$.status)return OZ({abi:a$,errorName:"HttpError",args:[$.status,$.shortMessage]});return OZ({abi:[$0],errorName:"Error",args:["shortMessage"in $?$.shortMessage:$.message]})}var j6="0x556f1830",v1={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 f6($,{blockNumber:Y,blockTag:Z,data:Q,to:J}){let{args:X}=F0({data:Q,abi:[v1]}),[W,D,K,w,G]=X,{ccipRead:F}=$,C=F&&typeof F?.request==="function"?F.request:g1;try{if(!yJ(J,W))throw new EZ({sender:W,to:J});let N=D.includes(zZ)?await RZ({data:K,ccipRequest:C}):await C({data:K,sender:W,urls:D}),{data:U}=await PJ($,{blockNumber:Y,blockTag:Z,data:o([w,v([{type:"bytes"},{type:"bytes"}],[N,G])]),to:J});return U}catch(N){throw new AZ({callbackSelector:w,cause:N,data:Q,extraData:G,sender:W,urls:D})}}async function g1({data:$,sender:Y,urls:Z}){let Q=Error("An unknown error occurred.");for(let J=0;J<Z.length;J++){let X=Z[J],W=X.includes("{data}")?"GET":"POST",D=W==="POST"?{data:$,sender:Y}:void 0,K=W==="POST"?{"Content-Type":"application/json"}:{};try{let w=await fetch(X.replace("{sender}",Y.toLowerCase()).replace("{data}",$),{body:JSON.stringify(D),headers:K,method:W}),G;if(w.headers.get("Content-Type")?.startsWith("application/json"))G=(await w.json()).data;else G=await w.text();if(!w.ok){Q=new H0({body:D,details:G?.error?g(G.error):w.statusText,headers:w.headers,status:w.status,url:X});continue}if(!B(G)){Q=new TZ({result:G,url:X});continue}return G}catch(w){Q=new H0({body:D,details:w.message,url:X})}}throw Q}
|
|
41
|
+
export{$$ as z,T0 as A,ZX as B,QX as C,E as D,B as E,A as F,V as G,QY as H,Y0 as I,JY as J,L$ as K,kX as L,IX as M,BX as N,jX as O,fX as P,PX as Q,s as R,n as S,UY as T,F4 as U,bQ as V,hQ as W,j as X,H as Y,AY as Z,W0 as _,D0 as $,TY as aa,YJ as ba,K0 as ca,GJ as da,S as ea,I$ as fa,B$ as ga,JW as ha,T as ia,o as ja,J$ as ka,y as la,xX as ma,MW as na,VJ as oa,v as pa,d as qa,N$ as ra,EJ as sa,IY as ta,XJ as ua,U$ as va,g as wa,N0 as xa,k as ya,f$ as za,H1 as Aa,M1 as Ba,U1 as Ca,q1 as Da,A1 as Ea,T1 as Fa,E1 as Ga,_1 as Ha,vY as Ia,O1 as Ja,L1 as Ka,z1 as La,dY as Ma,H0 as Na,cY as Oa,R1 as Pa,nY as Qa,uY as Ra,oY as Sa,iY as Ta,tY as Ua,sY as Va,rY as Wa,aY as Xa,eY as Ya,$Z as Za,YZ as _a,ZZ as $a,QZ as ab,JZ as bb,XZ as cb,WZ as db,DZ as eb,KZ as fb,VZ as gb,wZ as hb,GZ as ib,FZ as jb,CZ as kb,NZ as lb,HZ as mb,MZ as nb,k1 as ob,W$ as pb,D$ as qb,m$ as rb,OJ as sb,zJ as tb,RJ as ub,UZ as vb,T8 as wb,BJ as xb,l2 as yb,jJ as zb,fJ as Ab,yJ as Bb,qJ as Cb,d0 as Db,o5 as Eb,i5 as Fb,WQ as Gb,DQ as Hb,t5 as Ib,s5 as Jb,XX as Kb,r5 as Lb,a5 as Mb,WX as Nb,DX as Ob,e5 as Pb,$9 as Qb,Y9 as Rb,Z9 as Sb,Q9 as Tb,J9 as Ub,M as Vb,r$ as Wb,w9 as Xb,HX as Yb,G9 as Zb,Y$ as _b,F9 as $b,C9 as ac,N9 as bc,H9 as cc,M9 as dc,UX as ec,U9 as fc,q9 as gc,A9 as hc,T9 as ic,C$ as jc,I as kc,E9 as lc,_Q as mc,t0 as nc,_9 as oc,Z$ as pc,O9 as qc,EQ as rc,L9 as sc,OQ as tc,zQ as uc,e0 as vc,S9 as wc,k9 as xc,I9 as yc,B9 as zc,j9 as Ac,f9 as Bc,kQ as Cc,y9 as Dc,BQ as Ec,LX as Fc,zX as Gc,RX as Hc,pY as Ic,_J as Jc,LJ as Kc,SJ as Lc,kJ as Mc,zZ as Nc,j6 as Oc,v1 as Pc,f6 as Qc,g1 as Rc,PJ as Sc};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{ld as N8,md as M8}from"./chunk-gr14hnnm.mjs";import{nd as L4,od as L,qd as H}from"./chunk-enz73nmb.mjs";var E=L((T4,R5)=>{R5.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var h=L((C4,J5)=>{var{EMPTY_BUFFER:F8}=E();function B5(J,K){if(J.length===0)return F8;if(J.length===1)return J[0];let X=Buffer.allocUnsafe(K),Z=0;for(let $=0;$<J.length;$++){let G=J[$];X.set(G,Z),Z+=G.length}if(Z<K)return X.slice(0,Z);return X}function L5(J,K,X,Z,$){for(let G=0;G<$;G++)X[Z+G]=J[G]^K[G&3]}function T5(J,K){let X=J.length;for(let Z=0;Z<X;Z++)J[Z]^=K[Z&3]}function C5(J){if(J.byteLength===J.buffer.byteLength)return J.buffer;return J.buffer.slice(J.byteOffset,J.byteOffset+J.byteLength)}function k(J){if(k.readOnly=!0,Buffer.isBuffer(J))return J;let K;if(J instanceof ArrayBuffer)K=Buffer.from(J);else if(ArrayBuffer.isView(J))K=Buffer.from(J.buffer,J.byteOffset,J.byteLength);else K=Buffer.from(J),k.readOnly=!1;return K}try{let J=N8(),K=J.BufferUtil||J;J5.exports={concat:B5,mask(X,Z,$,G,Y){if(Y<48)L5(X,Z,$,G,Y);else K.mask(X,Z,$,G,Y)},toArrayBuffer:C5,toBuffer:k,unmask(X,Z){if(X.length<32)T5(X,Z);else K.unmask(X,Z)}}}catch(J){J5.exports={concat:B5,mask:L5,toArrayBuffer:C5,toBuffer:k,unmask:T5}}});var q5=L((M4,P5)=>{var M5=Symbol("kDone"),K5=Symbol("kRun");class O5{constructor(J){this[M5]=()=>{this.pending--,this[K5]()},this.concurrency=J||1/0,this.jobs=[],this.pending=0}add(J){this.jobs.push(J),this[K5]()}[K5](){if(this.pending===this.concurrency)return;if(this.jobs.length){let J=this.jobs.shift();this.pending++,J(this[M5])}}}P5.exports=O5});var u=L((O4,x5)=>{var w=H("zlib"),U5=h(),R8=q5(),{kStatusCode:D5,NOOP:B8}=E(),L8=Buffer.from([0,0,255,255]),n=Symbol("permessage-deflate"),M=Symbol("total-length"),m=Symbol("callback"),q=Symbol("buffers"),i=Symbol("error"),d;class E5{constructor(J,K,X){if(this._maxPayload=X|0,this._options=J||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!K,this._deflate=null,this._inflate=null,this.params=null,!d){let Z=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;d=new R8(Z)}}static get extensionName(){return"permessage-deflate"}offer(){let J={};if(this._options.serverNoContextTakeover)J.server_no_context_takeover=!0;if(this._options.clientNoContextTakeover)J.client_no_context_takeover=!0;if(this._options.serverMaxWindowBits)J.server_max_window_bits=this._options.serverMaxWindowBits;if(this._options.clientMaxWindowBits)J.client_max_window_bits=this._options.clientMaxWindowBits;else if(this._options.clientMaxWindowBits==null)J.client_max_window_bits=!0;return J}accept(J){return J=this.normalizeParams(J),this.params=this._isServer?this.acceptAsServer(J):this.acceptAsClient(J),this.params}cleanup(){if(this._inflate)this._inflate.close(),this._inflate=null;if(this._deflate){let J=this._deflate[m];if(this._deflate.close(),this._deflate=null,J)J(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(J){let K=this._options,X=J.find((Z)=>{if(K.serverNoContextTakeover===!1&&Z.server_no_context_takeover||Z.server_max_window_bits&&(K.serverMaxWindowBits===!1||typeof K.serverMaxWindowBits==="number"&&K.serverMaxWindowBits>Z.server_max_window_bits)||typeof K.clientMaxWindowBits==="number"&&!Z.client_max_window_bits)return!1;return!0});if(!X)throw Error("None of the extension offers can be accepted");if(K.serverNoContextTakeover)X.server_no_context_takeover=!0;if(K.clientNoContextTakeover)X.client_no_context_takeover=!0;if(typeof K.serverMaxWindowBits==="number")X.server_max_window_bits=K.serverMaxWindowBits;if(typeof K.clientMaxWindowBits==="number")X.client_max_window_bits=K.clientMaxWindowBits;else if(X.client_max_window_bits===!0||K.clientMaxWindowBits===!1)delete X.client_max_window_bits;return X}acceptAsClient(J){let K=J[0];if(this._options.clientNoContextTakeover===!1&&K.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(!K.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number")K.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==="number"&&K.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"');return K}normalizeParams(J){return J.forEach((K)=>{Object.keys(K).forEach((X)=>{let Z=K[X];if(Z.length>1)throw Error(`Parameter "${X}" must have only a single value`);if(Z=Z[0],X==="client_max_window_bits"){if(Z!==!0){let $=+Z;if(!Number.isInteger($)||$<8||$>15)throw TypeError(`Invalid value for parameter "${X}": ${Z}`);Z=$}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${X}": ${Z}`)}else if(X==="server_max_window_bits"){let $=+Z;if(!Number.isInteger($)||$<8||$>15)throw TypeError(`Invalid value for parameter "${X}": ${Z}`);Z=$}else if(X==="client_no_context_takeover"||X==="server_no_context_takeover"){if(Z!==!0)throw TypeError(`Invalid value for parameter "${X}": ${Z}`)}else throw Error(`Unknown parameter "${X}"`);K[X]=Z})}),J}decompress(J,K,X){d.add((Z)=>{this._decompress(J,K,($,G)=>{Z(),X($,G)})})}compress(J,K,X){d.add((Z)=>{this._compress(J,K,($,G)=>{Z(),X($,G)})})}_decompress(J,K,X){let Z=this._isServer?"client":"server";if(!this._inflate){let $=`${Z}_max_window_bits`,G=typeof this.params[$]!=="number"?w.Z_DEFAULT_WINDOWBITS:this.params[$];this._inflate=w.createInflateRaw({...this._options.zlibInflateOptions,windowBits:G}),this._inflate[n]=this,this._inflate[M]=0,this._inflate[q]=[],this._inflate.on("error",C8),this._inflate.on("data",W5)}if(this._inflate[m]=X,this._inflate.write(J),K)this._inflate.write(L8);this._inflate.flush(()=>{let $=this._inflate[i];if($){this._inflate.close(),this._inflate=null,X($);return}let G=U5.concat(this._inflate[q],this._inflate[M]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[M]=0,this._inflate[q]=[],K&&this.params[`${Z}_no_context_takeover`])this._inflate.reset();X(null,G)})}_compress(J,K,X){let Z=this._isServer?"server":"client";if(!this._deflate){let $=`${Z}_max_window_bits`,G=typeof this.params[$]!=="number"?w.Z_DEFAULT_WINDOWBITS:this.params[$];this._deflate=w.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:G}),this._deflate[M]=0,this._deflate[q]=[],this._deflate.on("error",B8),this._deflate.on("data",T8)}this._deflate[m]=X,this._deflate.write(J),this._deflate.flush(w.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let $=U5.concat(this._deflate[q],this._deflate[M]);if(K)$=$.slice(0,$.length-4);if(this._deflate[m]=null,this._deflate[M]=0,this._deflate[q]=[],K&&this.params[`${Z}_no_context_takeover`])this._deflate.reset();X(null,$)})}}x5.exports=E5;function T8(J){this[q].push(J),this[M]+=J.length}function W5(J){if(this[M]+=J.length,this[n]._maxPayload<1||this[M]<=this[n]._maxPayload){this[q].push(J);return}this[i]=RangeError("Max payload size exceeded"),this[i].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[i][D5]=1009,this.removeListener("data",W5),this.reset()}function C8(J){this[n]._inflate=null,J[D5]=1007,this[m](J)}});var Z5=L((P4,X5)=>{function y5(J){return J>=1000&&J<=1014&&J!==1004&&J!==1005&&J!==1006||J>=3000&&J<=4999}function v5(J){let K=J.length,X=0;while(X<K)if((J[X]&128)===0)X++;else if((J[X]&224)===192){if(X+1===K||(J[X+1]&192)!==128||(J[X]&254)===192)return!1;X+=2}else if((J[X]&240)===224){if(X+2>=K||(J[X+1]&192)!==128||(J[X+2]&192)!==128||J[X]===224&&(J[X+1]&224)===128||J[X]===237&&(J[X+1]&224)===160)return!1;X+=3}else if((J[X]&248)===240){if(X+3>=K||(J[X+1]&192)!==128||(J[X+2]&192)!==128||(J[X+3]&192)!==128||J[X]===240&&(J[X+1]&240)===128||J[X]===244&&J[X+1]>143||J[X]>244)return!1;X+=4}else return!1;return!0}try{let J=M8();if(typeof J==="object")J=J.Validation.isValidUTF8;X5.exports={isValidStatusCode:y5,isValidUTF8(K){return K.length<150?v5(K):J(K)}}}catch(J){X5.exports={isValidStatusCode:y5,isValidUTF8:v5}}});var G5=L((q4,w5)=>{var{Writable:O8}=H("stream"),S5=u(),{BINARY_TYPES:P8,EMPTY_BUFFER:q8,kStatusCode:U8,kWebSocket:D8}=E(),{concat:$5,toArrayBuffer:E8,unmask:W8}=h(),{isValidStatusCode:x8,isValidUTF8:g5}=Z5();class h5 extends O8{constructor(J,K,X,Z){super();this._binaryType=J||P8[0],this[D8]=void 0,this._extensions=K||{},this._isServer=!!X,this._maxPayload=Z|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(J,K,X){if(this._opcode===8&&this._state==0)return X();this._bufferedBytes+=J.length,this._buffers.push(J),this.startLoop(X)}consume(J){if(this._bufferedBytes-=J,J===this._buffers[0].length)return this._buffers.shift();if(J<this._buffers[0].length){let X=this._buffers[0];return this._buffers[0]=X.slice(J),X.slice(0,J)}let K=Buffer.allocUnsafe(J);do{let X=this._buffers[0],Z=K.length-J;if(J>=X.length)K.set(this._buffers.shift(),Z);else K.set(new Uint8Array(X.buffer,X.byteOffset,J),Z),this._buffers[0]=X.slice(J);J-=X.length}while(J>0);return K}startLoop(J){let K;this._loop=!0;do switch(this._state){case 0:K=this.getInfo();break;case 1:K=this.getPayloadLength16();break;case 2:K=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:K=this.getData(J);break;default:this._loop=!1;return}while(this._loop);J(K)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let J=this.consume(2);if((J[0]&48)!==0)return this._loop=!1,N(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");let K=(J[0]&64)===64;if(K&&!this._extensions[S5.extensionName])return this._loop=!1,N(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=(J[0]&128)===128,this._opcode=J[0]&15,this._payloadLength=J[1]&127,this._opcode===0){if(K)return this._loop=!1,N(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,N(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,N(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=K}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,N(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(K)return this._loop=!1,N(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,N(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,N(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(J[1]&128)===128,this._isServer){if(!this._masked)return this._loop=!1,N(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,N(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=1;else if(this._payloadLength===127)this._state=2;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let J=this.consume(8),K=J.readUInt32BE(0);if(K>Math.pow(2,21)-1)return this._loop=!1,N(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");return this._payloadLength=K*Math.pow(2,32)+J.readUInt32BE(4),this.haveLength()}haveLength(){if(this._payloadLength&&this._opcode<8){if(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)return this._loop=!1,N(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")}if(this._masked)this._state=3;else this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(J){let K=q8;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}if(K=this.consume(this._payloadLength),this._masked)W8(K,this._mask)}if(this._opcode>7)return this.controlMessage(K);if(this._compressed){this._state=5,this.decompress(K,J);return}if(K.length)this._messageLength=this._totalPayloadLength,this._fragments.push(K);return this.dataMessage()}decompress(J,K){this._extensions[S5.extensionName].decompress(J,this._fin,(Z,$)=>{if(Z)return K(Z);if($.length){if(this._messageLength+=$.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return K(N(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push($)}let G=this.dataMessage();if(G)return K(G);this.startLoop(K)})}dataMessage(){if(this._fin){let J=this._messageLength,K=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let X;if(this._binaryType==="nodebuffer")X=$5(K,J);else if(this._binaryType==="arraybuffer")X=E8($5(K,J));else X=K;this.emit("message",X)}else{let X=$5(K,J);if(!g5(X))return this._loop=!1,N(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",X.toString())}}this._state=0}controlMessage(J){if(this._opcode===8)if(this._loop=!1,J.length===0)this.emit("conclude",1005,""),this.end();else if(J.length===1)return N(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");else{let K=J.readUInt16BE(0);if(!x8(K))return N(RangeError,`invalid status code ${K}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let X=J.slice(2);if(!g5(X))return N(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",K,X.toString()),this.end()}else if(this._opcode===9)this.emit("ping",J);else this.emit("pong",J);this._state=0}}w5.exports=h5;function N(J,K,X,Z,$){let G=new J(X?`Invalid WebSocket frame: ${K}`:K);return Error.captureStackTrace(G,N),G.code=$,G[U8]=Z,G}});var I5=L((E4,f5)=>{var U4=H("net"),D4=H("tls"),{randomFillSync:y8}=H("crypto"),m5=u(),{EMPTY_BUFFER:v8}=E(),{isValidStatusCode:S8}=Z5(),{mask:u5,toBuffer:O}=h(),W=Buffer.alloc(4);class U{constructor(J,K){this._extensions=K||{},this._socket=J,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(J,K){let X=K.mask&&K.readOnly,Z=K.mask?6:2,$=J.length;if(J.length>=65536)Z+=8,$=127;else if(J.length>125)Z+=2,$=126;let G=Buffer.allocUnsafe(X?J.length+Z:Z);if(G[0]=K.fin?K.opcode|128:K.opcode,K.rsv1)G[0]|=64;if(G[1]=$,$===126)G.writeUInt16BE(J.length,2);else if($===127)G.writeUInt32BE(0,2),G.writeUInt32BE(J.length,6);if(!K.mask)return[G,J];if(y8(W,0,4),G[1]|=128,G[Z-4]=W[0],G[Z-3]=W[1],G[Z-2]=W[2],G[Z-1]=W[3],X)return u5(J,W,G,Z,J.length),[G];return u5(J,W,J,0,J.length),[G,J]}close(J,K,X,Z){let $;if(J===void 0)$=v8;else if(typeof J!=="number"||!S8(J))throw TypeError("First argument must be a valid error code number");else if(K===void 0||K==="")$=Buffer.allocUnsafe(2),$.writeUInt16BE(J,0);else{let G=Buffer.byteLength(K);if(G>123)throw RangeError("The message must not be greater than 123 bytes");$=Buffer.allocUnsafe(2+G),$.writeUInt16BE(J,0),$.write(K,2)}if(this._deflating)this.enqueue([this.doClose,$,X,Z]);else this.doClose($,X,Z)}doClose(J,K,X){this.sendFrame(U.frame(J,{fin:!0,rsv1:!1,opcode:8,mask:K,readOnly:!1}),X)}ping(J,K,X){let Z=O(J);if(Z.length>125)throw RangeError("The data size must not be greater than 125 bytes");if(this._deflating)this.enqueue([this.doPing,Z,K,O.readOnly,X]);else this.doPing(Z,K,O.readOnly,X)}doPing(J,K,X,Z){this.sendFrame(U.frame(J,{fin:!0,rsv1:!1,opcode:9,mask:K,readOnly:X}),Z)}pong(J,K,X){let Z=O(J);if(Z.length>125)throw RangeError("The data size must not be greater than 125 bytes");if(this._deflating)this.enqueue([this.doPong,Z,K,O.readOnly,X]);else this.doPong(Z,K,O.readOnly,X)}doPong(J,K,X,Z){this.sendFrame(U.frame(J,{fin:!0,rsv1:!1,opcode:10,mask:K,readOnly:X}),Z)}send(J,K,X){let Z=O(J),$=this._extensions[m5.extensionName],G=K.binary?2:1,Y=K.compress;if(this._firstFragment){if(this._firstFragment=!1,Y&&$)Y=Z.length>=$._threshold;this._compress=Y}else Y=!1,G=0;if(K.fin)this._firstFragment=!0;if($){let j={fin:K.fin,rsv1:Y,opcode:G,mask:K.mask,readOnly:O.readOnly};if(this._deflating)this.enqueue([this.dispatch,Z,this._compress,j,X]);else this.dispatch(Z,this._compress,j,X)}else this.sendFrame(U.frame(Z,{fin:K.fin,rsv1:!1,opcode:G,mask:K.mask,readOnly:O.readOnly}),X)}dispatch(J,K,X,Z){if(!K){this.sendFrame(U.frame(J,X),Z);return}let $=this._extensions[m5.extensionName];this._bufferedBytes+=J.length,this._deflating=!0,$.compress(J,X.fin,(G,Y)=>{if(this._socket.destroyed){let j=Error("The socket was closed while data was being compressed");if(typeof Z==="function")Z(j);for(let I=0;I<this._queue.length;I++){let Q=this._queue[I][4];if(typeof Q==="function")Q(j)}return}this._bufferedBytes-=J.length,this._deflating=!1,X.readOnly=!1,this.sendFrame(U.frame(Y,X),Z),this.dequeue()})}dequeue(){while(!this._deflating&&this._queue.length){let J=this._queue.shift();this._bufferedBytes-=J[1].length,Reflect.apply(J[0],this,J.slice(1))}}enqueue(J){this._bufferedBytes+=J[1].length,this._queue.push(J)}sendFrame(J,K){if(J.length===2)this._socket.cork(),this._socket.write(J[0]),this._socket.write(J[1],K),this._socket.uncork();else this._socket.write(J[0],K)}}f5.exports=U});var i5=L((W4,d5)=>{class f{constructor(J,K){this.target=K,this.type=J}}class l5 extends f{constructor(J,K){super("message",K);this.data=J}}class p5 extends f{constructor(J,K,X){super("close",X);this.wasClean=X._closeFrameReceived&&X._closeFrameSent,this.reason=K,this.code=J}}class b5 extends f{constructor(J){super("open",J)}}class k5 extends f{constructor(J,K){super("error",K);this.message=J.message,this.error=J}}var g8={addEventListener(J,K,X){if(typeof K!=="function")return;function Z(I){K.call(this,new l5(I,this))}function $(I,Q){K.call(this,new p5(I,Q,this))}function G(I){K.call(this,new k5(I,this))}function Y(){K.call(this,new b5(this))}let j=X&&X.once?"once":"on";if(J==="message")Z._listener=K,this[j](J,Z);else if(J==="close")$._listener=K,this[j](J,$);else if(J==="error")G._listener=K,this[j](J,G);else if(J==="open")Y._listener=K,this[j](J,Y);else this[j](J,K)},removeEventListener(J,K){let X=this.listeners(J);for(let Z=0;Z<X.length;Z++)if(X[Z]===K||X[Z]._listener===K)this.removeListener(J,X[Z])}};d5.exports=g8});var Q5=L((x4,n5)=>{var l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function C(J,K,X){if(J[K]===void 0)J[K]=[X];else J[K].push(X)}function h8(J){let K=Object.create(null);if(J===void 0||J==="")return K;let X=Object.create(null),Z=!1,$=!1,G=!1,Y,j,I=-1,Q=-1,_=0;for(;_<J.length;_++){let z=J.charCodeAt(_);if(Y===void 0)if(Q===-1&&l[z]===1){if(I===-1)I=_}else if(z===32||z===9){if(Q===-1&&I!==-1)Q=_}else if(z===59||z===44){if(I===-1)throw SyntaxError(`Unexpected character at index ${_}`);if(Q===-1)Q=_;let V=J.slice(I,Q);if(z===44)C(K,V,X),X=Object.create(null);else Y=V;I=Q=-1}else throw SyntaxError(`Unexpected character at index ${_}`);else if(j===void 0)if(Q===-1&&l[z]===1){if(I===-1)I=_}else if(z===32||z===9){if(Q===-1&&I!==-1)Q=_}else if(z===59||z===44){if(I===-1)throw SyntaxError(`Unexpected character at index ${_}`);if(Q===-1)Q=_;if(C(X,J.slice(I,Q),!0),z===44)C(K,Y,X),X=Object.create(null),Y=void 0;I=Q=-1}else if(z===61&&I!==-1&&Q===-1)j=J.slice(I,_),I=Q=-1;else throw SyntaxError(`Unexpected character at index ${_}`);else if($){if(l[z]!==1)throw SyntaxError(`Unexpected character at index ${_}`);if(I===-1)I=_;else if(!Z)Z=!0;$=!1}else if(G)if(l[z]===1){if(I===-1)I=_}else if(z===34&&I!==-1)G=!1,Q=_;else if(z===92)$=!0;else throw SyntaxError(`Unexpected character at index ${_}`);else if(z===34&&J.charCodeAt(_-1)===61)G=!0;else if(Q===-1&&l[z]===1){if(I===-1)I=_}else if(I!==-1&&(z===32||z===9)){if(Q===-1)Q=_}else if(z===59||z===44){if(I===-1)throw SyntaxError(`Unexpected character at index ${_}`);if(Q===-1)Q=_;let V=J.slice(I,Q);if(Z)V=V.replace(/\\/g,""),Z=!1;if(C(X,j,V),z===44)C(K,Y,X),X=Object.create(null),Y=void 0;j=void 0,I=Q=-1}else throw SyntaxError(`Unexpected character at index ${_}`)}if(I===-1||G)throw SyntaxError("Unexpected end of input");if(Q===-1)Q=_;let R=J.slice(I,Q);if(Y===void 0)C(K,R,X);else{if(j===void 0)C(X,R,!0);else if(Z)C(X,j,R.replace(/\\/g,""));else C(X,j,R);C(K,Y,X)}return K}function w8(J){return Object.keys(J).map((K)=>{let X=J[K];if(!Array.isArray(X))X=[X];return X.map((Z)=>{return[K].concat(Object.keys(Z).map(($)=>{let G=Z[$];if(!Array.isArray(G))G=[G];return G.map((Y)=>Y===!0?$:`${$}=${Y}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}n5.exports={format:w8,parse:h8}});var V5=L((v4,X8)=>{var m8=H("events"),u8=H("https"),f8=H("http"),a5=H("net"),l8=H("tls"),{randomBytes:p8,createHash:b8}=H("crypto"),{Readable:y4}=H("stream"),{URL:Y5}=H("url"),D=u(),k8=G5(),d8=I5(),{BINARY_TYPES:c5,EMPTY_BUFFER:j5,GUID:i8,kStatusCode:n8,kWebSocket:F,NOOP:o5}=E(),{addEventListener:c8,removeEventListener:r8}=i5(),{format:a8,parse:o8}=Q5(),{toBuffer:s8}=h(),P=["CONNECTING","OPEN","CLOSING","CLOSED"],z5=[8,13];class A extends m8{constructor(J,K,X){super();if(this._binaryType=c5[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=A.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,J!==null){if(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(K))K=K.join(", ");else if(typeof K==="object"&&K!==null)X=K,K=void 0;s5(this,J,K,X)}else this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(J){if(!c5.includes(J))return;if(this._binaryType=J,this._receiver)this._receiver._binaryType=J}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}get extensions(){return Object.keys(this._extensions).join()}get onclose(){return}set onclose(J){}get onerror(){return}set onerror(J){}get onopen(){return}set onopen(J){}get onmessage(){return}set onmessage(J){}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(J,K,X){let Z=new k8(this.binaryType,this._extensions,this._isServer,X);if(this._sender=new d8(J,this._extensions),this._receiver=Z,this._socket=J,Z[F]=this,J[F]=this,Z.on("conclude",J4),Z.on("drain",K4),Z.on("error",X4),Z.on("message",Z4),Z.on("ping",$4),Z.on("pong",G4),J.setTimeout(0),J.setNoDelay(),K.length>0)J.unshift(K);J.on("close",e5),J.on("data",c),J.on("end",J8),J.on("error",K8),this._readyState=A.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=A.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[D.extensionName])this._extensions[D.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=A.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(J,K){if(this.readyState===A.CLOSED)return;if(this.readyState===A.CONNECTING)return T(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===A.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=A.CLOSING,this._sender.close(J,K,!this._isServer,(X)=>{if(X)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),30000)}ping(J,K,X){if(this.readyState===A.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof J==="function")X=J,J=K=void 0;else if(typeof K==="function")X=K,K=void 0;if(typeof J==="number")J=J.toString();if(this.readyState!==A.OPEN){_5(this,J,X);return}if(K===void 0)K=!this._isServer;this._sender.ping(J||j5,K,X)}pong(J,K,X){if(this.readyState===A.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof J==="function")X=J,J=K=void 0;else if(typeof K==="function")X=K,K=void 0;if(typeof J==="number")J=J.toString();if(this.readyState!==A.OPEN){_5(this,J,X);return}if(K===void 0)K=!this._isServer;this._sender.pong(J||j5,K,X)}send(J,K,X){if(this.readyState===A.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof K==="function")X=K,K={};if(typeof J==="number")J=J.toString();if(this.readyState!==A.OPEN){_5(this,J,X);return}let Z={binary:typeof J!=="string",mask:!this._isServer,compress:!0,fin:!0,...K};if(!this._extensions[D.extensionName])Z.compress=!1;this._sender.send(J||j5,Z,X)}terminate(){if(this.readyState===A.CLOSED)return;if(this.readyState===A.CONNECTING)return T(this,this._req,"WebSocket was closed before the connection was established");if(this._socket)this._readyState=A.CLOSING,this._socket.destroy()}}Object.defineProperty(A,"CONNECTING",{enumerable:!0,value:P.indexOf("CONNECTING")});Object.defineProperty(A.prototype,"CONNECTING",{enumerable:!0,value:P.indexOf("CONNECTING")});Object.defineProperty(A,"OPEN",{enumerable:!0,value:P.indexOf("OPEN")});Object.defineProperty(A.prototype,"OPEN",{enumerable:!0,value:P.indexOf("OPEN")});Object.defineProperty(A,"CLOSING",{enumerable:!0,value:P.indexOf("CLOSING")});Object.defineProperty(A.prototype,"CLOSING",{enumerable:!0,value:P.indexOf("CLOSING")});Object.defineProperty(A,"CLOSED",{enumerable:!0,value:P.indexOf("CLOSED")});Object.defineProperty(A.prototype,"CLOSED",{enumerable:!0,value:P.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach((J)=>{Object.defineProperty(A.prototype,J,{enumerable:!0})});["open","error","close","message"].forEach((J)=>{Object.defineProperty(A.prototype,`on${J}`,{enumerable:!0,get(){let K=this.listeners(J);for(let X=0;X<K.length;X++)if(K[X]._listener)return K[X]._listener;return},set(K){let X=this.listeners(J);for(let Z=0;Z<X.length;Z++)if(X[Z]._listener)this.removeListener(J,X[Z]);this.addEventListener(J,K)}})});A.prototype.addEventListener=c8;A.prototype.removeEventListener=r8;X8.exports=A;function s5(J,K,X,Z){let $={protocolVersion:z5[1],maxPayload:104857600,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...Z,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!z5.includes($.protocolVersion))throw RangeError(`Unsupported protocol version: ${$.protocolVersion} (supported versions: ${z5.join(", ")})`);let G;if(K instanceof Y5)G=K,J._url=K.href;else G=new Y5(K),J._url=K;let Y=G.protocol==="ws+unix:";if(!G.host&&(!Y||!G.pathname)){let V=Error(`Invalid URL: ${J.url}`);if(J._redirects===0)throw V;else{A5(J,V);return}}let j=G.protocol==="wss:"||G.protocol==="https:",I=j?443:80,Q=p8(16).toString("base64"),_=j?u8.get:f8.get,R;if($.createConnection=j?e8:t8,$.defaultPort=$.defaultPort||I,$.port=G.port||I,$.host=G.hostname.startsWith("[")?G.hostname.slice(1,-1):G.hostname,$.headers={"Sec-WebSocket-Version":$.protocolVersion,"Sec-WebSocket-Key":Q,Connection:"Upgrade",Upgrade:"websocket",...$.headers},$.path=G.pathname+G.search,$.timeout=$.handshakeTimeout,$.perMessageDeflate)R=new D($.perMessageDeflate!==!0?$.perMessageDeflate:{},!1,$.maxPayload),$.headers["Sec-WebSocket-Extensions"]=a8({[D.extensionName]:R.offer()});if(X)$.headers["Sec-WebSocket-Protocol"]=X;if($.origin)if($.protocolVersion<13)$.headers["Sec-WebSocket-Origin"]=$.origin;else $.headers.Origin=$.origin;if(G.username||G.password)$.auth=`${G.username}:${G.password}`;if(Y){let V=$.path.split(":");$.socketPath=V[0],$.path=V[1]}if($.followRedirects){if(J._redirects===0){J._originalUnixSocket=Y,J._originalSecure=j,J._originalHostOrSocketPath=Y?$.socketPath:G.host;let V=Z&&Z.headers;if(Z={...Z,headers:{}},V)for(let[B,y]of Object.entries(V))Z.headers[B.toLowerCase()]=y}else{let V=Y?J._originalUnixSocket?$.socketPath===J._originalHostOrSocketPath:!1:J._originalUnixSocket?!1:G.host===J._originalHostOrSocketPath;if(!V||J._originalSecure&&!j){if(delete $.headers.authorization,delete $.headers.cookie,!V)delete $.headers.host;$.auth=void 0}}if($.auth&&!Z.headers.authorization)Z.headers.authorization="Basic "+Buffer.from($.auth).toString("base64")}let z=J._req=_($);if($.timeout)z.on("timeout",()=>{T(J,z,"Opening handshake has timed out")});z.on("error",(V)=>{if(z===null||z.aborted)return;z=J._req=null,A5(J,V)}),z.on("response",(V)=>{let B=V.headers.location,y=V.statusCode;if(B&&$.followRedirects&&y>=300&&y<400){if(++J._redirects>$.maxRedirects){T(J,z,"Maximum redirects exceeded");return}z.abort();let S;try{S=new Y5(B,K)}catch(o){A5(J,o);return}s5(J,S,X,Z)}else if(!J.emit("unexpected-response",z,V))T(J,z,`Unexpected server response: ${V.statusCode}`)}),z.on("upgrade",(V,B,y)=>{if(J.emit("upgrade",V),J.readyState!==A.CONNECTING)return;z=J._req=null;let S=V.headers.upgrade;if(S===void 0||S.toLowerCase()!=="websocket"){T(J,B,"Invalid Upgrade header");return}let o=b8("sha1").update(Q+i8).digest("base64");if(V.headers["sec-websocket-accept"]!==o){T(J,B,"Invalid Sec-WebSocket-Accept header");return}let v=V.headers["sec-websocket-protocol"],V8=(X||"").split(/, */),g;if(!X&&v)g="Server sent a subprotocol but none was requested";else if(X&&!v)g="Server sent no subprotocol";else if(v&&!V8.includes(v))g="Server sent an invalid subprotocol";if(g){T(J,B,g);return}if(v)J._protocol=v;let F5=V.headers["sec-websocket-extensions"];if(F5!==void 0){if(!R){T(J,B,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let s;try{s=o8(F5)}catch(e){T(J,B,"Invalid Sec-WebSocket-Extensions header");return}let t=Object.keys(s);if(t.length){if(t.length!==1||t[0]!==D.extensionName){T(J,B,"Server indicated an extension that was not requested");return}try{R.accept(s[D.extensionName])}catch(e){T(J,B,"Invalid Sec-WebSocket-Extensions header");return}J._extensions[D.extensionName]=R}}J.setSocket(B,y,$.maxPayload)})}function A5(J,K){J._readyState=A.CLOSING,J.emit("error",K),J.emitClose()}function t8(J){return J.path=J.socketPath,a5.connect(J)}function e8(J){if(J.path=void 0,!J.servername&&J.servername!=="")J.servername=a5.isIP(J.host)?"":J.host;return l8.connect(J)}function T(J,K,X){J._readyState=A.CLOSING;let Z=Error(X);if(Error.captureStackTrace(Z,T),K.setHeader){if(K.abort(),K.socket&&!K.socket.destroyed)K.socket.destroy();K.once("abort",J.emitClose.bind(J)),J.emit("error",Z)}else K.destroy(Z),K.once("error",J.emit.bind(J,"error")),K.once("close",J.emitClose.bind(J))}function _5(J,K,X){if(K){let Z=s8(K).length;if(J._socket)J._sender._bufferedBytes+=Z;else J._bufferedAmount+=Z}if(X){let Z=Error(`WebSocket is not open: readyState ${J.readyState} (${P[J.readyState]})`);X(Z)}}function J4(J,K){let X=this[F];if(X._closeFrameReceived=!0,X._closeMessage=K,X._closeCode=J,X._socket[F]===void 0)return;if(X._socket.removeListener("data",c),process.nextTick(t5,X._socket),J===1005)X.close();else X.close(J,K)}function K4(){this[F]._socket.resume()}function X4(J){let K=this[F];if(K._socket[F]!==void 0)K._socket.removeListener("data",c),process.nextTick(t5,K._socket),K.close(J[n8]);K.emit("error",J)}function r5(){this[F].emitClose()}function Z4(J){this[F].emit("message",J)}function $4(J){let K=this[F];K.pong(J,!K._isServer,o5),K.emit("ping",J)}function G4(J){this[F].emit("pong",J)}function t5(J){J.resume()}function e5(){let J=this[F];this.removeListener("close",e5),this.removeListener("data",c),this.removeListener("end",J8),J._readyState=A.CLOSING;let K;if(!this._readableState.endEmitted&&!J._closeFrameReceived&&!J._receiver._writableState.errorEmitted&&(K=J._socket.read())!==null)J._receiver.write(K);if(J._receiver.end(),this[F]=void 0,clearTimeout(J._closeTimer),J._receiver._writableState.finished||J._receiver._writableState.errorEmitted)J.emitClose();else J._receiver.on("error",r5),J._receiver.on("finish",r5)}function c(J){if(!this[F]._receiver.write(J))this.pause()}function J8(){let J=this[F];J._readyState=A.CLOSING,J._receiver.end(),this.end()}function K8(){let J=this[F];if(this.removeListener("error",K8),this.on("error",o5),J)J._readyState=A.CLOSING,this.destroy()}});var I8=L((S4,G8)=>{var{Duplex:I4}=H("stream");function Z8(J){J.emit("close")}function Q4(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function $8(J){if(this.removeListener("error",$8),this.destroy(),this.listenerCount("error")===0)this.emit("error",J)}function Y4(J,K){let X=!0,Z=!0;function $(){if(X)J._socket.resume()}if(J.readyState===J.CONNECTING)J.once("open",function(){J._receiver.removeAllListeners("drain"),J._receiver.on("drain",$)});else J._receiver.removeAllListeners("drain"),J._receiver.on("drain",$);let G=new I4({...K,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return J.on("message",function(j){if(!G.push(j))X=!1,J._socket.pause()}),J.once("error",function(j){if(G.destroyed)return;Z=!1,G.destroy(j)}),J.once("close",function(){if(G.destroyed)return;G.push(null)}),G._destroy=function(Y,j){if(J.readyState===J.CLOSED){j(Y),process.nextTick(Z8,G);return}let I=!1;if(J.once("error",function(_){I=!0,j(_)}),J.once("close",function(){if(!I)j(Y);process.nextTick(Z8,G)}),Z)J.terminate()},G._final=function(Y){if(J.readyState===J.CONNECTING){J.once("open",function(){G._final(Y)});return}if(J._socket===null)return;if(J._socket._writableState.finished){if(Y(),G._readableState.endEmitted)G.destroy()}else J._socket.once("finish",function(){Y()}),J.close()},G._read=function(){if((J.readyState===J.OPEN||J.readyState===J.CLOSING)&&!X){if(X=!0,!J._receiver._writableState.needDrain)J._socket.resume()}},G._write=function(Y,j,I){if(J.readyState===J.CONNECTING){J.once("open",function(){G._write(Y,j,I)});return}J.send(Y,I)},G.on("end",Q4),G.on("error",$8),G}G8.exports=Y4});var j8=L((m4,Y8)=>{var j4=H("events"),r=H("http"),g4=H("https"),h4=H("net"),w4=H("tls"),{createHash:z4}=H("crypto"),x=u(),A4=V5(),{format:_4,parse:V4}=Q5(),{GUID:H4,kWebSocket:N4}=E(),F4=/^[+/0-9A-Za-z]{22}==$/;class Q8 extends j4{constructor(J,K){super();if(J={maxPayload:104857600,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,...J},J.port==null&&!J.server&&!J.noServer||J.port!=null&&(J.server||J.noServer)||J.server&&J.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(J.port!=null)this._server=r.createServer((X,Z)=>{let $=r.STATUS_CODES[426];Z.writeHead(426,{"Content-Length":$.length,"Content-Type":"text/plain"}),Z.end($)}),this._server.listen(J.port,J.host,J.backlog,K);else if(J.server)this._server=J.server;if(this._server){let X=this.emit.bind(this,"connection");this._removeListeners=R4(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(Z,$,G)=>{this.handleUpgrade(Z,$,G,X)}})}if(J.perMessageDeflate===!0)J.perMessageDeflate={};if(J.clientTracking)this.clients=new Set;this.options=J,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');if(!this._server)return null;return this._server.address()}close(J){if(J)this.once("close",J);if(this._state===2){process.nextTick(H5,this);return}if(this._state===1)return;if(this._state=1,this.clients)for(let X of this.clients)X.terminate();let K=this._server;if(K){if(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null){K.close(H5.bind(void 0,this));return}}process.nextTick(H5,this)}shouldHandle(J){if(this.options.path){let K=J.url.indexOf("?");if((K!==-1?J.url.slice(0,K):J.url)!==this.options.path)return!1}return!0}handleUpgrade(J,K,X,Z){K.on("error",N5);let $=J.headers["sec-websocket-key"]!==void 0?J.headers["sec-websocket-key"].trim():!1,G=J.headers.upgrade,Y=+J.headers["sec-websocket-version"],j={};if(J.method!=="GET"||G===void 0||G.toLowerCase()!=="websocket"||!$||!F4.test($)||Y!==8&&Y!==13||!this.shouldHandle(J))return p(K,400);if(this.options.perMessageDeflate){let I=new x(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let Q=V4(J.headers["sec-websocket-extensions"]);if(Q[x.extensionName])I.accept(Q[x.extensionName]),j[x.extensionName]=I}catch(Q){return p(K,400)}}if(this.options.verifyClient){let I={origin:J.headers[`${Y===8?"sec-websocket-origin":"origin"}`],secure:!!(J.socket.authorized||J.socket.encrypted),req:J};if(this.options.verifyClient.length===2){this.options.verifyClient(I,(Q,_,R,z)=>{if(!Q)return p(K,_||401,R,z);this.completeUpgrade($,j,J,K,X,Z)});return}if(!this.options.verifyClient(I))return p(K,401)}this.completeUpgrade($,j,J,K,X,Z)}completeUpgrade(J,K,X,Z,$,G){if(!Z.readable||!Z.writable)return Z.destroy();if(Z[N4])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return p(Z,503);let j=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${z4("sha1").update(J+H4).digest("base64")}`],I=new A4(null),Q=X.headers["sec-websocket-protocol"];if(Q){if(Q=Q.split(",").map(B4),this.options.handleProtocols)Q=this.options.handleProtocols(Q,X);else Q=Q[0];if(Q)j.push(`Sec-WebSocket-Protocol: ${Q}`),I._protocol=Q}if(K[x.extensionName]){let _=K[x.extensionName].params,R=_4({[x.extensionName]:[_]});j.push(`Sec-WebSocket-Extensions: ${R}`),I._extensions=K}if(this.emit("headers",j,X),Z.write(j.concat(`\r
|
|
2
|
+
`).join(`\r
|
|
3
|
+
`)),Z.removeListener("error",N5),I.setSocket(Z,$,this.options.maxPayload),this.clients)this.clients.add(I),I.on("close",()=>this.clients.delete(I));G(I,X)}}Y8.exports=Q8;function R4(J,K){for(let X of Object.keys(K))J.on(X,K[X]);return function(){for(let Z of Object.keys(K))J.removeListener(Z,K[Z])}}function H5(J){J._state=2,J.emit("close")}function N5(){this.destroy()}function p(J,K,X,Z){if(J.writable)X=X||r.STATUS_CODES[K],Z={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(X),...Z},J.write(`HTTP/1.1 ${K} ${r.STATUS_CODES[K]}\r
|
|
4
|
+
`+Object.keys(Z).map(($)=>`${$}: ${Z[$]}`).join(`\r
|
|
5
|
+
`)+`\r
|
|
6
|
+
\r
|
|
7
|
+
`+X);J.removeListener("error",N5),J.destroy()}function B4(J){return J.trim()}});var A8=L((u4,z8)=>{var b=V5();b.createWebSocketStream=I8();b.Server=j8();b.Receiver=G5();b.Sender=I5();z8.exports=b});var a=L4(A8(),1);function _8(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw Error("`WebSocket` is not supported in this environment")}var p4=(()=>{try{return _8()}catch{if(a.WebSocket)return a.WebSocket;return a}})();export{p4 as WebSocket};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{readFileSync as L,writeFileSync as T,existsSync as Y,readdirSync as O,mkdirSync as k,renameSync as U}from"node:fs";import{join as F}from"node:path";import{homedir as R}from"node:os";var E=F(R(),".openclaw"),b=F(E,"openclaw.json"),A="setu",_=8403;var P=/[:\/]8403/,w="setu-proxy-handles-auth",x=[{id:"claude-sonnet-4-6",alias:"sonnet-4.6"},{id:"claude-sonnet-4-5",alias:"sonnet-4.5"},{id:"claude-opus-4-6",alias:"opus"},{id:"claude-3-5-haiku-20241022",alias:"haiku"},{id:"gpt-5.1-codex",alias:"codex"},{id:"gpt-5",alias:"gpt5"},{id:"gpt-5-mini",alias:"gpt5-mini"},{id:"codex-mini-latest",alias:"codex-mini"},{id:"gemini-3-pro-preview",alias:"gemini-pro"},{id:"gemini-3-flash-preview",alias:"gemini-flash"},{id:"kimi-k2.5",alias:"kimi"},{id:"glm-5",alias:"glm"},{id:"MiniMax-M2.5",alias:"minimax"}];function K(){if(!Y(b))return{};try{let z=L(b,"utf-8").trim();if(!z)return{};return JSON.parse(z)}catch{return{}}}function D(z){if(!Y(E))k(E,{recursive:!0});let q=`${b}.tmp.${process.pid}`;T(q,JSON.stringify(z,null,2)+`
|
|
2
|
+
`),U(q,b)}function C(){return[{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (anthropic, via Setu)",api:"anthropic-messages",reasoning:!0,input:["text","image"],contextWindow:200000,maxTokens:64000},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5 (anthropic, via Setu)",api:"anthropic-messages",reasoning:!0,input:["text","image"],contextWindow:200000,maxTokens:64000},{id:"claude-opus-4-6",name:"Claude Opus 4.6 (anthropic, via Setu)",api:"anthropic-messages",reasoning:!0,input:["text","image"],contextWindow:200000,maxTokens:128000},{id:"claude-3-5-haiku-20241022",name:"Claude 3.5 Haiku (anthropic, via Setu)",api:"anthropic-messages",reasoning:!1,input:["text","image"],contextWindow:200000,maxTokens:8192},{id:"gpt-5.1-codex",name:"GPT-5.1 Codex (openai, via Setu)",api:"openai-completions",reasoning:!0,input:["text","image"],contextWindow:400000,maxTokens:128000},{id:"gpt-5",name:"GPT-5 (openai, via Setu)",api:"openai-completions",reasoning:!0,input:["text","image"],contextWindow:400000,maxTokens:128000},{id:"gpt-5-mini",name:"GPT-5 Mini (openai, via Setu)",api:"openai-completions",reasoning:!0,input:["text","image"],contextWindow:400000,maxTokens:128000},{id:"codex-mini-latest",name:"Codex Mini (openai, via Setu)",api:"openai-completions",reasoning:!0,input:["text"],contextWindow:200000,maxTokens:1e5},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro (google, via Setu)",api:"openai-completions",reasoning:!0,input:["text","image"],contextWindow:1e6,maxTokens:64000},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash (google, via Setu)",api:"openai-completions",reasoning:!0,input:["text","image"],contextWindow:1048576,maxTokens:65536},{id:"kimi-k2.5",name:"Kimi K2.5 (moonshot, via Setu)",api:"openai-completions",reasoning:!0,input:["text"],contextWindow:262144,maxTokens:262144},{id:"glm-5",name:"GLM-5 (zai, via Setu)",api:"openai-completions",reasoning:!0,input:["text"],contextWindow:204800,maxTokens:131072},{id:"MiniMax-M2.5",name:"MiniMax M2.5 (minimax, via Setu)",api:"openai-completions",reasoning:!0,input:["text"],contextWindow:204800,maxTokens:131072}]}function W(z=_){return{baseUrl:`http://localhost:${z}/v1`,apiKey:"setu-proxy-handles-auth",api:"openai-completions",authHeader:!1,models:C()}}function v(z,q){let j=[];for(let H of Object.keys(z)){if(H===A)continue;if(!H.startsWith("custom-"))continue;let J=z[H];if(!J?.baseUrl)continue;let Q=String(J.baseUrl);if(Q.includes(`:${q}`)||P.test(Q))delete z[H],j.push(H)}return j}function u(z,q){if(q.length===0)return;let J=z.agents?.defaults?.model;if(!J?.primary)return;let Q=String(J.primary);for(let Z of q)if(Q.startsWith(`${Z}/`)){let G=Q.slice(Z.length+1);J.primary=`setu/${G}`;break}}function p(z=_){let q=K(),j=!1;if(!q.models)q.models={},j=!0;let H=q.models;if(!H.providers)H.providers={},j=!0;let J=H.providers,Q=v(J,z);if(Q.length>0)u(q,Q),j=!0;let Z=`http://localhost:${z}/v1`,G=J[A];if(!G)J[A]=W(z),j=!0;else{if(!G.baseUrl||G.baseUrl!==Z)G.baseUrl=Z,j=!0;if(!G.apiKey)G.apiKey=w,j=!0;if(!G.api)G.api="openai-completions",j=!0;let V=G.models,N=C(),B=new Set(Array.isArray(V)?V.map((X)=>X?.id).filter(Boolean):[]),h=N.map((X)=>X.id);if(!V||!Array.isArray(V)||V.length!==N.length||h.some((X)=>!B.has(X)))G.models=C(),j=!0}if(!q.agents)q.agents={},j=!0;let I=q.agents;if(!I.defaults)I.defaults={},j=!0;let $=I.defaults;if(!$.model)$.model={},j=!0;let M=$.model;if(!M.primary)M.primary="setu/claude-sonnet-4-6",j=!0;if(!$.models)$.models={},j=!0;let S=$.models;for(let V of x){let N=`setu/${V.id}`,B=S[N];if(!B)S[N]={alias:V.alias},j=!0;else if(B.alias!==V.alias)B.alias=V.alias,j=!0}if(j)D(q)}function g(){let z=F(E,"agents");if(!Y(z))try{k(z,{recursive:!0})}catch{return}let q;try{q=O(z,{withFileTypes:!0}).filter((j)=>j.isDirectory()).map((j)=>j.name)}catch{q=[]}if(!q.includes("main"))q=["main",...q];for(let j of q){let H=F(z,j,"agent"),J=F(H,"auth-profiles.json");if(!Y(H))try{k(H,{recursive:!0})}catch{continue}let Q={version:1,profiles:{}};if(Y(J))try{let G=JSON.parse(L(J,"utf-8"));if(G.version&&G.profiles)Q=G}catch{}let Z="setu:default";if(Q.profiles[Z])continue;Q.profiles[Z]={type:"api_key",provider:"setu",key:w};try{T(J,JSON.stringify(Q,null,2))}catch{}}}function a(){let z=K(),q=z.models;if(!q?.providers)return;let j=q.providers;delete j[A],D(z)}function l(){let q=K().models;if(!q?.providers)return!1;let j=q.providers;return A in j}function m(){return b}
|
|
3
|
+
export{W as b,p as c,g as d,a as e,l as f,m as g};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as k}from"node:module";var g=Object.create;var{getPrototypeOf:h,defineProperty:f,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var l=(a,b,c)=>{c=a!=null?g(h(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of i(a))if(!j.call(d,e))f(d,e,{get:()=>a[e],enumerable:!0});return d};var m=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var n=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};var p=k(import.meta.url);
|
|
2
|
+
export{l as nd,m as od,n as pd,p as qd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{od as Y,qd as K}from"./chunk-enz73nmb.mjs";var V=Y((rz,O)=>{var{defineProperty:J,getOwnPropertyDescriptor:r,getOwnPropertyNames:t}=Object,e=Object.prototype.hasOwnProperty,o=(z,B)=>{for(var F in B)J(z,F,{get:B[F],enumerable:!0})},zz=(z,B,F,H)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let G of t(B))if(!e.call(z,G)&&G!==F)J(z,G,{get:()=>B[G],enumerable:!(H=r(B,G))||H.enumerable})}return z},Bz=(z)=>zz(J({},"__esModule",{value:!0}),z),M={};o(M,{VercelOidcTokenError:()=>j});O.exports=Bz(M);class j extends Error{constructor(z,B){super(z);this.name="VercelOidcTokenError",this.cause=B}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var C=Y((tz,x)=>{var{create:Fz,defineProperty:v,getOwnPropertyDescriptor:Gz,getOwnPropertyNames:Hz,getPrototypeOf:Kz}=Object,Qz=Object.prototype.hasOwnProperty,Wz=(z,B)=>{for(var F in B)v(z,F,{get:B[F],enumerable:!0})},S=(z,B,F,H)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let G of Hz(B))if(!Qz.call(z,G)&&G!==F)v(z,G,{get:()=>B[G],enumerable:!(H=Gz(B,G))||H.enumerable})}return z},N=(z,B,F)=>(F=z!=null?Fz(Kz(z)):{},S(B||!z||!z.__esModule?v(F,"default",{value:z,enumerable:!0}):F,z)),Xz=(z)=>S(v({},"__esModule",{value:!0}),z),E={};Wz(E,{findRootDir:()=>$z,getUserDataDir:()=>qz});x.exports=Xz(E);var Z=N(K("path")),Yz=N(K("fs")),A=N(K("os")),Zz=V();function $z(){try{let z=process.cwd();while(z!==Z.default.dirname(z)){let B=Z.default.join(z,".vercel");if(Yz.default.existsSync(B))return z;z=Z.default.dirname(z)}}catch(z){throw new Zz.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function qz(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(A.default.platform()){case"darwin":return Z.default.join(A.default.homedir(),"Library/Application Support");case"linux":return Z.default.join(A.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var c=Y((ez,g)=>{var{create:vz,defineProperty:b,getOwnPropertyDescriptor:bz,getOwnPropertyNames:Uz,getPrototypeOf:Lz}=Object,Jz=Object.prototype.hasOwnProperty,Vz=(z,B)=>{for(var F in B)b(z,F,{get:B[F],enumerable:!0})},y=(z,B,F,H)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let G of Uz(B))if(!Jz.call(z,G)&&G!==F)b(z,G,{get:()=>B[G],enumerable:!(H=bz(B,G))||H.enumerable})}return z},u=(z,B,F)=>(F=z!=null?vz(Lz(z)):{},y(B||!z||!z.__esModule?b(F,"default",{value:z,enumerable:!0}):F,z)),Az=(z)=>y(b({},"__esModule",{value:!0}),z),P={};Vz(P,{isValidAccessToken:()=>wz,readAuthConfig:()=>Rz,writeAuthConfig:()=>Iz});g.exports=Az(P);var $=u(K("fs")),l=u(K("path")),Nz=k();function h(){let z=(0,Nz.getVercelDataDir)();if(!z)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return l.join(z,"auth.json")}function Rz(){try{let z=h();if(!$.existsSync(z))return null;let B=$.readFileSync(z,"utf8");if(!B)return null;return JSON.parse(B)}catch(z){return null}}function Iz(z){let B=h(),F=l.dirname(B);if(!$.existsSync(F))$.mkdirSync(F,{mode:504,recursive:!0});$.writeFileSync(B,JSON.stringify(z,null,2),{mode:384})}function wz(z){if(!z.token)return!1;if(typeof z.expiresAt!=="number")return!0;let B=Math.floor(Date.now()/1000);return z.expiresAt>=B}});var p=Y((oz,d)=>{var{defineProperty:w,getOwnPropertyDescriptor:Dz,getOwnPropertyNames:Tz}=Object,Mz=Object.prototype.hasOwnProperty,jz=(z,B)=>{for(var F in B)w(z,F,{get:B[F],enumerable:!0})},Oz=(z,B,F,H)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let G of Tz(B))if(!Mz.call(z,G)&&G!==F)w(z,G,{get:()=>B[G],enumerable:!(H=Dz(B,G))||H.enumerable})}return z},Sz=(z)=>Oz(w({},"__esModule",{value:!0}),z),i={};jz(i,{processTokenResponse:()=>uz,refreshTokenRequest:()=>yz});d.exports=Sz(i);var R=K("os"),Ez="https://vercel.com",xz="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",f=`@vercel/oidc node-${process.version} ${(0,R.platform)()} (${(0,R.arch)()}) ${(0,R.hostname)()}`,I=null;async function Cz(){if(I)return I;let z=`${Ez}/.well-known/openid-configuration`,B=await fetch(z,{headers:{"user-agent":f}});if(!B.ok)throw Error("Failed to discover OAuth endpoints");let F=await B.json();if(!F||typeof F.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let H=F.token_endpoint;return I=H,H}async function yz(z){let B=await Cz();return await fetch(B,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":f},body:new URLSearchParams({client_id:xz,grant_type:"refresh_token",...z})})}async function uz(z){let B=await z.json();if(!z.ok){let F=typeof B==="object"&&B&&"error"in B?String(B.error):"Token refresh failed";return[Error(F)]}if(typeof B!=="object"||B===null)return[Error("Invalid token response")];if(typeof B.access_token!=="string")return[Error("Missing access_token in response")];if(B.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof B.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,B]}});var k=Y((zB,n)=>{var{create:Pz,defineProperty:U,getOwnPropertyDescriptor:lz,getOwnPropertyNames:hz,getPrototypeOf:gz}=Object,cz=Object.prototype.hasOwnProperty,kz=(z,B)=>{for(var F in B)U(z,F,{get:B[F],enumerable:!0})},a=(z,B,F,H)=>{if(B&&typeof B==="object"||typeof B==="function"){for(let G of hz(B))if(!cz.call(z,G)&&G!==F)U(z,G,{get:()=>B[G],enumerable:!(H=lz(B,G))||H.enumerable})}return z},_=(z,B,F)=>(F=z!=null?Pz(gz(z)):{},a(B||!z||!z.__esModule?U(F,"default",{value:z,enumerable:!0}):F,z)),iz=(z)=>a(U({},"__esModule",{value:!0}),z),m={};kz(m,{assertVercelOidcTokenResponse:()=>D,findProjectInfo:()=>sz,getTokenPayload:()=>mz,getVercelCliToken:()=>dz,getVercelDataDir:()=>fz,getVercelOidcToken:()=>pz,isExpired:()=>nz,loadToken:()=>_z,saveToken:()=>az});n.exports=iz(m);var q=_(K("path")),Q=_(K("fs")),X=V(),L=C(),W=c(),s=p();function fz(){let B=(0,L.getUserDataDir)();if(!B)return null;return q.join(B,"com.vercel.cli")}async function dz(){let z=(0,W.readAuthConfig)();if(!z)return null;if((0,W.isValidAccessToken)(z))return z.token||null;if(!z.refreshToken)return(0,W.writeAuthConfig)({}),null;try{let B=await(0,s.refreshTokenRequest)({refresh_token:z.refreshToken}),[F,H]=await(0,s.processTokenResponse)(B);if(F||!H)return(0,W.writeAuthConfig)({}),null;let G={token:H.access_token,expiresAt:Math.floor(Date.now()/1000)+H.expires_in};if(H.refresh_token)G.refreshToken=H.refresh_token;return(0,W.writeAuthConfig)(G),G.token??null}catch(B){return(0,W.writeAuthConfig)({}),null}}async function pz(z,B,F){let H=`https://api.vercel.com/v1/projects/${B}/token?source=vercel-oidc-refresh${F?`&teamId=${F}`:""}`,G=await fetch(H,{method:"POST",headers:{Authorization:`Bearer ${z}`}});if(!G.ok)throw new X.VercelOidcTokenError(`Failed to refresh OIDC token: ${G.statusText}`);let T=await G.json();return D(T),T}function D(z){if(!z||typeof z!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in z)||typeof z.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function sz(){let z=(0,L.findRootDir)();if(!z)throw new X.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let B=q.join(z,".vercel","project.json");if(!Q.existsSync(B))throw new X.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let F=JSON.parse(Q.readFileSync(B,"utf8"));if(typeof F.projectId!=="string"&&typeof F.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:F.projectId,teamId:F.orgId}}function az(z,B){let F=(0,L.getUserDataDir)();if(!F)throw new X.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let H=q.join(F,"com.vercel.token",`${B}.json`),G=JSON.stringify(z);Q.mkdirSync(q.dirname(H),{mode:504,recursive:!0}),Q.writeFileSync(H,G),Q.chmodSync(H,432);return}function _z(z){let B=(0,L.getUserDataDir)();if(!B)throw new X.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let F=q.join(B,"com.vercel.token",`${z}.json`);if(!Q.existsSync(F))return null;let H=JSON.parse(Q.readFileSync(F,"utf8"));return D(H),H}function mz(z){let B=z.split(".");if(B.length!==3)throw new X.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let F=B[1].replace(/-/g,"+").replace(/_/g,"/"),H=F.padEnd(F.length+(4-F.length%4)%4,"=");return JSON.parse(Buffer.from(H,"base64").toString("utf8"))}function nz(z){return z.exp*1000<Date.now()}});
|
|
2
|
+
export{V as h,k as i};
|