1"use strict";(()=>{var Oe=Object.defineProperty;var r=(Kt,gt)=>Oe(Kt,"name",{value:gt,configurable:!0});(self.webpackChunk=self.webpackChunk||[]).push([[1417],{86142(Kt,gt,O){var It;O.d(gt,{y:r(()=>Bt,"y")});var x=O(31729),R=O(15674),X=O(44681),W=O(62643),b=O(30703);const Pt=class Pt extends R.Ue{constructor(o){super("address","address",o,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(o,l){let _=b.V.dereference(l,"string");try{_=(0,X.b)(_)}catch(D){return this._throwError(D.message,l)}return o.writeValue(_)}decode(o){return(0,X.b)((0,W.up)(o.readValue(),20))}};r(Pt,"AddressCoder");let B=Pt;var rt=O(13443),N=Object.defineProperty,at=r((S,o,l)=>o in S?N(S,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):S[o]=l,"__defNormalProp"),E=r((S,o,l)=>at(S,typeof o!="symbol"?o+"":o,l),"__publicField");const ut=class ut extends R.Ue{constructor(o){super(o.name,o.type,"_",o.dynamic),E(this,"coder"),this.coder=o}defaultValue(){return this.coder.defaultValue()}encode(o,l){return this.coder.encode(o,l)}decode(o){return this.coder.decode(o)}};r(ut,"AnonymousCoder");let J=ut;var H=Object.defineProperty,m=r((S,o,l)=>o in S?H(S,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):S[o]=l,"array_defNormalProp"),f=r((S,o,l)=>m(S,typeof o!="symbol"?o+"":o,l),"array_publicField");function w(S,o,l){let _=[];if(Array.isArray(l))_=l;else if(l&&typeof l=="object"){let bt={};_=o.map(Et=>{const yt=Et.localName;return(0,x.vA)(yt,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:Et},value:l}),(0,x.vA)(!bt[yt],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:Et},value:l}),bt[yt]=!0,l[yt]})}else(0,x.MR)(!1,"invalid tuple value","tuple",l);(0,x.MR)(o.length===_.length,"types/value length mismatch","tuple",l);let D=new R.AU,G=new R.AU,ct=[];o.forEach((bt,Et)=>{let yt=_[Et];if(bt.dynamic){let Ht=G.length;bt.encode(G,yt);let re=D.writeUpdatableValue();ct.push(v=>{re(v+Ht)})}else bt.encode(D,yt)}),ct.forEach(bt=>{bt(D.length)});let Nt=S.appendWriter(D);return Nt+=S.appendWriter(G),Nt}r(w,"pack");function y(S,o){let l=[],_=[],D=S.subReader(0);return o.forEach(G=>{let ct=null;if(G.dynamic){let Nt=S.readIndex(),bt=D.subReader(Nt);try{ct=G.decode(bt)}catch(Et){if((0,x.bJ)(Et,"BUFFER_OVERRUN"))throw Et;ct=Et,ct.baseType=G.name,ct.name=G.localName,ct.type=G.type}}else try{ct=G.decode(S)}catch(Nt){if((0,x.bJ)(Nt,"BUFFER_OVERRUN"))throw Nt;ct=Nt,ct.baseType=G.name,ct.name=G.localName,ct.type=G.type}if(ct==null)throw new Error("investigate");l.push(ct),_.push(G.localName||null)}),R.Q7.fromItems(l,_)}r(y,"unpack");const Dt=class Dt extends R.Ue{constructor(o,l,_){const D=o.type+"["+(l>=0?l:"")+"]",G=l===-1||o.dynamic;super("array",D,_,G),f(this,"coder"),f(this,"length"),(0,rt.n)(this,{coder:o,length:l})}defaultValue(){const o=this.coder.defaultValue(),l=[];for(let _=0;_<this.length;_++)l.push(o);return l}encode(o,l){const _=b.V.dereference(l,"array");Array.isArray(_)||this._throwError("expected array value",_);let D=this.length;D===-1&&(D=_.length,o.writeValue(_.length)),(0,x.dd)(_.length,D,"coder array"+(this.localName?" "+this.localName:""));let G=[];for(let ct=0;ct<_.length;ct++)G.push(this.coder);return w(o,G,_)}decode(o){let l=this.length;l===-1&&(l=o.readIndex(),(0,x.vA)(l*R.Yx<=o.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:o.bytes,offset:l*R.Yx,length:o.dataLength}));let _=[];for(let D=0;D<l;D++)_.push(new J(this.coder));return y(o,_)}};r(Dt,"ArrayCoder");let k=Dt;const qt=class qt extends R.Ue{constructor(o){super("bool","bool",o,!1)}defaultValue(){return!1}encode(o,l){const _=b.V.dereference(l,"bool");return o.writeValue(_?1:0)}decode(o){return!!o.readValue()}};r(qt,"BooleanCoder");let $=qt;var M=O(99030);const Gt=class Gt extends R.Ue{constructor(o,l){super(o,o,l,!0)}defaultValue(){return"0x"}encode(o,l){l=(0,M.Lm)(l);let _=o.writeValue(l.length);return _+=o.writeBytes(l),_}decode(o){return o.readBytes(o.readIndex(),!0)}};r(Gt,"DynamicBytesCoder");let n=Gt;const Mt=class Mt extends n{constructor(o){super("bytes",o)}decode(o){return(0,M.c$)(super.decode(o))}};r(Mt,"BytesCoder");let U=Mt;var dt=Object.defineProperty,st=r((S,o,l)=>o in S?dt(S,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):S[o]=l,"fixed_bytes_defNormalProp"),ft=r((S,o,l)=>st(S,typeof o!="symbol"?o+"":o,l),"fixed_bytes_publicField");const Ft=class Ft extends R.Ue{constructor(o,l){let _="bytes"+String(o);super(_,_,l,!1),ft(this,"size"),(0,rt.n)(this,{size:o},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(o,l){let _=(0,M.Lm)(b.V.dereference(l,this.type));return _.length!==this.size&&this._throwError("incorrect data length",l),o.writeBytes(_)}decode(o){return(0,M.c$)(o.readBytes(this.size))}};r(Ft,"FixedBytesCoder");let kt=Ft;const it=new Uint8Array([]),zt=class zt extends R.Ue{constructor(o){super("null","",o,!1)}defaultValue(){return null}encode(o,l){return l!=null&&this._throwError("not null",l),o.writeBytes(it)}decode(o){return o.readBytes(0),null}};r(zt,"NullCoder");let Q=zt;var ot=Object.defineProperty,T=r((S,o,l)=>o in S?ot(S,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):S[o]=l,"number_defNormalProp"),F=r((S,o,l)=>T(S,typeof o!="symbol"?o+"":o,l),"number_publicField");const Ot=BigInt(0),Ct=BigInt(1),ee=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Qt=class Qt extends R.Ue{constructor(o,l,_){const D=(l?"int":"uint")+o*8;super(D,D,_,!1),F(this,"size"),F(this,"signed"),(0,rt.n)(this,{size:o,signed:l},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(o,l){let _=(0,W.Ab)(b.V.dereference(l,this.type)),D=(0,W.dK)(ee,R.Yx*8);if(this.signed){let G=(0,W.dK)(D,this.size*8-1);(_>G||_<-(G+Ct))&&this._throwError("value out-of-bounds",l),_=(0,W.JJ)(_,8*R.Yx)}else(_<Ot||_>(0,W.dK)(D,this.size*8))&&this._throwError("value out-of-bounds",l);return o.writeValue(_)}decode(o){let l=(0,W.dK)(o.readValue(),this.size*8);return this.signed&&(l=(0,W.ST)(l,this.size*8)),l}};r(Qt,"NumberCoder");let Lt=Qt;var $t=O(4381);const Jt=class Jt extends n{constructor(o){super("string",o)}defaultValue(){return""}encode(o,l){return super.encode(o,(0,$t.YW)(b.V.dereference(l,"string")))}decode(o){return(0,$t._v)(super.decode(o))}};r(Jt,"StringCoder");let Ut=Jt;var vt=Object.defineProperty,St=r((S,o,l)=>o in S?vt(S,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):S[o]=l,"tuple_defNormalProp"),Rt=r((S,o,l)=>St(S,typeof o!="symbol"?o+"":o,l),"tuple_publicField");const Zt=class Zt extends R.Ue{constructor(o,l){let _=!1;const D=[];o.forEach(ct=>{ct.dynamic&&(_=!0),D.push(ct.type)});const G="tuple("+D.join(",")+")";super("tuple",G,l,_),Rt(this,"coders"),(0,rt.n)(this,{coders:Object.freeze(o.slice())})}defaultValue(){const o=[];
1this.coders.forEach(_=>{o.push(_.defaultValue())});const l=this.coders.reduce((_,D)=>{const G=D.localName;return G&&(_[G]||(_[G]=0),_[G]++),_},{});return this.coders.forEach((_,D)=>{let G=_.localName;!G||l[G]!==1||(G==="length"&&(G="_length"),o[G]==null&&(o[G]=o[D]))}),Object.freeze(o)}encode(o,l){const _=b.V.dereference(l,"tuple");return w(o,this.coders,_)}decode(o){return y(o,this.coders)}};r(Zt,"TupleCoder");let ht=Zt;var At=O(21014),ne=r(S=>{throw TypeError(S)},"__typeError"),Xt=r((S,o,l)=>o.has(S)||ne("Cannot "+l),"__accessCheck"),_t=r((S,o,l)=>o.has(S)?ne("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(S):o.set(S,l),"__privateAdd"),Vt=r((S,o,l)=>(Xt(S,o,"access private method"),l),"__privateMethod"),mt,xt;const C=new Map;C.set(0,"GENERIC_PANIC"),C.set(1,"ASSERT_FALSE"),C.set(17,"OVERFLOW"),C.set(18,"DIVIDE_BY_ZERO"),C.set(33,"ENUM_RANGE_ERROR"),C.set(34,"BAD_STORAGE_DATA"),C.set(49,"STACK_UNDERFLOW"),C.set(50,"ARRAY_RANGE_ERROR"),C.set(65,"OUT_OF_MEMORY"),C.set(81,"UNINITIALIZED_FUNCTION_CALL");const g=new RegExp(/^bytes([0-9]*)$/),A=new RegExp(/^(u?int)([0-9]*)$/);let P=null,Z=1024;function wt(S,o,l,_){let D="missing revert data",G=null;const ct=null;let Nt=null;if(l){D="execution reverted";const Et=(0,M.q5)(l);if(l=(0,M.c$)(l),Et.length===0)D+=" (no data present; likely require(false) occurred",G="require(false)";else if(Et.length%32!==4)D+=" (could not decode reason; invalid data length)";else if((0,M.c$)(Et.slice(0,4))==="0x08c379a0")try{G=_.decode(["string"],Et.slice(4))[0],Nt={signature:"Error(string)",name:"Error",args:[G]},D+=`: ${JSON.stringify(G)}`}catch{D+=" (could not decode reason; invalid string data)"}else if((0,M.c$)(Et.slice(0,4))==="0x4e487b71")try{const yt=Number(_.decode(["uint256"],Et.slice(4))[0]);Nt={signature:"Panic(uint256)",name:"Panic",args:[yt]},G=`Panic due to ${C.get(yt)||"UNKNOWN"}(${yt})`,D+=`: ${G}`}catch{D+=" (could not decode panic code)"}else D+=" (unknown custom error)"}const bt={to:o.to?(0,X.b)(o.to):null,data:o.data||"0x"};return o.from&&(bt.from=(0,X.b)(o.from)),(0,x.xz)(D,"CALL_EXCEPTION",{action:S,data:l,reason:G,transaction:bt,invocation:ct,revert:Nt})}r(wt,"getBuiltinCallException");const pt=(It=class{constructor(){_t(this,mt)}getDefaultValue(o){const l=o.map(D=>Vt(this,mt,xt).call(this,At.aX.from(D)));return new ht(l,"_").defaultValue()}encode(o,l){(0,x.dd)(l.length,o.length,"types/values length mismatch");const _=o.map(ct=>Vt(this,mt,xt).call(this,At.aX.from(ct))),D=new ht(_,"_"),G=new R.AU;return D.encode(G,l),G.data}decode(o,l,_){const D=o.map(ct=>Vt(this,mt,xt).call(this,At.aX.from(ct)));return new ht(D,"_").decode(new R.mP(l,_,Z))}static _setDefaultMaxInflation(o){(0,x.MR)(typeof o=="number"&&Number.isInteger(o),"invalid defaultMaxInflation factor","value",o),Z=o}static defaultAbiCoder(){return P==null&&(P=new It),P}static getBuiltinCallException(o,l,_){return wt(o,l,_,It.defaultAbiCoder())}},r(It,"_AbiCoder"),It);mt=new WeakSet,xt=r(function(S){if(S.isArray())return new k(Vt(this,mt,xt).call(this,S.arrayChildren),S.arrayLength,S.name);if(S.isTuple())return new ht(S.components.map(l=>Vt(this,mt,xt).call(this,l)),S.name);switch(S.baseType){case"address":return new B(S.name);case"bool":return new $(S.name);case"string":return new Ut(S.name);case"bytes":return new U(S.name);case"":return new Q(S.name)}let o=S.type.match(A);if(o){let l=parseInt(o[2]||"256");return(0,x.MR)(l!==0&&l<=256&&l%8===0,"invalid "+o[1]+" bit length","param",S),new Lt(l/8,o[1]==="int",S.name)}if(o=S.type.match(g),o){let l=parseInt(o[1]);return(0,x.MR)(l!==0&&l<=32,"invalid bytes length","param",S),new kt(l,S.name)}(0,x.MR)(!1,"invalid type","type",S.type)},"getCoder_fn");let Bt=pt},15674(Kt,gt,O){var _t,xt;O.d(gt,{AU:r(()=>At,"AU"),Q7:r(()=>vt,"Q7"),Ue:r(()=>ht,"Ue"),Yx:r(()=>Q,"Yx"),mP:r(()=>Xt,"mP")});var x=O(99030),R=O(31729),X=O(62643),W=O(13443),b=Object.defineProperty,B=r(C=>{throw TypeError(C)},"__typeError"),rt=r((C,g,A)=>g in C?b(C,g,{enumerable:!0,configurable:!0,writable:!0,value:A}):C[g]=A,"__defNormalProp"),N=r((C,g,A)=>rt(C,typeof g!="symbol"?g+"":g,A),"__publicField"),at=r((C,g,A)=>g.has(C)||B("Cannot "+A),"__accessCheck"),E=r((C,g,A)=>(at(C,g,"read from private field"),A?A.call(C):g.get(C)),"__privateGet"),J=r((C,g,A)=>g.has(C)?B("Cannot add the same private member more than once"):g instanceof WeakSet?g.add(C):g.set(C,A),"__privateAdd"),H=r((C,g,A,P)=>(at(C,g,"write to private field"),P?P.call(C,A):g.set(C,A),A),"__privateSet"),m=r((C,g,A)=>(at(C,g,"access private method"),A),"__privateMethod"),f,w,y,k,$,M,n,U,dt,st,ft,kt,it;const Q=32,ot=new Uint8Array(Q),T=["then"],F={},Ot=new WeakMap;function Ct(C){return Ot.get(C)}r(Ct,"getNames");function ee(C,g){Ot.set(C,g)}r(ee,"setNames");function Lt(C,g){const A=new Error(`deferred error during ABI decoding triggered accessing ${C}`);throw A.error=g,A}r(Lt,"throwError");function $t(C,g,A){return C.indexOf(null)>=0?g.map((P,Z)=>P instanceof vt?$t(Ct(P),P,A):P):C.reduce((P,Z,wt)=>{let pt=g.getValue(Z);return Z in P||(A&&pt instanceof vt&&(pt=$t(Ct(pt),pt,A)),P[Z]=pt),P},{})}r($t,"toObject");const Ut=(_t=class extends Array{constructor(...g){const A=g[0];let P=g[1],Z=(g[2]||[]).slice(),wt=!0;A!==F&&(P=g,Z=[],wt=!1),super(P.length),J(this,f),P.forEach((Pt,ut)=>{this[ut]=Pt});const pt=Z.reduce((Pt,ut)=>(typeof ut=="string"&&Pt.set(ut,(Pt.get(ut)||0)+1),Pt),new Map);if(ee(this,Object.freeze(P.map((Pt,ut)=>{const Dt=Z[ut];return Dt!=null&&pt.get(Dt)===1?Dt:null}))),H(this,f,[]),E(this,f)==null&&E(this,f),!wt)return;Object.freeze(this);const Bt=new Proxy(this,{get:r((Pt,ut,Dt)=>{if(typeof ut=="string"){if(ut.match(/^[0-9]+$/)){const Gt=(0,X.WZ)(ut,"%index");if(Gt<0||Gt>=this.length)throw new RangeError("out of result range");const Mt=Pt[Gt];return Mt instanceof Error&&Lt(`index ${Gt}`,Mt),Mt}if(T.indexOf(ut)>=0)return Reflect.get(Pt,ut,Dt);const qt=Pt[ut];
1if(qt instanceof Function)return function(...Gt){return qt.apply(this===Dt?Pt:this,Gt)};if(!(ut in Pt))return Pt.getValue.apply(this===Dt?Pt:this,[ut])}return Reflect.get(Pt,ut,Dt)},"get")});return ee(Bt,Ct(this)),Bt}toArray(g){const A=[];return this.forEach((P,Z)=>{P instanceof Error&&Lt(`index ${Z}`,P),g&&P instanceof _t&&(P=P.toArray(g)),A.push(P)}),A}toObject(g){const A=Ct(this);return A.reduce((P,Z,wt)=>((0,R.vA)(Z!=null,`value at index ${wt} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),$t(A,this,g)),{})}slice(g,A){g==null&&(g=0),g<0&&(g+=this.length,g<0&&(g=0)),A==null&&(A=this.length),A<0&&(A+=this.length,A<0&&(A=0)),A>this.length&&(A=this.length);const P=Ct(this),Z=[],wt=[];for(let pt=g;pt<A;pt++)Z.push(this[pt]),wt.push(P[pt]);return new _t(F,Z,wt)}filter(g,A){const P=Ct(this),Z=[],wt=[];for(let pt=0;pt<this.length;pt++){const Bt=this[pt];Bt instanceof Error&&Lt(`index ${pt}`,Bt),g.call(A,Bt,pt,this)&&(Z.push(Bt),wt.push(P[pt]))}return new _t(F,Z,wt)}map(g,A){const P=[];for(let Z=0;Z<this.length;Z++){const wt=this[Z];wt instanceof Error&&Lt(`index ${Z}
1`,wt),P.push(g.call(A,wt,Z,this))}return P}getValue(g){const A=Ct(this).indexOf(g);if(A===-1)return;const P=this[A];return P instanceof Error&&Lt(`property ${JSON.stringify(g)}`,P.error),P}static fromItems(g,A){return new _t(F,g,A)}},r(_t,"_Result"),_t);f=new WeakMap;let vt=Ut;function St(C){const g=[],A=r(function(P,Z){if(Array.isArray(Z))for(let wt in Z){const pt=P.slice();pt.push(wt);try{A(pt,Z[wt])}catch(Bt){g.push({path:pt,error:Bt})}}},"checkErrors");return A([],C),g}r(St,"checkResultErrors");function Rt(C){let g=(0,X.c4)(C);return(0,R.vA)(g.length<=Q,"value out-of-bounds","BUFFER_OVERRUN",{buffer:g,length:Q,offset:g.length}),g.length!==Q&&(g=(0,x.Lm)((0,x.xW)([ot.slice(g.length%Q),g]))),g}r(Rt,"getValue");const Vt=class Vt{constructor(g,A,P,Z){N(this,"name"),N(this,"type"),N(this,"localName"),N(this,"dynamic"),(0,W.n)(this,{name:g,type:A,localName:P,dynamic:Z},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(g,A){(0,R.MR)(!1,g,this.localName,A)}};r(Vt,"Coder");let ht=Vt;const mt=class mt{constructor(){J(this,k),J(this,w),J(this,y),H(this,w,[]),H(this,y,0)}get data(){return(0,x.xW)(E(this,w))}get length(){return E(this,y)}appendWriter(g){return m(this,k,$).call(this,(0,x.Lm)(g.data))}writeBytes(g){let A=(0,x.Lm)(g);const P=A.length%Q;return P&&(A=(0,x.Lm)((0,x.xW)([A,ot.slice(P)]))),m(this,k,$).call(this,A)}writeValue(g){return m(this,k,$).call(this,Rt(g))}writeUpdatableValue(){const g=E(this,w).length;return E(this,w).push(ot),H(this,y,E(this,y)+Q),A=>{E(this,w)[g]=Rt(A)}}};r(mt,"Writer");let At=mt;w=new WeakMap,y=new WeakMap,k=new WeakSet,$=r(function(C){return E(this,w).push(C),H(this,y,E(this,y)+C.length),C.length},"writeData_fn");const ne=(xt=class{constructor(g,A,P){J(this,ft),N(this,"allowLoose"),J(this,M),J(this,n),J(this,U),J(this,dt),J(this,st),(0,W.n)(this,{allowLoose:!!A}),H(this,M,(0,x.Lm)(g)),H(this,U,0),H(this,dt,null),H(this,st,P??1024),H(this,n,0)}get data(){return(0,x.c$)(E(this,M))}get dataLength(){return E(this,M).length}get consumed(){return E(this,n)}get bytes(){return new Uint8Array(E(this,M))}subReader(g){const A=new xt(E(this,M).slice(E(this,n)+g),this.allowLoose,E(this,st));return H(A,dt,this),A}readBytes(g,A){let P=m(this,ft,it).call(this,0,g,!!A);return m(this,ft,kt).call(this,g),H(this,n,E(this,n)+P.length),P.slice(0,g)}readValue(){return(0,X.Dg)(this.readBytes(Q))}readIndex(){return(0,X.Ro)(this.readBytes(Q))}},r(xt,"_Reader"),xt);M=new WeakMap,n=new WeakMap,U=new WeakMap,dt=new WeakMap,st=new WeakMap,ft=new WeakSet,kt=r(function(C){var g;if(E(this,dt))return m(g=E(this,dt),ft,kt).call(g,C);H(this,U,E(this,U)+C),(0,R.vA)(E(this,st)<1||E(this,U)<=E(this,st)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${E(this,st)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,x.Lm)(E(this,M)),offset:E(this,n),length:C,info:{bytesRead:E(this,U),dataLength:this.dataLength}})},"incrementBytesRead_fn"),it=r(function(C,g,A){let P=Math.ceil(g/Q)*Q;return E(this,n)+P>E(this,M).length&&(this.allowLoose&&A&&E(this,n)+g<=E(this,M).length?P=g:(0,R.vA)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,x.Lm)(E(this,M)),length:E(this,M).length,offset:E(this,n)+P})),E(this,M).slice(E(this,n),E(this,n)+P)},"peekBytes_fn");let Xt=ne},21014(Kt,gt,O){var _,D;O.d(gt,{FK:r(()=>Ft,"FK"),Pw:r(()=>It,"Pw"),Zp:r(()=>Zt,"Zp"),aX:r(()=>Mt,"aX"),bp:r(()=>Jt,"bp"),hc:r(()=>o,"hc")});var x=O(31729),R=O(62643),X=O(13443),W=O(45446),b=Object.defineProperty,B=r(v=>{throw TypeError(v)},"__typeError"),rt=r((v,e,c)=>e in v?b(v,e,{enumerable:!0,configurable:!0,writable:!0,value:c}):v[e]=c,"__defNormalProp"),N=r((v,e,c)=>rt(v,typeof e!="symbol"?e+"":e,c),"__publicField"),at=r((v,e,c)=>e.has(v)||B("Cannot "+c),"__accessCheck"),E=r((v,e,c)=>(at(v,e,"read from private field"),c?c.call(v):e.get(v)),"__privateGet"),J=r((v,e,c)=>e.has(v)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(v):e.set(v,c),"__privateAdd"),H=r((v,e,c,d)=>(at(v,e,"write to private field"),d?d.call(v,c):e.set(v,c),c),"__privateSet"),m=r((v,e,c)=>(at(v,e,"access private method"),c),"__privateMethod"),f=r((v,e,c,d)=>({set _(z){H(v,e,z,c)},get _(){return E(v,e,d)}}),"__privateWrapper"),w,y,k,$,M,n;function U(v){const e=new Set;return v.forEach(c=>e.add(c)),Object.freeze(e)}r(U,"setify");const st=U("external public payable override".split(" ")),ft="constant external internal payable private public pure view override",kt=U(ft.split(" ")),it="constructor error event fallback function receive struct",Q=U(it.split(" ")),ot="calldata memory storage payable indexed",T=U(ot.split(" ")),Ot=[it,ot,"tuple returns",ft].join(" "),Ct=U(Ot.split(" ")),ee={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"}
1,Lt=new RegExp("^(\\s*)"),$t=new RegExp("^([0-9]+)"),Ut=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),vt=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),St=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"),Rt=(_=class{constructor(e){J(this,k),J(this,w),J(this,y),H(this,w,0),H(this,y,e.slice())}get offset(){return E(this,w)}get length(){return E(this,y).length-E(this,w)}clone(){return new _(E(this,y))}reset(){H(this,w,0)}popKeyword(e){const c=this.peek();if(c.type!=="KEYWORD"||!e.has(c.text))throw new Error(`expected keyword ${c.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const c=this.peek();throw new Error(`expected ${e}; got ${c.type} ${JSON.stringify(c.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const c=m(this,k,$).call(this,E(this,w)+1,e.match+1);return H(this,w,e.match+1),c}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const c=[];for(;E(this,w)<e.match-1;){const d=this.peek().linkNext;c.push(m(this,k,$).call(this,E(this,w)+1,d)),H(this,w,d)}return H(this,w,e.match+1),c}peek(){if(E(this,w)>=E(this,y).length)throw new Error("out-of-bounds");return E(this,y)[E(this,w)]}peekKeyword(e){const c=this.peekType("KEYWORD");return c!=null&&e.has(c)?c:null}peekType(e){if(this.length===0)return null;const c=this.peek();return c.type===e?c.text:null}pop(){const e=this.peek();return f(this,w)._++,e}toString(){const e=[];for(let c=E(this,w);c<E(this,y).length;c++){const d=E(this,y)[c];e.push(`${d.type}:${d.text}`)}return`<TokenString ${e.join(" ")}>`}},r(_,"_TokenString"),_);w=new WeakMap,y=new WeakMap,k=new WeakSet,$=r(function(v=0,e=0){return new Rt(E(this,y).slice(v,e).map(c=>Object.freeze(Object.assign({},c,{match:c.match-v,linkBack:c.linkBack-v,linkNext:c.linkNext-v}))))},"subTokenString_fn");let ht=Rt;function At(v){const e=[],c=r(tt=>{const Y=K<v.length?JSON.stringify(v[K]):"$EOI";throw new Error(`invalid token ${Y} at ${K}: ${tt}`)},"throwError");let d=[],z=[],K=0;for(;K<v.length;){let tt=v.substring(K),Y=tt.match(Lt);Y&&(K+=Y[1].length,tt=v.substring(K));const j={depth:d.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:K,value:-1};e.push(j);let Tt=ee[tt[0]]||"";if(Tt){if(j.type=Tt,j.text=tt[0],K++,Tt==="OPEN_PAREN")d.push(e.length-1),z.push(e.length-1);else if(Tt=="CLOSE_PAREN")d.length===0&&c("no matching open bracket"),j.match=d.pop(),e[j.match].match=e.length-1,j.depth--,j.linkBack=z.pop(),e[j.linkBack].linkNext=e.length-1;else if(Tt==="COMMA")j.linkBack=z.pop(),e[j.linkBack].linkNext=e.length-1,z.push(e.length-1);else if(Tt==="OPEN_BRACKET")j.type="BRACKET";else if(Tt==="CLOSE_BRACKET"){let Yt=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){const ae=e.pop().text;Yt=ae+Yt,e[e.length-1].value=(0,R.WZ)(ae)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=Yt}continue}if(Y=tt.match(Ut),Y){if(j.text=Y[1],K+=j.text.length,Ct.has(j.text)){j.type="KEYWORD";continue}if(j.text.match(St)){j.type="TYPE";continue}j.type="ID";continue}if(Y=tt.match($t),Y){j.text=Y[1],j.type="NUMBER",K+=j.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(tt[0])} at position ${K}`)}return new ht(e.map(tt=>Object.freeze(tt)))}r(At,"lex");function ne(v,e){let c=[];for(const d in e.keys())v.has(d)&&c.push(d);if(c.length>1)throw new Error(`conflicting types: ${c.join(", ")}`)}r(ne,"allowSingle");function Xt(v,e){if(e.peekKeyword(Q)){const c=e.pop().text;if(c!==v)throw new Error(`expected ${v}, got ${c}`)}return e.popType("ID")}r(Xt,"consumeName");function _t(v,e){const c=new Set;for(;;){const d=v.peekType("KEYWORD");if(d==null||e&&!e.has(d))break;if(v.pop(),c.has(d))throw new Error(`duplicate keywords: ${JSON.stringify(d)}`);c.add(d)}return Object.freeze(c)}r(_t,"consumeKeywords");function Vt(v){let e=_t(v,kt);return ne(e,U("constant payable nonpayable".split(" "))),ne(e,U("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}r(Vt,"consumeMutability");function mt(v,e){return v.popParams().map(c=>Mt.from(c,e))}r(mt,"consumeParams");
1function xt(v){if(v.peekType("AT")){if(v.pop(),v.peekType("NUMBER"))return(0,R.Ab)(v.pop().text);throw new Error("invalid gas")}return null}r(xt,"consumeGas");function C(v){if(v.length)throw new Error(`unexpected tokens at offset ${v.offset}: ${v.toString()}`)}r(C,"consumeEoi");const g=new RegExp(/^(.*)\[([0-9]*)\]$/);function A(v){const e=v.match(St);if((0,x.MR)(e,"invalid type","type",v),v==="uint")return"uint256";if(v==="int")return"int256";if(e[2]){const c=parseInt(e[2]);(0,x.MR)(c!==0&&c<=32,"invalid bytes length","type",v)}else if(e[3]){const c=parseInt(e[3]);(0,x.MR)(c!==0&&c<=256&&c%8===0,"invalid numeric width","type",v)}return v}r(A,"verifyBasicType");const P={},Z=Symbol.for("_ethers_internal"),wt="_ParamTypeInternal",pt="_ErrorInternal",Bt="_EventInternal",Pt="_ConstructorInternal",ut="_FallbackInternal",Dt="_FunctionInternal",qt="_StructInternal",Gt=(D=class{constructor(e,c,d,z,K,tt,Y,j){if(J(this,M),N(this,"name"),N(this,"type"),N(this,"baseType"),N(this,"indexed"),N(this,"components"),N(this,"arrayLength"),N(this,"arrayChildren"),(0,x.gk)(e,P,"ParamType"),Object.defineProperty(this,Z,{value:wt}),tt&&(tt=Object.freeze(tt.slice())),z==="array"){if(Y==null||j==null)throw new Error("")}else if(Y!=null||j!=null)throw new Error("");if(z==="tuple"){if(tt==null)throw new Error("")}else if(tt!=null)throw new Error("");(0,X.n)(this,{name:c,type:d,baseType:z,indexed:K,components:tt,arrayLength:Y,arrayChildren:j})}format(e){if(e==null&&(e="sighash"),e==="json"){const d=this.name||"";if(this.isArray()){const K=JSON.parse(this.arrayChildren.format("json"));return K.name=d,K.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(K)}const z={type:this.baseType==="tuple"?"tuple":this.type,name:d};return typeof this.indexed=="boolean"&&(z.indexed=this.indexed),this.isTuple()&&(z.components=this.components.map(K=>JSON.parse(K.format(e)))),JSON.stringify(z)}let c="";return this.isArray()?(c+=this.arrayChildren.format(e),c+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?c+="("+this.components.map(d=>d.format(e)).join(e==="full"?", ":",")+")":c+=this.type,e!=="sighash"&&(this.indexed===!0&&(c+=" indexed"),e==="full"&&this.name&&(c+=" "+this.name)),c}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,c){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const d=this;return e.map(z=>d.arrayChildren.walk(z,c))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const d=this;return e.map((z,K)=>d.components[K].walk(z,c))}return c(this.type,e)}async walkAsync(e,c){const d=[],z=[e];return m(this,M,n).call(this,d,e,c,K=>{z[0]=K}),d.length&&await Promise.all(d),z[0]}static from(e,c){if(D.isParamType(e))return e;if(typeof e=="string")try{return D.from(At(e),c)}catch{(0,x.MR)(!1,"invalid param type","obj",e)}else if(e instanceof ht){let Y="",j="",Tt=null;_t(e,U(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(j="tuple",Tt=e.popParams().map(se=>D.from(se)),Y=`tuple(${Tt.map(se=>se.format()).join(",")})`):(Y=A(e.popType("TYPE")),j=Y);let Yt=null,ae=null;for(;e.length&&e.peekType("BRACKET");){const se=e.pop();Yt=new D(P,"",Y,j,null,Tt,ae,Yt),ae=se.value,Y+=se.text,j="array",Tt=null}let ce=null;if(_t(e,T).has("indexed")){if(!c)throw new Error("");ce=!0}const ue=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new D(P,ue,Y,j,ce,Tt,ae,Yt)}const d=e.name;(0,x.MR)(!d||typeof d=="string"&&d.match(vt),"invalid name","obj.name",d);let z=e.indexed;z!=null&&((0,x.MR)(c,"parameter cannot be indexed","obj.indexed",e.indexed),z=!!z);let K=e.type,tt=K.match(g);if(tt){const Y=parseInt(tt[2]||"-1"),j=D.from({type:tt[1],components:e.components});return new D(P,d||"",K,"array",z,null,Y,j)}if(K==="tuple"||K.startsWith("tuple(")||K.startsWith("(")){const Y=e.components!=null?e.components.map(Tt=>D.from(Tt)):null;return new D(P,d||"",K,"tuple",z,Y,null,null)}return K=A(e.type),new D(P,d||"",K,K,z,null,null,null)}static isParamType(e){return e&&e[Z]===wt}},r(D,"_ParamType"),D);M=new WeakSet,n=r(function(v,e,c,d){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const K=this.arrayChildren,tt=e.slice();tt.forEach((Y,j)=>{var Tt;m(Tt=K,M,n).call(Tt,v,Y,c,Yt=>{tt[j]=Yt})}),d(tt);return}if(this.isTuple()){const K=this.components;let tt;if(Array.isArray(e))tt=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");tt=K.map(Y=>{if(!Y.name)throw new Error("cannot use object value with unnamed components");
1if(!(Y.name in e))throw new Error(`missing value for component ${Y.name}`);return e[Y.name]})}if(tt.length!==this.components.length)throw new Error("array is wrong length");tt.forEach((Y,j)=>{var Tt;m(Tt=K[j],M,n).call(Tt,v,Y,c,Yt=>{tt[j]=Yt})}),d(tt);return}const z=c(this.type,e);z.then?v.push(async function(){d(await z)}()):d(z)},"walkAsync_fn");let Mt=Gt;const G=class G{constructor(e,c,d){N(this,"type"),N(this,"inputs"),(0,x.gk)(e,P,"Fragment"),d=Object.freeze(d.slice()),(0,X.n)(this,{type:c,inputs:d})}static from(e){if(typeof e=="string"){try{G.from(JSON.parse(e))}catch{}return G.from(At(e))}if(e instanceof ht)switch(e.peekKeyword(Q)){case"constructor":return It.from(e);case"error":return Jt.from(e);case"event":return Zt.from(e);case"fallback":case"receive":return S.from(e);case"function":return o.from(e);case"struct":return l.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return It.from(e);case"error":return Jt.from(e);case"event":return Zt.from(e);case"fallback":case"receive":return S.from(e);case"function":return o.from(e);case"struct":return l.from(e)}(0,x.vA)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,x.MR)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return It.isFragment(e)}static isError(e){return Jt.isFragment(e)}static isEvent(e){return Zt.isFragment(e)}static isFunction(e){return o.isFragment(e)}static isStruct(e){return l.isFragment(e)}};r(G,"Fragment");let Ft=G;const ct=class ct extends Ft{constructor(e,c,d,z){super(e,c,z),N(this,"name"),(0,x.MR)(typeof d=="string"&&d.match(vt),"invalid identifier","name",d),z=Object.freeze(z.slice()),(0,X.n)(this,{name:d})}};r(ct,"NamedFragment");let zt=ct;function Qt(v,e){return"("+e.map(c=>c.format(v)).join(v==="full"?", ":",")+")"}r(Qt,"joinParams");const Nt=class Nt extends zt{constructor(e,c,d){super(e,"error",c,d),Object.defineProperty(this,Z,{value:pt})}get selector(){return(0,W.id)(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(d=>JSON.parse(d.format(e)))});const c=[];return e!=="sighash"&&c.push("error"),c.push(this.name+Qt(e,this.inputs)),c.join(" ")}static from(e){if(Nt.isFragment(e))return e;if(typeof e=="string")return Nt.from(At(e));if(e instanceof ht){const c=Xt("error",e),d=mt(e);return C(e),new Nt(P,c,d)}return new Nt(P,e.name,e.inputs?e.inputs.map(Mt.from):[])}static isFragment(e){return e&&e[Z]===pt}};r(Nt,"ErrorFragment");let Jt=Nt;const bt=class bt extends zt{constructor(e,c,d,z){super(e,"event",c,d),N(this,"anonymous"),Object.defineProperty(this,Z,{value:Bt}),(0,X.n)(this,{anonymous:z})}get topicHash(){return(0,W.id)(this.format("sighash"))}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(d=>JSON.parse(d.format(e)))});const c=[];return e!=="sighash"&&c.push("event"),c.push(this.name+Qt(e,this.inputs)),e!=="sighash"&&this.anonymous&&c.push("anonymous"),c.join(" ")}static getTopicHash(e,c){return c=(c||[]).map(z=>Mt.from(z)),new bt(P,e,c,!1).topicHash}static from(e){if(bt.isFragment(e))return e;if(typeof e=="string")try{return bt.from(At(e))}catch{(0,x.MR)(!1,"invalid event fragment","obj",e)}else if(e instanceof ht){const c=Xt("event",e),d=mt(e,!0),z=!!_t(e,U(["anonymous"])).has("anonymous");return C(e),new bt(P,c,d,z)}return new bt(P,e.name,e.inputs?e.inputs.map(c=>Mt.from(c,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[Z]===Bt}};r(bt,"EventFragment");let Zt=bt;const Et=class Et extends Ft{constructor(e,c,d,z,K){super(e,c,d),N(this,"payable"),N(this,"gas"),Object.defineProperty(this,Z,{value:Pt}),(0,X.n)(this,{payable:z,gas:K})}format(e){if((0,x.vA)(e!=null&&e!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),e==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(d=>JSON.parse(d.format(e)))});const c=[`constructor${Qt(e,this.inputs)}`];return this.payable&&c.push("payable"),this.gas!=null&&c.push(`@${this.gas.toString()}`),c.join(" ")}static from(e){if(Et.isFragment(e))return e;if(typeof e=="string")try{return Et.from(At(e))}catch{(0,x.MR)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof ht){_t(e,U(["constructor"]));const c=mt(e),d=!!_t(e,st).has("payable"),z=xt(e);return C(e),new Et(P,"constructor",c,d,z)}return new Et(P,"constructor",e.inputs?e.inputs.map(Mt.from):[],!!e.payable,e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[Z]===Pt}};r(Et,"ConstructorFragment");let It=Et;const yt=class yt extends Ft{constructor(e,c,d){super(e,"fallback",c),N(this,"payable"),Object.defineProperty(this,Z,{value:ut}),(0,X.n)(this,{payable:d})}format(e){const c=this.inputs.length===0?"receive":"fallback";if(e==="json"){const d=this.payable?"payable":"nonpayable";return JSON.stringify({type:c,stateMutability:d})}return`${c}()${this.payable?" payable":""}`}static from(e){if(yt.isFragment(e))return e;if(typeof e=="string")try{return yt.from(At(e))}catch{(0,x.MR)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof ht){const c=e.toString(),d=e.peekKeyword(U(["fallback","receive"]));if((0,x.MR)(d,"type must be fallback or receive","obj",c),e.popKeyword(U(["fallback","receive"]))==="receive"){const Y=mt(e);return(0,x.MR)(Y.length===0,"receive cannot have arguments","obj.inputs",Y),_t(e,U(["payable"])),C(e),new yt(P,[],!0)}let K=mt(e);
1K.length?(0,x.MR)(K.length===1&&K[0].type==="bytes","invalid fallback inputs","obj.inputs",K.map(Y=>Y.format("minimal")).join(", ")):K=[Mt.from("bytes")];const tt=Vt(e);if((0,x.MR)(tt==="nonpayable"||tt==="payable","fallback cannot be constants","obj.stateMutability",tt),_t(e,U(["returns"])).has("returns")){const Y=mt(e);(0,x.MR)(Y.length===1&&Y[0].type==="bytes","invalid fallback outputs","obj.outputs",Y.map(j=>j.format("minimal")).join(", "))}return C(e),new yt(P,K,tt==="payable")}if(e.type==="receive")return new yt(P,[],!0);if(e.type==="fallback"){const c=[Mt.from("bytes")],d=e.stateMutability==="payable";return new yt(P,c,d)}(0,x.MR)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[Z]===ut}};r(yt,"FallbackFragment");let S=yt;const Ht=class Ht extends zt{constructor(e,c,d,z,K,tt){super(e,"function",c,z),N(this,"constant"),N(this,"outputs"),N(this,"stateMutability"),N(this,"payable"),N(this,"gas"),Object.defineProperty(this,Z,{value:Dt}),K=Object.freeze(K.slice());const Y=d==="view"||d==="pure",j=d==="payable";(0,X.n)(this,{constant:Y,gas:tt,outputs:K,payable:j,stateMutability:d})}get selector(){return(0,W.id)(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(d=>JSON.parse(d.format(e))),outputs:this.outputs.map(d=>JSON.parse(d.format(e)))});const c=[];return e!=="sighash"&&c.push("function"),c.push(this.name+Qt(e,this.inputs)),e!=="sighash"&&(this.stateMutability!=="nonpayable"&&c.push(this.stateMutability),this.outputs&&this.outputs.length&&(c.push("returns"),c.push(Qt(e,this.outputs))),this.gas!=null&&c.push(`@${this.gas.toString()}`)),c.join(" ")}static getSelector(e,c){return c=(c||[]).map(z=>Mt.from(z)),new Ht(P,e,"view",c,[],null).selector}static from(e){if(Ht.isFragment(e))return e;if(typeof e=="string")try{return Ht.from(At(e))}catch{(0,x.MR)(!1,"invalid function fragment","obj",e)}else if(e instanceof ht){const d=Xt("function",e),z=mt(e),K=Vt(e);let tt=[];_t(e,U(["returns"])).has("returns")&&(tt=mt(e));const Y=xt(e);return C(e),new Ht(P,d,K,z,tt,Y)}let c=e.stateMutability;return c==null&&(c="payable",typeof e.constant=="boolean"?(c="view",e.constant||(c="payable",typeof e.payable=="boolean"&&!e.payable&&(c="nonpayable"))):typeof e.payable=="boolean"&&!e.payable&&(c="nonpayable")),new Ht(P,e.name,c,e.inputs?e.inputs.map(Mt.from):[],e.outputs?e.outputs.map(Mt.from):[],e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[Z]===Dt}};r(Ht,"FunctionFragment");let o=Ht;const re=class re extends zt{constructor(e,c,d){super(e,"struct",c,d),Object.defineProperty(this,Z,{value:qt})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return re.from(At(e))}catch{(0,x.MR)(!1,"invalid struct fragment","obj",e)}else if(e instanceof ht){const c=Xt("struct",e),d=mt(e);return C(e),new re(P,c,d)}return new re(P,e.name,e.inputs?e.inputs.map(Mt.from):[])}static isFragment(e){return e&&e[Z]===qt}};r(re,"StructFragment");let l=re},30703(Kt,gt,O){var $;O.d(gt,{V:r(()=>k,"V")});var x=O(31729),R=O(13443),X=Object.defineProperty,W=r(M=>{throw TypeError(M)},"__typeError"),b=r((M,n,U)=>n in M?X(M,n,{enumerable:!0,configurable:!0,writable:!0,value:U}):M[n]=U,"__defNormalProp"),B=r((M,n,U)=>b(M,typeof n!="symbol"?n+"":n,U),"__publicField"),rt=r((M,n,U)=>n.has(M)||W("Cannot "+U),"__accessCheck"),N=r((M,n,U)=>(rt(M,n,"read from private field"),U?U.call(M):n.get(M)),"__privateGet"),at=r((M,n,U)=>n.has(M)?W("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(M):n.set(M,U),"__privateAdd"),E=r((M,n,U,dt)=>(rt(M,n,"write to private field"),dt?dt.call(M,U):n.set(M,U),U),"__privateSet"),J;const H={};function m(M,n){let U=!1;return n<0&&(U=!0,n*=-1),new k(H,`${U?"":"u"}int${n}`,M,{signed:U,width:n})}r(m,"n");function f(M,n){return new k(H,`bytes${n||""}`,M,{size:n})}r(f,"b");const w=Symbol.for("_ethers_typed"),y=($=class{constructor(n,U,dt,st){B(this,"type"),B(this,"value"),at(this,J),B(this,"_typedSymbol"),st==null&&(st=null),(0,x.gk)(H,n,"Typed"),(0,R.n)(this,{_typedSymbol:w,type:U,value:dt}),E(this,J,st),this.format()}
1format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(n=>n.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return N(this,J)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return N(this,J)===!0?-1:N(this,J)===!1?this.value.length:null}static from(n,U){return new $(H,n,U)}static uint8(n){return m(n,8)}static uint16(n){return m(n,16)}static uint24(n){return m(n,24)}static uint32(n){return m(n,32)}static uint40(n){return m(n,40)}static uint48(n){return m(n,48)}static uint56(n){return m(n,56)}static uint64(n){return m(n,64)}static uint72(n){return m(n,72)}static uint80(n){return m(n,80)}static uint88(n){return m(n,88)}static uint96(n){return m(n,96)}static uint104(n){return m(n,104)}static uint112(n){return m(n,112)}static uint120(n){return m(n,120)}static uint128(n){return m(n,128)}static uint136(n){return m(n,136)}static uint144(n){return m(n,144)}static uint152(n){return m(n,152)}static uint160(n){return m(n,160)}static uint168(n){return m(n,168)}static uint176(n){return m(n,176)}static uint184(n){return m(n,184)}static uint192(n){return m(n,192)}static uint200(n){return m(n,200)}static uint208(n){return m(n,208)}static uint216(n){return m(n,216)}static uint224(n){return m(n,224)}static uint232(n){return m(n,232)}static uint240(n){return m(n,240)}static uint248(n){return m(n,248)}static uint256(n){return m(n,256)}static uint(n){return m(n,256)}static int8(n){return m(n,-8)}static int16(n){return m(n,-16)}static int24(n){return m(n,-24)}static int32(n){return m(n,-32)}static int40(n){return m(n,-40)}static int48(n){return m(n,-48)}static int56(n){return m(n,-56)}static int64(n){return m(n,-64)}static int72(n){return m(n,-72)}static int80(n){return m(n,-80)}static int88(n){return m(n,-88)}static int96(n){return m(n,-96)}static int104(n){return m(n,-104)}static int112(n){return m(n,-112)}static int120(n){return m(n,-120)}static int128(n){return m(n,-128)}static int136(n){return m(n,-136)}static int144(n){return m(n,-144)}static int152(n){return m(n,-152)}static int160(n){return m(n,-160)}static int168(n){return m(n,-168)}static int176(n){return m(n,-176)}static int184(n){return m(n,-184)}static int192(n){return m(n,-192)}static int200(n){return m(n,-200)}static int208(n){return m(n,-208)}static int216(n){return m(n,-216)}static int224(n){return m(n,-224)}static int232(n){return m(n,-232)}static int240(n){return m(n,-240)}static int248(n){return m(n,-248)}static int256(n){return m(n,-256)}static int(n){return m(n,-256)}static bytes1(n){return f(n,1)}static bytes2(n){return f(n,2)}static bytes3(n){return f(n,3)}static bytes4(n){return f(n,4)}static bytes5(n){return f(n,5)}static bytes6(n){return f(n,6)}static bytes7(n){return f(n,7)}static bytes8(n){return f(n,8)}static bytes9(n){return f(n,9)}static bytes10(n){return f(n,10)}static bytes11(n){return f(n,11)}static bytes12(n){return f(n,12)}static bytes13(n){return f(n,13)}static bytes14(n){return f(n,14)}static bytes15(n){return f(n,15)}static bytes16(n){return f(n,16)}static bytes17(n){return f(n,17)}static bytes18(n){return f(n,18)}static bytes19(n){return f(n,19)}static bytes20(n){return f(n,20)}static bytes21(n){return f(n,21)}static bytes22(n){return f(n,22)}static bytes23(n){return f(n,23)}static bytes24(n){return f(n,24)}static bytes25(n){return f(n,25)}static bytes26(n){return f(n,26)}static bytes27(n){return f(n,27)}static bytes28(n){return f(n,28)}static bytes29(n){return f(n,29)}static bytes30(n){return f(n,30)}static bytes31(n){return f(n,31)}static bytes32(n){return f(n,32)}static address(n){return new $(H,"address",n)}static bool(n){return new $(H,"bool",!!n)}static bytes(n){return new $(H,"bytes",n)}static string(n){return new $(H,"string",n)}static array(n,U){throw new Error("not implemented yet")}static tuple(n,U){throw new Error("not implemented yet")}static overrides(n){return new $(H,"overrides",Object.assign({},n))}static isTyped(n){return n&&typeof n=="object"&&"_typedSymbol"in n&&n._typedSymbol===w}static dereference(n,U){if($.isTyped(n)){if(n.type!==U)throw new Error(`invalid type: expecetd ${U}, got ${n.type}`);return n.value}return n}},r($,"_Typed"),$);J=new WeakMap;let k=y},44681(Kt,gt,O){O.d(gt,{b:r(()=>H,"b")});var x=O(20230),R=O(99030),X=O(31729);const W=BigInt(0),b=BigInt(36);function B(f){f=f.toLowerCase();const w=f.substring(2).split(""),y=new Uint8Array(40);for(let $=0;$<40;$++)y[$]=w[$].charCodeAt(0);const k=(0,R.q5)((0,x.S)(y));for(let $=0;$<40;$+=2)k[$>>1]>>4>=8&&(w[$]=w[$].toUpperCase()),(k[$>>1]&15)>=8&&(w[$+1]=w[$+1].toUpperCase());return"0x"+w.join("")}r(B,"getChecksumAddress");const rt={};for(let f=0;f<10;f++)rt[String(f)]=String(f);for(let f=0;f<26;f++)rt[String.fromCharCode(65+f)]=String(10+f);const N=15;function at(f){f=f.toUpperCase(),f=f.substring(4)+f.substring(0,2)+"00";let w=f.split("").map(k=>rt[k]).join("");for(;w.length>=N;){let k=w.substring(0,N);w=parseInt(k,10)%97+w.substring(k.length)}let y=String(98-parseInt(w,10)%97);for(;y.length<2;)y="0"+y;return y}r(at,"ibanChecksum");const E=function(){const f={};for(let w=0;w<36;w++){const y="0123456789abcdefghijklmnopqrstuvwxyz"[w];f[y]=BigInt(w)}return f}();function J(f){f=f.toLowerCase();let w=W;for(let y=0;y<f.length;y++)w=w*b+E[f[y]];return w}r(J,"fromBase36");
1function H(f){if((0,X.MR)(typeof f=="string","invalid address","address",f),f.match(/^(0x)?[0-9a-fA-F]{40}$/)){f.startsWith("0x")||(f="0x"+f);const w=B(f);return(0,X.MR)(!f.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||w===f,"bad address checksum","address",f),w}if(f.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,X.MR)(f.substring(2,4)===at(f),"bad icap checksum","address",f);let w=J(f.substring(4)).toString(16);for(;w.length<40;)w="0"+w;return B("0x"+w)}(0,X.MR)(!1,"invalid address","address",f)}r(H,"getAddress");function m(f){let w=BigInt(H(f)).toString(36).toUpperCase();for(;w.length<30;)w="0"+w;return"XE"+at("XE00"+w)+w}r(m,"getIcapAddress")},92820(Kt,gt,O){O.d(gt,{$C:r(()=>W,"$C"),tG:r(()=>rt,"tG")});var x,R=O(31729),X=O(44681);function W(N){return N&&typeof N.getAddress=="function"}r(W,"isAddressable");function b(N){try{return x(N),!0}catch{}return!1}r(b,"isAddress");async function B(N,at){const E=await at;return(E==null||E==="0x0000000000000000000000000000000000000000")&&((0,R.vA)(typeof N!="string","unconfigured name","UNCONFIGURED_NAME",{value:N}),(0,R.MR)(!1,"invalid AddressLike value; did not resolve to a value address","target",N)),(0,X.b)(E)}r(B,"checkAddress");function rt(N,at){if(typeof N=="string")return N.match(/^0x[0-9a-f]{40}$/i)?(0,X.b)(N):((0,R.vA)(at!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),B(N,at.resolveName(N)));if(W(N))return B(N,N.getAddress());if(N&&typeof N.then=="function")return B(N,N);(0,R.MR)(!1,"unsupported addressable value","target",N)}r(rt,"resolveAddress")},35186(Kt,gt,O){O.d(gt,{t:r(()=>H,"t")});var x,R,X,W,b,B,rt=O(20230),N=O(99030),at=O(62643),E=O(49657),J=O(44681);function H(f){const w=(0,J.b)(f.from);let k=(0,at.Ab)(f.nonce,"tx.nonce").toString(16);return k==="0"?k="0x":k.length%2?k="0x0"+k:k="0x"+k,(0,J.b)((0,N.ZG)((0,rt.S)((0,E.R)([w,k])),12))}r(H,"getCreateAddress");function m(f,w,y){const k=B(f),$=R(w,"salt"),M=R(y,"initCodeHash");return b($.length===32,"salt must be 32 bytes","salt",w),b(M.length===32,"initCodeHash must be 32 bytes","initCodeHash",y),B(X(x(W(["0xff",k,$,M])),12))}r(m,"getCreate2Address")},16992(Kt,gt,O){O.d(gt,{j:r(()=>x,"j")});const x="0x0000000000000000000000000000000000000000"},54410(Kt,gt,O){var jt,ie;O.d(gt,{NZ:r(()=>ce,"NZ")});var x=O(30703),R=O(20230),X=O(45446),W=O(13443),b=O(31729),B=O(99030),rt=O(62643),N=O(86142),at=O(15674),E=O(21014),J=Object.defineProperty,H=r(a=>{throw TypeError(a)},"__typeError"),m=r((a,t,s)=>t in a?J(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,"__defNormalProp"),f=r((a,t,s)=>m(a,typeof t!="symbol"?t+"":t,s),"__publicField"),w=r((a,t,s)=>t.has(a)||H("Cannot "+s),"__accessCheck"),y=r((a,t,s)=>(w(a,t,"read from private field"),s?s.call(a):t.get(a)),"__privateGet"),k=r((a,t,s)=>t.has(a)?H("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,s),"__privateAdd"),$=r((a,t,s,i)=>(w(a,t,"write to private field"),i?i.call(a,s):t.set(a,s),s),"__privateSet"),M=r((a,t,s)=>(w(a,t,"access private method"),s),"__privateMethod"),n,U,dt,st,ft,kt,it;const le=class le{constructor(t,s,i){f(this,"fragment"),f(this,"name"),f(this,"signature"),f(this,"topic"),f(this,"args");const u=t.name,h=t.format();(0,W.n)(this,{fragment:t,name:u,signature:h,topic:s,args:i})}};r(le,"LogDescription");let Q=le;const ue=class ue{constructor(t,s,i,u){f(this,"fragment"),f(this,"name"),f(this,"args"),f(this,"signature"),f(this,"selector"),f(this,"value");const h=t.name,p=t.format();(0,W.n)(this,{fragment:t,name:h,args:i,signature:p,selector:s,value:u})}};r(ue,"TransactionDescription");let ot=ue;const se=class se{constructor(t,s,i){f(this,"fragment"),f(this,"name"),f(this,"args"),f(this,"signature"),f(this,"selector");const u=t.name,h=t.format();(0,W.n)(this,{fragment:t,name:u,args:i,signature:h,selector:s})}};r(se,"ErrorDescription");let T=se;const pe=class pe{constructor(t){f(this,"hash"),f(this,"_isIndexed"),(0,W.n)(this,{hash:t,_isIndexed:!0})}static isIndexed(t){return!!(t&&t._isIndexed)}};r(pe,"Indexed");let F=pe;const Ot={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},Ct={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:r(a=>`reverted with reason string ${JSON.stringify(a)}`,"reason")},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:r(a=>{let t="unknown panic code";return a>=0&&a<=255&&Ot[a.toString()]&&(t=Ot[a.toString()]),`reverted with panic code 0x${a.toString(16)} (${t})`},"reason")}},ee=(jt=class{constructor(t){k(this,ft),f(this,"fragments"),f(this,"deploy"),f(this,"fallback"),f(this,"receive"),k(this,n),k(this,U),k(this,dt),k(this,st);let s=[];typeof t=="string"?s=JSON.parse(t):s=t,$(this,dt,new Map),$(this,n,new Map),$(this,U,new Map);const i=[];for(const p of s)try{i.push(E.FK.from(p))}catch(I){console.log(`[Warning] Invalid Fragment ${JSON.stringify(p)}:`,I.message)}(0,W.n)(this,{fragments:Object.freeze(i)});let u=null,h=!1;
1$(this,st,this.getAbiCoder()),this.fragments.forEach((p,I)=>{let L;switch(p.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}(0,W.n)(this,{deploy:p});return;case"fallback":p.inputs.length===0?h=!0:((0,b.MR)(!u||p.payable!==u.payable,"conflicting fallback fragments",`fragments[${I}]`,p),u=p,h=u.payable);return;case"function":L=y(this,dt);break;case"event":L=y(this,U);break;case"error":L=y(this,n);break;default:return}const V=p.format();L.has(V)||L.set(V,p)}),this.deploy||(0,W.n)(this,{deploy:E.Pw.from("constructor()")}),(0,W.n)(this,{fallback:u,receive:h})}format(t){const s=t?"minimal":"full";return this.fragments.map(u=>u.format(s))}formatJson(){const t=this.fragments.map(s=>s.format("json"));return JSON.stringify(t.map(s=>JSON.parse(s)))}getAbiCoder(){return N.y.defaultAbiCoder()}getFunctionName(t){const s=M(this,ft,kt).call(this,t,null,!1);return(0,b.MR)(s,"no matching function","key",t),s.name}hasFunction(t){return!!M(this,ft,kt).call(this,t,null,!1)}getFunction(t,s){return M(this,ft,kt).call(this,t,s||null,!0)}forEachFunction(t){const s=Array.from(y(this,dt).keys());s.sort((i,u)=>i.localeCompare(u));for(let i=0;i<s.length;i++){const u=s[i];t(y(this,dt).get(u),i)}}getEventName(t){const s=M(this,ft,it).call(this,t,null,!1);return(0,b.MR)(s,"no matching event","key",t),s.name}hasEvent(t){return!!M(this,ft,it).call(this,t,null,!1)}getEvent(t,s){return M(this,ft,it).call(this,t,s||null,!0)}forEachEvent(t){const s=Array.from(y(this,U).keys());s.sort((i,u)=>i.localeCompare(u));for(let i=0;i<s.length;i++){const u=s[i];t(y(this,U).get(u),i)}}getError(t,s){if((0,B.Lo)(t)){const u=t.toLowerCase();if(Ct[u])return E.bp.from(Ct[u].signature);for(const h of y(this,n).values())if(u===h.selector)return h;return null}if(t.indexOf("(")===-1){const u=[];for(const[h,p]of y(this,n))h.split("(")[0]===t&&u.push(p);if(u.length===0)return t==="Error"?E.bp.from("error Error(string)"):t==="Panic"?E.bp.from("error Panic(uint256)"):null;if(u.length>1){const h=u.map(p=>JSON.stringify(p.format())).join(", ");(0,b.MR)(!1,`ambiguous error description (i.e. ${h})`,"name",t)}return u[0]}if(t=E.bp.from(t).format(),t==="Error(string)")return E.bp.from("error Error(string)");if(t==="Panic(uint256)")return E.bp.from("error Panic(uint256)");const i=y(this,n).get(t);return i||null}forEachError(t){const s=Array.from(y(this,n).keys());s.sort((i,u)=>i.localeCompare(u));for(let i=0;i<s.length;i++){const u=s[i];t(y(this,n).get(u),i)}}_decodeParams(t,s){return y(this,st).decode(t,s)}_encodeParams(t,s){return y(this,st).encode(t,s)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,s){if(typeof t=="string"){const i=this.getError(t);(0,b.MR)(i,"unknown error","fragment",t),t=i}return(0,b.MR)((0,B.ZG)(s,0,4)===t.selector,`data signature does not match error ${t.name}.`,"data",s),this._decodeParams(t.inputs,(0,B.ZG)(s,4))}encodeErrorResult(t,s){if(typeof t=="string"){const i=this.getError(t);(0,b.MR)(i,"unknown error","fragment",t),t=i}return(0,B.xW)([t.selector,this._encodeParams(t.inputs,s||[])])}decodeFunctionData(t,s){if(typeof t=="string"){const i=this.getFunction(t);(0,b.MR)(i,"unknown function","fragment",t),t=i}return(0,b.MR)((0,B.ZG)(s,0,4)===t.selector,`data signature does not match function ${t.name}.`,"data",s),this._decodeParams(t.inputs,(0,B.ZG)(s,4))}encodeFunctionData(t,s){if(typeof t=="string"){const i=this.getFunction(t);(0,b.MR)(i,"unknown function","fragment",t),t=i}return(0,B.xW)([t.selector,this._encodeParams(t.inputs,s||[])])}decodeFunctionResult(t,s){if(typeof t=="string"){const h=this.getFunction(t);(0,b.MR)(h,"unknown function","fragment",t),t=h}let i="invalid length for result data";const u=(0,B.Lm)(s);if(u.length%32===0)try{return y(this,st).decode(t.outputs,u)}catch{i="could not decode result data"}(0,b.vA)(!1,i,"BAD_DATA",{value:(0,B.c$)(u),info:{method:t.name,signature:t.format()}})}makeError(t,s){const i=(0,B.q5)(t,"data"),u=N.y.getBuiltinCallException("call",s,i);if(u.message.startsWith("execution reverted (unknown custom error)")){const I=(0,B.c$)(i.slice(0,4)),L=this.getError(I);if(L)try{const V=y(this,st).decode(L.inputs,i.slice(4));u.revert={name:L.name,signature:L.format(),args:V},u.reason=u.revert.signature,u.message=`execution reverted: ${u.reason}`}catch{u.message="execution reverted (coult not decode custom error)"}}const p=this.parseTransaction(s);return p&&(u.invocation={method:p.name,signature:p.signature,args:p.args}),u}encodeFunctionResult(t,s){if(typeof t=="string"){const i=this.getFunction(t);(0,b.MR)(i,"unknown function","fragment",t),t=i}return(0,B.c$)(y(this,st).encode(t.outputs,s||[]))}encodeFilterTopics(t,s){if(typeof t=="string"){const h=this.getEvent(t);(0,b.MR)(h,"unknown event","eventFragment",t),t=h}(0,b.vA)(s.length<=t.inputs.length,`too many arguments for ${t.format()}`,"UNEXPECTED_ARGUMENT",{count:s.length,expectedCount:t.inputs.length});const i=[];
1t.anonymous||i.push(t.topicHash);const u=r((h,p)=>h.type==="string"?(0,X.id)(p):h.type==="bytes"?(0,R.S)((0,B.c$)(p)):(h.type==="bool"&&typeof p=="boolean"?p=p?"0x01":"0x00":h.type.match(/^u?int/)?p=(0,rt.up)(p):h.type.match(/^bytes/)?p=(0,B.X_)(p,32):h.type==="address"&&y(this,st).encode(["address"],[p]),(0,B.nx)((0,B.c$)(p),32)),"encodeTopic");for(s.forEach((h,p)=>{const I=t.inputs[p];if(!I.indexed){(0,b.MR)(h==null,"cannot filter non-indexed parameters; must be null","contract."+I.name,h);return}h==null?i.push(null):I.baseType==="array"||I.baseType==="tuple"?(0,b.MR)(!1,"filtering with tuples or arrays not supported","contract."+I.name,h):Array.isArray(h)?i.push(h.map(L=>u(I,L))):i.push(u(I,h))});i.length&&i[i.length-1]===null;)i.pop();return i}encodeEventLog(t,s){if(typeof t=="string"){const p=this.getEvent(t);(0,b.MR)(p,"unknown event","eventFragment",t),t=p}const i=[],u=[],h=[];return t.anonymous||i.push(t.topicHash),(0,b.MR)(s.length===t.inputs.length,"event arguments/values mismatch","values",s),t.inputs.forEach((p,I)=>{const L=s[I];if(p.indexed)if(p.type==="string")i.push((0,X.id)(L));else if(p.type==="bytes")i.push((0,R.S)(L));else{if(p.baseType==="tuple"||p.baseType==="array")throw new Error("not implemented");i.push(y(this,st).encode([p.type],[L]))}else u.push(p),h.push(L)}),{data:y(this,st).encode(u,h),topics:i}}decodeEventLog(t,s,i){if(typeof t=="string"){const lt=this.getEvent(t);(0,b.MR)(lt,"unknown event","eventFragment",t),t=lt}if(i!=null&&!t.anonymous){const lt=t.topicHash;(0,b.MR)((0,B.Lo)(i[0],32)&&i[0].toLowerCase()===lt,"fragment/topic mismatch","topics[0]",i[0]),i=i.slice(1)}const u=[],h=[],p=[];t.inputs.forEach((lt,Wt)=>{lt.indexed?lt.type==="string"||lt.type==="bytes"||lt.baseType==="tuple"||lt.baseType==="array"?(u.push(E.aX.from({type:"bytes32",name:lt.name})),p.push(!0)):(u.push(lt),p.push(!1)):(h.push(lt),p.push(!1))});const I=i!=null?y(this,st).decode(u,(0,B.xW)(i)):null,L=y(this,st).decode(h,s,!0),V=[],et=[];let q=0,nt=0;return t.inputs.forEach((lt,Wt)=>{let oe=null;if(lt.indexed)if(I==null)oe=new F(null);else if(p[Wt])oe=new F(I[nt++]);else try{oe=I[nt++]}catch(te){oe=te}else try{oe=L[q++]}catch(te){oe=te}V.push(oe),et.push(lt.name||null)}),at.Q7.fromItems(V,et)}parseTransaction(t){const s=(0,B.q5)(t.data,"tx.data"),i=(0,rt.Ab)(t.value!=null?t.value:0,"tx.value"),u=this.getFunction((0,B.c$)(s.slice(0,4)));if(!u)return null;const h=y(this,st).decode(u.inputs,s.slice(4));return new ot(u,u.selector,h,i)}parseCallResult(t){throw new Error("@TODO")}parseLog(t){const s=this.getEvent(t.topics[0]);return!s||s.anonymous?null:new Q(s,s.topicHash,this.decodeEventLog(s,t.data,t.topics))}parseError(t){const s=(0,B.c$)(t),i=this.getError((0,B.ZG)(s,0,4));if(!i)return null;const u=y(this,st).decode(i.inputs,(0,B.ZG)(s,4));return new T(i,i.selector,u)}static from(t){return t instanceof jt?t:typeof t=="string"?new jt(JSON.parse(t)):typeof t.formatJson=="function"?new jt(t.formatJson()):typeof t.format=="function"?new jt(t.format("json")):new jt(t)}},r(jt,"_Interface"),jt);n=new WeakMap,U=new WeakMap,dt=new WeakMap,st=new WeakMap,ft=new WeakSet,kt=r(function(a,t,s){if((0,B.Lo)(a)){const u=a.toLowerCase();for(const h of y(this,dt).values())if(u===h.selector)return h;return null}if(a.indexOf("(")===-1){const u=[];for(const[h,p]of y(this,dt))h.split("(")[0]===a&&u.push(p);if(t){const h=t.length>0?t[t.length-1]:null;let p=t.length,I=!0;x.V.isTyped(h)&&h.type==="overrides"&&(I=!1,p--);for(let L=u.length-1;L>=0;L--){const V=u[L].inputs.length;V!==p&&(!I||V!==p-1)&&u.splice(L,1)}for(let L=u.length-1;L>=0;L--){const V=u[L].inputs;for(let et=0;et<t.length;et++)if(x.V.isTyped(t[et])){if(et>=V.length){if(t[et].type==="overrides")continue;u.splice(L,1);break}if(t[et].type!==V[et].baseType){u.splice(L,1);break}}}}if(u.length===1&&t&&t.length!==u[0].inputs.length){const h=t[t.length-1];(h==null||Array.isArray(h)||typeof h!="object")&&u.splice(0,1)}if(u.length===0)return null;if(u.length>1&&s){const h=u.map(p=>JSON.stringify(p.format())).join(", ");(0,b.MR)(!1,`ambiguous function description (i.e. matches ${h})`,"key",a)}return u[0]}const i=y(this,dt).get(E.hc.from(a).format());return i||null},"getFunction_fn"),it=r(function(a,t,s){if((0,B.Lo)(a)){const u=a.toLowerCase();for(const h of y(this,U).values())if(u===h.topicHash)return h;return null}if(a.indexOf("(")===-1){const u=[];for(const[h,p]of y(this,U))h.split("(")[0]===a&&u.push(p);if(t){for(let h=u.length-1;h>=0;h--)u[h].inputs.length<t.length&&u.splice(h,1);for(let h=u.length-1;h>=0;h--){const p=u[h].inputs;for(let I=0;I<t.length;I++)if(x.V.isTyped(t[I])&&t[I].type!==p[I].baseType){u.splice(h,1);break}}}if(u.length===0)return null;if(u.length>1&&s){const h=u.map(p=>JSON.stringify(p.format())).join(", ");(0,b.MR)(!1,`ambiguous event description (i.e. matches ${h})`,"key",a)}return u[0]}const i=y(this,U).get(E.Zp.from(a).format());return i||null},"getEvent_fn");let Lt=ee;var $t=O(92820),Ut=O(42814),vt=O(72595),St=Object.defineProperty,Rt=r(a=>{throw TypeError(a)},"wrappers_typeError"),ht=r((a,t,s)=>t in a?St(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,"wrappers_defNormalProp"),At=r((a,t,s)=>ht(a,typeof t!="symbol"?t+"":t,s),"wrappers_publicField"),ne=r((a,t,s)=>t.has(a)||Rt("Cannot "+s),"wrappers_accessCheck"),Xt=r((a,t,s)=>(ne(a,t,"read from private field"),s?s.call(a):t.get(a)),"wrappers_privateGet"),_t=r((a,t,s)=>t.has(a)?Rt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,s),"wrappers_privateAdd"),Vt=r((a,t,s,i)=>(ne(a,t,"write to private field"),i?i.call(a,s):t.set(a,s),s),"wrappers_privateSet"),mt,xt;const de=class de extends Ut.tG{constructor(t,s,i){super(t,t.provider),At(this,"interface"),At(this,"fragment"),At(this,"args");const u=s.decodeEventLog(i,t.data,t.topics);(0,W.n)(this,{args:u,fragment:i,interface:s})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}};r(de,"EventLog");let C=de;
1const ye=class ye extends Ut.tG{constructor(t,s){super(t,t.provider),At(this,"error"),(0,W.n)(this,{error:s})}};r(ye,"UndecodedEventLog");let g=ye;const ge=class ge extends Ut.z5{constructor(t,s,i){super(i,s),_t(this,mt),Vt(this,mt,t)}get logs(){return super.logs.map(t=>{const s=t.topics.length?Xt(this,mt).getEvent(t.topics[0]):null;if(s)try{return new C(t,Xt(this,mt),s)}catch(i){return new g(t,i)}return t})}};r(ge,"ContractTransactionReceipt");let A=ge;mt=new WeakMap;const me=class me extends Ut.uI{constructor(t,s,i){super(i,s),_t(this,xt),Vt(this,xt,t)}async wait(t,s){const i=await super.wait(t,s);return i==null?null:new A(Xt(this,xt),this.provider,i)}};r(me,"ContractTransactionResponse");let P=me;xt=new WeakMap;const we=class we extends vt.z{constructor(t,s,i,u){super(t,s,i),At(this,"log"),(0,W.n)(this,{log:u})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}};r(we,"ContractUnknownEventPayload");let Z=we;const ve=class ve extends Z{constructor(t,s,i,u,h){super(t,s,i,new C(h,t.interface,u));const p=t.interface.decodeEventLog(u,this.log.data,this.log.topics);(0,W.n)(this,{args:p,fragment:u})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}};r(ve,"ContractEventPayload");let wt=ve;var pt=Object.defineProperty,Bt=r(a=>{throw TypeError(a)},"contract_typeError"),Pt=r((a,t,s)=>t in a?pt(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,"contract_defNormalProp"),ut=r((a,t,s)=>Pt(a,typeof t!="symbol"?t+"":t,s),"contract_publicField"),Dt=r((a,t,s)=>t.has(a)||Bt("Cannot "+s),"contract_accessCheck"),qt=r((a,t,s)=>(Dt(a,t,"read from private field"),s?s.call(a):t.get(a)),"contract_privateGet"),Gt=r((a,t,s)=>t.has(a)?Bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,s),"contract_privateAdd"),Mt=r((a,t,s,i)=>(Dt(a,t,"write to private field"),i?i.call(a,s):t.set(a,s),s),"contract_privateSet"),Ft,zt;const Qt=BigInt(0);function Jt(a){return a&&typeof a.call=="function"}r(Jt,"canCall");function Zt(a){return a&&typeof a.estimateGas=="function"}r(Zt,"canEstimate");function It(a){return a&&typeof a.resolveName=="function"}r(It,"canResolve");function S(a){return a&&typeof a.sendTransaction=="function"}r(S,"canSend");function o(a){if(a!=null){if(It(a))return a;if(a.provider)return a.provider}}r(o,"getResolver");const Ee=class Ee{constructor(t,s,i){if(Gt(this,Ft),ut(this,"fragment"),(0,W.n)(this,{fragment:s}),s.inputs.length<i.length)throw new Error("too many arguments");const u=_(t.runner,"resolveName"),h=It(u)?u:null;Mt(this,Ft,async function(){const p=await Promise.all(s.inputs.map((I,L)=>i[L]==null?null:I.walkAsync(i[L],(et,q)=>et==="address"?Array.isArray(q)?Promise.all(q.map(nt=>(0,$t.tG)(nt,h))):(0,$t.tG)(q,h):q)));return t.interface.encodeFilterTopics(s,p)}())}getTopicFilter(){return qt(this,Ft)}};r(Ee,"PreparedTopicFilter");let l=Ee;Ft=new WeakMap;function _(a,t){return a==null?null:typeof a[t]=="function"?a:a.provider&&typeof a.provider[t]=="function"?a.provider:null}r(_,"getRunner");function D(a){return a==null?null:a.provider||null}r(D,"getProvider");async function G(a,t){const s=x.V.dereference(a,"overrides");(0,b.MR)(typeof s=="object","invalid overrides parameter","overrides",a);const i=(0,Ut.VS)(s);return(0,b.MR)(i.to==null||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,b.MR)(i.data==null||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}r(G,"copyOverrides");async function ct(a,t,s){const i=_(a,"resolveName"),u=It(i)?i:null;return await Promise.all(t.map((h,p)=>h.walkAsync(s[p],(I,L)=>(L=x.V.dereference(L,I),I==="address"?(0,$t.tG)(L,u):L))))}r(ct,"resolveArgs");function Nt(a){const t=r(async function(p){const I=await G(p,["data"]);I.to=await a.getAddress(),I.from&&(I.from=await(0,$t.tG)(I.from,o(a.runner)));const L=a.interface,V=(0,rt.Ab)(I.value||Qt,"overrides.value")===Qt,et=(I.data||"0x")==="0x";L.fallback&&!L.fallback.payable&&L.receive&&!et&&!V&&(0,b.MR)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",p),(0,b.MR)(L.fallback||et,"cannot send data to receive-only contract","overrides.data",I.data);const q=L.receive||L.fallback&&L.fallback.payable;return(0,b.MR)(q||V,"cannot send value to non-payable fallback","overrides.value",I.value),(0,b.MR)(L.fallback||et,"cannot send data to receive-only contract","overrides.data",I.data),I},"populateTransaction"),s=r(async function(p){const I=_(a.runner,"call");(0,b.vA)(Jt(I),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const L=await t(p);try{return await I.call(L)}catch(V){throw(0,b.E)(V)&&V.data?a.interface.makeError(V.data,L):V}},"staticCall"),i=r(async function(p){const I=a.runner;(0,b.vA)(S(I),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const L=await I.sendTransaction(await t(p)),V=D(a.runner);return new P(a.interface,V,L)},"send"),u=r(async function(p){const I=_(a.runner,"estimateGas");return(0,b.vA)(Zt(I),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await I.estimateGas(await t(p))},"estimateGas"),h=r(async p=>await i(p),"method");return(0,W.n)(h,{_contract:a,estimateGas:u,populateTransaction:t,send:i,staticCall:s}),h}r(Nt,"buildWrappedFallback");function bt(a,t){const s=r(function(...V){const et=a.interface.getFunction(t,V);return(0,b.vA)(et,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:V}}),et},"getFragment"),i=r(async function(...V){const et=s(...V);let q={};if(et.inputs.length+1===V.length&&(q=await G(V.pop()),q.from&&(q.from=await(0,$t.tG)(q.from,o(a.runner)))),et.input
1s.length!==V.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const nt=await ct(a.runner,et.inputs,V);return Object.assign({},q,await(0,W.k)({to:a.getAddress(),data:a.interface.encodeFunctionData(et,nt)}))},"populateTransaction"),u=r(async function(...V){const et=await I(...V);return et.length===1?et[0]:et},"staticCall"),h=r(async function(...V){const et=a.runner;(0,b.vA)(S(et),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const q=await et.sendTransaction(await i(...V)),nt=D(a.runner);return new P(a.interface,nt,q)},"send"),p=r(async function(...V){const et=_(a.runner,"estimateGas");return(0,b.vA)(Zt(et),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await et.estimateGas(await i(...V))},"estimateGas"),I=r(async function(...V){const et=_(a.runner,"call");(0,b.vA)(Jt(et),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const q=await i(...V);let nt="0x";try{nt=await et.call(q)}catch(Wt){throw(0,b.E)(Wt)&&Wt.data?a.interface.makeError(Wt.data,q):Wt}const lt=s(...V);return a.interface.decodeFunctionResult(lt,nt)},"staticCallResult"),L=r(async(...V)=>s(...V).constant?await u(...V):await h(...V),"method");return(0,W.n)(L,{name:a.interface.getFunctionName(t),_contract:a,_key:t,getFragment:s,estimateGas:p,populateTransaction:i,send:h,staticCall:u,staticCallResult:I}),Object.defineProperty(L,"fragment",{configurable:!1,enumerable:!0,get:r(()=>{const V=a.interface.getFunction(t);return(0,b.vA)(V,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),V},"get")}),L}r(bt,"buildWrappedMethod");function Et(a,t){const s=r(function(...u){const h=a.interface.getEvent(t,u);return(0,b.vA)(h,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:u}}),h},"getFragment"),i=r(function(...u){return new l(a,s(...u),u)},"method");return(0,W.n)(i,{name:a.interface.getEventName(t),_contract:a,_key:t,getFragment:s}),Object.defineProperty(i,"fragment",{configurable:!1,enumerable:!0,get:r(()=>{const u=a.interface.getEvent(t);return(0,b.vA)(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),u},"get")}),i}r(Et,"buildWrappedEvent");const yt=Symbol.for("_ethersInternal_contract"),Ht=new WeakMap;function re(a,t){Ht.set(a[yt],t)}r(re,"setInternal");function v(a){return Ht.get(a[yt])}r(v,"getInternal");function e(a){return a&&typeof a=="object"&&"getTopicFilter"in a&&typeof a.getTopicFilter=="function"&&a.fragment}r(e,"isDeferred");async function c(a,t){let s,i=null;if(Array.isArray(t)){const h=r(function(p){if((0,B.Lo)(p,32))return p;const I=a.interface.getEvent(p);return(0,b.MR)(I,"unknown fragment","name",p),I.topicHash},"topicHashify");s=t.map(p=>p==null?null:Array.isArray(p)?p.map(h):h(p))}else t==="*"?s=[null]:typeof t=="string"?(0,B.Lo)(t,32)?s=[t]:(i=a.interface.getEvent(t),(0,b.MR)(i,"unknown fragment","event",t),s=[i.topicHash]):e(t)?s=await t.getTopicFilter():"fragment"in t?(i=t.fragment,s=[i.topicHash]):(0,b.MR)(!1,"unknown event name","event",t);s=s.map(h=>{if(h==null)return null;if(Array.isArray(h)){const p=Array.from(new Set(h.map(I=>I.toLowerCase())).values());return p.length===1?p[0]:(p.sort(),p)}return h.toLowerCase()});const u=s.map(h=>h==null?"null":Array.isArray(h)?h.join("|"):h).join("&");return{fragment:i,tag:u,topics:s}}r(c,"getSubInfo");async function d(a,t){const{subs:s}=v(a);return s.get((await c(a,t)).tag)||null}r(d,"hasSub");async function z(a,t,s){const i=D(a.runner);(0,b.vA)(i,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:u,tag:h,topics:p}=await c(a,s),{addr:I,subs:L}=v(a);let V=L.get(h);if(!V){const q={address:I||a,topics:p},nt=r(te=>{let fe=u;if(fe==null)try{fe=a.interface.getEvent(te.topics[0])}catch{}if(fe){const he=fe,Pe=u?a.interface.decodeEventLog(u,te.data,te.topics):[];Y(a,s,Pe,be=>new wt(a,be,s,he,te))}else Y(a,s,[],he=>new Z(a,he,s,te))},"listener");let lt=[];V={tag:h,listeners:[],start:r(()=>{lt.length||lt.push(i.on(q,nt))},"start"),stop:r(async()=>
1{if(lt.length==0)return;let te=lt;lt=[],await Promise.all(te),i.off(q,nt)},"stop")},L.set(h,V)}return V}r(z,"getSub");let K=Promise.resolve();async function tt(a,t,s,i){await K;const u=await d(a,t);if(!u)return!1;const h=u.listeners.length;return u.listeners=u.listeners.filter(({listener:p,once:I})=>{const L=Array.from(s);i&&L.push(i(I?null:p));try{p.call(a,...L)}catch{}return!I}),u.listeners.length===0&&(u.stop(),v(a).subs.delete(u.tag)),h>0}r(tt,"_emit");async function Y(a,t,s,i){try{await K}catch{}const u=tt(a,t,s,i);return K=u,await u}r(Y,"emit");const j=["then"];zt=yt;let Yt=(ie=class{constructor(t,s,i,u){ut(this,"target"),ut(this,"interface"),ut(this,"runner"),ut(this,"filters"),ut(this,zt),ut(this,"fallback"),(0,b.MR)(typeof t=="string"||(0,$t.$C)(t),"invalid value for Contract target","target",t),i==null&&(i=null);const h=Lt.from(s);(0,W.n)(this,{target:t,runner:i,interface:h}),Object.defineProperty(this,yt,{value:{}});let p,I=null,L=null;if(u){const q=D(i);L=new P(this.interface,q,u)}let V=new Map;if(typeof t=="string")if((0,B.Lo)(t))I=t,p=Promise.resolve(t);else{const q=_(i,"resolveName");if(!It(q))throw(0,b.xz)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});p=q.resolveName(t).then(nt=>{if(nt==null)throw(0,b.xz)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return v(this).addr=nt,nt})}else p=t.getAddress().then(q=>{if(q==null)throw new Error("TODO");return v(this).addr=q,q});re(this,{addrPromise:p,addr:I,deployTx:L,subs:V});const et=new Proxy({},{get:r((q,nt,lt)=>{if(typeof nt=="symbol"||j.indexOf(nt)>=0)return Reflect.get(q,nt,lt);try{return this.getEvent(nt)}catch(Wt){if(!(0,b.bJ)(Wt,"INVALID_ARGUMENT")||Wt.argument!=="key")throw Wt}},"get"),has:r((q,nt)=>j.indexOf(nt)>=0?Reflect.has(q,nt):Reflect.has(q,nt)||this.interface.hasEvent(String(nt)),"has")});return(0,W.n)(this,{filters:et}),(0,W.n)(this,{fallback:h.receive||h.fallback?Nt(this):null}),new Proxy(this,{get:r((q,nt,lt)=>{if(typeof nt=="symbol"||nt in q||j.indexOf(nt)>=0)return Reflect.get(q,nt,lt);try{return q.getFunction(nt)}catch(Wt){if(!(0,b.bJ)(Wt,"INVALID_ARGUMENT")||Wt.argument!=="key")throw Wt}},"get"),has:r((q,nt)=>typeof nt=="symbol"||nt in q||j.indexOf(nt)>=0?Reflect.has(q,nt):q.interface.hasFunction(nt),"has")})}connect(t){return new ie(this.target,this.interface,t)}attach(t){return new ie(t,this.interface,this.runner)}async getAddress(){return await v(this).addrPromise}async getDeployedCode(){const t=D(this.runner);(0,b.vA)(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const s=await t.getCode(await this.getAddress());return s==="0x"?null:s}async waitForDeployment(){const t=this.deploymentTransaction();if(t)return await t.wait(),this;if(await this.getDeployedCode()!=null)return this;const i=D(this.runner);return(0,b.vA)(i!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((u,h)=>{const p=r(async()=>{try{if(await this.getDeployedCode()!=null)return u(this);i.once("block",p)}catch(I){h(I)}},"checkCode");p()})}deploymentTransaction(){return v(this).deployTx}getFunction(t){return typeof t!="string"&&(t=t.format()),bt(this,t)}getEvent(t){return typeof t!="string"&&(t=t.format()),Et(this,t)}async queryTransaction(t){throw new Error("@TODO")}async queryFilter(t,s,i){s==null&&(s=0),i==null&&(i="latest");const{addr:u,addrPromise:h}=v(this),p=u||await h,{fragment:I,topics:L}=await c(this,t),V={address:p,topics:L,fromBlock:s,toBlock:i},et=D(this.runner);return(0,b.vA)(et,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await et.getLogs(V)).map(q=>{let nt=I;if(nt==null)try{nt=this.interface.getEvent(q.topics[0])}catch{}if(nt)try{return new C(q,this.interface,nt)}catch(lt){return new g(q,lt)}return new Ut.tG(q,et)})}async on(t,s){const i=await z(this,"on",t);return i.listeners.push({listener:s,once:!1}),i.start(),this}async once(t,s){const i=await z(this,"once",t);return i.listeners.push({listener:s,once:!0}),i.start(),this}async emit(t,...s){return await Y(this,t,s,null)}async listenerCount(t){if(t){const u=await d(this,t);return u?u.listeners.length:0}const{subs:s}=v(this);let i=0;for(const{listeners:u}of s.values())i+=u.length;return i}async listeners(t){if(t){const u=await d(this,t);return u?u.listeners.map(({listener:h})=>h):[]}const{subs:s}=v(this);let i=[];for(const{listeners:u}of s.values())i=i.concat(u.map(({listener:h})=>h));return i}async off(t,s){const i=await d(this,t);if(!i)return this;if(s){const u=i.listeners.map(({listener:h})=>h).indexOf(s);u>=0&&i.listeners.splice(u,1)}return(s==null||i.listeners.length===0)&&(i.stop(),v(this).subs.delete(i.tag)),this}async removeAllListeners(t){if(t){const s=await d(this,t);if(!s)return this;s.stop(),v(this).subs.delete(s.tag)}else{const{subs:s}=v(this);for(const{tag:i,stop:u}of s.values())u(),s.delete(i)}return this}async addListener(t,s){return await this.on(t,s)}async removeListener(t,s){return await this.off(t,s)}static buildClass(t){const i=class i extends ie{constructor(h,p=null){super(h,t,p)}};r(i,"CustomContract");let s=i;return s}static from(t,s,i){return i==null&&(i=null),new this(t,s,i)}},r(ie,"_BaseContract"),ie);function ae(){return Yt}r(ae,"_ContractBase");const _e=class _e extends ae(){};r(_e,"Contract");let ce=_e},20230(Kt,gt,O){O.d(gt,{S:r(()=>B,"S")});var x=O(49240),R=O(99030);let X=!1;const W=r(function(rt){return(0,x.lY)(rt)},"_keccak256");let b=W;function B(rt){const N=(0,R.q5)(rt,"data");return(0,R.c$)(b(N))}r(B,"keccak256"),B._=W,B.lock=function(){X=!0},B.register=function(rt){if(X)throw new TypeError("keccak256 is locked");b=rt},Object.freeze(B)},55288(Kt,gt,O){O.d(gt,{s:r(()=>ft,"s")});var x=O(87600),R=O(42117),X=O(31729),W,b,B,rt,N,at;
1function E(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof O.g<"u")return O.g;throw new Error("unable to locate global object")}r(E,"getGlobal");const J=E(),H=J.crypto||J.msCrypto;function m(it){switch(it){case"sha256":return x.sc.create();case"sha512":return R.Zf.create()}(0,X.MR)(!1,"invalid hashing algorithm name","algorithm",it)}r(m,"createHash");function f(it,Q){const ot={sha256:B,sha512:rt}[it];return N(ot!=null,"invalid hmac algorithm","algorithm",it),W.create(ot,Q)}r(f,"createHmac");function w(it,Q,ot,T,F){const Ot={sha256:B,sha512:rt}[F];return N(Ot!=null,"invalid pbkdf2 algorithm","algorithm",F),b(Ot,it,Q,{c:ot,dkLen:T})}r(w,"pbkdf2Sync");function y(it){at(H!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),N(Number.isInteger(it)&&it>0&&it<=1024,"invalid length","length",it);const Q=new Uint8Array(it);return H.getRandomValues(Q),Q}r(y,"randomBytes");var k=O(99030);const $=r(function(it){return m("sha256").update(it).digest()},"_sha256"),M=r(function(it){return m("sha512").update(it).digest()},"_sha512");let n=$,U=M,dt=!1,st=!1;function ft(it){const Q=(0,k.q5)(it,"data");return(0,k.c$)(n(Q))}r(ft,"sha2_sha256"),ft._=$,ft.lock=function(){dt=!0},ft.register=function(it){if(dt)throw new Error("sha256 is locked");n=it},Object.freeze(ft);function kt(it){const Q=(0,k.q5)(it,"data");return(0,k.c$)(U(Q))}r(kt,"sha2_sha512"),kt._=M,kt.lock=function(){st=!0},kt.register=function(it){if(st)throw new Error("sha512 is locked");U=it},Object.freeze(ft)},8264(Kt,gt,O){var Q;O.d(gt,{t:r(()=>it,"t")});const x="0x0000000000000000000000000000000000000000000000000000000000000000";var R=O(99030),X=O(62643),W=O(31729),b=r(ot=>{throw TypeError(ot)},"__typeError"),B=r((ot,T,F)=>T.has(ot)||b("Cannot "+F),"__accessCheck"),rt=r((ot,T,F)=>(B(ot,T,"read from private field"),F?F.call(ot):T.get(ot)),"__privateGet"),N=r((ot,T,F)=>T.has(ot)?b("Cannot add the same private member more than once"):T instanceof WeakSet?T.add(ot):T.set(ot,F),"__privateAdd"),at=r((ot,T,F,Ot)=>(B(ot,T,"write to private field"),Ot?Ot.call(ot,F):T.set(ot,F),F),"__privateSet"),E,J,H,m;const f=BigInt(0),w=BigInt(1),y=BigInt(2),k=BigInt(27),$=BigInt(28),M=BigInt(35),n=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),U=n/y,dt=Symbol.for("nodejs.util.inspect.custom"),st={};function ft(ot){return(0,R.nx)((0,X.c4)(ot),32)}r(ft,"toUint256");const kt=(Q=class{constructor(T,F,Ot,Ct){N(this,E),N(this,J),N(this,H),N(this,m),(0,W.gk)(T,st,"Signature"),at(this,E,F),at(this,J,Ot),at(this,H,Ct),at(this,m,null)}get r(){return rt(this,E)}
1set r(T){(0,W.MR)((0,R.pO)(T)===32,"invalid r","value",T),at(this,E,(0,R.c$)(T))}get s(){return(0,W.MR)(parseInt(rt(this,J).substring(0,3))<8,"non-canonical s; use ._s","s",rt(this,J)),rt(this,J)}set s(T){(0,W.MR)((0,R.pO)(T)===32,"invalid s","value",T),at(this,J,(0,R.c$)(T))}get _s(){return rt(this,J)}isValid(){return BigInt(rt(this,J))<=U}get v(){return rt(this,H)}set v(T){const F=(0,X.WZ)(T,"value");(0,W.MR)(F===27||F===28,"invalid v","v",T),at(this,H,F)}get networkV(){return rt(this,m)}get legacyChainId(){const T=this.networkV;return T==null?null:Q.getChainId(T)}get yParity(){return this.v===27?0:1}get yParityAndS(){const T=(0,R.q5)(this.s);return this.yParity&&(T[0]|=128),(0,R.c$)(T)}get compactSerialized(){return(0,R.xW)([this.r,this.yParityAndS])}get serialized(){return(0,R.xW)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}getCanonical(){if(this.isValid())return this;const T=n-BigInt(this._s),F=55-this.v,Ot=new Q(st,this.r,ft(T),F);return this.networkV&&at(Ot,m,this.networkV),Ot}clone(){const T=new Q(st,this.r,this._s,this.v);return this.networkV&&at(T,m,this.networkV),T}toJSON(){const T=this.networkV;return{_type:"signature",networkV:T!=null?T.toString():null,r:this.r,s:this._s,v:this.v}}[dt](){return this.toString()}toString(){return this.isValid()?`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v} }`:`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v}, valid: false }`}static getChainId(T){const F=(0,X.Ab)(T,"v");return F==k||F==$?f:((0,W.MR)(F>=M,"invalid EIP-155 v","v",T),(F-M)/y)}static getChainIdV(T,F){return(0,X.Ab)(T)*y+BigInt(35+F-27)}static getNormalizedV(T){const F=(0,X.Ab)(T);return F===f||F===k?27:F===w||F===$?28:((0,W.MR)(F>=M,"invalid v","v",T),F&w?27:28)}static from(T){function F(vt,St){(0,W.MR)(vt,St,"signature",T)}if(r(F,"assertError"),T==null)return new Q(st,x,x,27);if(typeof T=="string"){const vt=(0,R.q5)(T,"signature");if(vt.length===64){const St=(0,R.c$)(vt.slice(0,32)),Rt=vt.slice(32,64),ht=Rt[0]&128?28:27;return Rt[0]&=127,new Q(st,St,(0,R.c$)(Rt),ht)}if(vt.length===65){const St=(0,R.c$)(vt.slice(0,32)),Rt=(0,R.c$)(vt.slice(32,64)),ht=Q.getNormalizedV(vt[64]);return new Q(st,St,Rt,ht)}F(!1,"invalid raw signature length")}if(T instanceof Q)return T.clone();const Ot=T.r;F(Ot!=null,"missing r");const Ct=ft(Ot),ee=function(vt,St){if(vt!=null)return ft(vt);if(St!=null){F((0,R.Lo)(St,32),"invalid yParityAndS");const Rt=(0,R.q5)(St);return Rt[0]&=127,(0,R.c$)(Rt)}F(!1,"missing s")}(T.s,T.yParityAndS),{networkV:Lt,v:$t}=function(vt,St,Rt){if(vt!=null){const ht=(0,X.Ab)(vt);return{networkV:ht>=M?ht:void 0,v:Q.getNormalizedV(ht)}}if(St!=null)return F((0,R.Lo)(St,32),"invalid yParityAndS"),{v:(0,R.q5)(St)[0]&128?28:27};if(Rt!=null){switch((0,X.WZ)(Rt,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}F(!1,"invalid yParity")}F(!1,"missing v")}(T.v,T.yParityAndS,T.yParity),Ut=new Q(st,Ct,ee,$t);return Lt&&at(Ut,m,Lt),F(T.yParity==null||(0,X.WZ)(T.yParity,"sig.yParity")===Ut.yParity,"yParity mismatch"),F(T.yParityAndS==null||T.yParityAndS===Ut.yParityAndS,"yParityAndS mismatch"),Ut}},r(Q,"_Signature"),Q);E=new WeakMap,J=new WeakMap,H=new WeakMap,m=new WeakMap;let it=kt},86323(Kt,gt,O){var f;O.d(gt,{h:r(()=>m,"h")});var x=O(15393),R=O(99030),X=O(31729),W=O(62643),b=O(8264),B=r(w=>{throw TypeError(w)},"__typeError"),rt=r((w,y,k)=>y.has(w)||B("Cannot "+k),"__accessCheck"),N=r((w,y,k)=>(rt(w,y,"read from private field"),k?k.call(w):y.get(w)),"__privateGet"),at=r((w,y,k)=>y.has(w)?B("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(w):y.set(w,k),"__privateAdd"),E=r((w,y,k,$)=>(rt(w,y,"write to private field"),$?$.call(w,k):y.set(w,k),k),"__privateSet"),J;const H=(f=class{constructor(y){at(this,J),(0,X.MR)((0,R.pO)(y)===32,"invali
1d private key","privateKey","[REDACTED]"),E(this,J,(0,R.c$)(y))}get privateKey(){return N(this,J)}get publicKey(){return f.computePublicKey(N(this,J))}get compressedPublicKey(){return f.computePublicKey(N(this,J),!0)}sign(y){(0,X.MR)((0,R.pO)(y)===32,"invalid digest length","digest",y);const k=x.secp256k1.sign((0,R.Lm)(y),(0,R.Lm)(N(this,J)),{lowS:!0});return b.t.from({r:(0,W.up)(k.r,32),s:(0,W.up)(k.s,32),v:k.recovery?28:27})}computeSharedSecret(y){const k=f.computePublicKey(y);return(0,R.c$)(x.secp256k1.getSharedSecret((0,R.Lm)(N(this,J)),(0,R.q5)(k),!1))}static computePublicKey(y,k){let $=(0,R.q5)(y,"key");if($.length===32){const n=x.secp256k1.getPublicKey($,!!k);return(0,R.c$)(n)}if($.length===64){const n=new Uint8Array(65);n[0]=4,n.set($,1),$=n}const M=x.secp256k1.ProjectivePoint.fromHex($);return(0,R.c$)(M.toRawBytes(k))}static recoverPublicKey(y,k){(0,X.MR)((0,R.pO)(y)===32,"invalid digest length","digest",y);const $=b.t.from(k);let M=x.secp256k1.Signature.fromCompact((0,R.Lm)((0,R.xW)([$.r,$.s])));M=M.addRecoveryBit($.yParity);const n=M.recoverPublicKey((0,R.Lm)(y));return(0,X.MR)(n!=null,"invalid signature for digest","signature",k),"0x"+n.toHex(!1)}static addPoints(y,k,$){const M=x.secp256k1.ProjectivePoint.fromHex(f.computePublicKey(y).substring(2)),n=x.secp256k1.ProjectivePoint.fromHex(f.computePublicKey(k).substring(2));return"0x"+M.add(n).toHex(!!$)}},r(f,"_SigningKey"),f);J=new WeakMap;let m=H}}]);})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.