shogun-core 1.2.2 → 1.2.4
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/browser/shogun-core.js +1 -1
- package/dist/browser/shogun-core.js.LICENSE.txt +9 -0
- package/dist/browser/shogun-core.light.js +1 -1
- package/dist/browser/shogun-core.vendors.light.js +1 -1
- package/dist/browser.js +3 -3
- package/dist/core.js +10 -5
- package/dist/gundb/gun.js +1 -0
- package/dist/types/core.d.ts +1 -0
- package/dist/types/gundb/gun.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see shogun-core.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ShogunCore=t():e.ShogunCore=t()}(this,(function(){return function(){var e={22:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexedAccountPath=t.getAccountPath=t.HDNodeVoidWallet=t.HDNodeWallet=t.defaultPath=void 0;const n=r(2291),i=r(3996),o=r(7778),s=r(5347),a=r(9943),c=r(8394),u=r(5312),l=r(1650);t.defaultPath="m/44'/60'/0'/0/0";const f=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),d=2147483648,h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function p(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function g(e){const t=(0,s.getBytes)(e),r=(0,s.dataSlice)((0,n.sha256)((0,n.sha256)(t)),0,4),i=(0,s.concat)([t,r]);return(0,s.encodeBase58)(i)}const y={};function b(e,t,r,i){const o=new Uint8Array(37);e&d?((0,s.assert)(null!=i,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),o.set((0,s.getBytes)(i),1)):o.set((0,s.getBytes)(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const a=(0,s.getBytes)((0,n.computeHmac)("sha512",t,o));return{IL:a.slice(0,32),IR:a.slice(32)}}function m(e,t){const r=t.split("/");(0,s.assertArgument)(r.length>0,"invalid path","path",t),"m"===r[0]&&((0,s.assertArgument)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e<r.length;e++){const t=r[e];if(t.match(/^[0-9]+'$/)){const r=parseInt(t.substring(0,t.length-1));(0,s.assertArgument)(r<d,"invalid path index",`path[${e}]`,t),n=n.deriveChild(d+r)}else if(t.match(/^[0-9]+$/)){const r=parseInt(t);(0,s.assertArgument)(r<d,"invalid path index",`path[${e}]`,t),n=n.deriveChild(r)}else(0,s.assertArgument)(!1,"invalid path component",`path[${e}]`,t)}return n}class v extends c.BaseWallet{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,r,i,o,a,c,u,l){super(t,l),(0,s.assertPrivate)(e,y,"HDNodeWallet"),(0,s.defineProperties)(this,{publicKey:t.compressedPublicKey});const f=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(this.publicKey)),0,4);(0,s.defineProperties)(this,{parentFingerprint:r,fingerprint:f,chainCode:i,path:o,index:a,depth:c}),(0,s.defineProperties)(this,{mnemonic:u})}connect(e){return new v(y,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e)}#e(){const e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&"en"===t.wordlist.locale&&""===t.password&&(e.mnemonic={path:this.path,locale:"en",entropy:t.entropy}),e}async encrypt(e,t){return await(0,l.encryptKeystoreJson)(this.#e(),e,{progressCallback:t})}encryptSync(e){return(0,l.encryptKeystoreJsonSync)(this.#e(),e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),g((0,s.concat)(["0x0488ADE4",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,(0,s.concat)(["0x00",this.privateKey])]))}hasPath(){return null!=this.path}neuter(){return new w(y,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(e){const t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&d&&(r+="'"));const{IR:i,IL:o}=b(t,this.chainCode,this.publicKey,this.privateKey),a=new n.SigningKey((0,s.toBeHex)(((0,s.toBigInt)(o)+BigInt(this.privateKey))%h,32));return new v(y,a,this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return m(this,e)}static#t(e,t){(0,s.assertArgument)((0,s.isBytesLike)(e),"invalid seed","seed","[REDACTED]");const r=(0,s.getBytes)(e,"seed");(0,s.assertArgument)(r.length>=16&&r.length<=64,"invalid seed","seed","[REDACTED]");const i=(0,s.getBytes)((0,n.computeHmac)("sha512",f,r)),o=new n.SigningKey((0,s.hexlify)(i.slice(0,32)));return new v(y,o,"0x00000000",(0,s.hexlify)(i.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){const t=(0,s.toBeArray)((0,s.decodeBase58)(e));(0,s.assertArgument)(82===t.length||g(t.slice(0,78))===e,"invalid extended key","extendedKey","[ REDACTED ]");const r=t[4],i=(0,s.hexlify)(t.slice(5,9)),a=parseInt((0,s.hexlify)(t.slice(9,13)).substring(2),16),c=(0,s.hexlify)(t.slice(13,45)),u=t.slice(45,78);switch((0,s.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const e=(0,s.hexlify)(u);return new w(y,(0,o.computeAddress)(e),e,i,c,null,a,r,null)}case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new v(y,new n.SigningKey(u.slice(1)),i,c,null,a,r,null,null)}(0,s.assertArgument)(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(e,r,i){null==e&&(e=""),null==r&&(r=t.defaultPath),null==i&&(i=a.LangEn.wordlist());const o=u.Mnemonic.fromEntropy((0,n.randomBytes)(16),e,i);return v.#t(o.computeSeed(),o).derivePath(r)}static fromMnemonic(e,r){return r||(r=t.defaultPath),v.#t(e.computeSeed(),e).derivePath(r)}static fromPhrase(e,r,n,i){null==r&&(r=""),null==n&&(n=t.defaultPath),null==i&&(i=a.LangEn.wordlist());const o=u.Mnemonic.fromPhrase(e,r,i);return v.#t(o.computeSeed(),o).derivePath(n)}static fromSeed(e){return v.#t(e,null)}}t.HDNodeWallet=v;class w extends i.VoidSigner{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,i,o,a,c,u,l){super(t,l),(0,s.assertPrivate)(e,y,"HDNodeVoidWallet"),(0,s.defineProperties)(this,{publicKey:r});const f=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(r)),0,4);(0,s.defineProperties)(this,{publicKey:r,fingerprint:f,parentFingerprint:i,chainCode:o,path:a,index:c,depth:u})}connect(e){return new w(y,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),g((0,s.concat)(["0x0488B21E",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&d&&(r+="'"));const{IR:i,IL:a}=b(t,this.chainCode,this.publicKey,null),c=n.SigningKey.addPoints(a,this.publicKey,!0),u=(0,o.computeAddress)(c);return new w(y,u,c,this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.provider)}derivePath(e){return m(this,e)}}t.HDNodeVoidWallet=w,t.getAccountPath=function(e){const t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<d,"invalid account index","index",t),`m/44'/60'/${t}'/0/0`},t.getIndexedAccountPath=function(e){const t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<d,"invalid account index","index",t),`m/44'/60'/0'/0/${t}`}},37:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(6808),i=r(2326),o=r(9879),s=r(5212),a=r(7214),c=r(4830),u=r(6404),l=r(8619);t.windowTime=function(e){for(var t,r,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var h=null!==(t=u.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,g=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),c.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,h,(function(){return u(a)}),e)}};null!==p&&p>=0?l.executeSchedule(r,h,f,p,!0):s=!0,f();var d=function(e){return i.slice().forEach(e)},y=function(e){d((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){d((function(t){t.window.next(e),g<=++t.seen&&u(t)}))}),(function(){return y((function(e){return e.complete()}))}),(function(e){return y((function(t){return t.error(e)}))}))),function(){i=null}}))}},74:function(e,t){"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.AuthEvent=t.AuthState=t.CorePlugins=t.PluginCategory=void 0,function(e){e.Authentication="authentication",e.Wallet="wallet",e.Privacy="privacy",e.Identity="identity",e.Utility="utility"}(r||(t.PluginCategory=r={})),function(e){e.WebAuthn="webauthn",e.Web3="web3",e.Nostr="nostr"}(n||(t.CorePlugins=n={})),function(e){e.UNAUTHENTICATED="unauthenticated",e.AUTHENTICATING="authenticating",e.AUTHENTICATED="authenticated",e.AUTHENTICATION_FAILED="authentication_failed",e.WALLET_INITIALIZING="wallet_initializing",e.WALLET_READY="wallet_ready",e.ERROR="error"}(i||(t.AuthState=i={})),function(e){e.LOGIN_START="login_start",e.LOGIN_SUCCESS="login_success",e.LOGIN_FAILED="login_failed",e.LOGOUT="logout",e.WALLET_INIT_START="wallet_init_start",e.WALLET_INIT_SUCCESS="wallet_init_success",e.WALLET_INIT_FAILED="wallet_init_failed",e.ERROR="error"}(o||(t.AuthEvent=o={}))},96:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(2070),i=r(281);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},102:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;const n=r(915),i=r(2318),o=r(9175),[s,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends n.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:u,Fh:l,Fl:f,Gh:d,Gl:h,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,s,a,c,u,l,f,d,h,p,g]}set(e,t,r,n,i,o,s,a,c,u,l,f,d,h,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t),u[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],r=0|u[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),o=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),s=0|c[e-2],a=0|u[e-2],l=i.default.rotrSH(s,a,19)^i.default.rotrBH(s,a,61)^i.default.shrSH(s,a,6),f=i.default.rotrSL(s,a,19)^i.default.rotrBL(s,a,61)^i.default.shrSL(s,a,6),d=i.default.add4L(o,f,u[e-7],u[e-16]),h=i.default.add4H(d,n,l,c[e-7],c[e-16]);c[e]=0|h,u[e]=0|d}let{Ah:r,Al:n,Bh:o,Bl:l,Ch:f,Cl:d,Dh:h,Dl:p,Eh:g,El:y,Fh:b,Fl:m,Gh:v,Gl:w,Hh:A,Hl:E}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(g,y,14)^i.default.rotrSH(g,y,18)^i.default.rotrBH(g,y,41),P=i.default.rotrSL(g,y,14)^i.default.rotrSL(g,y,18)^i.default.rotrBL(g,y,41),O=g&b^~g&v,S=y&m^~y&w,_=i.default.add5L(E,P,S,a[e],u[e]),k=i.default.add5H(_,A,t,O,s[e],c[e]),T=0|_,x=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),R=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),I=r&o^r&f^o&f,C=n&l^n&d^l&d;A=0|v,E=0|w,v=0|b,w=0|m,b=0|g,m=0|y,({h:g,l:y}=i.default.add(0|h,0|p,0|k,0|T)),h=0|f,p=0|d,f=0|o,d=0|l,o=0|r,l=0|n;const N=i.default.add3L(T,R,C);r=i.default.add3H(N,k,x,I),n=0|N}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:l}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|l)),({h:f,l:d}=i.default.add(0|this.Ch,0|this.Cl,0|f,0|d)),({h:h,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|h,0|p)),({h:g,l:y}=i.default.add(0|this.Eh,0|this.El,0|g,0|y)),({h:b,l:m}=i.default.add(0|this.Fh,0|this.Fl,0|b,0|m)),({h:v,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:A,l:E}=i.default.add(0|this.Hh,0|this.Hl,0|A,0|E)),this.set(r,n,o,l,f,d,h,p,g,y,b,m,v,w,A,E)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=l;class f extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class d extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class h extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,o.wrapConstructor)((()=>new l)),t.sha512_224=(0,o.wrapConstructor)((()=>new f)),t.sha512_256=(0,o.wrapConstructor)((()=>new d)),t.sha384=(0,o.wrapConstructor)((()=>new h))},131:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5650),i=r(4530),o=r(4950),s=r(6805),a=r(7873),c=r(629),u=r(7552),l=r(4975),f=r(2187),d=r(8263),h=r(6297),p=r(5462),g=r(380);t.scheduled=function(e,t){if(null!=e){if(c.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(u.isPromise(e))return i.schedulePromise(e,t);if(d.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(p.isReadableStreamLike(e))return g.scheduleReadableStreamLike(e,t)}throw h.createInvalidObservableTypeError(e)}},142:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(2070),i=r(281);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},170:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrayFromIndexedObject=t.getIndexedObjectFromArray=t.qs=t.getSet=t.getUUID=t.getTargetPub=t.getPub=t.getId=void 0,t.app_scoped=function(e,t){return t.length>0?`${t}-${e}`:e},t.getId=e=>e?._?.["#"],t.getPub=e=>{const t=/~([^@][^\.]+\.[^\.]+)/.exec(e);return t?t[1]:null},t.getTargetPub=e=>{const t=/~[^@][^\.]+\.[^\.]+.*~([^@][^\.]+\.[^\.]+)$/.exec(e);return t?t[1]:null},t.getUUID=e=>e.opt()._.opt.uuid(),t.getSet=(e,t)=>{const r=e[t];return r?Object.keys(r).filter((e=>"_"!==e)).map((e=>r[e])).filter((e=>e&&"object"==typeof e&&e["#"])).map((t=>e[t["#"]])).filter(Boolean):[]},t.qs=(e,t="?")=>{const r=Object.fromEntries(Object.entries(e).filter((([e,t])=>t))),n=JSON.stringify(r);return n?`${t}${n}`:""},t.getIndexedObjectFromArray=e=>e.reduce(((e,t)=>({...e,[t.id]:t})),{}),t.getArrayFromIndexedObject=e=>Object.values(e)},189:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructFragment=t.FunctionFragment=t.FallbackFragment=t.ConstructorFragment=t.EventFragment=t.ErrorFragment=t.NamedFragment=t.Fragment=t.ParamType=void 0;const n=r(5347),i=r(1181);function o(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const s=o("external public payable override".split(" ")),a="constant external internal payable private public pure view override",c=o(a.split(" ")),u="constructor error event fallback function receive struct",l=o(u.split(" ")),f="calldata memory storage payable indexed",d=o(f.split(" ")),h=o([u,f,"tuple returns",a].join(" ").split(" ")),p={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},g=new RegExp("^(\\s*)"),y=new RegExp("^([0-9]+)"),b=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),m=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#r;#n;get offset(){return this.#r}get length(){return this.#n.length-this.#r}constructor(e){this.#r=0,this.#n=e.slice()}clone(){return new w(this.#n)}reset(){this.#r=0}#i(e=0,t=0){return new w(this.#n.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#i(this.#r+1,e.match+1);return this.#r=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#r<e.match-1;){const e=this.peek().linkNext;t.push(this.#i(this.#r+1,e)),this.#r=e}return this.#r=e.match+1,t}peek(){if(this.#r>=this.#n.length)throw new Error("out-of-bounds");return this.#n[this.#r]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#r++,e}toString(){const e=[];for(let t=this.#r;t<this.#n.length;t++){const r=this.#n[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}}function A(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):"$EOI";throw new Error(`invalid token ${r} at ${s}: ${t}`)};let i=[],o=[],s=0;for(;s<e.length;){let a=e.substring(s),c=a.match(g);c&&(s+=c[1].length,a=e.substring(s));const u={depth:i.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(u);let l=p[a[0]]||"";if(l){if(u.type=l,u.text=a[0],s++,"OPEN_PAREN"===l)i.push(t.length-1),o.push(t.length-1);else if("CLOSE_PAREN"==l)0===i.length&&r("no matching open bracket"),u.match=i.pop(),t[u.match].match=t.length-1,u.depth--,u.linkBack=o.pop(),t[u.linkBack].linkNext=t.length-1;else if("COMMA"===l)u.linkBack=o.pop(),t[u.linkBack].linkNext=t.length-1,o.push(t.length-1);else if("OPEN_BRACKET"===l)u.type="BRACKET";else if("CLOSE_BRACKET"===l){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=(0,n.getNumber)(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(c=a.match(b),c){if(u.text=c[1],s+=u.text.length,h.has(u.text)){u.type="KEYWORD";continue}if(u.text.match(v)){u.type="TYPE";continue}u.type="ID"}else{if(c=a.match(y),!c)throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`);u.text=c[1],u.type="NUMBER",s+=u.text.length}}return new w(t.map((e=>Object.freeze(e))))}function E(e,t){let r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function P(e,t){if(t.peekKeyword(l)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function O(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function S(e){let t=O(e,c);return E(t,o("constant payable nonpayable".split(" "))),E(t,o("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function _(e,t){return e.popParams().map((e=>D.from(e,t)))}function k(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,n.getBigInt)(e.pop().text);throw new Error("invalid gas")}return null}function T(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const x=new RegExp(/^(.*)\[([0-9]*)\]$/);function R(e){const t=e.match(v);if((0,n.assertArgument)(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const I={},C=Symbol.for("_ethers_internal"),N="_ParamTypeInternal",j="_ErrorInternal",B="_EventInternal",M="_ConstructorInternal",F="_FallbackInternal",L="_FunctionInternal",U="_StructInternal";class D{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,i,o,s,a,c){if((0,n.assertPrivate)(e,I,"ParamType"),Object.defineProperty(this,C,{value:N}),s&&(s=Object.freeze(s.slice())),"array"===i){if(null==a||null==c)throw new Error("")}else if(null!=a||null!=c)throw new Error("");if("tuple"===i){if(null==s)throw new Error("")}else if(null!=s)throw new Error("");(0,n.defineProperties)(this,{name:t,type:r,baseType:i,indexed:o,components:s,arrayLength:a,arrayChildren:c})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}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 r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#o(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,o=t.slice();return o.forEach(((t,n)=>{i.#o(e,t,r,(e=>{o[n]=e}))})),void n(o)}if(this.isTuple()){const i=this.components;let o;if(Array.isArray(t))o=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");o=i.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(o.length!==this.components.length)throw new Error("array is wrong length");return o.forEach(((t,n)=>{i[n].#o(e,t,r,(e=>{o[n]=e}))})),void n(o)}const i=r(this.type,t);i.then?e.push(async function(){n(await i)}()):n(i)}async walkAsync(e,t){const r=[],n=[e];return this.#o(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(D.isParamType(e))return e;if("string"==typeof e)try{return D.from(A(e),t)}catch(t){(0,n.assertArgument)(!1,"invalid param type","obj",e)}else if(e instanceof w){let r="",n="",i=null;O(e,o(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",i=e.popParams().map((e=>D.from(e))),r=`tuple(${i.map((e=>e.format())).join(",")})`):(r=R(e.popType("TYPE")),n=r);let s=null,a=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new D(I,"",r,n,null,i,a,s),a=t.value,r+=t.text,n="array",i=null}let c=null;if(O(e,d).has("indexed")){if(!t)throw new Error("");c=!0}const u=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new D(I,u,r,n,c,i,a,s)}const r=e.name;(0,n.assertArgument)(!r||"string"==typeof r&&r.match(m),"invalid name","obj.name",r);let i=e.indexed;null!=i&&((0,n.assertArgument)(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,a=s.match(x);if(a){const t=parseInt(a[2]||"-1"),n=D.from({type:a[1],components:e.components});return new D(I,r||"",s,"array",i,null,t,n)}if("tuple"===s||s.startsWith("tuple(")||s.startsWith("(")){const t=null!=e.components?e.components.map((e=>D.from(e))):null;return new D(I,r||"",s,"tuple",i,t,null,null)}return s=R(e.type),new D(I,r||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[C]===N}}t.ParamType=D;class G{type;inputs;constructor(e,t,r){(0,n.assertPrivate)(e,I,"Fragment"),r=Object.freeze(r.slice()),(0,n.defineProperties)(this,{type:t,inputs:r})}static from(e){if("string"==typeof e){try{G.from(JSON.parse(e))}catch(e){}return G.from(A(e))}if(e instanceof w)switch(e.peekKeyword(l)){case"constructor":return K.from(e);case"error":return W.from(e);case"event":return V.from(e);case"fallback":case"receive":return $.from(e);case"function":return q.from(e);case"struct":return J.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return K.from(e);case"error":return W.from(e);case"event":return V.from(e);case"fallback":case"receive":return $.from(e);case"function":return q.from(e);case"struct":return J.from(e)}(0,n.assert)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,n.assertArgument)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return K.isFragment(e)}static isError(e){return W.isFragment(e)}static isEvent(e){return V.isFragment(e)}static isFunction(e){return q.isFragment(e)}static isStruct(e){return J.isFragment(e)}}t.Fragment=G;class H extends G{name;constructor(e,t,r,i){super(e,t,i),(0,n.assertArgument)("string"==typeof r&&r.match(m),"invalid identifier","name",r),i=Object.freeze(i.slice()),(0,n.defineProperties)(this,{name:r})}}function z(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}t.NamedFragment=H;class W extends H{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,C,{value:j})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+z(e,this.inputs)),t.join(" ")}static from(e){if(W.isFragment(e))return e;if("string"==typeof e)return W.from(A(e));if(e instanceof w){const t=P("error",e),r=_(e);return T(e),new W(I,t,r)}return new W(I,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===j}}t.ErrorFragment=W;class V extends H{anonymous;constructor(e,t,r,i){super(e,"event",t,r),Object.defineProperty(this,C,{value:B}),(0,n.defineProperties)(this,{anonymous:i})}get topicHash(){return(0,i.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+z(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return t=(t||[]).map((e=>D.from(e))),new V(I,e,t,!1).topicHash}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){const t=P("event",e),r=_(e,!0),n=!!O(e,o(["anonymous"])).has("anonymous");return T(e),new V(I,t,r,n)}return new V(I,e.name,e.inputs?e.inputs.map((e=>D.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[C]===B}}t.EventFragment=V;class K extends G{payable;gas;constructor(e,t,r,i,o){super(e,t,r),Object.defineProperty(this,C,{value:M}),(0,n.defineProperties)(this,{payable:i,gas:o})}format(e){if((0,n.assert)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${z(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){O(e,o(["constructor"]));const t=_(e),r=!!O(e,s).has("payable"),n=k(e);return T(e),new K(I,"constructor",t,r,n)}return new K(I,"constructor",e.inputs?e.inputs.map(D.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===M}}t.ConstructorFragment=K;class $ extends G{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,C,{value:F}),(0,n.defineProperties)(this,{payable:r})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if($.isFragment(e))return e;if("string"==typeof e)try{return $.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){const t=e.toString(),r=e.peekKeyword(o(["fallback","receive"]));if((0,n.assertArgument)(r,"type must be fallback or receive","obj",t),"receive"===e.popKeyword(o(["fallback","receive"]))){const t=_(e);return(0,n.assertArgument)(0===t.length,"receive cannot have arguments","obj.inputs",t),O(e,o(["payable"])),T(e),new $(I,[],!0)}let i=_(e);i.length?(0,n.assertArgument)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map((e=>e.format("minimal"))).join(", ")):i=[D.from("bytes")];const s=S(e);if((0,n.assertArgument)("nonpayable"===s||"payable"===s,"fallback cannot be constants","obj.stateMutability",s),O(e,o(["returns"])).has("returns")){const t=_(e);(0,n.assertArgument)(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return T(e),new $(I,i,"payable"===s)}if("receive"===e.type)return new $(I,[],!0);if("fallback"===e.type){const t=[D.from("bytes")],r="payable"===e.stateMutability;return new $(I,t,r)}(0,n.assertArgument)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[C]===F}}t.FallbackFragment=$;class q extends H{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,i,o,s){super(e,"function",t,i),Object.defineProperty(this,C,{value:L}),o=Object.freeze(o.slice());const a="view"===r||"pure"===r,c="payable"===r;(0,n.defineProperties)(this,{constant:a,gas:s,outputs:o,payable:c,stateMutability:r})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+z(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(z(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return t=(t||[]).map((e=>D.from(e))),new q(I,e,"view",t,[],null).selector}static from(e){if(q.isFragment(e))return e;if("string"==typeof e)try{return q.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){const t=P("function",e),r=_(e),n=S(e);let i=[];O(e,o(["returns"])).has("returns")&&(i=_(e));const s=k(e);return T(e),new q(I,t,n,r,i,s)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new q(I,e.name,t,e.inputs?e.inputs.map(D.from):[],e.outputs?e.outputs.map(D.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===L}}t.FunctionFragment=q;class J extends H{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,C,{value:U})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return J.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){const t=P("struct",e),r=_(e);return T(e),new J(I,t,r)}return new J(I,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===U}}t.StructFragment=J},197:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunCore=t.ShogunEventEmitter=t.ShogunStorage=t.Webauthn=t.Web3Connector=t.GunDB=t.RelayVerifier=void 0;const o=r(4101),s=r(2077),a=r(4134),c=r(5628),u=r(3358),l=r(4643),f=r(74),d=r(4933),h=r(8098),p=r(8050);var g=r(7405);Object.defineProperty(t,"RelayVerifier",{enumerable:!0,get:function(){return g.RelayVerifier}}),i(r(3358),t),i(r(2077),t),i(r(5307),t),i(r(6640),t),i(r(7405),t),i(r(5349),t),i(r(8777),t),i(r(74),t);var y=r(4101);Object.defineProperty(t,"GunDB",{enumerable:!0,get:function(){return y.GunDB}});var b=r(8089);Object.defineProperty(t,"Web3Connector",{enumerable:!0,get:function(){return b.Web3Connector}});var m=r(7510);Object.defineProperty(t,"Webauthn",{enumerable:!0,get:function(){return m.Webauthn}});var v=r(4643);Object.defineProperty(t,"ShogunStorage",{enumerable:!0,get:function(){return v.ShogunStorage}});var w=r(4465);Object.defineProperty(t,"ShogunEventEmitter",{enumerable:!0,get:function(){return w.ShogunEventEmitter}}),t.ShogunCore=class{static API_VERSION="2.0.0";_gun;_user=null;gundb;storage;eventEmitter;provider;config;rx;plugins=new Map;currentAuthMethod;constructor(e){(0,c.log)("Initializing ShogunSDK"),this.config=e,e.logging&&((0,c.configureLogging)(e.logging),(0,c.log)("Logging configured with custom settings")),this.storage=new l.ShogunStorage,this.eventEmitter=new a.EventEmitter,u.ErrorHandler.addListener((e=>{this.eventEmitter.emit("error",{action:e.code,message:e.message,type:e.type})})),(0,c.log)("Creating Gun instance...");try{e.gunInstance?((0,c.log)("Using provided Gun instance"),this._gun=e.gunInstance):((0,c.log)(`Creating new Gun instance with peers: ${JSON.stringify(e.peers)}`),this._gun=Gun(e.peers||[])),(0,c.log)("Gun instance created and validated successfully")}catch(e){throw(0,c.logError)("Error creating Gun instance:",e),new Error(`Failed to create Gun instance: ${e}`)}(0,c.log)("Initializing GunDB...");try{this.gundb=new o.GunDB(this._gun,e.scope||""),this._gun=this.gundb.gun,(0,c.log)("GunDB initialized successfully")}catch(e){throw(0,c.logError)("Error initializing GunDB:",e),new Error(`Failed to initialize GunDB: ${e}`)}(0,c.log)("Initialized Gun instance");try{this._user=this.gun.user().recall({sessionStorage:!0}),(0,c.log)("Gun user initialized successfully")}catch(e){throw(0,c.logError)("Error initializing Gun user:",e),new Error(`Failed to initialize Gun user: ${e}`)}if(this.rx=new s.GunRxJS(this.gun),this.registerBuiltinPlugins(e),e.plugins?.autoRegister&&e.plugins.autoRegister.length>0)for(const t of e.plugins.autoRegister)try{this.register(t),(0,c.log)(`Auto-registered plugin: ${t.name}`)}catch(e){(0,c.logError)(`Failed to auto-register plugin ${t.name}:`,e)}(0,c.log)("ShogunSDK initialized!")}get gun(){return this._gun}get user(){return this._user}registerBuiltinPlugins(e){try{if(e.webauthn?.enabled){const e=new d.WebauthnPlugin;e._category=f.PluginCategory.Authentication,this.register(e),(0,c.log)("Webauthn plugin registered")}if(e.web3?.enabled){const e=new h.Web3ConnectorPlugin;e._category=f.PluginCategory.Authentication,this.register(e),(0,c.log)("Web3Connector plugin registered")}if(e.nostr?.enabled){const e=new p.NostrConnectorPlugin;e._category=f.PluginCategory.Authentication,this.register(e),(0,c.log)("NostrConnector plugin registered")}}catch(e){(0,c.logError)("Error registering builtin plugins:",e)}}register(e){if(this.plugins.has(e.name))throw new Error(`Plugin with name "${e.name}" already registered`);e.initialize(this),this.plugins.set(e.name,e),(0,c.log)(`Registered plugin: ${e.name}`)}unregister(e){const t=this.plugins.get(e);t?(t.destroy&&t.destroy(),this.plugins.delete(e),(0,c.log)(`Unregistered plugin: ${e}`)):(0,c.log)(`Plugin "${e}" not found, nothing to unregister`)}getPlugin(e){return this.plugins.get(e)}hasPlugin(e){return this.plugins.has(e)}getPluginsByCategory(e){const t=[];return this.plugins.forEach((r=>{r._category===e&&t.push(r)})),t}getAuthenticationMethod(e){switch(e){case"webauthn":return this.getPlugin(f.CorePlugins.WebAuthn);case"web3":return this.getPlugin(f.CorePlugins.Web3);case"nostr":return this.getPlugin(f.CorePlugins.Nostr);default:return{login:(e,t)=>{this.login(e,t)},signUp:(e,t,r)=>{this.signUp(e,t,r)}}}}getRecentErrors(e=10){return u.ErrorHandler.getRecentErrors(e)}configureLogging(e){(0,c.configureLogging)(e),(0,c.log)("Logging reconfigured with new settings")}isLoggedIn(){return this.gundb.isLoggedIn()}logout(){try{if(!this.isLoggedIn())return void(0,c.log)("Logout ignored: user not authenticated");this.gundb.logout(),this.eventEmitter.emit("auth:logout",{}),(0,c.log)("Logout completed successfully")}catch(e){u.ErrorHandler.handle(u.ErrorType.AUTHENTICATION,"LOGOUT_FAILED",e instanceof Error?e.message:"Error during logout",e)}}async login(e,t){(0,c.log)("Login");try{if((0,c.log)(`Login attempt for user: ${e}`),!e||!t)return{success:!1,error:"Username and password are required"};this.currentAuthMethod||(this.currentAuthMethod="password",(0,c.log)("Authentication method set to default: password"));const r=this.config?.timeouts?.login??15e3,n=new Promise((async n=>{const i=setTimeout((()=>{n({success:!1,error:"Login timeout"})}),r);try{const r=await this.gundb.login(e,t);clearTimeout(i),r.success?n({success:!0,userPub:r.userPub,username:r.username}):n({success:!1,error:r.error||"Wrong user or password"})}catch(e){clearTimeout(i),n({success:!1,error:e.message||"Login error"})}})),i=await n;return i.success&&(this.eventEmitter.emit("auth:login",{userPub:i.userPub??""}),(0,c.log)(`Current auth method before wallet check: ${this.currentAuthMethod}`)),i}catch(e){return u.ErrorHandler.handle(u.ErrorType.AUTHENTICATION,"LOGIN_FAILED",e.message??"Unknown error during login",e),{success:!1,error:e.message??"Unknown error during login"}}}async signUp(e,t,r){(0,c.log)("Sign up");try{if(!e||!t)return{success:!1,error:"Username and password are required"};if(void 0!==r&&t!==r)return{success:!1,error:"Passwords do not match"};if(t.length<6)return{success:!1,error:"Password must be at least 6 characters long"};this.eventEmitter.emit("debug",{action:"signup_start",username:e,timestamp:Date.now()}),(0,c.log)(`Attempting user registration: ${e}`);const n=this.config?.timeouts?.signup??3e4,i=new Promise((async r=>{const i=setTimeout((()=>{r({success:!1,error:"Registration timeout"})}),n);try{const n=await this.gundb.signUp(e,t);clearTimeout(i),n.success?(this.eventEmitter.emit("debug",{action:"signup_complete",username:e,userPub:n.userPub,timestamp:Date.now()}),this.eventEmitter.emit("auth:signup",{userPub:n.userPub??"",username:e})):this.eventEmitter.emit("debug",{action:"signup_failed",username:e,error:n.error,timestamp:Date.now()}),r(n)}catch(e){clearTimeout(i),r({success:!1,error:e.message||"Registration error"})}}));return await i}catch(t){return(0,c.logError)(`Error during registration for user ${e}:`,t),this.eventEmitter.emit("debug",{action:"signup_exception",username:e,error:t.message||"Unknown error",timestamp:Date.now()}),{success:!1,error:t.message??"Unknown error during registration"}}}emit(e,t){return this.eventEmitter.emit(e,t)}on(e,t){return this.eventEmitter.on(e,t),this}once(e,t){return this.eventEmitter.once(e,t),this}off(e,t){return this.eventEmitter.off(e,t),this}removeAllListeners(e){return this.eventEmitter.removeAllListeners(e),this}setAuthMethod(e){(0,c.log)(`Setting authentication method from '${this.currentAuthMethod}' to '${e}'`),this.currentAuthMethod=e,(0,c.log)(`Authentication method successfully set to: ${e}`)}getAuthMethod(){return this.currentAuthMethod}}},201:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(8087);t.concatAll=function(){return n.mergeAll(1)}},226:function(e,t,r){"use strict";var n,i,o,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.OFB=void 0;const c=r(6342);class u extends c.ModeOfOperation{constructor(e,t){if(super("OFB",e,u),n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");s(this,n,new Uint8Array(t),"f")}else s(this,n,new Uint8Array(16),"f");s(this,i,this.iv,"f"),s(this,o,16,"f")}get iv(){return new Uint8Array(a(this,n,"f"))}encrypt(e){var t,r;if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)16===a(this,o,"f")&&(s(this,i,this.aes.encrypt(a(this,i,"f")),"f"),s(this,o,0,"f")),n[e]^=a(this,i,"f")[(s(this,o,(r=a(this,o,"f"),t=r++,r),"f"),t)];return n}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");return this.encrypt(e)}}t.OFB=u,n=new WeakMap,i=new WeakMap,o=new WeakMap},254:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserProvider=void 0;const n=r(5347),i=r(2371);class o extends i.JsonRpcApiPollingProvider{#s;#a;constructor(e,t,r){const i=Object.assign({},null!=r?r:{},{batchMaxCount:1});(0,n.assertArgument)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,i),this.#a=null,r&&r.providerInfo&&(this.#a=r.providerInfo),this.#s=async(t,r)=>{const n={method:t,params:r};this.emit("debug",{action:"sendEip1193Request",payload:n});try{const t=await e.request(n);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(e){const t=new Error(e.message);throw t.code=e.code,t.data=e.data,t.payload=n,this.emit("debug",{action:"receiveEip1193Error",error:t}),t}}}get providerInfo(){return this.#a}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){(0,n.assertArgument)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const t=await this.#s(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);const t=await this.send("eth_accounts",[]);return"number"==typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter((t=>t.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#s("eth_requestAccounts",[])}catch(e){const t=e.payload;throw this.getRpcError(t,{id:t.id,error:e})}return await super.getSigner(e)}static async discover(e){if(null==e&&(e={}),e.provider)return new o(e.provider);const t=e.window?e.window:"undefined"!=typeof window?window:null;if(null==t)return null;const r=e.anyProvider;if(r&&t.ethereum)return new o(t.ethereum);if(!("addEventListener"in t&&"dispatchEvent"in t&&"removeEventListener"in t))return null;const i=e.timeout?e.timeout:300;return 0===i?null:await new Promise(((s,a)=>{let c=[];const u=e=>{c.push(e.detail),r&&l()},l=()=>{if(clearTimeout(f),c.length)if(e&&e.filter){const t=e.filter(c.map((e=>Object.assign({},e.info))));if(null==t)s(null);else if(t instanceof o)s(t);else{let e=null;if(t.uuid&&(e=c.filter((e=>t.uuid===e.info.uuid))[0]),e){const{provider:t,info:r}=e;s(new o(t,void 0,{providerInfo:r}))}else a((0,n.makeError)("filter returned unknown info","UNSUPPORTED_OPERATION",{value:t}))}}else{const{provider:e,info:t}=c[0];s(new o(e,void 0,{providerInfo:t}))}else s(null);t.removeEventListener("eip6963:announceProvider",u)},f=setTimeout((()=>{l()}),i);t.addEventListener("eip6963:announceProvider",u),t.dispatchEvent(new Event("eip6963:requestProvider"))}))}}t.BrowserProvider=o},281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},345:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=void 0;const n=r(5347),i=r(7262);function o(e){return e&&"function"==typeof e.getAddress}async function s(e,t){const r=await t;return null!=r&&"0x0000000000000000000000000000000000000000"!==r||((0,n.assert)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,n.assertArgument)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,i.getAddress)(r)}t.isAddressable=o,t.isAddress=function(e){try{return(0,i.getAddress)(e),!0}catch(e){}return!1},t.resolveAddress=function(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,i.getAddress)(e):((0,n.assert)(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),s(e,t.resolveName(e))):o(e)?s(e,e.getAddress()):e&&"function"==typeof e.then?s(e,e):void(0,n.assertArgument)(!1,"unsupported addressable value","target",e)}},380:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(7873),i=r(5462);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},381:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(6808),s=r(3275),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,c=1;c<n.length&&n[c]<=s;c+=2)a=c;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},406:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractFactory=void 0;const n=r(8456),i=r(646),o=r(5347),s=r(1008);class a{interface;bytecode;runner;constructor(e,t,r){const i=n.Interface.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=(0,o.hexlify)((0,o.getBytes)(t)),(0,o.defineProperties)(this,{bytecode:t,interface:i,runner:r||null})}attach(e){return new s.BaseContract(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const r=this.interface.deploy;if(r.inputs.length+1===e.length&&(t=await(0,s.copyOverrides)(e.pop())),r.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const n=await(0,s.resolveArgs)(this.runner,r.inputs,e),i=(0,o.concat)([this.bytecode,this.interface.encodeDeploy(n)]);return Object.assign({},t,{data:i})}async deploy(...e){const t=await this.getDeployTransaction(...e);(0,o.assert)(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const r=await this.runner.sendTransaction(t),n=(0,i.getCreateAddress)(r);return new s.BaseContract(n,this.interface,this.runner,r)}connect(e){return new a(this.interface,this.bytecode,e)}static fromSolidity(e,t){(0,o.assertArgument)(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}}t.ContractFactory=a},432:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(4772),s=r(6002),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},t}(o.AsyncAction);t.AsapAction=a},436:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=t.formatEther=t.parseUnits=t.formatUnits=void 0;const n=r(1500),i=r(9412),o=r(6508),s=["wei","kwei","mwei","gwei","szabo","finney","ether"];function a(e,t){let r=18;if("string"==typeof t){const e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromValue(e,r,{decimals:r,width:512}).toString()}function c(e,t){(0,n.assertArgument)("string"==typeof e,"value must be a string","value",e);let r=18;if("string"==typeof t){const e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromString(e,{decimals:r,width:512}).value}t.formatUnits=a,t.parseUnits=c,t.formatEther=function(e){return a(e,18)},t.parseEther=function(e){return c(e,18)}},439:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},554:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=function(e){return"string"==typeof e&&44===e.length&&"="===e.charAt(43)},t.encrypt=async function(e,t){if(!Gun.SEA)throw new Error("SEA is not available");return Gun.SEA.encrypt(e,t)},t.decrypt=async function(e,t){if(!Gun.SEA)throw new Error("SEA is not available");return Gun.SEA.decrypt(e,t)},t.encFor=async function(e,t,r){const i=await n.SEA.secret(r.epub,t);return await n.SEA.encrypt(e,i)},t.decFrom=async function(e,t,r){const i=await n.SEA.secret(t.epub,r);return await n.SEA.decrypt(e,i)},t.hashText=i,t.hashObj=async function(e){let t="string"==typeof e?e:JSON.stringify(e);return{hash:await i(t),hashed:t}},t.secret=async function(e,t){return await n.SEA.secret(e,t)},t.getShortHash=async function(e,t){return await n.SEA.work(e,null,null,{name:"PBKDF2",encode:"hex",salt:t})},t.safeHash=function(e){if(e)return e.replace(/[+=/]/g,o)},t.unsafeHash=function(e){if(e)return e.replace(/[._-]/g,s)},t.safeJSONParse=function(e,t={}){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}},t.randomUUID=function(){throw new Error("Function not implemented.")};const n=r(9229);async function i(e){return await n.SEA.work(e,null,null,{name:"SHA-256"})}function o(e){switch(e){case"+":return"-";case"=":return".";case"/":return"_"}}function s(e){switch(e){case"-":return"+";case".":return"=";case"_":return"/"}}},597:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(2326),i=r(5345),o=r(1713);t.timeoutWith=function(e,t,r){var s,a,c;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(c=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:c})}},598:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(5212),i=r(7214);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},629:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2884),i=r(281);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},632:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(9328),i=r(5212),o=r(7214);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},646:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=void 0;var n=r(7262);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return n.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return n.getIcapAddress}});var i=r(1891);Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return i.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}});var o=r(345);Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}})},680:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9724),i=r(5212),o=r(7214);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,c=!1,u=function(){return c&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var c=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,c++):e)}),(function(){s=null,u()})))}),(function(){c=!0,u()})))}))}},706:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(5212),i=r(5717),o=r(7214),s=r(9724);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),s.innerFrom(e).subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},719:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(7699),i=r(3916),o=r(1898),s=r(7478),a=r(3484);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},761:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(680),i=r(281);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=t.computeAddress=void 0;const n=r(646),i=r(2291);function o(e){let t;return t="string"==typeof e?i.SigningKey.computePublicKey(e,!1):e.publicKey,(0,n.getAddress)((0,i.keccak256)("0x"+t.substring(4)).substring(26))}t.computeAddress=o,t.recoverAddress=function(e,t){return o(i.SigningKey.recoverPublicKey(e,t))}},839:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9619);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(9328),i=r(2708);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},873:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketProvider=void 0;const n=r(3913),i=r(4945);class o extends i.SocketProvider{#c;#u;get websocket(){if(null==this.#u)throw new Error("websocket closed");return this.#u}constructor(e,t,r){super(t,r),"string"==typeof e?(this.#c=()=>new n.WebSocket(e),this.#u=this.#c()):"function"==typeof e?(this.#c=e,this.#u=e()):(this.#c=null,this.#u=e),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(e){console.log("failed to start WebsocketProvider",e)}},this.websocket.onmessage=e=>{this._processMessage(e.data)}}async _write(e){this.websocket.send(e)}async destroy(){null!=this.#u&&(this.#u.close(),this.#u=null),super.destroy()}}t.WebSocketProvider=o},875:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(4772),s=r(9879),a=function(e){function t(t,r){void 0===t&&(t=c),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(9533).AsyncScheduler);t.VirtualTimeScheduler=a;var c=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(o.AsyncAction);t.VirtualAction=c},915:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(7557),i=r(9175);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+u,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},954:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbiCoder=void 0;const n=r(5347),i=r(8869),o=r(1355),s=r(3178),a=r(8719),c=r(2348),u=r(9095),l=r(8026),f=r(7398),d=r(8766),h=r(1693),p=r(189),g=r(646),y=r(5347),b=new Map;b.set(0,"GENERIC_PANIC"),b.set(1,"ASSERT_FALSE"),b.set(17,"OVERFLOW"),b.set(18,"DIVIDE_BY_ZERO"),b.set(33,"ENUM_RANGE_ERROR"),b.set(34,"BAD_STORAGE_DATA"),b.set(49,"STACK_UNDERFLOW"),b.set(50,"ARRAY_RANGE_ERROR"),b.set(65,"OUT_OF_MEMORY"),b.set(81,"UNINITIALIZED_FUNCTION_CALL");const m=new RegExp(/^bytes([0-9]*)$/),v=new RegExp(/^(u?int)([0-9]*)$/);let w=null,A=1024;class E{#l(e){if(e.isArray())return new s.ArrayCoder(this.#l(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new h.TupleCoder(e.components.map((e=>this.#l(e))),e.name);switch(e.baseType){case"address":return new o.AddressCoder(e.name);case"bool":return new a.BooleanCoder(e.name);case"string":return new d.StringCoder(e.name);case"bytes":return new c.BytesCoder(e.name);case"":return new l.NullCoder(e.name)}let t=e.type.match(v);if(t){let r=parseInt(t[2]||"256");return(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new f.NumberCoder(r/8,"int"===t[1],e.name)}if(t=e.type.match(m),t){let r=parseInt(t[1]);return(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","param",e),new u.FixedBytesCoder(r,e.name)}(0,n.assertArgument)(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#l(p.ParamType.from(e))));return new h.TupleCoder(t,"_").defaultValue()}encode(e,t){(0,n.assertArgumentCount)(t.length,e.length,"types/values length mismatch");const r=e.map((e=>this.#l(p.ParamType.from(e)))),o=new h.TupleCoder(r,"_"),s=new i.Writer;return o.encode(s,t),s.data}decode(e,t,r){const n=e.map((e=>this.#l(p.ParamType.from(e))));return new h.TupleCoder(n,"_").decode(new i.Reader(t,r,A))}static _setDefaultMaxInflation(e){(0,n.assertArgument)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),A=e}static defaultAbiCoder(){return null==w&&(w=new E),w}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let i="missing revert data",o=null,s=null;if(r){i="execution reverted";const e=(0,y.getBytes)(r);if(r=(0,y.hexlify)(r),0===e.length)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(e.length%32!=4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,y.hexlify)(e.slice(0,4)))try{o=n.decode(["string"],e.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch(e){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,y.hexlify)(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[t]},o=`Panic due to ${b.get(t)||"UNKNOWN"}(${t})`,i+=`: ${o}`}catch(e){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const a={to:t.to?(0,g.getAddress)(t.to):null,data:t.data||"0x"};return t.from&&(a.from=(0,g.getAddress)(t.from)),(0,y.makeError)(i,"CALL_EXCEPTION",{action:e,data:r,reason:o,transaction:a,invocation:null,revert:s})}(e,t,r,E.defaultAbiCoder())}}t.AbiCoder=E},1008:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.BaseContract=t.resolveArgs=t.copyOverrides=void 0;const n=r(8456),i=r(646),o=r(3807),s=r(5347),a=r(6526),c=BigInt(0);function u(e){return e&&"function"==typeof e.call}function l(e){return e&&"function"==typeof e.estimateGas}function f(e){return e&&"function"==typeof e.resolveName}function d(e){return e&&"function"==typeof e.sendTransaction}function h(e){if(null!=e){if(f(e))return e;if(e.provider)return e.provider}}class p{#f;fragment;constructor(e,t,r){if((0,s.defineProperties)(this,{fragment:t}),t.inputs.length<r.length)throw new Error("too many arguments");const n=g(e.runner,"resolveName"),o=f(n)?n:null;this.#f=async function(){const n=await Promise.all(t.inputs.map(((e,t)=>null==r[t]?null:e.walkAsync(r[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>(0,i.resolveAddress)(e,o)))):(0,i.resolveAddress)(t,o):t)))));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#f}}function g(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function y(e){return null==e?null:e.provider||null}async function b(e,t){const r=n.Typed.dereference(e,"overrides");(0,s.assertArgument)("object"==typeof r,"invalid overrides parameter","overrides",e);const i=(0,o.copyRequest)(r);return(0,s.assertArgument)(null==i.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,s.assertArgument)(null==i.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function m(e,t,r){const o=g(e,"resolveName"),s=f(o)?o:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(r[t],((e,t)=>(t=n.Typed.dereference(t,e),"address"===e?(0,i.resolveAddress)(t,s):t))))))}function v(e){const t=async function(t){const r=await b(t,["data"]);r.to=await e.getAddress(),r.from&&(r.from=await(0,i.resolveAddress)(r.from,h(e.runner)));const n=e.interface,o=(0,s.getBigInt)(r.value||c,"overrides.value")===c,a="0x"===(r.data||"0x");!n.fallback||n.fallback.payable||!n.receive||a||o||(0,s.assertArgument)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),(0,s.assertArgument)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data);const u=n.receive||n.fallback&&n.fallback.payable;return(0,s.assertArgument)(u||o,"cannot send value to non-payable fallback","overrides.value",r.value),(0,s.assertArgument)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){const n=e.runner;(0,s.assert)(d(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await n.sendTransaction(await t(r)),o=y(e.runner);return new a.ContractTransactionResponse(e.interface,o,i)},n=async e=>await r(e);return(0,s.defineProperties)(n,{_contract:e,estimateGas:async function(r){const n=g(e.runner,"estimateGas");return(0,s.assert)(l(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(r))},populateTransaction:t,send:r,staticCall:async function(r){const n=g(e.runner,"call");(0,s.assert)(u(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await t(r);try{return await n.call(i)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,i);throw t}}}),n}t.copyOverrides=b,t.resolveArgs=m;const w=Symbol.for("_ethersInternal_contract"),A=new WeakMap;function E(e){return A.get(e[w])}async function P(e,t){let r,n=null;if(Array.isArray(t)){const n=function(t){if((0,s.isHexString)(t,32))return t;const r=e.interface.getEvent(t);return(0,s.assertArgument)(r,"unknown fragment","name",t),r.topicHash};r=t.map((e=>null==e?null:Array.isArray(e)?e.map(n):n(e)))}else"*"===t?r=[null]:"string"==typeof t?(0,s.isHexString)(t,32)?r=[t]:(n=e.interface.getEvent(t),(0,s.assertArgument)(n,"unknown fragment","event",t),r=[n.topicHash]):(i=t)&&"object"==typeof i&&"getTopicFilter"in i&&"function"==typeof i.getTopicFilter&&i.fragment?r=await t.getTopicFilter():"fragment"in t?(n=t.fragment,r=[n.topicHash]):(0,s.assertArgument)(!1,"unknown event name","event",t);var i;return r=r.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()})),{fragment:n,tag:r.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:r}}async function O(e,t){const{subs:r}=E(e);return r.get((await P(e,t)).tag)||null}async function S(e,t,r){const n=y(e.runner);(0,s.assert)(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:c}=await P(e,r),{addr:u,subs:l}=E(e);let f=l.get(o);if(!f){const t={address:u||e,topics:c},s=t=>{let n=i;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){const o=n,s=i?e.interface.decodeEventLog(i,t.data,t.topics):[];k(e,r,s,(n=>new a.ContractEventPayload(e,n,r,o,t)))}else k(e,r,[],(n=>new a.ContractUnknownEventPayload(e,n,r,t)))};let d=[];f={tag:o,listeners:[],start:()=>{d.length||d.push(n.on(t,s))},stop:async()=>{if(0==d.length)return;let e=d;d=[],await Promise.all(e),n.off(t,s)}},l.set(o,f)}return f}let _=Promise.resolve();async function k(e,t,r,n){try{await _}catch(e){}const i=async function(e,t,r,n){await _;const i=await O(e,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter((({listener:t,once:i})=>{const o=Array.from(r);n&&o.push(n(i?null:t));try{t.call(e,...o)}catch(e){}return!i})),0===i.listeners.length&&(i.stop(),E(e).subs.delete(i.tag)),o>0}(e,t,r,n);return _=i,await i}const T=["then"];class x{target;interface;runner;filters;[w];fallback;constructor(e,t,r,o){(0,s.assertArgument)("string"==typeof e||(0,i.isAddressable)(e),"invalid value for Contract target","target",e),null==r&&(r=null);const c=n.Interface.from(t);let u;(0,s.defineProperties)(this,{target:e,runner:r,interface:c}),Object.defineProperty(this,w,{value:{}});let l=null,d=null;if(o){const e=y(r);d=new a.ContractTransactionResponse(this.interface,e,o)}let h=new Map;if("string"==typeof e)if((0,s.isHexString)(e))l=e,u=Promise.resolve(e);else{const t=g(r,"resolveName");if(!f(t))throw(0,s.makeError)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});u=t.resolveName(e).then((t=>{if(null==t)throw(0,s.makeError)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return E(this).addr=t,t}))}else u=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return E(this).addr=e,e}));var p;p={addrPromise:u,addr:l,deployTx:d,subs:h},A.set(this[w],p);const b=new Proxy({},{get:(e,t,r)=>{if("symbol"==typeof t||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return this.getEvent(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>T.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return(0,s.defineProperties)(this,{filters:b}),(0,s.defineProperties)(this,{fallback:c.receive||c.fallback?v(this):null}),new Proxy(this,{get:(e,t,r)=>{if("symbol"==typeof t||t in e||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return e.getFunction(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||T.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new x(this.target,this.interface,e)}attach(e){return new x(e,this.interface,this.runner)}async getAddress(){return await E(this).addrPromise}async getDeployedCode(){const e=y(this.runner);(0,s.assert)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=y(this.runner);return(0,s.assert)(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,r)=>{const n=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",n)}catch(e){r(e)}};n()}))}deploymentTransaction(){return E(this).deployTx}getFunction(e){"string"!=typeof e&&(e=e.format());const t=function(e,t){const r=function(...r){const n=e.interface.getFunction(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=async function(...t){const n=r(...t);let o={};if(n.inputs.length+1===t.length&&(o=await b(t.pop()),o.from&&(o.from=await(0,i.resolveAddress)(o.from,h(e.runner)))),n.inputs.length!==t.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const a=await m(e.runner,n.inputs,t);return Object.assign({},o,await(0,s.resolveProperties)({to:e.getAddress(),data:e.interface.encodeFunctionData(n,a)}))},o=async function(...e){const t=await f(...e);return 1===t.length?t[0]:t},c=async function(...t){const r=e.runner;(0,s.assert)(d(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await r.sendTransaction(await n(...t)),o=y(e.runner);return new a.ContractTransactionResponse(e.interface,o,i)},f=async function(...t){const i=g(e.runner,"call");(0,s.assert)(u(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const o=await n(...t);let a="0x";try{a=await i.call(o)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,o);throw t}const c=r(...t);return e.interface.decodeFunctionResult(c,a)},p=async(...e)=>r(...e).constant?await o(...e):await c(...e);return(0,s.defineProperties)(p,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:r,estimateGas:async function(...t){const r=g(e.runner,"estimateGas");return(0,s.assert)(l(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await n(...t))},populateTransaction:n,send:c,staticCall:o,staticCallResult:f}),Object.defineProperty(p,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getFunction(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),p}(this,e);return t}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){const r=function(...r){const n=e.interface.getEvent(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=function(...t){return new p(e,r(...t),t)};return(0,s.defineProperties)(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getEvent(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),n}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,r){null==t&&(t=0),null==r&&(r="latest");const{addr:n,addrPromise:i}=E(this),c=n||await i,{fragment:u,topics:l}=await P(this,e),f={address:c,topics:l,fromBlock:t,toBlock:r},d=y(this.runner);return(0,s.assert)(d,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await d.getLogs(f)).map((e=>{let t=u;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new a.EventLog(e,this.interface,t)}catch(t){return new a.UndecodedEventLog(e,t)}return new o.Log(e,d)}))}async on(e,t){const r=await S(this,"on",e);return r.listeners.push({listener:t,once:!1}),r.start(),this}async once(e,t){const r=await S(this,"once",e);return r.listeners.push({listener:t,once:!0}),r.start(),this}async emit(e,...t){return await k(this,e,t,null)}async listenerCount(e){if(e){const t=await O(this,e);return t?t.listeners.length:0}const{subs:t}=E(this);let r=0;for(const{listeners:e}of t.values())r+=e.length;return r}async listeners(e){if(e){const t=await O(this,e);return t?t.listeners.map((({listener:e})=>e)):[]}const{subs:t}=E(this);let r=[];for(const{listeners:e}of t.values())r=r.concat(e.map((({listener:e})=>e)));return r}async off(e,t){const r=await O(this,e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return null!=t&&0!==r.listeners.length||(r.stop(),E(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const t=await O(this,e);if(!t)return this;t.stop(),E(this).subs.delete(t.tag)}else{const{subs:e}=E(this);for(const{tag:t,stop:r}of e.values())r(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends x{constructor(t,r=null){super(t,e,r)}}}static from(e,t,r){return null==r&&(r=null),new this(e,t,r)}}t.BaseContract=x;class R extends(function(){return x}()){}t.Contract=R},1071:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(8051);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},1181:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.verifyAuthorization=t.hashAuthorization=void 0;var n=r(4027);Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return n.hashAuthorization}}),Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return n.verifyAuthorization}});var i=r(1993);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return i.id}});var o=r(3239);Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return o.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return o.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return o.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return o.dnsEncode}});var s=r(8717);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return s.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return s.verifyMessage}});var a=r(6065);Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return a.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return a.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return a.solidityPackedSha256}});var c=r(7215);Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return c.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return c.verifyTypedData}})},1245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(4885),o=r(1587),s=r(6680),a=r(281);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var c=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return u(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function u(e,t){var r,n,i,o=e,s=o.kind,a=o.value,c=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,c):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=c,t.observeNotification=u},1279:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(7024),i=r(5934),o=r(632),s=r(8799),a=r(4383);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(c){return c.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},1295:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=t.ZeroHash=t.ZeroAddress=void 0;var n=r(5239);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return n.ZeroAddress}});var i=r(5255);Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return i.ZeroHash}});var o=r(9197);Object.defineProperty(t,"N",{enumerable:!0,get:function(){return o.N}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return o.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return o.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return o.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return o.MaxInt256}});var s=r(6245);Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}})},1355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;const n=r(646),i=r(6508),o=r(9976),s=r(8869);class a extends s.Coder{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=o.Typed.dereference(t,"string");try{r=(0,n.getAddress)(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return(0,n.getAddress)((0,i.toBeHex)(e.readValue(),20))}}t.AddressCoder=a},1361:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(5212),i=r(7214);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},1398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;const n=r(646),i=r(5239),o=r(2291),s=r(5347),a=r(7918),c=r(2963),u=r(778),l=BigInt(0),f=BigInt(2),d=BigInt(27),h=BigInt(28),p=BigInt(35),g=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),y=131072;function b(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return r+=(0,o.sha256)(t).substring(4),"0x"+r}function m(e){return"0x"===e?null:(0,n.getAddress)(e)}function v(e,t){try{return(0,a.accessListify)(e)}catch(r){(0,s.assertArgument)(!1,r.message,t,e)}}function w(e,t){try{if(!Array.isArray(e))throw new Error("authorizationList: invalid array");const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(!Array.isArray(n))throw new Error(`authorization[${r}]: invalid array`);if(6!==n.length)throw new Error(`authorization[${r}]: wrong length`);if(!n[1])throw new Error(`authorization[${r}]: null address`);t.push({address:m(n[1]),nonce:E(n[2],"nonce"),chainId:E(n[0],"chainId"),signature:o.Signature.from({yParity:A(n[3],"yParity"),r:(0,s.zeroPadValue)(n[4],32),s:(0,s.zeroPadValue)(n[5],32)})})}return t}catch(r){(0,s.assertArgument)(!1,r.message,t,e)}}function A(e,t){return"0x"===e?0:(0,s.getNumber)(e,t)}function E(e,t){if("0x"===e)return l;const r=(0,s.getBigInt)(e,t);return(0,s.assertArgument)(r<=g,"value exceeds uint size",t,r),r}function P(e,t){const r=(0,s.getBigInt)(e,"value"),n=(0,s.toBeArray)(r);return(0,s.assertArgument)(n.length<=32,"value too large",`tx.${t}`,r),n}function O(e){return(0,a.accessListify)(e).map((e=>[e.address,e.storageKeys]))}function S(e,t){(0,s.assertArgument)(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid ${ param } hash",`value[${t}]`,e[t]);return e}function _(e,t){let r;try{if(r=A(t[0],"yParity"),0!==r&&1!==r)throw new Error("bad yParity")}catch(e){(0,s.assertArgument)(!1,"invalid yParity","yParity",t[0])}const n=(0,s.zeroPadValue)(t[1],32),i=(0,s.zeroPadValue)(t[2],32),a=o.Signature.from({r:n,s:i,yParity:r});e.signature=a}class k{#d;#h;#p;#g;#y;#b;#m;#v;#w;#A;#E;#P;#O;#S;#_;#k;#T;get type(){return this.#d}set type(e){switch(e){case null:this.#d=null;break;case 0:case"legacy":this.#d=0;break;case 1:case"berlin":case"eip-2930":this.#d=1;break;case 2:case"london":case"eip-1559":this.#d=2;break;case 3:case"cancun":case"eip-4844":this.#d=3;break;case 4:case"pectra":case"eip-7702":this.#d=4;break;default:(0,s.assertArgument)(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const e=this.#h;return null==e&&3===this.type?i.ZeroAddress:e}set to(e){this.#h=null==e?null:(0,n.getAddress)(e)}get nonce(){return this.#g}set nonce(e){this.#g=(0,s.getNumber)(e,"value")}get gasLimit(){return this.#y}set gasLimit(e){this.#y=(0,s.getBigInt)(e)}get gasPrice(){const e=this.#b;return null!=e||0!==this.type&&1!==this.type?e:l}set gasPrice(e){this.#b=null==e?null:(0,s.getBigInt)(e,"gasPrice")}get maxPriorityFeePerGas(){const e=this.#m;return null==e?2===this.type||3===this.type?l:null:e}set maxPriorityFeePerGas(e){this.#m=null==e?null:(0,s.getBigInt)(e,"maxPriorityFeePerGas")}get maxFeePerGas(){const e=this.#v;return null==e?2===this.type||3===this.type?l:null:e}set maxFeePerGas(e){this.#v=null==e?null:(0,s.getBigInt)(e,"maxFeePerGas")}get data(){return this.#p}set data(e){this.#p=(0,s.hexlify)(e)}get value(){return this.#w}set value(e){this.#w=(0,s.getBigInt)(e,"value")}get chainId(){return this.#A}set chainId(e){this.#A=(0,s.getBigInt)(e)}get signature(){return this.#E||null}set signature(e){this.#E=null==e?null:o.Signature.from(e)}get accessList(){const e=this.#P||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#P=null==e?null:(0,a.accessListify)(e)}get authorizationList(){const e=this.#T||null;return null==e&&4===this.type?[]:e}set authorizationList(e){this.#T=null==e?null:e.map((e=>(0,c.authorizationify)(e)))}get maxFeePerBlobGas(){const e=this.#O;return null==e&&3===this.type?l:e}set maxFeePerBlobGas(e){this.#O=null==e?null:(0,s.getBigInt)(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#S;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){(0,s.assertArgument)(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#S=e}get blobs(){return null==this.#k?null:this.#k.map((e=>Object.assign({},e)))}set blobs(e){if(null==e)return void(this.#k=null);const t=[],r=[];for(let n=0;n<e.length;n++){const i=e[n];if((0,s.isBytesLike)(i)){(0,s.assert)(this.#_,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=(0,s.getBytes)(i);if((0,s.assertArgument)(e.length<=y,"blob is too large",`blobs[${n}]`,i),e.length!==y){const t=new Uint8Array(y);t.set(e),e=t}const o=this.#_.blobToKzgCommitment(e),a=(0,s.hexlify)(this.#_.computeBlobKzgProof(e,o));t.push({data:(0,s.hexlify)(e),commitment:(0,s.hexlify)(o),proof:a}),r.push(b(1,o))}else{const e=(0,s.hexlify)(i.commitment);t.push({data:(0,s.hexlify)(i.data),commitment:e,proof:(0,s.hexlify)(i.proof)}),r.push(b(1,e))}}this.#k=t,this.#S=r}get kzg(){return this.#_}set kzg(e){this.#_=null==e?null:function(e){return{blobToKzgCommitment:t=>{if("computeBlobProof"in e){if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,s.getBytes)(e.blobToKzgCommitment((0,s.hexlify)(t)))}else if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,s.getBytes)(e.blobToKzgCommitment(t));if("blobToKZGCommitment"in e&&"function"==typeof e.blobToKZGCommitment)return(0,s.getBytes)(e.blobToKZGCommitment((0,s.hexlify)(t)));(0,s.assertArgument)(!1,"unsupported KZG library","kzg",e)},computeBlobKzgProof:(t,r)=>"computeBlobProof"in e&&"function"==typeof e.computeBlobProof?(0,s.getBytes)(e.computeBlobProof((0,s.hexlify)(t),(0,s.hexlify)(r))):"computeBlobKzgProof"in e&&"function"==typeof e.computeBlobKzgProof?e.computeBlobKzgProof(t,r):"computeBlobKZGProof"in e&&"function"==typeof e.computeBlobKZGProof?(0,s.getBytes)(e.computeBlobKZGProof((0,s.hexlify)(t),(0,s.hexlify)(r))):void(0,s.assertArgument)(!1,"unsupported KZG library","kzg",e)}}(e)}constructor(){this.#d=null,this.#h=null,this.#g=0,this.#y=l,this.#b=null,this.#m=null,this.#v=null,this.#p="0x",this.#w=l,this.#A=l,this.#E=null,this.#P=null,this.#O=null,this.#S=null,this.#_=null,this.#k=null,this.#T=null}get hash(){return null==this.signature?null:(0,o.keccak256)(this.#x(!0,!1))}get unsignedHash(){return(0,o.keccak256)(this.unsignedSerialized)}get from(){return null==this.signature?null:(0,u.recoverAddress)(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:o.SigningKey.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#x(e,t){(0,s.assert)(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const r=[P(e.nonce,"nonce"),P(e.gasPrice||0,"gasPrice"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data];let n=l;if(e.chainId!=l)n=(0,s.getBigInt)(e.chainId,"tx.chainId"),(0,s.assertArgument)(!t||null==t.networkV||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==l&&(r.push((0,s.toBeArray)(n)),r.push("0x"),r.push("0x")),(0,s.encodeRlp)(r);let i=BigInt(27+t.yParity);return n!==l?i=o.Signature.getChainIdV(n,t.v):BigInt(t.v)!==i&&(0,s.assertArgument)(!1,"tx.chainId/sig.v mismatch","sig",t),r.push((0,s.toBeArray)(i)),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s)),(0,s.encodeRlp)(r)}(this,r);case 1:return function(e,t){const r=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.gasPrice||0,"gasPrice"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data,O(e.accessList||[])];return t&&(r.push(P(t.yParity,"recoveryParam")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x01",(0,s.encodeRlp)(r)])}(this,r);case 2:return function(e,t){const r=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(e.maxFeePerGas||0,"maxFeePerGas"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data,O(e.accessList||[])];return t&&(r.push(P(t.yParity,"yParity")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x02",(0,s.encodeRlp)(r)])}(this,r);case 3:return function(e,t,r){const n=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(e.maxFeePerGas||0,"maxFeePerGas"),P(e.gasLimit,"gasLimit"),e.to||i.ZeroAddress,P(e.value,"value"),e.data,O(e.accessList||[]),P(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),S(e.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(n.push(P(t.yParity,"yParity")),n.push((0,s.toBeArray)(t.r)),n.push((0,s.toBeArray)(t.s)),r)?(0,s.concat)(["0x03",(0,s.encodeRlp)([n,r.map((e=>e.data)),r.map((e=>e.commitment)),r.map((e=>e.proof))])]):(0,s.concat)(["0x03",(0,s.encodeRlp)(n)])}(this,r,t?this.blobs:null);case 4:return function(e,t){const r=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(e.maxFeePerGas||0,"maxFeePerGas"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data,O(e.accessList||[]),(n=e.authorizationList||[],n.map((e=>[P(e.chainId,"chainId"),e.address,P(e.nonce,"nonce"),P(e.signature.yParity,"yParity"),e.signature.r,e.signature.s])))];var n;return t&&(r.push(P(t.yParity,"yParity")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x04",(0,s.encodeRlp)(r)])}(this,r)}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#x(!0,!0)}get unsignedSerialized(){return this.#x(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#O||this.#S;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,s.assert)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,s.assert)(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,s.assert)(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return null!=this.type?i.push(this.type):this.authorizationList&&this.authorizationList.length?i.push(4):t?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(n&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return k.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new k;if("string"==typeof e){const t=(0,s.getBytes)(e);if(t[0]>=127)return k.from(function(e){const t=(0,s.decodeRlp)(e);(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const r={type:0,nonce:A(t[0],"nonce"),gasPrice:E(t[1],"gasPrice"),gasLimit:E(t[2],"gasLimit"),to:m(t[3]),value:E(t[4],"value"),data:(0,s.hexlify)(t[5]),chainId:l};if(6===t.length)return r;const n=E(t[6],"v"),i=E(t[7],"r"),a=E(t[8],"s");if(i===l&&a===l)r.chainId=n;else{let e=(n-p)/f;e<l&&(e=l),r.chainId=e,(0,s.assertArgument)(e!==l||n===d||n===h,"non-canonical legacy v","v",t[6]),r.signature=o.Signature.from({r:(0,s.zeroPadValue)(t[7],32),s:(0,s.zeroPadValue)(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return k.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",(0,s.hexlify)(e));const r={type:1,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),gasPrice:E(t[2],"gasPrice"),gasLimit:E(t[3],"gasLimit"),to:m(t[4]),value:E(t[5],"value"),data:(0,s.hexlify)(t[6]),accessList:v(t[7],"accessList")};return 8===t.length||_(r,t.slice(8)),r}(t));case 2:return k.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",(0,s.hexlify)(e));const r={type:2,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),maxPriorityFeePerGas:E(t[2],"maxPriorityFeePerGas"),maxFeePerGas:E(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:E(t[4],"gasLimit"),to:m(t[5]),value:E(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList")};return 9===t.length||_(r,t.slice(9)),r}(t));case 3:return k.from(function(e){let t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1)),r="3",n=null;if(4===t.length&&Array.isArray(t[0])){r="3 (network format)";const e=t[1],i=t[2],o=t[3];(0,s.assertArgument)(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),(0,s.assertArgument)(Array.isArray(i),"invalid network format: commitments not an array","fields[2]",i),(0,s.assertArgument)(Array.isArray(o),"invalid network format: proofs not an array","fields[3]",o),(0,s.assertArgument)(e.length===i.length,"invalid network format: blobs/commitments length mismatch","fields",t),(0,s.assertArgument)(e.length===o.length,"invalid network format: blobs/proofs length mismatch","fields",t),n=[];for(let r=0;r<t[1].length;r++)n.push({data:e[r],commitment:i[r],proof:o[r]});t=t[0]}(0,s.assertArgument)(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,"data",(0,s.hexlify)(e));const i={type:3,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),maxPriorityFeePerGas:E(t[2],"maxPriorityFeePerGas"),maxFeePerGas:E(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:E(t[4],"gasLimit"),to:m(t[5]),value:E(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList"),maxFeePerBlobGas:E(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};n&&(i.blobs=n),(0,s.assertArgument)(null!=i.to,`invalid address for transaction type: ${r}`,"data",e),(0,s.assertArgument)(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let t=0;t<i.blobVersionedHashes.length;t++)(0,s.assertArgument)((0,s.isHexString)(i.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,"data",e);return 11===t.length||_(i,t.slice(11)),i}(t));case 4:return k.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(10===t.length||13===t.length),"invalid field count for transaction type: 4","data",(0,s.hexlify)(e));const r={type:4,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),maxPriorityFeePerGas:E(t[2],"maxPriorityFeePerGas"),maxFeePerGas:E(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:E(t[4],"gasLimit"),to:m(t[5]),value:E(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList"),authorizationList:w(t[9],"authorizationList")};return 10===t.length||_(r,t.slice(10)),r}(t))}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new k;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=o.Signature.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.authorizationList&&(t.authorizationList=e.authorizationList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),(0,s.assertArgument)(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),(0,s.assertArgument)(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}t.Transaction=k},1415:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(8051),s=r(9724),a=r(7652),c=r(4885),u=r(7214),l=r(6404);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(u.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var c=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(c))):c),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},c=0;!e.closed&&c<f.length;c++)a(c);return function(){t=o=null}})):c.EMPTY}},1464:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(7977);t.exhaust=n.exhaustAll},1484:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function c(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function u(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r}function f(e,t){return l(e.toString(16).padStart(2*t,"0"))}function d(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=c,t.hexToNumber=u,t.hexToBytes=l,t.bytesToNumberBE=function(e){return u(a(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return u(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=f,t.numberToBytesLE=function(e,t){return f(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(c(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=d,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;const h=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=h(e),i=h(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),c=(e=h())=>{i=a(p([0]),e),n=a(),0!==e.length&&(i=a(p([1]),e),n=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return d(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(u()));)c();return s(),r}};const g={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=g[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},1485:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ECB=void 0;const n=r(6342);class i extends n.ModeOfOperation{constructor(e){super("ECB",e,i)}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.encrypt(e.subarray(r,r+16)),r);return t}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.decrypt(e.subarray(r,r+16)),r);return t}}t.ECB=i},1500:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.makeError=t.isCallException=t.isError=void 0;const n=r(2205),i=r(8166);function o(e,t){if(null==e)return"null";if(null==t&&(t=new Set),"object"==typeof e){if(t.has(e))return"[Circular]";t.add(e)}if(Array.isArray(e))return"[ "+e.map((e=>o(e,t))).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return o(e.toJSON(),t);switch(typeof e){case"boolean":case"number":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const r=Object.keys(e);return r.sort(),"{ "+r.map((r=>`${o(r,t)}: ${o(e[r],t)}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function s(e,t){return e&&e.code===t}function a(e,t,r){let s,a=e;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${o(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];i.push(e+"="+o(t))}}i.push(`code=${t}`),i.push(`version=${n.version}`),i.length&&(e+=" ("+i.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":s=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(e);break;default:s=new Error(e)}return(0,i.defineProperties)(s,{code:t}),r&&Object.assign(s,r),null==s.shortMessage&&(0,i.defineProperties)(s,{shortMessage:a}),s}function c(e,t,r,n){if(!e)throw a(t,r,n)}t.isError=s,t.isCallException=function(e){return s(e,"CALL_EXCEPTION")},t.makeError=a,t.assert=c,t.assertArgument=function(e,t,r,n){c(e,t,"INVALID_ARGUMENT",{argument:r,value:n})},t.assertArgumentCount=function(e,t,r){null==r&&(r=""),r&&(r=": "+r),c(e>=t,"missing argument"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),c(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})};const u=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);t.assertNormalize=function(e){c(u.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})},t.assertPrivate=function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),c(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},1587:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(6404),i=r(7058);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1608:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(2326),i=r(8877),o=r(5825);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},1650:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encryptKeystoreJson=t.encryptKeystoreJsonSync=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=void 0;const n=r(8165),i=r(646),o=r(2291),s=r(7778),a=r(5347),c=r(8634),u=r(2205),l="m/44'/60'/0'/0/0";function f(e,t){const r=(0,a.getBytes)(t),u=(0,c.spelunk)(e,"crypto.ciphertext:data!"),f=(0,a.hexlify)((0,o.keccak256)((0,a.concat)([r.slice(16,32),u]))).substring(2);(0,a.assertArgument)(f===(0,c.spelunk)(e,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const d=function(e,t,r){if("aes-128-ctr"===(0,c.spelunk)(e,"crypto.cipher:string")){const i=(0,c.spelunk)(e,"crypto.cipherparams.iv:data!"),o=new n.CTR(t,i);return(0,a.hexlify)(o.decrypt(r))}(0,a.assert)(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}(e,r.slice(0,16),u),h=(0,s.computeAddress)(d);if(e.address){let t=e.address.toLowerCase();t.startsWith("0x")||(t="0x"+t),(0,a.assertArgument)((0,i.getAddress)(t)===h,"keystore address/privateKey mismatch","address",e.address)}const p={address:h,privateKey:d};if("0.1"===(0,c.spelunk)(e,"x-ethers.version:string")){const t=r.slice(32,64),i=(0,c.spelunk)(e,"x-ethers.mnemonicCiphertext:data!"),o=(0,c.spelunk)(e,"x-ethers.mnemonicCounter:data!"),s=new n.CTR(t,o);p.mnemonic={path:(0,c.spelunk)(e,"x-ethers.path:string")||l,locale:(0,c.spelunk)(e,"x-ethers.locale:string")||"en",entropy:(0,a.hexlify)((0,a.getBytes)(s.decrypt(i)))}}return p}function d(e){const t=(0,c.spelunk)(e,"crypto.kdf:string");if(t&&"string"==typeof t){if("scrypt"===t.toLowerCase()){const r=(0,c.spelunk)(e,"crypto.kdfparams.salt:data!"),n=(0,c.spelunk)(e,"crypto.kdfparams.n:int!"),i=(0,c.spelunk)(e,"crypto.kdfparams.r:int!"),o=(0,c.spelunk)(e,"crypto.kdfparams.p:int!");(0,a.assertArgument)(n>0&&!(n&n-1),"invalid kdf.N","kdf.N",n),(0,a.assertArgument)(i>0&&o>0,"invalid kdf","kdf",t);const s=(0,c.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,a.assertArgument)(32===s,"invalid kdf.dklen","kdf.dflen",s),{name:"scrypt",salt:r,N:n,r:i,p:o,dkLen:64}}if("pbkdf2"===t.toLowerCase()){const t=(0,c.spelunk)(e,"crypto.kdfparams.salt:data!"),r=(0,c.spelunk)(e,"crypto.kdfparams.prf:string!"),n=r.split("-").pop();(0,a.assertArgument)("sha256"===n||"sha512"===n,"invalid kdf.pdf","kdf.pdf",r);const i=(0,c.spelunk)(e,"crypto.kdfparams.c:int!"),o=(0,c.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,a.assertArgument)(32===o,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:t,count:i,dkLen:o,algorithm:n}}}(0,a.assertArgument)(!1,"unsupported key-derivation function","kdf",t)}function h(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}function p(e){const t=null!=e.salt?(0,a.getBytes)(e.salt,"options.salt"):(0,o.randomBytes)(32);let r=1<<17,n=8,i=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),(0,a.assertArgument)("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),(0,a.assertArgument)("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),(0,a.assertArgument)("number"==typeof i&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:i}}function g(e,t,r,i){const s=(0,a.getBytes)(r.privateKey,"privateKey"),f=null!=i.iv?(0,a.getBytes)(i.iv,"options.iv"):(0,o.randomBytes)(16);(0,a.assertArgument)(16===f.length,"invalid options.iv length","options.iv",i.iv);const d=null!=i.uuid?(0,a.getBytes)(i.uuid,"options.uuid"):(0,o.randomBytes)(16);(0,a.assertArgument)(16===d.length,"invalid options.uuid length","options.uuid",i.iv);const h=e.slice(0,16),p=e.slice(16,32),g=new n.CTR(h,f),y=(0,a.getBytes)(g.encrypt(s)),b=(0,o.keccak256)((0,a.concat)([p,y])),m={address:r.address.substring(2).toLowerCase(),id:(0,a.uuidV4)(d),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,a.hexlify)(f).substring(2)},ciphertext:(0,a.hexlify)(y).substring(2),kdf:"scrypt",kdfparams:{salt:(0,a.hexlify)(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:b.substring(2)}};if(r.mnemonic){const t=null!=i.client?i.client:`ethers/${u.version}`,s=r.mnemonic.path||l,f=r.mnemonic.locale||"en",d=e.slice(32,64),h=(0,a.getBytes)(r.mnemonic.entropy,"account.mnemonic.entropy"),p=(0,o.randomBytes)(16),g=new n.CTR(d,p),y=(0,a.getBytes)(g.encrypt(h)),b=new Date,v="UTC--"+b.getUTCFullYear()+"-"+(0,c.zpad)(b.getUTCMonth()+1,2)+"-"+(0,c.zpad)(b.getUTCDate(),2)+"T"+(0,c.zpad)(b.getUTCHours(),2)+"-"+(0,c.zpad)(b.getUTCMinutes(),2)+"-"+(0,c.zpad)(b.getUTCSeconds(),2)+".0Z--"+m.address;m["x-ethers"]={client:t,gethFilename:v,path:s,locale:f,mnemonicCounter:(0,a.hexlify)(p).substring(2),mnemonicCiphertext:(0,a.hexlify)(y).substring(2),version:"0.1"}}return JSON.stringify(m)}t.isKeystoreJson=function(e){try{const t=JSON.parse(e);if(3===(null!=t.version?parseInt(t.version):0))return!0}catch(e){}return!1},t.decryptKeystoreJsonSync=function(e,t){const r=JSON.parse(e),n=(0,c.getPassword)(t),i=d(r);if("pbkdf2"===i.name){const{salt:e,count:t,dkLen:s,algorithm:a}=i;return f(r,(0,o.pbkdf2)(n,e,t,s,a))}(0,a.assert)("scrypt"===i.name,"cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:s,N:u,r:l,p:h,dkLen:p}=i;return f(r,(0,o.scryptSync)(n,s,u,l,h,p))},t.decryptKeystoreJson=async function(e,t,r){const n=JSON.parse(e),i=(0,c.getPassword)(t),s=d(n);if("pbkdf2"===s.name){r&&(r(0),await h(0));const{salt:e,count:t,dkLen:a,algorithm:c}=s,u=(0,o.pbkdf2)(i,e,t,a,c);return r&&(r(1),await h(0)),f(n,u)}(0,a.assert)("scrypt"===s.name,"cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:u,N:l,r:p,p:g,dkLen:y}=s;return f(n,await(0,o.scrypt)(i,u,l,p,g,y,r))},t.encryptKeystoreJsonSync=function(e,t,r){null==r&&(r={});const n=(0,c.getPassword)(t),i=p(r),s=(0,o.scryptSync)(n,i.salt,i.N,i.r,i.p,64);return g((0,a.getBytes)(s),i,e,r)},t.encryptKeystoreJson=async function(e,t,r){null==r&&(r={});const n=(0,c.getPassword)(t),i=p(r),s=await(0,o.scrypt)(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return g((0,a.getBytes)(s),i,e,r)}},1666:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(9879).Subscription);t.Action=o},1691:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsResolver=t.BasicMulticoinProviderPlugin=t.MulticoinProviderPlugin=void 0;const n=r(646),i=r(1295),o=r(9288),s=r(1181),a=r(5347);function c(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):(0,a.assertArgument)(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class u{name;constructor(e){(0,a.defineProperties)(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}t.MulticoinProviderPlugin=u,t.BasicMulticoinProviderPlugin=class extends u{constructor(){super("org.ethers.plugins.provider.BasicMulticoin")}};const l=new RegExp("^(ipfs)://(.*)$","i"),f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),l,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class d{provider;address;name;#R;#I;constructor(e,t,r){(0,a.defineProperties)(this,{provider:e,address:t,name:r}),this.#R=null,this.#I=new o.Contract(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#R&&(this.#R=(async()=>{try{return await this.#I.supportsInterface("0x9061b923")}catch(e){if((0,a.isError)(e,"CALL_EXCEPTION"))return!1;throw this.#R=null,e}})()),await this.#R}async#C(e,t){t=(t||[]).slice();const r=this.#I.interface;t.unshift((0,s.namehash)(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(e),(0,a.assert)(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[(0,s.dnsEncode)(this.name,255),r.encodeFunctionData(n,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{const i=await this.#I[e](...t);return n?r.decodeFunctionResult(n,i)[0]:i}catch(e){if(!(0,a.isError)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#C("addr(bytes32)");return null==e||e===i.ZeroAddress?null:e}catch(e){if((0,a.isError)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<2147483648){let t=e+2147483648;const r=await this.#C("addr(bytes32,uint)",[t]);if((0,a.isHexString)(r,20))return(0,n.getAddress)(r)}let t=null;for(const r of this.provider.plugins)if(r instanceof u&&r.supportsCoinType(e)){t=r;break}if(null==t)return null;const r=await this.#C("addr(bytes32,uint)",[e]);if(null==r||"0x"===r)return null;const o=await t.decodeAddress(e,r);if(null!=o)return o;(0,a.assert)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const t=await this.#C("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){const e=await this.#C("contenthash(bytes32)");if(null==e||"0x"===e)return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e="e3010170"===t[1]?"ipfs":"ipns",r=parseInt(t[4],16);if(t[5].length===2*r)return`${e}://${(0,a.encodeBase58)("0x"+t[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return`bzz://${r[1]}`;(0,a.assert)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(null==t)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let r=0;r<f.length;r++){const n=t.match(f[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":case"data":return e.push({type:"url",value:t}),{linkage:e,url:t};case"ipfs":{const r=c(t);return e.push({type:"ipfs",value:t}),e.push({type:"url",value:r}),{linkage:e,url:r}}case"erc721":case"erc1155":{const r="erc721"===i?"tokenURI(uint256)":"uri(uint256)";e.push({type:i,value:t});const s=await this.getAddress();if(null==s)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const u=(n[2]||"").split("/");if(2!==u.length)return e.push({type:`!${i}caip`,value:n[2]||""}),{url:null,linkage:e};const f=u[1],d=new o.Contract(u[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if("erc721"===i){const t=await d.ownerOf(f);if(s!==t)return e.push({type:"!owner",value:t}),{url:null,linkage:e};e.push({type:"owner",value:t})}else if("erc1155"===i){const t=await d.balanceOf(s,f);if(!t)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:t.toString()})}let h=await d[r](f);if(null==h||"0x"===h)return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:h}),"erc1155"===i&&(h=h.replace("{id}",(0,a.toBeHex)(f,32).substring(2)),e.push({type:"metadata-url-expanded",value:h})),h.match(/^ipfs:/i)&&(h=c(h)),e.push({type:"metadata-url",value:h});let p={};const g=await new a.FetchRequest(h).send();g.assertOk();try{p=g.bodyJson}catch(t){try{e.push({type:"!metadata",value:g.bodyText})}catch(t){const r=g.body;return r&&e.push({type:"!metadata",value:(0,a.hexlify)(r)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!p)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(p)});let y=p.image;if("string"!=typeof y)return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(y.match(/^(https:\/\/|data:)/i));else{if(null==y.match(l))return e.push({type:"!imageUrl-ipfs",value:y}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:y}),y=c(y)}return e.push({type:"url",value:y}),{linkage:e,url:y}}}}}catch(e){}return{linkage:e,url:null}}static async getEnsAddress(e){const t=await e.getNetwork(),r=t.getPlugin("org.ethers.plugins.network.Ens");return(0,a.assert)(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),r.address}static async#N(e,t){const r=await d.getEnsAddress(e);try{const n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],e),a=await n.resolver((0,s.namehash)(t),{enableCcipRead:!0});return a===i.ZeroAddress?null:a}catch(e){throw e}}static async fromName(e,t){let r=t;for(;;){if(""===r||"."===r)return null;if("eth"!==t&&"eth"===r)return null;const n=await d.#N(e,r);if(null!=n){const i=new d(e,n,t);return r===t||await i.supportsWildcard()?i:null}r=r.split(".").slice(1).join(".")}}}t.EnsResolver=d},1693:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;const n=r(8166),i=r(9976),o=r(8869),s=r(3178);class a extends o.Coder{coders;constructor(e,t){let r=!1;const i=[];e.forEach((e=>{e.dynamic&&(r=!0),i.push(e.type)})),super("tuple","tuple("+i.join(",")+")",t,r),(0,n.defineProperties)(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){const r=i.Typed.dereference(t,"tuple");return(0,s.pack)(e,this.coders,r)}decode(e){return(0,s.unpack)(e,this.coders)}}t.TupleCoder=a},1705:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(4967),i=r(1484),o=r(1484),s=r(2422),{bytesToNumberBE:a,hexToBytes:c}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?c(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:s}=t.DER._parseInt(n.subarray(2)),{d:a,l:u}=t.DER._parseInt(s);if(u.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}};const u=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"==typeof e&&u<e&&e<t.n}function p(e){if(!h(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:c}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=i.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let u;try{u="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(u=n.mod(u,c)),p(u),u}const y=new Map;function b(e){if(!(e instanceof m))throw new Error("ProjectivePoint expected")}class m{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof m)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?m.ZERO:new m(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}static fromHex(e){const t=m.fromAffine(c((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return m.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,y.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){b(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,d),{px:o,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(o,o),h=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),l=r.mul(o,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(i,p),u=r.add(c,u),c=r.sub(h,u),u=r.add(h,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(i,l),p=r.mul(e,p),g=r.sub(f,p),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,g),u=r.add(u,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,g),c=r.sub(c,f),l=r.mul(p,h),l=r.add(l,l),l=r.add(l,l),new m(c,u,l)}add(e){b(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let u=r.ZERO,l=r.ZERO,f=r.ZERO;const h=t.a,p=r.mul(t.b,d);let g=r.mul(n,s),y=r.mul(i,a),v=r.mul(o,c),w=r.add(n,i),A=r.add(s,a);w=r.mul(w,A),A=r.add(g,y),w=r.sub(w,A),A=r.add(n,o);let E=r.add(s,c);return A=r.mul(A,E),E=r.add(g,v),A=r.sub(A,E),E=r.add(i,o),u=r.add(a,c),E=r.mul(E,u),u=r.add(y,v),E=r.sub(E,u),f=r.mul(h,A),u=r.mul(p,v),f=r.add(u,f),u=r.sub(y,f),f=r.add(y,f),l=r.mul(u,f),y=r.add(g,g),y=r.add(y,g),v=r.mul(h,v),A=r.mul(p,A),y=r.add(y,v),v=r.sub(g,v),v=r.mul(h,v),A=r.add(A,v),g=r.mul(y,A),l=r.add(l,g),g=r.mul(E,A),u=r.mul(w,u),u=r.sub(u,g),g=r.mul(w,y),f=r.mul(E,f),f=r.add(f,g),new m(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(m.ZERO)}wNAF(e){return w.wNAFCached(this,y,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}))}multiplyUnsafe(e){const n=m.ZERO;if(e===u)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:c}=i.splitScalar(e),f=n,d=n,h=this;for(;s>u||c>u;)s&l&&(f=f.add(h)),c&l&&(d=d.add(h)),h=h.double(),s>>=l,c>>=l;return o&&(f=f.negate()),a&&(d=d.negate()),d=new m(r.mul(d.px,i.beta),d.py,d.pz),f.add(d)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(o);let{p:u,f:l}=this.wNAF(t),{p:f,f:d}=this.wNAF(c);u=w.constTimeNegate(e,u),f=w.constTimeNegate(a,f),f=new m(r.mul(f.px,s.beta),f.py,f.pz),n=u.add(f),i=l.add(d)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return m.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=m.BASE,i=(e,t)=>t!==u&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(m,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(m,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}m.BASE=new m(t.Gx,t.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(m,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:f,isWithinCurveOrder:h}}function g(e,t){const r=e.ORDER;let n=u;for(let e=r-l;e%f===u;e/=f)n+=l;const i=n,o=f<<i-l-l,s=o*f,a=(r-l)/s,c=(a-l)/f,p=s-l,g=o,y=e.pow(t,a),b=e.pow(t,(a+l)/f);let m=(t,r)=>{let n=y,o=e.pow(r,p),s=e.sqr(o);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,r),s=e.mul(a,t);let u=e.mul(s,o);a=e.pow(u,g);let d=e.eql(a,e.ONE);o=e.mul(s,b),a=e.mul(u,n),s=e.cmov(o,s,d),u=e.cmov(a,u,d);for(let t=i;t>l;t--){let r=t-f;r=f<<r-l;let i=e.pow(u,r);const a=e.eql(i,e.ONE);o=e.mul(s,n),n=e.mul(n,n),i=e.mul(u,n),s=e.cmov(o,s,a),u=e.cmov(i,u,a)}return{isValid:d,value:s}};if(e.ORDER%h===d){const r=(e.ORDER-d)/h,n=e.sqrt(e.neg(t));m=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const c=e.mul(a,n),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return m}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=r,f=a.BYTES+1,d=2*a.BYTES+1;function h(e){return n.mod(e,c)}function g(e){return n.invert(e,c)}const{ProjectivePoint:y,normPrivateKeyToScalar:b,weierstrassEquation:m,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===d&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${d} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(u<(o=e)&&o<a.ORDER))throw new Error("Point is not on curve");const t=m(e);let s=a.sqrt(t);return!(1&~r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var o}}),w=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function A(e){return e>c>>l}const E=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class P{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new P(E(e,0,t),E(e,t,2*t))}static fromDER(e){const{r:r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new P(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new P(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,s=k((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const c=2===i||3===i?t+r.n:t;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=1&i?"03":"02",l=y.fromHex(u+w(c)),f=g(c),d=h(-s*f),p=h(n*f),b=y.BASE.multiplyAndAddUnsafe(l,d,p);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new P(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const O={isValidPrivateKey(e){try{return b(e),!0}catch(e){return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute(e=8,t=y.BASE){return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function S(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===d:r?n===2*f||n===2*d:e instanceof y}const _=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},k=r.bits2int_modN||function(e){return h(_(e))},T=i.bitMask(r.nBitLength);function x(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(u<=e&&e<T))throw new Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}const R={lowS:r.lowS,prehash:!1},I={lowS:r.lowS,prehash:!1};return y.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return y.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(S(e))throw new Error("first arg must be private key");if(!S(t))throw new Error("second arg must be public key");return y.fromHex(t).multiply(b(e)).toRawBytes(r)},sign:function(e,t,n=R){const{seed:s,k2sig:c}=function(e,t,n=R){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:c}=r;let{lowS:f,prehash:d,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),d&&(e=(0,o.ensureBytes)("prehashed msgHash",s(e)));const m=k(e),w=b(t),E=[x(w),x(m)];if(null!=p){const e=!0===p?c(a.BYTES):p;E.push((0,o.ensureBytes)("extraEntropy",e))}const O=i.concatBytes(...E),S=m;return{seed:O,k2sig:function(e){const t=_(e);if(!v(t))return;const r=g(t),n=y.BASE.multiply(t).toAffine(),i=h(n.x);if(i===u)return;const o=h(r*h(S+i*w));if(o===u)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return f&&A(o)&&(a=function(e){return A(e)?h(-e):e}(o),s^=1),new P(i,a,s)}}}(e,t,n),f=r;return i.createHmacDrbg(f.hash.outputLen,f.nByteLength,f.hmac)(s,c)},verify:function(e,n,i,s=I){const a=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:u}=s;let l,f;try{if("string"==typeof a||a instanceof Uint8Array)try{l=P.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=P.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new P(e,t)}}f=y.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&l.hasHighS())return!1;u&&(n=r.hash(n));const{r:d,s:p}=l,b=k(n),m=g(p),v=h(b*m),w=h(d*m),A=y.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!A&&h(A.x)===d},ProjectivePoint:y,Signature:P,utils:O}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,c,u,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),o=e.add(o,c),o=e.mul(o,s),u=e.mul(u,a),c=e.mul(u,t.B),o=e.add(o,c),l=e.mul(i,s);const{isValid:d,value:h}=r(o,u);f=e.mul(i,n),f=e.mul(f,h),l=e.cmov(l,s,d),f=e.cmov(f,h,d);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},1713:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(2326),i=r(5345),o=r(5212),s=r(9724),a=r(9619),c=r(7214),u=r(8619);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,d=r.with,h=void 0===d?l:d,p=r.scheduler,g=void 0===p?null!=t?t:n.asyncScheduler:p,y=r.meta,b=void 0===y?null:y;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=u.executeSchedule(t,g,(function(){try{r.unsubscribe(),s.innerFrom(h({meta:b,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(c.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-g.now():f)}))}},1719:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=r(9879),o=r(5212),s=r(7214),a=r(4830),c=r(2326),u=r(6404),l=r(8619);t.bufferTime=function(e){for(var t,r,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var h=null!==(t=u.popScheduler(f))&&void 0!==t?t:c.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,g=f[1]||1/0;return o.operate((function(t,r){var o=[],c=!1,u=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),c&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,h,(function(){return u(n)}),e)}};null!==p&&p>=0?l.executeSchedule(r,h,f,p,!0):c=!0,f();var d=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.buffer;l.push(e),g<=l.length&&u(c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==d||d.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(d)}))}},1731:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnEventType=void 0,function(e){e.DEVICE_REGISTERED="deviceRegistered",e.DEVICE_REMOVED="deviceRemoved",e.AUTHENTICATION_SUCCESS="authenticationSuccess",e.AUTHENTICATION_FAILED="authenticationFailed",e.ERROR="error"}(r||(t.WebAuthnEventType=r={}))},1752:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=t.UndecodedEventLog=t.EventLog=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=t.MessagePrefix=t.EtherSymbol=t.ZeroHash=t.N=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.ZeroAddress=t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=t.Typed=t.TransactionDescription=t.Result=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.FallbackFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.AbiCoder=t.encodeBytes32String=t.decodeBytes32String=t.version=void 0,t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanProvider=t.CloudflareProvider=t.ChainstackProvider=t.BlockscoutProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.AbstractProvider=t.VoidSigner=t.NonceManager=t.AbstractSigner=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.getDefaultProvider=t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.verifyAuthorization=t.hashAuthorization=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.SigningKey=t.Signature=t.lock=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=void 0,t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.isError=t.isCallException=t.makeError=t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.resolveProperties=t.defineProperties=t.zeroPadValue=t.zeroPadBytes=t.stripZerosLeft=t.isBytesLike=t.isHexString=t.hexlify=t.getBytesCopy=t.getBytes=t.dataSlice=t.dataLength=t.concat=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=t.Transaction=t.recoverAddress=t.computeAddress=t.authorizationify=t.accessListify=t.showThrottleMessage=t.copyRequest=t.UnmanagedSubscriber=t.SocketSubscriber=t.SocketPendingSubscriber=t.SocketEventSubscriber=t.SocketBlockSubscriber=t.MulticoinProviderPlugin=t.NetworkPlugin=t.GasCostPlugin=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EtherscanPlugin=t.EnsPlugin=t.Network=t.EnsResolver=void 0,t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.decryptCrowdsaleJson=t.isKeystoreJson=t.isCrowdsaleJson=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.Wallet=t.HDNodeVoidWallet=t.HDNodeWallet=t.BaseWallet=t.Mnemonic=t.uuidV4=t.encodeRlp=t.decodeRlp=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.mask=t.toTwos=t.fromTwos=t.toQuantity=t.toNumber=t.toBeHex=t.toBigInt=t.toBeArray=t.getUint=t.getNumber=t.getBigInt=t.FixedNumber=void 0;var n=r(2205);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}});var i=r(8456);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return i.FallbackFragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return i.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return i.StructFragment}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return i.ErrorDescription}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return i.Result}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}}),Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return i.Typed}});var o=r(646);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return o.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return o.getIcapAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return o.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return o.getCreate2Address}}),Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}});var s=r(1295);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return s.ZeroAddress}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return s.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return s.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return s.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return s.MaxInt256}}),Object.defineProperty(t,"N",{enumerable:!0,get:function(){return s.N}}),Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return s.ZeroHash}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}});var a=r(9288);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return a.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return a.Contract}}),Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return a.ContractFactory}}),Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return a.ContractEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return a.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return a.ContractTransactionResponse}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return a.ContractUnknownEventPayload}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return a.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return a.UndecodedEventLog}});var c=r(2291);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return c.computeHmac}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return c.randomBytes}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return c.keccak256}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return c.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}}),Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return c.pbkdf2}}),Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return c.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return c.scryptSync}}),Object.defineProperty(t,"lock",{enumerable:!0,get:function(){return c.lock}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return c.Signature}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return c.SigningKey}});var u=r(1181);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return u.id}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return u.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return u.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return u.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return u.dnsEncode}}),Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return u.hashAuthorization}}),Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return u.verifyAuthorization}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return u.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return u.verifyMessage}}),Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return u.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return u.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return u.solidityPackedSha256}}),Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return u.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return u.verifyTypedData}});var l=r(3996);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return l.getDefaultProvider}}),Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return l.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return l.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return l.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return l.TransactionResponse}}),Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return l.AbstractSigner}}),Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return l.NonceManager}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return l.VoidSigner}}),Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return l.AbstractProvider}}),Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return l.FallbackProvider}}),Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return l.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return l.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return l.JsonRpcSigner}}),Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return l.BrowserProvider}}),Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return l.AlchemyProvider}}),Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return l.AnkrProvider}}),Object.defineProperty(t,"BlockscoutProvider",{enumerable:!0,get:function(){return l.BlockscoutProvider}}),Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return l.ChainstackProvider}}),Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return l.CloudflareProvider}}),Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return l.EtherscanProvider}}),Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return l.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return l.InfuraWebSocketProvider}}),Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return l.PocketProvider}}),Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return l.QuickNodeProvider}}),Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return l.IpcSocketProvider}}),Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return l.SocketProvider}}),Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return l.WebSocketProvider}}),Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return l.EnsResolver}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return l.Network}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return l.EtherscanPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return l.MulticoinProviderPlugin}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return l.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return l.SocketEventSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return l.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return l.SocketSubscriber}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return l.UnmanagedSubscriber}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return l.copyRequest}}),Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return l.showThrottleMessage}});var f=r(7778);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return f.accessListify}}),Object.defineProperty(t,"authorizationify",{enumerable:!0,get:function(){return f.authorizationify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return f.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return f.recoverAddress}}),Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return f.Transaction}});var d=r(5347);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return d.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return d.encodeBase58}}),Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return d.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return d.encodeBase64}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return d.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return d.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return d.dataSlice}}),Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return d.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return d.getBytesCopy}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return d.hexlify}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return d.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return d.isBytesLike}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return d.stripZerosLeft}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return d.zeroPadBytes}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return d.zeroPadValue}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return d.defineProperties}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return d.resolveProperties}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return d.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return d.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return d.assertArgumentCount}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return d.assertNormalize}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return d.assertPrivate}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return d.makeError}}),Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return d.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return d.isError}}),Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return d.EventPayload}}),Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return d.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return d.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return d.FetchCancelSignal}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return d.FixedNumber}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return d.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return d.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return d.getUint}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return d.toBeArray}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return d.toBigInt}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return d.toBeHex}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return d.toNumber}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return d.toQuantity}}),Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return d.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return d.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return d.mask}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return d.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return d.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return d.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return d.parseUnits}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return d.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return d.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return d.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return d.Utf8ErrorFuncs}}),Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}}),Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return d.encodeRlp}}),Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return d.uuidV4}});var h=r(3279);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return h.Mnemonic}}),Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return h.BaseWallet}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return h.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return h.HDNodeVoidWallet}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return h.Wallet}}),Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return h.getIndexedAccountPath}}),Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return h.isCrowdsaleJson}}),Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return h.isKeystoreJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return h.decryptCrowdsaleJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return h.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return h.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.encryptKeystoreJsonSync}});var p=r(6591);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return p.LangEn}}),Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return p.WordlistOwl}}),Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return p.WordlistOwlA}}),Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return p.wordlists}})},1761:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(4967),i=r(1484),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function c(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function u(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){c(e),c(t),u(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const d=(0,i.concatBytes)(t,s(t.length,1)),h=s(0,l),p=s(r,2),g=new Array(f),y=n((0,i.concatBytes)(h,e,p,s(0,1),d));g[0]=n((0,i.concatBytes)(y,s(1,1),d));for(let e=1;e<=f;e++){const t=[a(y,g[e-1]),s(e+1,1),d];g[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,r)}function f(e,t,r,n,o){if(c(e),c(t),u(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function d(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:d,hash:h,expand:p,DST:g}=r;c(e),u(t);const y=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),b=s.toString(2).length,m=Math.ceil((b+a)/8),v=t*d*m;let w;if("xmd"===p)w=l(e,y,v,h);else if("xof"===p)w=f(e,y,v,a,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const A=new Array(t);for(let e=0;e<t;e++){const t=new Array(d);for(let r=0;r<d;r++){const i=m*(r+e*d),a=w.subarray(i,i+m);t[r]=(0,n.mod)(o(a),s)}A[e]=t}return A}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=d,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=d(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,i){const o=d(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s}}}},1762:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(2326),i=r(5212),o=r(7214);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,c=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function u(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);c()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(u,e),n.add(i))}),(function(){c(),n.complete()}),void 0,(function(){s=i=null})))}))}},1778:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=r(9879),o=r(5212),s=r(9724),a=r(7214),c=r(5717),u=r(4830);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){u.arrRemove(l,r),o.next(r),n.unsubscribe()}),c.noop)))}),c.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1875:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(8051),i=r(2931),o=r(5726);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},1891:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=void 0;const n=r(2291),i=r(5347),o=r(7262);t.getCreateAddress=function(e){const t=(0,o.getAddress)(e.from);let r=(0,i.getBigInt)(e.nonce,"tx.nonce").toString(16);return r="0"===r?"0x":r.length%2?"0x0"+r:"0x"+r,(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.encodeRlp)([t,r])),12))},t.getCreate2Address=function(e,t,r){const s=(0,o.getAddress)(e),a=(0,i.getBytes)(t,"salt"),c=(0,i.getBytes)(r,"initCodeHash");return(0,i.assertArgument)(32===a.length,"salt must be 32 bytes","salt",t),(0,i.assertArgument)(32===c.length,"initCodeHash must be 32 bytes","initCodeHash",r),(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.concat)(["0xff",s,a,c])),12))}},1898:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(7699);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},1903:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(8051),i=r(7652),o=r(7214),s=r(5717),a=r(9724);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.argsOrArgArray(e);return new n.Observable((function(e){var t=0,n=function(){if(t<r.length){var i=void 0;try{i=a.innerFrom(r[t++])}catch(e){return void n()}var c=new o.OperatorSubscriber(e,void 0,s.noop,s.noop);i.subscribe(c),c.add(n)}else e.complete()};n()}))}},1934:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(8051),i=r(5717);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},1946:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(7474);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1949:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBase64=t.decodeBase64=void 0;const n=r(7415);t.decodeBase64=function(e){e=atob(e);const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return(0,n.getBytes)(t)},t.encodeBase64=function(e){const t=(0,n.getBytes)(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}},1983:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(4772).AsyncAction);t.QueueAction=o},1993:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;const n=r(2291),i=r(5347);t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))}},2036:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(9533).AsyncScheduler);t.QueueScheduler=o},2044:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(4948);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},2052:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},2070:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(8531),i=r(5212);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2071:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(8619),i=r(5212),o=r(7214);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},2077:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GunRxJS=void 0;const n=r(9364),i=r(2794);t.GunRxJS=class{gun;user;constructor(e){this.gun=e,this.user=e.user().recall({sessionStorage:!0})}getUser(){return this.user}getUserPub(){return this.user.is?.pub}observe(e){return new n.Observable((t=>{const r="string"==typeof e?this.gun.get(e):e,n=r.on(((e,r)=>{if(null!=e)if("object"==typeof e&&null!==e){const r=this.removeGunMeta(e);t.next(r)}else t.next(e);else t.next(null)}));return()=>{n&&"function"==typeof n&&n(),r.off()}})).pipe((0,i.distinctUntilChanged)(((e,t)=>JSON.stringify(e)===JSON.stringify(t))))}match(e,t){return new n.Observable((r=>{const n="string"==typeof e?this.gun.get(e):e,i={},o=n.map().on(((e,n)=>{if("_"===n||!e)return;if(t&&!t(e))return void(i[n]&&(delete i[n],r.next(Object.values(i))));const o="object"==typeof e?this.removeGunMeta(e):e;i[n]=o,r.next(Object.values(i))}));return()=>{o&&"function"==typeof o&&o(),n.off()}}))}put(e,t){const r="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{r.put(t,(r=>{r.err?e.error(new Error(r.err)):(e.next(t),e.complete())}))}))}set(e,t){const r="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{r.set(t,(r=>{r.err?e.error(new Error(r.err)):(e.next(t),e.complete())}))}))}once(e){const t="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{t.once((t=>{if(null==t)return e.next(null),void e.complete();const r="object"==typeof t?this.removeGunMeta(t):t;e.next(r),e.complete()}))}))}compute(e,t){const r=e.map((e=>"string"==typeof e?this.observe(e):e));return new n.Observable((n=>{let i=new Array(e.length).fill(void 0),o=new Array(e.length).fill(!1);const s=r.map(((e,r)=>e.subscribe({next:e=>{if(i[r]=e,i.every((e=>void 0!==e)))try{const e=t(...i);n.next(e)}catch(e){n.error(e)}},error:e=>n.error(e),complete:()=>{o[r]=!0,o.every((e=>e))&&n.complete()}})));return()=>{s.forEach((e=>e.unsubscribe()))}}))}userPut(e,t){return new n.Observable((r=>{this.gun.user().get(e).put(t,(e=>{e.err?r.error(new Error(e.err)):(r.next(t),r.complete())}))}))}userGet(e){return this.observe(this.gun.user().get(e))}observeUser(e){return this.observe(this.gun.user().get(e))}removeGunMeta(e){if(!e||"object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((r=>{if("_"===r||"#"===r)return;const n=e[r];t[r]=n&&"object"==typeof n?this.removeGunMeta(n):n})),t}}},2105:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(432),i=r(3952);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},2139:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9724),i=r(6808),o=r(5212),s=r(7214);t.repeatWhen=function(e){return o.operate((function(t,r){var o,a,c=!1,u=!1,l=!1,f=function(){return l&&u&&(r.complete(),!0)},d=function(){l=!1,o=t.subscribe(s.createOperatorSubscriber(r,void 0,(function(){l=!0,!f()&&(a||(a=new i.Subject,n.innerFrom(e(a)).subscribe(s.createOperatorSubscriber(r,(function(){o?d():c=!0}),(function(){u=!0,f()})))),a).next()}))),c&&(o.unsubscribe(),o=null,c=!1,d())};d()}))}},2187:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(4891),i=r(281);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},2205:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="6.14.3"},2271:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloudflareProvider=void 0;const n=r(5347),i=r(5317),o=r(2371);class s extends o.JsonRpcProvider{constructor(e){null==e&&(e="mainnet");const t=i.Network.from(e);(0,n.assertArgument)("mainnet"===t.name,"unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}t.CloudflareProvider=s},2275:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(2326),i=r(5825);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},2291:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lock=t.Signature=t.SigningKey=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=void 0;const n=r(3192);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return n.computeHmac}});const i=r(3905);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return i.keccak256}});const o=r(7307);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return o.ripemd160}});const s=r(2862);Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return s.pbkdf2}});const a=r(8964);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return a.randomBytes}});const c=r(5456);Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return c.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return c.scryptSync}});const u=r(5059);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return u.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return u.sha512}});var l=r(4534);Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return l.SigningKey}});var f=r(7005);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return f.Signature}}),t.lock=function(){n.computeHmac.lock(),i.keccak256.lock(),s.pbkdf2.lock(),a.randomBytes.lock(),o.ripemd160.lock(),c.scrypt.lock(),c.scryptSync.lock(),u.sha256.lock(),u.sha512.lock(),a.randomBytes.lock()}},2318:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}t.fromBig=i,t.split=o;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const d=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=d;const h=(e,t)=>t;t.rotr32H=h;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=y;const b=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=b;const m=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=m,t.add=v;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const A=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=A;const E=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=E;const P=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=P;const O=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=O;const S=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=S;const _={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:d,rotr32H:h,rotr32L:p,rotlSH:g,rotlSL:y,rotlBH:b,rotlBL:m,add:v,add3L:w,add3H:A,add4L:E,add4H:P,add5H:S,add5L:O};t.default=_},2326:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(4772),i=r(9533);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},2347:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultProvider=void 0;const n=r(5347),i=r(6806),o=r(7841),s=r(8907),a=r(2271),c=r(5047),u=r(5855),l=r(8817),f=r(9902),d=r(2371),h=r(5317),p=r(873),g="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");t.getDefaultProvider=function(e,t){null==t&&(t={});const r=e=>"-"!==t[e]&&("string"==typeof t.exclusive?e===t.exclusive:!Array.isArray(t.exclusive)||-1!==t.exclusive.indexOf(e));if("string"==typeof e&&e.match(/^https?:/))return new d.JsonRpcProvider(e);if("string"==typeof e&&e.match(/^wss?:/)||(y=e)&&"function"==typeof y.send&&"function"==typeof y.close)return new p.WebSocketProvider(e);var y;let b=null;try{b=h.Network.from(e)}catch(e){}const m=[];if(r("publicPolygon")&&b&&("matic"===b.name?m.push(new d.JsonRpcProvider("https://polygon-rpc.com/",b,{staticNetwork:b})):"matic-amoy"===b.name&&m.push(new d.JsonRpcProvider("https://rpc-amoy.polygon.technology/",b,{staticNetwork:b}))),r("alchemy"))try{m.push(new o.AlchemyProvider(e,t.alchemy))}catch(e){}if(r("ankr")&&null!=t.ankr)try{m.push(new i.AnkrProvider(e,t.ankr))}catch(e){}if(r("chainstack"))try{m.push(new s.ChainstackProvider(e,t.chainstack))}catch(e){}if(r("cloudflare"))try{m.push(new a.CloudflareProvider(e))}catch(e){}if(r("etherscan"))try{m.push(new c.EtherscanProvider(e,t.etherscan))}catch(e){}if(r("infura"))try{let r,n=t.infura;"object"==typeof n&&(r=n.projectSecret,n=n.projectId),m.push(new u.InfuraProvider(e,n,r))}catch(e){}if(r("quicknode"))try{let r=t.quicknode;m.push(new l.QuickNodeProvider(e,r))}catch(e){}if((0,n.assert)(m.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),1===m.length)return m[0];let v=Math.floor(m.length/2);return v>2&&(v=2),b&&-1!==g.indexOf(b.name)&&(v=1),t&&t.quorum&&(v=t.quorum),new f.FallbackProvider(m,void 0,{quorum:v})}},2348:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesCoder=t.DynamicBytesCoder=void 0;const n=r(5347),i=r(8869);class o extends i.Coder{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,n.getBytesCopy)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}t.DynamicBytesCoder=o,t.BytesCoder=class extends o{constructor(e){super("bytes",e)}decode(e){return(0,n.hexlify)(super.decode(e))}}},2359:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(7699),i=r(5212),o=r(7214);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},2371:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcProvider=t.JsonRpcApiPollingProvider=t.JsonRpcApiProvider=t.JsonRpcSigner=void 0;const n=r(8456),i=r(646),o=r(1181),s=r(7778),a=r(5347),c=r(8672),u=r(3071),l=r(5317),f=r(7966),d=r(4338),h="bigint,boolean,function,number,string,symbol".split(/,/g);function p(e){if(null==e||h.indexOf(typeof e)>=0)return e;if("function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(p);if("object"==typeof e)return Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function g(e){return new Promise((t=>{setTimeout(t,e)}))}function y(e){return e?e.toLowerCase():e}function b(e){return e&&"number"==typeof e.pollingInterval}const m={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class v extends u.AbstractSigner{address;constructor(e,t){super(e),t=(0,i.getAddress)(t),(0,a.defineProperties)(this,{address:t})}connect(e){(0,a.assert)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const t=p(e),r=[];if(t.from){const n=t.from;r.push((async()=>{const r=await(0,i.resolveAddress)(n,this.provider);(0,a.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r})())}else t.from=this.address;if(null==t.gasLimit&&r.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){const e=t.to;r.push((async()=>{t.to=await(0,i.resolveAddress)(e,this.provider)})())}r.length&&await Promise.all(r);const n=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[n])}async sendTransaction(e){const t=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(e);return await new Promise(((e,n)=>{const i=[1e3,100];let o=0;const s=async()=>{try{const n=await this.provider.getTransaction(r);if(null!=n)return void e(n.replaceableTransaction(t))}catch(e){if((0,a.isError)(e,"CANCELLED")||(0,a.isError)(e,"BAD_DATA")||(0,a.isError)(e,"NETWORK_ERROR")||(0,a.isError)(e,"UNSUPPORTED_OPERATION"))return null==e.info&&(e.info={}),e.info.sendTransactionHash=r,void n(e);if((0,a.isError)(e,"INVALID_ARGUMENT")&&(o++,null==e.info&&(e.info={}),e.info.sendTransactionHash=r,o>10))return void n(e);this.provider.emit("error",(0,a.makeError)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout((()=>{s()}),i.pop()||4e3)};s()}))}async signTransaction(e){const t=p(e);if(t.from){const r=await(0,i.resolveAddress)(t.from,this.provider);(0,a.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r}else t.from=this.address;const r=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[r])}async signMessage(e){const t="string"==typeof e?(0,a.toUtf8Bytes)(e):e;return await this.provider.send("personal_sign",[(0,a.hexlify)(t),this.address.toLowerCase()])}async signTypedData(e,t,r){const n=p(r),s=await o.TypedDataEncoder.resolveNames(e,t,n,(async e=>{const t=await(0,i.resolveAddress)(e);return(0,a.assertArgument)(null!=t,"TypedData does not support null address","value",e),t}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(o.TypedDataEncoder.getPayload(s.domain,t,s.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const t="string"==typeof e?(0,a.toUtf8Bytes)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,a.hexlify)(t)])}}t.JsonRpcSigner=v;class w extends c.AbstractProvider{#j;#B;#M;#F;#L;#U;#D;#G(){if(this.#F)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#F=setTimeout((()=>{this.#F=null;const e=this.#M;for(this.#M=[];e.length;){const t=[e.shift()];for(;e.length&&t.length!==this.#j.batchMaxCount;)if(t.push(e.shift()),JSON.stringify(t.map((e=>e.payload))).length>this.#j.batchMaxSize){e.unshift(t.pop());break}(async()=>{const e=1===t.length?t[0].payload:t.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const r=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:r});for(const{resolve:e,reject:n,payload:i}of t){if(this.destroyed){n((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}const t=r.filter((e=>e.id===i.id))[0];if(null!=t)"error"in t?n(this.getRpcError(i,t)):e(t.result);else{const e=(0,a.makeError)("missing response for request","BAD_DATA",{value:r,info:{payload:i}});this.emit("error",e),n(e)}}}catch(e){this.emit("debug",{action:"receiveRpcError",error:e});for(const{reject:r}of t)r(e)}})()}}),e)}constructor(e,t){super(e,t),this.#B=1,this.#j=Object.assign({},m,t||{}),this.#M=[],this.#F=null,this.#U=null,this.#D=null;{let e=null;const t=new Promise((t=>{e=t}));this.#L={promise:t,resolve:e}}const r=this._getOption("staticNetwork");"boolean"==typeof r?((0,a.assertArgument)(!r||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),r&&null!=e&&(this.#U=l.Network.from(e))):r&&((0,a.assertArgument)(null==e||r.matches(e),"staticNetwork MUST match network object","options",t),this.#U=r)}_getOption(e){return this.#j[e]}get _network(){return(0,a.assert)(this.#U,"network is not available yet","NETWORK_ERROR"),this.#U}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&(0,a.getBigInt)(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=await this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}const t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#U)return this.#U}return this.#D?await this.#D:this.ready?(this.#D=(async()=>{try{const e=l.Network.from((0,a.getBigInt)(await this.send("eth_chainId",[])));return this.#D=null,e}catch(e){throw this.#D=null,e}})(),await this.#D):(this.#D=(async()=>{const e={id:this.#B++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let t;this.emit("debug",{action:"sendRpcPayload",payload:e});try{t=(await this._send(e))[0],this.#D=null}catch(e){throw this.#D=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:t}),"result"in t)return l.Network.from((0,a.getBigInt)(t.result));throw this.getRpcError(e,t)})(),await this.#D)}_start(){null!=this.#L&&null!=this.#L.resolve&&(this.#L.resolve(),this.#L=null,(async()=>{for(;null==this.#U&&!this.destroyed;)try{this.#U=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,a.makeError)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await g(1e3)}this.#G()})())}async _waitUntilReady(){if(null!=this.#L)return await this.#L.promise}_getSubscriber(e){return"pending"===e.type?new f.FilterIdPendingSubscriber(this):"event"===e.type?this._getOption("polling")?new d.PollingEventSubscriber(this,e.filter):new f.FilterIdEventSubscriber(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new c.UnmanagedSubscriber("orphan"):super._getSubscriber(e)}get ready(){return null==this.#L}getRpcTransaction(e){const t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((r=>{if(null==e[r])return;let n=r;"gasLimit"===r&&(n="gas"),t[n]=(0,a.toQuantity)((0,a.getBigInt)(e[r],`tx.${r}`))})),["from","to","data"].forEach((r=>{null!=e[r]&&(t[r]=(0,a.hexlify)(e[r]))})),e.accessList&&(t.accessList=(0,s.accessListify)(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),e.authorizationList&&(t.authorizationList=e.authorizationList.map((e=>{const t=(0,s.authorizationify)(e);return{address:t.address,nonce:(0,a.toQuantity)(t.nonce),chainId:(0,a.toQuantity)(t.chainId),yParity:(0,a.toQuantity)(t.signature.yParity),r:(0,a.toQuantity)(t.signature.r),s:(0,a.toQuantity)(t.signature.s)}}))),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[y(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[y(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[y(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[y(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(y):e.filter.address=y(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){const{method:r}=e,{error:i}=t;if("eth_estimateGas"===r&&i.message){const t=i.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return(0,a.makeError)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}});if(t.match(/nonce/i)&&t.match(/too low/i))return(0,a.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:e.params[0],info:{payload:e,error:i}})}if("eth_call"===r||"eth_estimateGas"===r){const t=E(i),o=n.AbiCoder.getBuiltinCallException("eth_call"===r?"call":"estimateGas",e.params[0],t?t.data:null);return o.info={error:i,payload:e},o}const o=JSON.stringify(function(e){const t=[];return P(e,t),t}(i));if("string"==typeof i.message&&i.message.match(/user denied|ethers-user-denied/i)){const t={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,a.makeError)("user rejected action","ACTION_REJECTED",{action:t[r]||"unknown",reason:"rejected",info:{payload:e,error:i}})}if("eth_sendRawTransaction"===r||"eth_sendTransaction"===r){const t=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return(0,a.makeError)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return(0,a.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return(0,a.makeError)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:i}});if(o.match(/only replay-protected/i))return(0,a.makeError)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:t,info:{error:i}}})}let s=!!o.match(/the method .* does not exist/i);return s||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(s=!0),s?(0,a.makeError)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):(0,a.makeError)("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,t){if(this.destroyed)return Promise.reject((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const r=this.#B++,n=new Promise(((n,i)=>{this.#M.push({resolve:n,reject:i,payload:{method:e,params:t,id:r,jsonrpc:"2.0"}})}));return this.#G(),n}async getSigner(e){null==e&&(e=0);const t=this.send("eth_accounts",[]);if("number"==typeof e){const r=await t;if(e>=r.length)throw new Error("no such account");return new v(this,r[e])}const{accounts:r}=await(0,a.resolveProperties)({network:this.getNetwork(),accounts:t});e=(0,i.getAddress)(e);for(const t of r)if((0,i.getAddress)(t)===e)return new v(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new v(this,e)))}destroy(){this.#F&&(clearTimeout(this.#F),this.#F=null);for(const{payload:e,reject:t}of this.#M)t((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#M=[],super.destroy()}}t.JsonRpcApiProvider=w;class A extends w{#H;constructor(e,t){super(e,t);let r=this._getOption("pollingInterval");null==r&&(r=m.pollingInterval),this.#H=r}_getSubscriber(e){const t=super._getSubscriber(e);return b(t)&&(t.pollingInterval=this.#H),t}get pollingInterval(){return this.#H}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#H=e,this._forEachSubscriber((e=>{b(e)&&(e.pollingInterval=this.#H)}))}}function E(e){if(null==e)return null;if("string"==typeof e.message&&e.message.match(/revert/i)&&(0,a.isHexString)(e.data))return{message:e.message,data:e.data};if("object"==typeof e){for(const t in e){const r=E(e[t]);if(r)return r}return null}if("string"==typeof e)try{return E(JSON.parse(e))}catch(e){}return null}function P(e,t){if(null!=e){if("string"==typeof e.message&&t.push(e.message),"object"==typeof e)for(const r in e)P(e[r],t);if("string"==typeof e)try{return P(JSON.parse(e),t)}catch(e){}}}t.JsonRpcApiPollingProvider=A,t.JsonRpcProvider=class extends A{#c;constructor(e,t,r){null==e&&(e="http://localhost:8545"),super(t,r),this.#c="string"==typeof e?new a.FetchRequest(e):e.clone()}_getConnection(){return this.#c.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){const t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");const r=await t.send();r.assertOk();let n=r.bodyJson;return Array.isArray(n)||(n=[n]),n}}},2398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="62e1ad51b37b8e00394bda3b";class c extends s.JsonRpcProvider{applicationId;applicationSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=a),null==r&&(r=null);const s={staticNetwork:i};super(c.getRequest(i,t,r),i,s),(0,n.defineProperties)(this,{applicationId:t,applicationSecret:r})}_getProvider(e){try{return new c(e,this.applicationId,this.applicationSecret)}catch(e){}return super._getProvider(e)}static getRequest(e,t,r){null==t&&(t=a);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v1/lb/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===a&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("PocketProvider"),!0)),o}isCommunityResource(){return this.applicationId===a}}t.PocketProvider=c},2422:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(4967),i=r(1484),o=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:c}=n(t);let u=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<a;e++){const t=e*c;let n=Number(o&f);o>>=h,n>c&&(n-=d,o+=s);const a=t,p=t+Math.abs(n)-1,g=e%2!=0,y=n<0;0===n?l=l.add(r(g,i[a])):u=u.add(r(y,i[p]))}return{p:u,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},2426:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwl=t.decode=void 0;const n=r(5347),i=/^[a-z]*$/i;function o(e,t){let r=97;return e.reduce(((e,n)=>(n===t?r++:n.match(i)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e)),[])}function s(e,t){for(let r=28;r>=0;r--)e=e.split(" !#$%&'()*+,-./<=>?@[]^_`{|}~"[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,t,n,i)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""}));if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return o(o(r,";"),":")}t.decode=s,t.decodeOwl=function(e){return(0,n.assertArgument)("0"===e[0],"unsupported auwl data","data",e),s(e.substring(59),e.substring(1,59))}},2431:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=void 0;const n=r(9943);t.wordlists={en:n.LangEn.wordlist()}},2508:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(2326),i=r(5212),o=r(7214);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},2560:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(8051),i=r(281);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2568:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(9328),i=r(5934),o=r(5279),s=r(632),a=r(8799),c=r(7699);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?i.filter((function(t,r){return e(t,r,u)})):c.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},2574:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9724),i=r(8619),o=r(7214);t.mergeInternals=function(e,t,r,s,a,c,u,l){var f=[],d=0,h=0,p=!1,g=function(){!p||f.length||d||t.complete()},y=function(e){return d<s?b(e):f.push(e)},b=function(e){c&&t.next(e),d++;var l=!1;n.innerFrom(r(e,h++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),c?y(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{d--;for(var e=function(){var e=f.shift();u?i.executeSchedule(t,u,(function(){return b(e)})):b(e)};f.length&&d<s;)e();g()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,y,(function(){p=!0,g()}))),function(){null==l||l()}}},2623:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(915),i=r(9175),o=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],r=c[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;c[e]=o+c[e-7]+n+c[e-16]|0}let{A:r,B:n,C:a,D:u,E:l,F:f,G:d,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&d)+s[e]+c[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;h=d,d=f,f=l,l=u+t|0,u=a,a=n,n=r,r=t+g|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,n,a,u,l,f,d,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new u)),t.sha224=(0,i.wrapConstructor)((()=>new l))},2684:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwl=void 0;const n=r(1181),i=r(5347),o=r(2426),s=r(9011);class a extends s.Wordlist{#p;#z;constructor(e,t,r){super(e),this.#p=t,this.#z=r,this.#W=null}get _data(){return this.#p}_decodeWords(){return(0,o.decodeOwl)(this.#p)}#W;#V(){if(null==this.#W){const e=this._decodeWords();if((0,n.id)(e.join("\n")+"\n")!==this.#z)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#W=e}return this.#W}getWord(e){const t=this.#V();return(0,i.assertArgument)(e>=0&&e<t.length,`invalid word index: ${e}`,"index",e),t[e]}getWordIndex(e){return this.#V().indexOf(e)}}t.WordlistOwl=a},2688:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3728),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},2708:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(281),s=r(9879),a=r(3728),c=r(2980),u=r(5717),l=r(2767),f=r(4808),d=r(2688),h=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new b(e,t,r)},r.prototype.next=function(e){this.isStopped?v(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?v(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?v(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=h;var p=Function.prototype.bind;function g(e,t){return p.call(e,t)}var y=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){m(e)}else m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){m(e)}},e}(),b=function(e){function t(t,r,n){var i,s,c=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:c&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return c.unsubscribe()},i={next:t.next&&g(t.next,s),error:t.error&&g(t.error,s),complete:t.complete&&g(t.complete,s)}):i=t,c.destination=new y(i),c}return i(t,e),t}(h);function m(e){a.config.useDeprecatedSynchronousErrorHandling?d.captureError(e):c.reportUnhandledError(e)}function v(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=b,t.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}},2719:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9724),i=r(7214),o=r(5212);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,c=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):c=!0}))),c&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},2767:function(e,t){"use strict";function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},2794:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(8877);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(1608);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(706);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(9287);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(1719);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var c=r(1778);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return c.bufferToggle}});var u=r(6606);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return u.bufferWhen}});var l=r(2719);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(9244);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var d=r(7933);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return d.combineLatestAll}});var h=r(4948);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return h.combineLatest}});var p=r(2044);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var g=r(6328);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return g.concat}});var y=r(201);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return y.concatAll}});var b=r(9512);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return b.concatMap}});var m=r(9913);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return m.concatMapTo}});var v=r(8032);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return v.concatWith}});var w=r(7812);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return w.connect}});var A=r(8589);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return A.count}});var E=r(3143);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return E.debounce}});var P=r(1762);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return P.debounceTime}});var O=r(8799);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return O.defaultIfEmpty}});var S=r(5797);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return S.delay}});var _=r(2885);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return _.delayWhen}});var k=r(9818);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return k.dematerialize}});var T=r(7876);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return T.distinct}});var x=r(9663);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var R=r(6035);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return R.distinctUntilKeyChanged}});var I=r(1279);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return I.elementAt}});var C=r(6791);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return C.endWith}});var N=r(1361);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return N.every}});var j=r(1464);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return j.exhaust}});var B=r(7977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return B.exhaustAll}});var M=r(6632);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return M.exhaustMap}});var F=r(5544);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return F.expand}});var L=r(5934);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return L.filter}});var U=r(7802);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return U.finalize}});var D=r(8183);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return D.find}});var G=r(9035);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return G.findIndex}});var H=r(9980);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return H.first}});var z=r(5128);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return z.groupBy}});var W=r(2959);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return W.ignoreElements}});var V=r(9915);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return V.isEmpty}});var K=r(2568);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return K.last}});var $=r(6872);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return $.map}});var q=r(3337);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return q.mapTo}});var J=r(5019);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return J.materialize}});var Q=r(96);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return Q.max}});var Y=r(9330);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Y.merge}});var Z=r(8087);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(4613);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(7478);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(6075);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(6707);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(9694);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(142);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(8464);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(2071);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(5513);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ce=r(6744);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ce.pairwise}});var ue=r(9516);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ue.partition}});var le=r(6355);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3197);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var de=r(2955);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return de.publishBehavior}});var he=r(6569);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return he.publishLast}});var pe=r(8710);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return pe.publishReplay}});var ge=r(6081);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ge.race}});var ye=r(6677);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ye.raceWith}});var be=r(2070);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return be.reduce}});var me=r(6131);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return me.repeat}});var ve=r(2139);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ve.repeatWhen}});var we=r(3352);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return we.retry}});var Ae=r(3956);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Ae.retryWhen}});var Ee=r(9224);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Ee.refCount}});var Pe=r(3434);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Pe.sample}});var Oe=r(4143);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Oe.sampleTime}});var Se=r(5565);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Se.scan}});var _e=r(3929);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return _e.sequenceEqual}});var ke=r(3405);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return ke.share}});var Te=r(7782);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Te.shareReplay}});var xe=r(5440);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Re=r(3079);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Re.skip}});var Ie=r(2359);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ie.skipLast}});var Ce=r(7783);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Ce.skipUntil}});var Ne=r(5774);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ne.skipWhile}});var je=r(9054);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return je.startWith}});var Be=r(5455);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Be.subscribeOn}});var Me=r(6201);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Me.switchAll}});var Fe=r(680);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Fe.switchMap}});var Le=r(761);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Le.switchMapTo}});var Ue=r(8461);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Ue.switchScan}});var De=r(4383);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return De.take}});var Ge=r(5279);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ge.takeLast}});var He=r(6911);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return He.takeUntil}});var ze=r(598);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return ze.takeWhile}});var We=r(7400);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return We.tap}});var Ve=r(4880);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Ve.throttle}});var Ke=r(7245);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ke.throttleTime}});var $e=r(632);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return $e.throwIfEmpty}});var qe=r(2508);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return qe.timeInterval}});var Je=r(1713);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Je.timeout}});var Qe=r(597);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Qe.timeoutWith}});var Ye=r(3866);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Ye.timestamp}});var Ze=r(3484);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(8072);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(2893);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(37);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(8996);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(5156);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(6975);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(6749);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(5362);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(6977);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},2831:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRlp=void 0;const n=r(7415);function i(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function o(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(o(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=i(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call((0,n.getBytes)(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=i(t.length);return r.unshift(183+r.length),r.concat(t)}const s="0123456789abcdef";t.encodeRlp=function(e){let t="0x";for(const r of o(e))t+=s[r>>4],t+=s[15&r];return t}},2862:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=void 0;const n=r(7155),i=r(5347);let o=!1;const s=function(e,t,r,i,o){return(0,n.pbkdf2Sync)(e,t,r,i,o)};let a=s;function c(e,t,r,n,o){const s=(0,i.getBytes)(e,"password"),c=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(a(s,c,r,n,o))}t.pbkdf2=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new Error("pbkdf2 is locked");a=e},Object.freeze(c)},2884:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},2885:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(9546),i=r(4383),o=r(2959),s=r(3337),a=r(7478),c=r(9724);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return c.innerFrom(t(e,r)).pipe(i.take(1),s.mapTo(e))}))}},2893:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=r(6808),o=r(5212),s=r(7214);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],c=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,u;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(s)throw s.error}}var d=c-e+1;if(d>=0&&d%r===0&&a.shift().complete(),++c%r===0){var h=new i.Subject;a.push(h),o.next(h.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},2931:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},2955:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(7314),i=r(4359);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},2959:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(5212),i=r(7214),o=r(5717);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},2963:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizationify=void 0;const n=r(646),i=r(2291),o=r(5347);t.authorizationify=function(e){return{address:(0,n.getAddress)(e.address),nonce:(0,o.getBigInt)(null!=e.nonce?e.nonce:0),chainId:(0,o.getBigInt)(null!=e.chainId?e.chainId:0),signature:i.Signature.from(e.signature)}}},2977:function(e,t,r){"use strict";var n,i,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},s=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CBC=void 0;const a=r(6342);class c extends a.ModeOfOperation{constructor(e,t){if(super("ECC",e,c),n.set(this,void 0),i.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");o(this,n,new Uint8Array(t),"f")}else o(this,n,new Uint8Array(16),"f");o(this,i,this.iv,"f")}get iv(){return new Uint8Array(s(this,n,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){for(let t=0;t<16;t++)s(this,i,"f")[t]^=e[r+t];o(this,i,this.aes.encrypt(s(this,i,"f")),"f"),t.set(s(this,i,"f"),r)}return t}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){const n=this.aes.decrypt(e.subarray(r,r+16));for(let o=0;o<16;o++)t[r+o]=n[o]^s(this,i,"f")[o],s(this,i,"f")[o]=e[r+o]}return t}}t.CBC=c,n=new WeakMap,i=new WeakMap},2980:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3728),i=r(4808);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},3071:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VoidSigner=t.AbstractSigner=void 0;const n=r(646),i=r(7778),o=r(5347),s=r(3807);function a(e,t){if(e.provider)return e.provider;(0,o.assert)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function c(e,t){let r=(0,s.copyRequest)(t);if(null!=r.to&&(r.to=(0,n.resolveAddress)(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),(0,n.resolveAddress)(t,e)]).then((([e,t])=>((0,o.assertArgument)(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e)))}else r.from=e.getAddress();return await(0,o.resolveProperties)(r)}class u{provider;constructor(e){(0,o.defineProperties)(this,{provider:e||null})}async getNonce(e){return a(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await c(this,e)}async populateTransaction(e){const t=a(this,"populateTransaction"),r=await c(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){const t=(0,o.getBigInt)(r.chainId);(0,o.assertArgument)(t===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;const i=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!i?0!==r.type&&1!==r.type||!i||(0,o.assertArgument)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):(0,o.assertArgument)(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();(0,o.assert)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,o.assert)(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):(0,o.assert)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==r.type&&3!==r.type&&4!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await(0,o.resolveProperties)(r)}async populateAuthorization(e){const t=Object.assign({},e);return null==t.chainId&&(t.chainId=(await a(this,"getNetwork").getNetwork()).chainId),null==t.nonce&&(t.nonce=await this.getNonce()),t}async estimateGas(e){return a(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return a(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=a(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=a(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const n=i.Transaction.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}authorize(e){(0,o.assert)(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}t.AbstractSigner=u;class l extends u{address;constructor(e,t){super(t),(0,o.defineProperties)(this,{address:e})}async getAddress(){return this.address}connect(e){return new l(this.address,e)}#K(e,t){(0,o.assert)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#K("transactions","signTransaction")}async signMessage(e){this.#K("messages","signMessage")}async signTypedData(e,t,r){this.#K("typed-data","signTypedData")}}t.VoidSigner=l},3079:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(5934);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},3143:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(5212),i=r(5717),o=r(7214),s=r(9724);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,c=null,u=function(){if(null==c||c.unsubscribe(),c=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==c||c.unsubscribe(),n=!0,a=t,c=o.createOperatorSubscriber(r,u,i.noop),s.innerFrom(e(t)).subscribe(c)}),(function(){u(),r.complete()}),void 0,(function(){a=c=null})))}))}},3178:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=t.unpack=t.pack=void 0;const n=r(5347),i=r(9976),o=r(8869),s=r(5754);function a(e,t,r){let i=[];if(Array.isArray(r))i=r;else if(r&&"object"==typeof r){let e={};i=t.map((t=>{const i=t.localName;return(0,n.assert)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),(0,n.assert)(!e[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[i]=!0,r[i]}))}else(0,n.assertArgument)(!1,"invalid tuple value","tuple",r);(0,n.assertArgument)(t.length===i.length,"types/value length mismatch","tuple",r);let s=new o.Writer,a=new o.Writer,c=[];t.forEach(((e,t)=>{let r=i[t];if(e.dynamic){let t=a.length;e.encode(a,r);let n=s.writeUpdatableValue();c.push((e=>{n(e+t)}))}else e.encode(s,r)})),c.forEach((e=>{e(s.length)}));let u=e.appendWriter(s);return u+=e.appendWriter(a),u}function c(e,t){let r=[],i=[],s=e.subReader(0);return t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readIndex(),i=s.subReader(r);try{o=t.decode(i)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}if(null==o)throw new Error("investigate");r.push(o),i.push(t.localName||null)})),o.Result.fromItems(r,i)}t.pack=a,t.unpack=c;class u extends o.Coder{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),(0,n.defineProperties)(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){const r=i.Typed.dereference(t,"array");Array.isArray(r)||this._throwError("expected array value",r);let o=this.length;-1===o&&(o=r.length,e.writeValue(r.length)),(0,n.assertArgumentCount)(r.length,o,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let e=0;e<r.length;e++)s.push(this.coder);return a(e,s,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),(0,n.assert)(t*o.WordSize<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*o.WordSize,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new s.AnonymousCoder(this.coder));return c(e,r)}}t.ArrayCoder=u},3192:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeHmac=void 0;const n=r(7155),i=r(5347);let o=!1;const s=function(e,t,r){return(0,n.createHmac)(e,t).update(r).digest()};let a=s;function c(e,t,r){const n=(0,i.getBytes)(t,"key"),o=(0,i.getBytes)(r,"data");return(0,i.hexlify)(a(e,n,o))}t.computeHmac=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new Error("computeHmac is locked");a=e},Object.freeze(c)},3197:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(6808),i=r(8464),o=r(7812);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},3238:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const n=r(915),i=r(9175),o=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),s=Uint8Array.from({length:16},((e,t)=>t));let a=[s],c=[s.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let t of[a,c])t.push(t[e].map((e=>o[e])));const u=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=a.map(((e,t)=>e.map((e=>u[t][e])))),f=c.map(((e,t)=>e.map((e=>u[t][e])))),d=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),p=(e,t)=>e<<t|e>>>32-t;function g(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const y=new Uint32Array(16);class b extends n.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)y[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,s=0|this.h2,u=s,b=0|this.h3,m=b,v=0|this.h4,w=v;for(let e=0;e<5;e++){const t=4-e,A=d[e],E=h[e],P=a[e],O=c[e],S=l[e],_=f[e];for(let t=0;t<16;t++){const n=p(r+g(e,i,s,b)+y[P[t]]+A,S[t])+v|0;r=v,v=b,b=0|p(s,10),s=i,i=n}for(let e=0;e<16;e++){const r=p(n+g(t,o,u,m)+y[O[e]]+E,_[e])+w|0;n=w,w=m,m=0|p(u,10),u=o,o=r}}this.set(this.h1+s+m|0,this.h2+b+w|0,this.h3+v+n|0,this.h4+r+o|0,this.h0+i+u|0)}roundClean(){y.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=b,t.ripemd160=(0,i.wrapConstructor)((()=>new b))},3239:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=void 0;const n=r(2291),i=r(5347),o=r(3514),s=new Uint8Array(32);function a(e){return(0,i.assertArgument)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function c(e){const t=(0,i.toUtf8Bytes)(u(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(a(t.slice(n,e))),n=e+1);return(0,i.assertArgument)(n<t.length,"invalid ENS name; empty component","name",e),r.push(a(t.slice(n))),r}function u(e){try{if(0===e.length)throw new Error("empty label");return(0,o.ens_normalize)(e)}catch(t){(0,i.assertArgument)(!1,`invalid ENS name (${t.message})`,"name",e)}}s.fill(0),t.ensNormalize=u,t.isValidName=function(e){try{return 0!==c(e).length}catch(e){}return!1},t.namehash=function(e){(0,i.assertArgument)("string"==typeof e,"invalid ENS name; not a string","name",e),(0,i.assertArgument)(e.length,"invalid ENS name (empty label)","name",e);let t=s;const r=c(e);for(;r.length;)t=(0,n.keccak256)((0,i.concat)([t,(0,n.keccak256)(r.pop())]));return(0,i.hexlify)(t)},t.dnsEncode=function(e,t){const r=null!=t?t:63;return(0,i.assertArgument)(r<=255,"DNS encoded label cannot exceed 255","length",r),(0,i.hexlify)((0,i.concat)(c(e).map((t=>{(0,i.assertArgument)(t.length<=r,`label ${JSON.stringify(e)} exceeds ${r} bytes`,"name",e);const n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n}))))+"00"}},3271:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.createGetUrl=void 0;const n=r(1500);function i(e){return async function(t,r){(0,n.assert)(null==r||!r.cancelled,"request cancelled before sending","CANCELLED");const i=t.url.split(":")[0].toLowerCase();(0,n.assert)("http"===i||"https"===i,`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),(0,n.assert)("https"===i||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let o=null;const s=new AbortController,a=setTimeout((()=>{o=(0,n.makeError)("request timeout","TIMEOUT"),s.abort()}),t.timeout);r&&r.addListener((()=>{o=(0,n.makeError)("request cancelled","CANCELLED"),s.abort()}));const c=Object.assign({},e,{method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:s.signal});let u;try{u=await fetch(t.url,c)}catch(e){if(clearTimeout(a),o)throw o;throw e}clearTimeout(a);const l={};u.headers.forEach(((e,t)=>{l[t.toLowerCase()]=e}));const f=await u.arrayBuffer(),d=null==f?null:new Uint8Array(f);return{statusCode:u.status,statusMessage:u.statusText,headers:l,body:d}}}t.createGetUrl=i;const o=i({});t.getUrl=async function(e,t){return o(e,t)}},3275:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},3279:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=t.Mnemonic=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=t.decryptCrowdsaleJson=t.isCrowdsaleJson=t.HDNodeVoidWallet=t.HDNodeWallet=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.BaseWallet=void 0;var n=r(8394);Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return n.BaseWallet}});var i=r(22);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return i.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return i.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return i.getIndexedAccountPath}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return i.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return i.HDNodeVoidWallet}});var o=r(7570);Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return o.isCrowdsaleJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return o.decryptCrowdsaleJson}});var s=r(1650);Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return s.isKeystoreJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return s.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return s.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.encryptKeystoreJsonSync}});var a=r(5312);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return a.Mnemonic}});var c=r(6930);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.Wallet}})},3337:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(6872);t.mapTo=function(e){return n.map((function(){return e}))}},3352:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(5212),i=r(7214),o=r(7699),s=r(5825),a=r(9724);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,c=void 0===r?1/0:r,u=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return c<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<c){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=u){var d="number"==typeof u?s.timer(u):a.innerFrom(u(e,n)),h=i.createOperatorSubscriber(t,(function(){h.unsubscribe(),f()}),(function(){t.complete()}));d.subscribe(h)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},3358:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandler=t.ErrorType=void 0,t.createError=o,t.handleError=function(e,t={}){const{message:r=(e instanceof Error?e.message:String(e)),throwError:n=!1,logError:i=!0,callback:o}=t;if(i&&console.error(`[ERROR] ${r}`,e),"function"==typeof o)return o(e);if(n)throw e instanceof Error?e:new Error(r);return{success:!1,message:r,error:e}};const n=r(5628);var i;function o(e,t,r,n){return{type:e,code:t,message:r,originalError:n,timestamp:Date.now()}}!function(e){e.AUTHENTICATION="AuthenticationError",e.AUTHORIZATION="AuthorizationError",e.VALIDATION="ValidationError",e.NETWORK="NetworkError",e.DATABASE="DatabaseError",e.WALLET="WalletError",e.STORAGE="StorageError",e.ENCRYPTION="EncryptionError",e.SIGNATURE="SignatureError",e.ENVIRONMENT="EnvironmentError",e.SECURITY="SecurityError",e.GUN="GunError",e.STEALTH="StealthError",e.WEBAUTHN="WebAuthnError",e.PLUGIN="PluginError",e.UNKNOWN="UnknownError",e.CONNECTOR="CONNECTOR",e.GENERAL="GENERAL",e.CONTRACT="CONTRACT",e.BIP32="BIP32Error",e.ETHEREUM="EthereumError",e.BITCOIN="BitcoinError"}(i||(t.ErrorType=i={})),t.ErrorHandler=class{static errors=[];static maxErrors=100;static listeners=[];static handleError(e){(0,n.logError)(`[${e.type}] ${e.code}: ${e.message}`),this.errors.push(e),this.errors.length>this.maxErrors&&(this.errors=this.errors.slice(-this.maxErrors)),this.notifyListeners(e)}static handle(e,t,r,i,s="error"){const a=i?`${r} - ${this.formatError(i)}`:r;switch(s){case"debug":(0,n.log)(`[${e}.${t}] (DEBUG) ${a}`);break;case"warn":(0,n.log)(`[${e}.${t}] (WARN) ${a}`);break;case"info":(0,n.log)(`[${e}.${t}] (INFO) ${a}`);break;default:(0,n.log)(`[${e}.${t}] (ERROR) ${a}`),i&&i instanceof Error&&(0,n.log)(i.stack||"No stack trace available")}const c=o(e,t,a,i);return this.handleError(c),c}static getRecentErrors(e=10){return this.errors.slice(-Math.min(e,this.errors.length))}static addListener(e){this.listeners.push(e)}static removeListener(e){const t=this.listeners.indexOf(e);-1!==t&&this.listeners.splice(t,1)}static notifyListeners(e){for(const t of this.listeners)try{t(e)}catch(e){(0,n.logError)(`Error in error listener: ${e}`)}}static formatError(e){if(!e)return"Unknown error";if(e instanceof Error)return`${e.name}: ${e.message}`;if("string"==typeof e)return e;if("object"==typeof e)try{return JSON.stringify(e)}catch(t){return`Object: ${Object.prototype.toString.call(e)}`}return String(e)}static async withRetry(e,t,r,i=3,o=1e3){let s;for(let t=1;t<=i;t++)try{return await e()}catch(e){s=e;const r=o*t;t<i&&((0,n.log)(`Retrying operation after ${r}ms (attempt ${t}/${i})`),await new Promise((e=>setTimeout(e,r))))}throw this.handle(t,r,`Operation failed after ${i} attempts`,s)}}},3405:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9724),s=r(6808),a=r(2708),c=r(5212);function u(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(!0!==t){if(!1!==t){var c=new a.SafeSubscriber({next:function(){c.unsubscribe(),e()}});return o.innerFrom(t.apply(void 0,i([],n(r)))).subscribe(c)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,d=e.resetOnRefCountZero,h=void 0===d||d;return function(e){var t,n,s,l=0,d=!1,p=!1,g=function(){null==n||n.unsubscribe(),n=void 0},y=function(){g(),t=s=void 0,d=p=!1},b=function(){var e=t;y(),null==e||e.unsubscribe()};return c.operate((function(e,c){l++,p||d||g();var m=s=null!=s?s:r();c.add((function(){0!==--l||p||d||(n=u(b,h))})),m.subscribe(c),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){p=!0,g(),n=u(y,i,e),m.error(e)},complete:function(){d=!0,g(),n=u(y,f),m.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},3434:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(9724),i=r(5212),o=r(5717),s=r(7214);t.sample=function(e){return i.operate((function(t,r){var i=!1,a=null;t.subscribe(s.createOperatorSubscriber(r,(function(e){i=!0,a=e}))),n.innerFrom(e).subscribe(s.createOperatorSubscriber(r,(function(){if(i){i=!1;var e=a;a=null,r.next(e)}}),o.noop))}))}},3484:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(2070),i=r(5212),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},3506:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9619);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},3514:function(e,t){"use strict";const r=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function n(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e<n;e++)o.push(i+=r());let s=r(),a=t;t+=s;let c=0,u=0;function l(){return 0==c&&(u=u<<8|e[t++],c=8),u>>--c&1}const f=2**31,d=f>>>1,h=d>>1,p=f-1;let g=0;for(let e=0;e<31;e++)g=g<<1|l();let y=[],b=0,m=f;for(;;){let e=Math.floor(((g-b+1)*i-1)/m),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;y.push(t);let s=b+Math.floor(m*o[t]/i),a=b+Math.floor(m*o[t+1]/i)-1;for(;0==((s^a)&d);)g=g<<1&p|l(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&h;)g=g&d|g<<1&p>>>1|l(),s=s<<1^d,a=(a^d)<<1|d|1;b=s,m=1+a-s}let v=n-4;return y.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,a=0;i<r;i++)a=a<<6|t[e.charCodeAt(i)],s+=6,s>=8&&(n[o++]=a>>(s-=8));return n}(e)))}function i(e){return 1&e?~e>>1:e>>1}function o(e,t){let r=Array(e);for(let n=0,o=0;n<e;n++)r[n]=o+=i(t());return r}function s(e,t=0){let r=[];for(;;){let n=e(),i=e();if(!i)break;t+=n;for(let e=0;e<i;e++)r.push(t+e);t+=i+1}return r}function a(e){return u((()=>{let t=s(e);if(t.length)return t}))}function c(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(f(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(d(r,e))}return t.flat()}function u(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function l(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;i<t;i++)o(e,r).forEach(((e,t)=>n[t].push(e)));return n}function f(e,t){let r=1+t(),n=t(),i=u(t);return l(i.length,1+e,t).flatMap(((e,t)=>{let[o,...s]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))}))}function d(e,t){return l(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function h(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function p(e){let t=[];for(let r=0,n=e.length;r<n;){let n=e.codePointAt(r);r+=n<65536?1:2,t.push(n)}return t}function g(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n<t;)r.push(String.fromCodePoint(...e.slice(n,n+=4096)));return r.join("")}function y(e,t){let r=e.length,n=r-t.length;for(let i=0;0==n&&i<r;i++)n=e[i]-t[i];return n}const b=44032,m=4352,v=4449,w=4519;function A(e){return e>>24&255}function E(e){return 16777215&e}let P,O,S,_;function k(e){return e>=b&&e<55204}function T(e,t){if(e>=m&&e<4371&&t>=v&&t<4470)return b+588*(e-m)+28*(t-v);if(k(e)&&t>w&&t<4547&&(e-b)%28==0)return e+(t-w);{let r=_.get(e);return r&&(r=r.get(t),r)?r:-1}}function x(e){P||function(){let e=n("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");P=new Map(a(e).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),O=new Set(s(e)),S=new Map,_=new Map;for(let[t,r]of c(e)){if(!O.has(t)&&2==r.length){let[e,n]=r,i=_.get(e);i||(i=new Map,_.set(e,i)),i.set(n,t)}S.set(t,r.reverse())}}();let t=[],r=[],i=!1;function o(e){let r=P.get(e);r&&(i=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(k(n)){let e=n-b,t=e%588/28|0,r=e%28;o(m+(e/588|0)),o(v+t),r>0&&o(w+r)}else{let e=S.get(n);e?r.push(...e):o(n)}if(!r.length)break;n=r.pop()}if(i&&t.length>1){let e=A(t[0]);for(let r=1;r<t.length;r++){let n=A(t[r]);if(0==n||e<=n){e=n;continue}let i=r-1;for(;;){let r=t[i+1];if(t[i+1]=t[i],t[i]=r,!i)break;if(e=A(t[--i]),e<=n)break}e=A(t[r])}}return t}function R(e){return x(e).map(E)}function I(e){return function(e){let t=[],r=[],n=-1,i=0;for(let o of e){let e=A(o),s=E(o);if(-1==n)0==e?n=s:t.push(s);else if(i>0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=s):r.push(s),i=e;else{let o=T(n,s);o>=0?n=o:0==i&&0==e?(t.push(n),n=s):(r.push(s),i=e)}}return n>=0&&t.push(n,...r),t}(x(e))}const C=".",N=e=>Array.from(e);function j(e,t){return e.P.has(t)||e.Q.has(t)}class B extends Array{get is_emoji(){return!0}}let M,F,L,U,D,G,H,z,W,V,K,$;function q(){if(M)return;let e=n("AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI");const t=()=>s(e),r=()=>new Set(t()),i=(e,t)=>t.forEach((t=>e.add(t)));M=new Map(c(e)),F=r(),L=t(),U=new Set(t().map((e=>L[e]))),L=new Set(L),D=r(),G=r();let o=a(e),l=e();const f=()=>{let e=new Set;return t().forEach((t=>i(e,o[t]))),i(e,t()),e};H=u((t=>{let r=u(e).map((e=>e+96));if(r.length){let n=t>=l;return r[0]-=32,r=g(r),n&&(r=`Restricted[${r}]`),{N:r,P:f(),Q:f(),M:!e(),R:n}}})),z=r(),W=new Map;let d=t().concat(N(z)).sort(((e,t)=>e-t));d.forEach(((t,r)=>{let n=e(),i=d[r]=n?d[r-n]:{V:[],M:new Map};i.V.push(t),z.has(t)||W.set(t,i)}));for(let{V:e,M:t}of new Set(W.values())){let r=[];for(let t of e){let e=H.filter((e=>j(e,t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),i(n.G,e)}let n=r.flatMap((e=>N(e.G)));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}V=new Set;let h=new Set;const p=e=>V.has(e)?h.add(e):V.add(e);for(let e of H){for(let t of e.P)p(t);for(let t of e.Q)p(t)}for(let e of V)W.has(e)||h.has(e)||W.set(e,1);i(V,R(V)),K=function(e){let t=[],r=s(e);return function e({S:r,B:n},i,o){if(!(4&r&&o===i[i.length-1])){2&r&&(o=i[i.length-1]),1&r&&t.push(i);for(let t of n)for(let r of t.Q)e(t,[...i,r],o)}}(function t(n){return{S:e(),B:u((()=>{let n=s(e).map((e=>r[e]));if(n.length)return t(n)})),Q:n}}([]),[]),t}(e).map((e=>B.from(e))).sort(y),$=new Map;for(let e of K){let t=[$];for(let r of e){let e=t.map((e=>{let t=e.get(r);return t||(t=new Map,e.set(r,t)),t}));65039===r?t.push(...e):t=e}for(let r of t)r.V=e}}function J(e){return(X(e)?"":`${Q(Y([e]))} `)+h(e)}function Q(e){return`"${e}"`}function Y(e,t=1/0,r=h){let n=[];Z(e[0])&&n.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,o=e.length;for(let t=0;t<o;t++){let o=e[t];X(o)&&(n.push(g(e.slice(i,t))),n.push(r(o)),i=t+1)}return n.push(g(e.slice(i,o))),n.join("")}function Z(e){return q(),L.has(e)}function X(e){return q(),D.has(e)}function ee(e,t,r){let n=0;for(;;){let i=e.indexOf(t,n);if(i<0)break;e[i]=r,n=i+1}}function te(e,t,n){if(!e)return[];q();let i=0;return e.split(C).map((e=>{let o=p(e),s={input:o,offset:i};i+=o.length+1;try{let e,i=s.tokens=se(o,t,n),a=i.length;if(!a)throw new Error("empty label");let c=s.output=i.flat();if(function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(c),!(s.emoji=a>1||i[0].is_emoji)&&c.every((e=>e<128)))!function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error(`invalid label extension: "${g(e.slice(0,4))}"`)}(c),e="ASCII";else{let t=i.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(L.has(c[0]))throw oe("leading combining mark");for(let e=1;e<a;e++){let t=i[e];if(!t.is_emoji&&L.has(t[0]))throw oe(`emoji + combining mark: "${g(i[e-1])} + ${Y([t[0]])}"`)}!function(e){let t=e[0],n=r.get(t);if(n)throw oe(`leading ${n}`);let i=e.length,o=-1;for(let s=1;s<i;s++){t=e[s];let i=r.get(t);if(i){if(o==s)throw oe(`${n} + ${i}`);o=s+1,n=i}}if(o==i)throw oe(`trailing ${n}`)}(c);let n=N(new Set(t)),[o]=function(e){let t=H;for(let r of e){let e=t.filter((e=>j(e,r)));if(!e.length)throw H.some((e=>j(e,r)))?ie(t[0],r):ne(r);if(t=e,1==e.length)break}return t}(n);!function(e,t){for(let r of t)if(!j(e,r))throw ie(e,r);if(e.M){let e=R(t);for(let t=1,r=e.length;t<r;t++)if(U.has(e[t])){let n=t+1;for(let i;n<r&&U.has(i=e[n]);n++)for(let r=t;r<n;r++)if(e[r]==i)throw new Error(`duplicate non-spacing marks: ${J(i)}`);if(n-t>4)throw new Error(`excessive non-spacing marks: ${Q(Y(e.slice(t-1,n)))} (${n-t}/4)`);t=n}}}(o,t),function(e,t){let r,n=[];for(let e of t){let t=W.get(e);if(1===t)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):N(n),!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>j(t,e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(o,n),e=o.N}else e="Emoji"}s.type=e}catch(e){s.error=e}return s}))}function re(e){return e.map((({input:t,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==e.length?n:`Invalid label ${Q(Y(t,63))}: ${n}`)}return g(n)})).join(C)}function ne(e){return new Error(`disallowed character: ${J(e)}`)}function ie(e,t){let r=J(t),n=H.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function oe(e){return new Error(`illegal placement: ${e}`)}function se(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let o=ce(e);if(o)i.length&&(n.push(t(i)),i=[]),n.push(r(o));else{let t=e.pop();if(V.has(t))i.push(t);else{let e=M.get(t);if(e)i.push(...e);else if(!F.has(t))throw ne(t)}}}return i.length&&n.push(t(i)),n}function ae(e){return e.filter((e=>65039!=e))}function ce(e,t){let r,n=$,i=e.length;for(;i&&(n=n.get(e[--i]),n);){let{V:o}=n;o&&(r=o,t&&t.push(...e.slice(i).reverse()),e.length=i)}return r}const ue="valid",le="mapped",fe="ignored";function de(e){return e==ue||e==le}function he(e){return e.some((e=>G.has(e)))}function pe(e){for(let t=0;t<e.length;t++)if(e[t].type==ue){let r=t+1;for(;r<e.length&&e[r].type==ue;)r++;e.splice(t,r-t,{type:ue,cps:e.slice(t,r).flatMap((e=>e.cps))})}return e}t.ens_beautify=function(e){let t=te(e,I,(e=>e));for(let{type:e,output:r,error:n}of t){if(n)break;"Greek"!==e&&ee(r,958,926)}return re(t)},t.ens_emoji=function(){return q(),K.map((e=>e.slice()))},t.ens_normalize=function(e){return re(te(e,I,ae))},t.ens_normalize_fragment=function(e,t){q();let r=t?R:I;return e.split(C).map((e=>g(se(p(e),r,ae).flat()))).join(C)},t.ens_split=function(e,t){return te(e,I,t?e=>e.slice():ae)},t.ens_tokenize=function e(t,{nf:r=!0}={}){q();let n=p(t).reverse(),i=[],o=[];for(;n.length;){let e=ce(n,i);if(e)o.push({type:"emoji",emoji:e.slice(),input:i,cps:ae(e)}),i=[];else{let e=n.pop();if(46==e)o.push({type:"stop",cp:e});else if(V.has(e))o.push({type:ue,cps:[e]});else if(F.has(e))o.push({type:fe,cp:e});else{let t=M.get(e);t?o.push({type:le,cp:e,cps:t.slice()}):o.push({type:"disallowed",cp:e})}}}if(r)for(let t=0,r=-1;t<o.length;t++){let n=o[t];if(de(n.type))if(he(n.cps)){let n=t+1;for(let e=n;e<o.length;e++){let{type:t,cps:r}=o[e];if(de(t)){if(!he(r))break;n=e+1}else if(t!==fe)break}r<0&&(r=t);let i=o.slice(r,n),s=i.flatMap((e=>de(e.type)?e.cps:[])),a=I(s);y(a,s)?(o.splice(r,n-r,{type:"nfc",input:s,cps:a,tokens0:pe(i),tokens:e(g(a),{nf:!1})}),t=r):t=n-1,r=-1}else r=t;else n.type!==fe&&(r=-1)}return pe(o)},t.is_combining_mark=Z,t.nfc=I,t.nfd=R,t.safe_str_from_cps=Y,t.should_escape=X},3562:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(9615),i=r(9175),o=r(1705);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},3728:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},3807:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResponse=t.TransactionReceipt=t.Log=t.Block=t.copyRequest=t.FeeData=void 0;const n=r(5347),i=r(7778),o=BigInt(0);function s(e){return null==e?null:e}function a(e){return null==e?null:e.toString()}t.FeeData=class{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,r){(0,n.defineProperties)(this,{gasPrice:s(e),maxFeePerGas:s(t),maxPriorityFeePerGas:s(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:a(e),maxFeePerGas:a(t),maxPriorityFeePerGas:a(r)}}},t.copyRequest=function(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=(0,n.hexlify)(e.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)i in e&&null!=e[i]&&(t[i]=(0,n.getBigInt)(e[i],`request.${i}`));const o="type,nonce".split(/,/);for(const r of o)r in e&&null!=e[r]&&(t[r]=(0,n.getNumber)(e[r],`request.${r}`));return e.accessList&&(t.accessList=(0,i.accessListify)(e.accessList)),e.authorizationList&&(t.authorizationList=e.authorizationList.slice()),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>(0,n.isBytesLike)(e)?(0,n.hexlify)(e):Object.assign({},e)))),t};class c{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#$;constructor(e,t){this.#$=e.transactions.map((e=>"string"!=typeof e?new f(e,t):e)),(0,n.defineProperties)(this,{provider:t,hash:s(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:s(e.prevRandao),extraData:e.extraData,baseFeePerGas:s(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#$.map((e=>"string"==typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#$.slice();return 0===e.length?[]:((0,n.assert)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:r,gasLimit:n,gasUsed:i,hash:o,miner:s,prevRandao:c,nonce:u,number:l,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,timestamp:g,transactions:y}=this;return{_type:"Block",baseFeePerGas:a(e),difficulty:a(t),extraData:r,gasLimit:a(n),gasUsed:a(i),blobGasUsed:a(this.blobGasUsed),excessBlobGas:a(this.excessBlobGas),hash:o,miner:s,prevRandao:c,nonce:u,number:l,parentHash:f,timestamp:g,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,transactions:y}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#$.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(e){let t;if("number"==typeof e)t=this.#$[e];else{const r=e.toLowerCase();for(const e of this.#$){if("string"==typeof e){if(e!==r)continue;t=e;break}if(e.hash===r){t=e;break}}}if(null==t)throw new Error("no such tx");return"string"==typeof t?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){const t=this.prefetchedTransactions;if("number"==typeof e)return t[e];e=e.toLowerCase();for(const r of t)if(r.hash===e)return r;(0,n.assertArgument)(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return{orphan:"drop-block",hash:this.hash,number:this.number}}}t.Block=c;class u{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;const r=Object.freeze(e.topics.slice());(0,n.defineProperties)(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:r,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:c}=this;return{_type:"log",address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:c}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:(e=this).transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}};var e}}t.Log=u;class l{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#q;constructor(e,t){this.#q=Object.freeze(e.logs.map((e=>new u(e,t))));let r=o;null!=e.effectiveGasPrice?r=e.effectiveGasPrice:null!=e.gasPrice&&(r=e.gasPrice),(0,n.defineProperties)(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#q}toJSON(){const{to:e,from:t,contractAddress:r,hash:n,index:i,blockHash:o,blockNumber:s,logsBloom:c,logs:u,status:l,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:r,cumulativeGasUsed:a(this.cumulativeGasUsed),from:t,gasPrice:a(this.gasPrice),blobGasUsed:a(this.blobGasUsed),blobGasPrice:a(this.blobGasPrice),gasUsed:a(this.gasUsed),hash:n,index:i,logs:u,logsBloom:c,root:f,status:l,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(null==e)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(null==e)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return h(this)}reorderedEvent(e){return(0,n.assert)(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),d(this,e)}}t.TransactionReceipt=l;class f{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#J;constructor(e,t){this.provider=t,this.blockNumber=null!=e.blockNumber?e.blockNumber:null,this.blockHash=null!=e.blockHash?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=null!=e.maxPriorityFeePerGas?e.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=e.maxFeePerGas?e.maxFeePerGas:null,this.maxFeePerBlobGas=null!=e.maxFeePerBlobGas?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=null!=e.accessList?e.accessList:null,this.blobVersionedHashes=null!=e.blobVersionedHashes?e.blobVersionedHashes:null,this.authorizationList=null!=e.authorizationList?e.authorizationList:null,this.#J=-1}toJSON(){const{blockNumber:e,blockHash:t,index:r,hash:n,type:i,to:o,from:s,nonce:c,data:u,signature:l,accessList:f,blobVersionedHashes:d}=this;return{_type:"TransactionResponse",accessList:f,blockNumber:e,blockHash:t,blobVersionedHashes:d,chainId:a(this.chainId),data:u,from:s,gasLimit:a(this.gasLimit),gasPrice:a(this.gasPrice),hash:n,maxFeePerGas:a(this.maxFeePerGas),maxPriorityFeePerGas:a(this.maxPriorityFeePerGas),maxFeePerBlobGas:a(this.maxFeePerBlobGas),nonce:c,signature:l,to:o,index:r,type:i,value:a(this.value)}}async getBlock(){let e=this.blockNumber;if(null==e){const t=await this.getTransaction();t&&(e=t.blockNumber)}if(null==e)return null;const t=this.provider.getBlock(e);if(null==t)throw new Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){const{tx:e,blockNumber:t}=await(0,n.resolveProperties)({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==e||null==e.blockNumber?0:t-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){const r=null==e?1:e,i=null==t?0:t;let s=this.#J,a=-1,c=-1===s;const u=async()=>{if(c)return null;const{blockNumber:e,nonce:t}=await(0,n.resolveProperties)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t<this.nonce)return void(s=e);if(c)return null;const i=await this.getTransaction();if(!i||null==i.blockNumber)for(-1===a&&(a=s-3,a<this.#J&&(a=this.#J));a<=e;){if(c)return null;const t=await this.provider.getBlock(a,!0);if(null==t)return;for(const e of t)if(e===this.hash)return;for(let i=0;i<t.length;i++){const a=await t.getTransaction(i);if(a.from===this.from&&a.nonce===this.nonce){if(c)return null;const t=await this.provider.getTransactionReceipt(a.hash);if(null==t)return;if(e-t.blockNumber+1<r)return;let i="replaced";a.data===this.data&&a.to===this.to&&a.value===this.value?i="repriced":"0x"===a.data&&a.from===a.to&&a.value===o&&(i="cancelled"),(0,n.assert)(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:a.replaceableTransaction(s),hash:a.hash,receipt:t})}}a++}},l=e=>{if(null==e||0!==e.status)return e;(0,n.assert)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},f=await this.provider.getTransactionReceipt(this.hash);if(0===r)return l(f);if(f){if(1===r||await f.confirmations()>=r)return l(f)}else if(await u(),0===r)return null;const d=new Promise(((e,t)=>{const o=[],a=()=>{o.forEach((e=>e()))};if(o.push((()=>{c=!0})),i>0){const e=setTimeout((()=>{a(),t((0,n.makeError)("wait for transaction timeout","TIMEOUT"))}),i);o.push((()=>{clearTimeout(e)}))}const f=async n=>{if(await n.confirmations()>=r){a();try{e(l(n))}catch(e){t(e)}}};if(o.push((()=>{this.provider.off(this.hash,f)})),this.provider.on(this.hash,f),s>=0){const e=async()=>{try{await u()}catch(e){if((0,n.isError)(e,"TRANSACTION_REPLACED"))return a(),void t(e)}c||this.provider.once("block",e)};o.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await d}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),h(this)}reorderedEvent(e){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,n.assert)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),d(this,e)}replaceableTransaction(e){(0,n.assertArgument)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new f(this,this.provider);return t.#J=e,t}}function d(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function h(e){return{orphan:"drop-transaction",tx:e}}t.TransactionResponse=f},3866:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(3275),i=r(6872);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},3905:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const n=r(5336),i=r(5347);let o=!1;const s=function(e){return(0,n.keccak_256)(e)};let a=s;function c(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}t.keccak256=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new TypeError("keccak256 is locked");a=e},Object.freeze(c)},3913:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocket=void 0;const n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}().WebSocket;t.WebSocket=n},3916:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(6872),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},3929:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(5212),i=r(7214),o=r(9724);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var s={buffer:[],complete:!1},a={buffer:[],complete:!1},c=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?c(!1):e.buffer.push(n):!t(n,i.shift())&&c(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&c(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(s,a)),o.innerFrom(e).subscribe(u(a,s))}))}},3948:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8CodePoints=t.toUtf8String=t.toUtf8Bytes=t.Utf8ErrorFuncs=void 0;const n=r(7415),i=r(1500);function o(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}function s(e,r){null==r&&(r=t.Utf8ErrorFuncs.error);const i=(0,n.getBytes)(e,"bytes"),o=[];let s=0;for(;s<i.length;){const e=i[s++];if(!(e>>7)){o.push(e);continue}let t=null,n=null;if(192==(224&e))t=1,n=127;else if(224==(240&e))t=2,n=2047;else{if(240!=(248&e)){s+=r(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",s-1,i,o);continue}t=3,n=65535}if(s-1+t>=i.length){s+=r("OVERRUN",s-1,i,o);continue}let a=e&(1<<8-t-1)-1;for(let e=0;e<t;e++){let e=i[s];if(128!=(192&e)){s+=r("MISSING_CONTINUE",s,i,o),a=null;break}a=a<<6|63&e,s++}null!==a&&(a>1114111?s+=r("OUT_OF_RANGE",s-1-t,i,o,a):a>=55296&&a<=57343?s+=r("UTF16_SURROGATE",s-1-t,i,o,a):a<=n?s+=r("OVERLONG",s-1-t,i,o,a):o.push(a))}return o}function a(e,t){(0,i.assertArgument)("string"==typeof e,"invalid string value","str",e),null!=t&&((0,i.assertNormalize)(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);(0,i.assertArgument)(t<e.length&&56320==(64512&o),"invalid surrogate pair","str",e);const s=65536+((1023&n)<<10)+(1023&o);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}t.Utf8ErrorFuncs=Object.freeze({error:function(e,t,r,n,o){(0,i.assertArgument)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:o,replace:function(e,t,r,n,s){return"OVERLONG"===e?((0,i.assertArgument)("number"==typeof s,"invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),o(e,t,r))}}),t.toUtf8Bytes=a,t.toUtf8String=function(e,t){return s(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")},t.toUtf8CodePoints=function(e,t){return s(a(e,t))}},3952:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(9533).AsyncScheduler);t.AsapScheduler=o},3956:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9724),i=r(6808),o=r(5212),s=r(7214);t.retryWhen=function(e){return o.operate((function(t,r){var o,a,c=!1,u=function(){o=t.subscribe(s.createOperatorSubscriber(r,void 0,void 0,(function(t){a||(a=new i.Subject,n.innerFrom(e(a)).subscribe(s.createOperatorSubscriber(r,(function(){return o?u():c=!0})))),a&&a.next(t)}))),c&&(o.unsubscribe(),o=null,c=!1,u())};u()}))}},3996:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanPlugin=t.EtherscanProvider=t.ChainstackProvider=t.CloudflareProvider=t.AnkrProvider=t.BlockscoutProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.copyRequest=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=t.NonceManager=t.Network=t.MulticoinProviderPlugin=t.EnsResolver=t.getDefaultProvider=t.showThrottleMessage=t.VoidSigner=t.AbstractSigner=t.UnmanagedSubscriber=t.AbstractProvider=void 0;var n=r(8672);Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return n.AbstractProvider}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return n.UnmanagedSubscriber}});var i=r(3071);Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return i.AbstractSigner}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return i.VoidSigner}});var o=r(9973);Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return o.showThrottleMessage}});var s=r(2347);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return s.getDefaultProvider}});var a=r(1691);Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return a.EnsResolver}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return a.MulticoinProviderPlugin}});var c=r(5317);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return c.Network}});var u=r(9596);Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return u.NonceManager}});var l=r(4491);Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}});var f=r(3807);Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return f.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return f.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return f.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return f.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return f.TransactionResponse}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return f.copyRequest}});var d=r(9902);Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return d.FallbackProvider}});var h=r(2371);Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return h.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return h.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return h.JsonRpcSigner}});var p=r(254);Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return p.BrowserProvider}});var g=r(7841);Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return g.AlchemyProvider}});var y=r(9349);Object.defineProperty(t,"BlockscoutProvider",{enumerable:!0,get:function(){return y.BlockscoutProvider}});var b=r(6806);Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return b.AnkrProvider}});var m=r(2271);Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return m.CloudflareProvider}});var v=r(8907);Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return v.ChainstackProvider}});var w=r(5047);Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return w.EtherscanProvider}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return w.EtherscanPlugin}});var A=r(5855);Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return A.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return A.InfuraWebSocketProvider}});var E=r(2398);Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return E.PocketProvider}});var P=r(8817);Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return P.QuickNodeProvider}});const O=r(4584);Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return O.IpcSocketProvider}});var S=r(4945);Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return S.SocketProvider}});var _=r(873);Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return _.WebSocketProvider}});var k=r(4945);Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return k.SocketSubscriber}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return k.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return k.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return k.SocketEventSubscriber}})},4027:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyAuthorization=t.hashAuthorization=void 0;const n=r(646),i=r(2291),o=r(7778),s=r(5347);function a(e){return(0,s.assertArgument)("string"==typeof e.address,"invalid address for hashAuthorization","auth.address",e),(0,i.keccak256)((0,s.concat)(["0x05",(0,s.encodeRlp)([null!=e.chainId?(0,s.toBeArray)(e.chainId):"0x",(0,n.getAddress)(e.address),null!=e.nonce?(0,s.toBeArray)(e.nonce):"0x"])]))}t.hashAuthorization=a,t.verifyAuthorization=function(e,t){return(0,o.recoverAddress)(a(e),t)}},4101:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),s=0;s<r.length;s++)"default"!==r[s]&&i(t,e,r[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.GunDB=void 0;const a=r(5628),c=r(3358),u=r(2077),l=s(r(7120)),f=s(r(554)),d=s(r(170));t.GunDB=class{gun;user=null;crypto;utils;node;onAuthCallbacks=[];_rxjs;constructor(e,t="shogun"){if((0,a.log)("Initializing GunDB"),!e)throw new Error("Gun instance is required but was not provided");if("object"!=typeof e)throw new Error("Gun instance must be an object, received: "+typeof e);if("function"!=typeof e.user)throw new Error("Gun instance is invalid: gun.user is not a function. Received gun.user type: "+typeof e.user);if("function"!=typeof e.get)throw new Error("Gun instance is invalid: gun.get is not a function. Received gun.get type: "+typeof e.get);if("function"!=typeof e.on)throw new Error("Gun instance is invalid: gun.on is not a function. Received gun.on type: "+typeof e.on);this.gun=e;try{this.user=this.gun.user().recall({sessionStorage:!0})}catch(e){throw(0,a.logError)("Error initializing Gun user:",e),new Error(`Failed to initialize Gun user: ${e}`)}this.subscribeToAuthEvents(),this.crypto=f,this.utils=d,this.node=this.gun.get(t)}subscribeToAuthEvents(){this.gun.on("auth",(e=>{(0,a.log)("Auth event received:",e),e.err?c.ErrorHandler.handle(c.ErrorType.GUN,"AUTH_EVENT_ERROR",e.err,new Error(e.err)):this.notifyAuthListeners(e.sea?.pub||"")}))}notifyAuthListeners(e){const t=this.gun.user();this.onAuthCallbacks.forEach((e=>e(t)))}addPeer(e){this.gun.opt({peers:[e]}),(0,a.log)(`Added new peer: ${e}`)}removePeer(e){try{const t=this.gun._.opt;if(t&&t.peers){delete t.peers[e];const r=t.peers[e];r&&"function"==typeof r.close&&r.close(),(0,a.log)(`Removed peer: ${e}`)}else(0,a.log)(`Peer not found in current connections: ${e}`)}catch(t){(0,a.logError)(`Error removing peer ${e}:`,t)}}getCurrentPeers(){try{const e=this.gun._.opt;return e&&e.peers?Object.keys(e.peers).filter((t=>{const r=e.peers[t];return r&&r.wire&&"bye"!==r.wire.hied})):[]}catch(e){return(0,a.logError)("Error getting current peers:",e),[]}}getAllConfiguredPeers(){try{const e=this.gun._.opt;return e&&e.peers?Object.keys(e.peers):[]}catch(e){return(0,a.logError)("Error getting configured peers:",e),[]}}getPeerInfo(){try{const e=this.gun._.opt,t={};return e&&e.peers&&Object.keys(e.peers).forEach((r=>{const n=e.peers[r],i=n&&n.wire&&"bye"!==n.wire.hied,o=i?"connected":n&&n.wire?"disconnected":"not_initialized";t[r]={connected:i,status:o}})),t}catch(e){return(0,a.logError)("Error getting peer info:",e),{}}}reconnectToPeer(e){try{this.removePeer(e),setTimeout((()=>{this.addPeer(e),(0,a.log)(`Reconnected to peer: ${e}`)}),1e3)}catch(t){(0,a.logError)(`Error reconnecting to peer ${e}:`,t)}}resetPeers(e){try{const t=this.gun._.opt;t&&t.peers&&(Object.keys(t.peers).forEach((e=>{this.removePeer(e)})),e&&e.length>0&&e.forEach((e=>{this.addPeer(e)})),(0,a.log)(`Reset peers. New peers: ${e?e.join(", "):"none"}`))}catch(e){(0,a.logError)("Error resetting peers:",e)}}onAuth(e){this.onAuthCallbacks.push(e);const t=this.gun.user();return t&&t.is&&e(t),()=>{const t=this.onAuthCallbacks.indexOf(e);-1!==t&&this.onAuthCallbacks.splice(t,1)}}getGun(){return this.gun}getUser(){return this.gun.user()}get(e){return this.gun.get(e)}async put(e,t){return new Promise((r=>{this.gun.get(e).put(t,(e=>{r(e.err?{success:!1,error:e.err}:{success:!0})}))}))}async set(e,t){return new Promise((r=>{this.gun.get(e).set(t,(e=>{r(e.err?{success:!1,error:e.err}:{success:!0})}))}))}async remove(e){return new Promise((t=>{this.gun.get(e).put(null,(e=>{t(e.err?{success:!1,error:e.err}:{success:!0})}))}))}async signUp(e,t){(0,a.log)("Attempting user registration:",e);try{if(t.length<8){const e="Passwords must be more than 8 characters long!";return(0,a.log)(e),{success:!1,error:e}}if(e.length<1){const e="Username must be more than 0 characters long!";return(0,a.log)(e),{success:!1,error:e}}const r=await new Promise((r=>{this.gun.user().create(e,t,(t=>{t.err?((0,a.logError)(`User creation error: ${t.err}`),r({success:!1,error:t.err})):((0,a.log)(`User created successfully: ${e}`),r({success:!0,pub:t.pub}))}))}));if(!r.success)return r;try{const t=this.gun.get(r.pub).put({username:e,pub:r.pub});this.gun.get("users").set(t)}catch(e){(0,a.logError)(`Warning: Could not store user metadata: ${e}`)}(0,a.log)(`Attempting login after registration for: ${e}`);try{const r=await this.login(e,t);return r.success?((0,a.log)(`Login after registration successful for: ${e}`),r):((0,a.logError)(`Login after registration failed: ${r.error}`),{success:!1,error:`Registration completed but login failed: ${r.error}`})}catch(e){return(0,a.logError)(`Exception during post-registration login: ${e}`),{success:!1,error:"Exception during post-registration login"}}}catch(e){return(0,a.logError)(`Unexpected error during registration flow: ${e}`),{success:!1,error:`Unexpected error during registration: ${e}`}}}async login(e,t,r){(0,a.log)(`Attempting login for user: ${e}`);try{const n=await new Promise((r=>{this.gun.user().auth(e,t,(t=>{t.err?((0,a.logError)(`Login error for ${e}: ${t.err}`),r({success:!1,error:t.err})):((0,a.log)(`Login successful for: ${e}`),r({success:!0,ack:t}))}))}));if(!n.success){const e={success:!1,error:n.error};return r&&r(e),e}const i=this.gun.user().is?.pub;try{let t=!1;if(await new Promise((e=>{this.gun.get("users").map().once(((e,r)=>{e&&e.pub===i&&(t=!0)})),setTimeout((()=>e()),100)})),!t&&i){const t=this.gun.get(i).put({username:e,pub:i});this.gun.get("users").set(t)}}catch(e){(0,a.logError)(`Warning: Could not update user collection: ${e}`)}(0,a.log)(`Login successful for: ${e} (${i})`),this._savePair();const o={success:!0,userPub:i,username:e};return r&&r(o),o}catch(t){(0,a.logError)(`Exception during login for ${e}: ${t}`);const n={success:!1,error:String(t)};return r&&r(n),n}}_savePair(){try{const e=this.gun.user()?._?.sea;e&&"undefined"!=typeof localStorage&&localStorage.setItem("pair",JSON.stringify(e))}catch(e){console.error("Error saving auth pair:",e)}}logout(){try{if(!this.isLoggedIn())return void(0,a.log)("No user logged in, skipping logout");this.gun.user().leave(),(0,a.log)("Logout completed")}catch(e){(0,a.logError)("Error during logout:",e)}}isLoggedIn(){return!!this.gun.user()?.is?.pub}getCurrentUser(){const e=this.gun.user()?.is?.pub;return e?{pub:e,user:this.gun.user()}:null}rx(){return this._rxjs||(this._rxjs=new u.GunRxJS(this.gun)),this._rxjs}async setPasswordHint(e,t,r,n,i){if((0,a.log)("Setting password hint for:",e),!(await this.login(e,t)).success)return{success:!1,error:"Authentication failed"};try{const e=await this.crypto.hashText(i.join("|")),t=await this.crypto.encrypt(r,e);return await this.saveUserData("security",{questions:n,hint:t}),{success:!0}}catch(e){return(0,a.logError)("Error setting password hint:",e),{success:!1,error:String(e)}}}async forgotPassword(e,t){(0,a.log)("Attempting password recovery for:",e);try{const e=this.gun.user().recall({sessionStorage:!0});if(!e||!e.is)return{success:!1,error:"User not found"};const r=await this.getUserData("security");if(!r||!r.hint)return{success:!1,error:"No password hint found"};const n=await this.crypto.decrypt(r.hint,await this.crypto.hashText(t.join("|")));return void 0===n?{success:!1,error:"Incorrect answers to security questions"}:{success:!0,hint:n}}catch(e){return(0,a.logError)("Error recovering password hint:",e),{success:!1,error:String(e)}}}async hashText(e){return this.crypto.hashText(e)}async encrypt(e,t){return this.crypto.encrypt(e,t)}async decrypt(e,t){return this.crypto.decrypt(e,t)}async saveUserData(e,t){return new Promise(((r,n)=>{const i=this.gun.user();i.is?i.get(e).put(t,(e=>{e.err?n(new Error(e.err)):r()})):n(new Error("User not authenticated"))}))}async getUserData(e){return new Promise((t=>{const r=this.gun.user();r.is?r.get(e).once((e=>{t(e)})):t(null)}))}static Errors=l}},4120:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},4134:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;const n=r(5628);t.EventEmitter=class{events;constructor(){this.events=new Map}on(e,t){this.events.has(e)||this.events.set(e,[]),this.events.get(e)?.push(t)}emit(e,t){return!!this.events.has(e)&&((this.events.get(e)||[]).forEach((r=>{try{r(t)}catch(t){(0,n.logError)(`Error in event listener for ${String(e)}:`,t)}})),!0)}off(e,t){if(!this.events.has(e))return;const r=this.events.get(e)||[],n=r.indexOf(t);-1!==n&&(r.splice(n,1),0===r.length?this.events.delete(e):this.events.set(e,r))}once(e,t){const r=n=>{t(n),this.off(e,r)};this.on(e,r)}removeAllListeners(e){e?this.events.delete(e):this.events.clear()}}},4143:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(2326),i=r(3434),o=r(2275);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},4164:function(e,t,r){"use strict";var n,i,o,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CTR=void 0;const c=r(6342);class u extends c.ModeOfOperation{constructor(e,t){super("CTR",e,u),n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),s(this,o,new Uint8Array(16),"f"),a(this,o,"f").fill(0),s(this,n,a(this,o,"f"),"f"),s(this,i,16,"f"),null==t&&(t=1),"number"==typeof t?this.setCounterValue(t):this.setCounterBytes(t)}get counter(){return new Uint8Array(a(this,o,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)a(this,o,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");a(this,o,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==a(this,o,"f")[e]){a(this,o,"f")[e]++;break}a(this,o,"f")[e]=0}}encrypt(e){var t,r;const c=new Uint8Array(e);for(let e=0;e<c.length;e++)16===a(this,i,"f")&&(s(this,n,this.aes.encrypt(a(this,o,"f")),"f"),s(this,i,0,"f"),this.increment()),c[e]^=a(this,n,"f")[(s(this,i,(r=a(this,i,"f"),t=r++,r),"f"),t)];return c}decrypt(e){return this.encrypt(e)}}t.CTR=u,n=new WeakMap,i=new WeakMap,o=new WeakMap},4193:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethers=void 0;const n=r(9990),i=n.__importStar(r(1752));t.ethers=i,n.__exportStar(r(1752),t)},4338:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingEventSubscriber=t.PollingTransactionSubscriber=t.PollingOrphanSubscriber=t.PollingBlockTagSubscriber=t.OnBlockSubscriber=t.PollingBlockSubscriber=t.getPollingSubscriber=void 0;const n=r(5347);function i(e){return JSON.parse(JSON.stringify(e))}t.getPollingSubscriber=function(e,t){return"block"===t?new o(e):(0,n.isHexString)(t,32)?new a(e,t):void(0,n.assert)(!1,"unsupported polling event","UNSUPPORTED_OPERATION",{operation:"getPollingSubscriber",info:{event:t}})};class o{#Q;#Y;#Z;#X;constructor(e){this.#Q=e,this.#Y=null,this.#Z=4e3,this.#X=-2}get pollingInterval(){return this.#Z}set pollingInterval(e){this.#Z=e}async#ee(){try{const e=await this.#Q.getBlockNumber();if(-2===this.#X)return void(this.#X=e);if(e!==this.#X){for(let t=this.#X+1;t<=e;t++){if(null==this.#Y)return;await this.#Q.emit("block",t)}this.#X=e}}catch(e){}null!=this.#Y&&(this.#Y=this.#Q._setTimeout(this.#ee.bind(this),this.#Z))}start(){this.#Y||(this.#Y=this.#Q._setTimeout(this.#ee.bind(this),this.#Z),this.#ee())}stop(){this.#Y&&(this.#Q._clearTimeout(this.#Y),this.#Y=null)}pause(e){this.stop(),e&&(this.#X=-2)}resume(){this.start()}}t.PollingBlockSubscriber=o;class s{#Q;#ee;#te;constructor(e){this.#Q=e,this.#te=!1,this.#ee=e=>{this._poll(e,this.#Q)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#te||(this.#te=!0,this.#ee(-2),this.#Q.on("block",this.#ee))}stop(){this.#te&&(this.#te=!1,this.#Q.off("block",this.#ee))}pause(e){this.stop()}resume(){this.start()}}t.OnBlockSubscriber=s,t.PollingBlockTagSubscriber=class extends s{#re;#ne;constructor(e,t){super(e),this.#re=t,this.#ne=-2}pause(e){e&&(this.#ne=-2),super.pause(e)}async _poll(e,t){const r=await t.getBlock(this.#re);null!=r&&(-2===this.#ne?this.#ne=r.number:r.number>this.#ne&&(t.emit(this.#re,r.number),this.#ne=r.number))}},t.PollingOrphanSubscriber=class extends s{#f;constructor(e,t){super(e),this.#f=i(t)}async _poll(e,t){throw new Error("@TODO")}};class a extends s{#ie;constructor(e,t){super(e),this.#ie=t}async _poll(e,t){const r=await t.getTransactionReceipt(this.#ie);r&&t.emit(this.#ie,r)}}t.PollingTransactionSubscriber=a,t.PollingEventSubscriber=class{#Q;#f;#Y;#te;#X;constructor(e,t){this.#Q=e,this.#f=i(t),this.#Y=this.#ee.bind(this),this.#te=!1,this.#X=-2}async#ee(e){if(-2===this.#X)return;const t=i(this.#f);t.fromBlock=this.#X+1,t.toBlock=e;const r=await this.#Q.getLogs(t);if(0!==r.length)for(const e of r)this.#Q.emit(this.#f,e),this.#X=e.blockNumber;else this.#X<e-60&&(this.#X=e-60)}start(){this.#te||(this.#te=!0,-2===this.#X&&this.#Q.getBlockNumber().then((e=>{this.#X=e})),this.#Q.on("block",this.#Y))}stop(){this.#te&&(this.#te=!1,this.#Q.off("block",this.#Y))}pause(e){this.stop(),e&&(this.#X=-2)}resume(){this.start()}}},4359:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(8051),s=r(9879),a=r(9224),c=r(7214),u=r(5212),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,u.hasLift(t)&&(n.lift=t.lift),n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(c.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},4383:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(4885),i=r(5212),o=r(7214);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4385:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(8051),i=r(4885);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},4465:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunEventEmitter=void 0;const n=r(4134);class i extends n.EventEmitter{emit(e,t){return super.emit(e,t)}on(e,t){super.on(e,t)}off(e,t){super.off(e,t)}}t.ShogunEventEmitter=i},4478:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(9533).AsyncScheduler);t.AnimationFrameScheduler=o},4491:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=void 0;const n=r(8166),i=r(5347);class o{name;constructor(e){(0,n.defineProperties)(this,{name:e})}clone(){return new o(this.name)}}t.NetworkPlugin=o;class s extends o{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const r={effectiveBlock:e};function o(e,n){let o=(t||{})[e];null==o&&(o=n),(0,i.assertArgument)("number"==typeof o,`invalud value for ${e}`,"costs",t),r[e]=o}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),(0,n.defineProperties)(this,r)}clone(){return new s(this.effectiveBlock,this)}}t.GasCostPlugin=s;class a extends o{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),(0,n.defineProperties)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new a(this.address,this.targetNetwork)}}t.EnsPlugin=a;class c extends o{#oe;get feeDataFunc(){return this.#oe}constructor(e){super("org.ethers.plugins.network.FeeData"),this.#oe=e}async getFeeData(e){return await this.#oe(e)}clone(){return new c(this.#oe)}}t.FeeDataNetworkPlugin=c,t.FetchUrlFeeDataNetworkPlugin=class extends o{#se;#ae;get url(){return this.#se}get processFunc(){return this.#ae}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#se=e,this.#ae=t}clone(){return this}}},4530:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9724),i=r(2071),o=r(5455);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4534:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0;const n=r(8510),i=r(5347),o=r(7005);class s{#ce;constructor(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid private key","privateKey","[REDACTED]"),this.#ce=(0,i.hexlify)(e)}get privateKey(){return this.#ce}get publicKey(){return s.computePublicKey(this.#ce)}get compressedPublicKey(){return s.computePublicKey(this.#ce,!0)}sign(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const t=n.secp256k1.sign((0,i.getBytesCopy)(e),(0,i.getBytesCopy)(this.#ce),{lowS:!0});return o.Signature.from({r:(0,i.toBeHex)(t.r,32),s:(0,i.toBeHex)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=s.computePublicKey(e);return(0,i.hexlify)(n.secp256k1.getSharedSecret((0,i.getBytesCopy)(this.#ce),(0,i.getBytes)(t),!1))}static computePublicKey(e,t){let r=(0,i.getBytes)(e,"key");if(32===r.length){const e=n.secp256k1.getPublicKey(r,!!t);return(0,i.hexlify)(e)}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}const o=n.secp256k1.ProjectivePoint.fromHex(r);return(0,i.hexlify)(o.toRawBytes(t))}static recoverPublicKey(e,t){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const r=o.Signature.from(t);let s=n.secp256k1.Signature.fromCompact((0,i.getBytesCopy)((0,i.concat)([r.r,r.s])));s=s.addRecoveryBit(r.yParity);const a=s.recoverPublicKey((0,i.getBytesCopy)(e));return(0,i.assertArgument)(null!=a,"invalid signature for digest","signature",t),"0x"+a.toHex(!1)}static addPoints(e,t,r){const i=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(e).substring(2)),o=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(t).substring(2));return"0x"+i.add(o).toHex(!!r)}}t.SigningKey=s},4584:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpcSocketProvider=void 0,t.IpcSocketProvider=void 0},4586:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePlugin=void 0;const n=r(4134);class i extends n.EventEmitter{description;_category;core=null;initialize(e){this.core=e}destroy(){this.core=null}assertInitialized(){if(!this.core)throw new Error(`Plugin ${this.name} not initialized`);return this.core}}t.BasePlugin=i},4613:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(7478);t.flatMap=n.mergeMap},4643:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunStorage=void 0,t.ShogunStorage=class{store;isTestMode;useLocalStorage;constructor(){if(this.store=new Map,this.isTestMode=!1,this.useLocalStorage=!1,"undefined"!=typeof localStorage&&!this.isTestMode)try{localStorage.setItem("_shogun_test","_shogun_test"),localStorage.removeItem("_shogun_test"),this.useLocalStorage=!0;const e=localStorage.getItem("shogun_keypair");e&&this.store.set("keypair",JSON.parse(e))}catch(e){this.useLocalStorage=!1,this.isTestMode||console.error("localStorage not available:",e)}}async getPair(){return this.getPairSync()}getPairSync(){return this.store.get("keypair")||null}async setPair(e){if(this.store.set("keypair",e),this.useLocalStorage)try{localStorage.setItem("shogun_keypair",JSON.stringify(e))}catch(e){this.isTestMode||console.error("Error saving data to localStorage:",e)}}clearAll(){if(this.store.clear(),this.useLocalStorage)try{localStorage.removeItem("shogun_keypair")}catch(e){this.isTestMode||console.error("Error removing data from localStorage:",e)}}getItem(e){const t=this.store.get(e);return void 0!==t?JSON.stringify(t):null}setItem(e,t){try{const r=JSON.parse(t);if(this.store.set(e,r),this.useLocalStorage)try{localStorage.setItem(e,t)}catch(t){this.isTestMode||console.error(`Error saving ${e} to localStorage:`,t)}}catch(r){if(this.store.set(e,t),this.useLocalStorage)try{localStorage.setItem(e,t)}catch(t){this.isTestMode||console.error(`Error saving ${e} to localStorage:`,t)}}}removeItem(e){if(this.store.delete(e),this.useLocalStorage)try{localStorage.removeItem(e)}catch(t){this.isTestMode||console.error(`Error removing ${e} from localStorage:`,t)}}}},4708:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9619);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},4772:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(1666),s=r(8284),a=r(4830),c=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=c},4808:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},4827:function(e,t,r){e=r.nmd(e),function(){function t(e,n){return n?r(5736)(e):e.slice?t[i(e)]:function(r,n){e(r={exports:{}}),t[i(n)]=r.exports};function i(e){return e.split("/").slice(-1).toString().replace(".js","")}}var n=e;t((function(e){String.random=function(e,t){var r="";for(e=e||24,t=t||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";e-- >0;)r+=t.charAt(Math.floor(Math.random()*t.length));return r},String.match=function(e,t){var r,n;return"string"==typeof e&&("string"==typeof t&&(t={"=":t}),e===(r=(t=t||{})["="]||t["*"]||t[">"]||t["<"])||n===t["="]&&(r=t["*"]||t[">"],e.slice(0,(r||"").length)===r||n===t["*"]&&(n!==t[">"]&&n!==t["<"]?e>=t[">"]&&e<=t["<"]:n!==t[">"]&&e>=t[">"]||n!==t["<"]&&e<=t["<"])))},String.hash=function(e,t){if("string"==typeof e){if(t=t||0,!e.length)return t;for(var r=0,n=e.length;r<n;++r)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}};var t,r,n,i,o,s,a=Object.prototype.hasOwnProperty;Object.plain=function(e){return!!e&&(e instanceof Object&&e.constructor===Object||"Object"===Object.prototype.toString.call(e).match(/^\[object (\w+)\]$/)[1])},Object.empty=function(e,t){for(var r in e)if(a.call(e,r)&&(!t||-1==t.indexOf(r)))return!1;return!0},Object.keys=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t},r=setTimeout,n=0,i=0,o=typeof setImmediate!=""+t&&setImmediate||function(e,n){return typeof MessageChannel==""+t?r:((e=new MessageChannel).port1.onmessage=function(e){""==e.data&&n()},function(t){n=t,e.port2.postMessage("")})}(),s=r.check=r.check||typeof performance!=""+t&&performance||{now:function(){return+new Date}},r.hold=r.hold||9,r.poll=r.poll||function(e){r.hold>=s.now()-n&&i++<3333?e():o((function(){n=s.now(),e()}),i=0)},function(){var e,t=setTimeout,r=t.turn=t.turn||function(e){1==n.push(e)&&i(s)},n=r.s=[],i=t.poll,o=0,s=function(){(e=n[o++])&&e(),o!=n.length&&99!=o||(n=r.s=n.slice(o),o=0),n.length&&i(s)}}(),function(){var e,t=setTimeout,r=t.turn;(t.each=t.each||function(t,n,i,o){o=o||9,function s(a,c,u){if(c=(a=(t||[]).splice(0,o)).length){for(var l=0;l<c&&e===(u=n(a[l]));l++);if(e===u)return void r(s)}i&&i(u)}()})()}()}))(t,"./shim"),t((function(e){e.exports=function e(t,r,n){if(!t)return{to:e};var i="function"==typeof r;if(t=(this.tag||(this.tag={}))[t]||i&&(this.tag[t]={tag:t,to:e._={next:function(e){var t;(t=this.to)&&t.next(e)}}}),i){var o={off:e.off||(e.off=function(){if(this.next===e._.next)return!0;this===this.the.last&&(this.the.last=this.back),this.to.back=this.back,this.next=e._.next,this.back.to=this.to,this.the.last===this.the&&delete this.on.tag[this.the.tag]}),to:e._,next:r,the:t,on:this,as:n};return(o.back=t.last||t).to=o,t.last=o}return(t=t.to)&&void 0!==r&&t.next(r),t}}))(t,"./onto"),t((function(e){e.exports=function(e){return null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e&&e!=1/0&&e!=-1/0&&e==e||!!e&&"string"==typeof e["#"]&&1===Object.keys(e).length&&e["#"]}}))(t,"./valid"),t((function(e){function r(){var e=+new Date;return a<e?(o=0,a=e+r.drift):a=e+(o+=1)/s+r.drift}t("./shim"),r.drift=0;var n,i=-1/0,o=0,s=999,a=i;r.is=function(e,t,r){var n=t&&e&&e._&&e._[">"]||r;if(n)return"number"==typeof(n=n[t])?n:i},r.ify=function(e,t,r,i,o){(e=e||{})._=e._||{},o&&(e._["#"]=o);var s=e._[">"]||(e._[">"]={});return n!==t&&"_"!==t&&("number"==typeof r&&(s[t]=r),n!==i&&(e[t]=i)),e},e.exports=r}))(t,"./state"),t((function(e){t("./shim"),e.exports=function(e){var t={s:{}},r=t.s;e=e||{max:999,age:9e3},t.check=function(e){return!!r[e]&&n(e)};var n=t.track=function(i){var o=r[i]||(r[i]={});return o.was=t.now=+new Date,t.to||(t.to=setTimeout(t.drop,e.age+9)),n.ed&&n.ed(i),o};return t.drop=function(n){t.to=null,t.now=+new Date;var i=Object.keys(r);console.STAT&&console.STAT(t.now,+new Date-t.now,"dup drop keys"),setTimeout.each(i,(function(i){var o=r[i];o&&(n||e.age)>t.now-o.was||delete r[i]}),0,99)},t}}))(t,"./dup"),t((function(e){t("./onto"),e.exports=function(e,t){if(this.on){var n=(this.opt||{}).lack||9e3;if("function"!=typeof e){if(!e)return;var i=e["#"]||e,o=(this.tag||"")[i];if(!o)return;return t&&(o=this.on(i,t),clearTimeout(o.err),o.err=setTimeout((function(){o.off()}),n)),!0}if(i=t&&t["#"]||r(9),!e)return i;var s=this.on(i,e,t);return s.err=s.err||setTimeout((function(){s.off(),s.next({err:"Error: No ACK yet.",lack:!0})}),n),i}};var r=String.random||function(){return Math.random().toString(36).slice(2)}}))(t,"./ask"),t((function(e){function r(e){return e instanceof r?(this._={$:this}).$:this instanceof r?r.create(this._={$:this,opt:e}):new r(e)}r.is=function(e){return e instanceof r||e&&e._&&e===e._.$||!1},r.version=.202,r.chain=r.prototype,r.chain.toJSON=function(){},t("./shim"),r.valid=t("./valid"),r.state=t("./state"),r.on=t("./onto"),r.dup=t("./dup"),r.ask=t("./ask"),function(){function e(n){if(n)if(n.out!==e){var i,o=this.as,c=o.at||o,u=c.$,l=c.dup,f=n.DBG;if((i=n["#"])||(i=n["#"]=a(9)),!l.check(i)){if(l.track(i),i=n._,n._="function"==typeof i?i:function(){},n.$&&n.$===(n.$._||"").$||(n.$=u),n["@"]&&!n.put&&function(e){var t,r=e["@"]||"";if(t=r._)t.acks=(t.acks||0)+1,(t.err=e.err)&&(e["@"]=t["#"],s(t)),t.ok=e.ok||t.ok,t.stop||t.crack||(t.crack=t.match&&t.match.push((function(){h(t)}))),h(t);else{var n=(n=e.$)&&(n=n._)&&(n=n.root)&&(n=n.dup);if(!(n=n.check(r)))return;e["@"]=n["#"]||e["@"]}}(n),!c.ask(n["@"],n)){if(f&&(f.u=+new Date),n.put)return void t(n);n.get&&r.on.get(n,u)}f&&(f.uc=+new Date),this.to.next(n),f&&(f.ua=+new Date),n.nts||n.NTS||(n.out=e,c.on("out",n),f&&(f.ue=+new Date))}}else this.to.next(n)}function t(t){if(t){var r=t._||"",o=r.root=((r.$=t.$||"")._||"").root;if(t["@"]&&r.faith&&!r.miss)return t.out=e,void o.on("out",t);r.latch=o.hatch,r.match=o.hatch=[];var a=t.put,l=r.DBG=t.DBG,f=+new Date;if(p=p||f,!a["#"]||!a["."]){l&&(l.p=f),r["#"]=t["#"],r.msg=t,r.all=0,r.stun=1;var d=Object.keys(a);console.STAT&&console.STAT(f,((l||r).pk=+new Date)-f,"put sort");var h,b,m,v,A,E,P,O=0;!function e(o){if(h!=O){if(h=O,!(m=d[O]))return console.STAT&&console.STAT(f,((l||r).pd=+new Date)-f,"put"),void s(r);(v=a[m])?(P=v._)?m!==P["#"]?E=g+y(m)+"soul not same.":(A=P[">"])||(E=g+y(m)+"no state."):E=g+y(m)+"no meta.":E=g+y(m)+"no node.",b=Object.keys(v||{})}if(E)return t.err=r.err=E,void s(r);var p,S=0;for(o=o||0;o++<9&&(p=b[S++]);)if("_"!==p){var _=v[p],k=A[p];if(i===k){E=g+y(p)+"on"+y(m)+"no state.";break}if(!u(_)){E=g+y(p)+"on"+y(m)+"bad "+typeof _+y(_);break}n(_,p,m,k,t),++w}(b=b.slice(S)).length?c(e):(++O,b=null,e(o))}()}}}function n(e,t,r,i,o){var s,a=o._||"",c=a.root,u=c.graph,f=u[r]||d,h=l(f,t,1),p=f[t],g=a.DBG;(s=console.STAT)&&(u[r]&&p||(s.has=(s.has||0)+1));var y=v();if(i>y)return setTimeout((function(){n(e,t,r,i,o)}),(s=i-y)>m?m:s),void(console.STAT&&console.STAT((g||a).Hf=+new Date,s,"future"));if(!(i<h)&&(a.faith||i!==h||!(e===p||b(e)<=b(p))||a.miss)){a.stun++;var w=o["#"]+a.all++,A={toString:function(){return w},_:a};A.toJSON=A.toString,c.dup.track(A)["#"]=o["#"],g&&(g.ph=g.ph||+new Date),c.on("put",{"#":A,"@":o["@"],put:{"#":r,".":t,":":e,">":i},ok:o.ok,_:a})}}function o(e){var t;(t=(e._||"").DBG)&&(t.pa=+new Date,t.pm=t.pm||+new Date);var r,n=this.as,i=n.graph,o=e._,a=e.put,c=a["#"],u=a["."],l=a[":"],d=a[">"];e["#"],(r=o.msg)&&(r=r.put)&&(r=r[c])&&f(r,u,d,l,c),i[c]=f(i[c],u,d,l,c),(r=(n.next||"")[c])&&r.on("in",e),s(o),this.to.next(e)}function s(t,r){var n;if(!t.stop&&(t.err||!(0<--t.stun))&&(t.stop=1,n=t.root)){var i=t.match;i.end=1,i===n.hatch&&(!(i=t.latch)||i.end?delete n.hatch:n.hatch=i),t.hatch&&t.hatch(),setTimeout.each(t.match,(function(e){e&&e()})),!(r=t.msg)||t.err||r.err||(r.out=e,t.root.on("out",r),A())}}function h(e){e&&e.root&&(e.stun||e.acks!==e.all||e.root.on("in",{"@":e["#"],err:e.err,ok:e.err?i:e.ok||{"":1}}))}r.create=function(t){t.root=t.root||t,t.graph=t.graph||{},t.on=t.on||r.on,t.ask=t.ask||r.ask,t.dup=t.dup||r.dup();var n=t.$.opt(t.opt);return t.once||(t.on("in",e,t),t.on("out",e,t),t.on("put",o,t),r.on("create",t),t.on("create",t)),t.once=1,n},r.on.put=t;var p,g="Error: Invalid graph!",y=function(e){return" '"+(""+e).slice(0,9)+"...' "},b=JSON.stringify,m=2147483647,v=r.state,w=0,A=function(){w>999&&w/-(p-(p=+new Date))>1&&(r.window&&console.log("Warning: You're syncing 1K+ records a second, faster than DOM can update - consider limiting query."),A=function(){w=0})}}(),function(){function e(e,t){var r=+new Date,n=e._||{},o=n.DBG=e.DBG,s=e["#"],c=a(9),u=Object.keys(t||"").sort(),d=((t||"")._||"")["#"],h=(u.length,e.$._.root),p=t===h.graph[d];console.STAT&&console.STAT(r,((o||n).gk=+new Date)-r,"got keys"),t&&function e(){r=+new Date;for(var n,g,y,b=0,m={};b<9&&(n=u[b++]);)f(m,n,l(t,n),t[n],d);u=u.slice(b),(g={})[d]=m,m=g,p&&((y=function(){}).ram=y.faith=!0),g=u.length,console.STAT&&console.STAT(r,-(r-(r=+new Date)),"got copied some"),o&&(o.ga=+new Date),h.on("in",{"@":s,"#":c,put:m,"%":g?c=a(9):i,$:h.$,_:y,DBG:o,FOO:1}),console.STAT&&console.STAT(r,+new Date-r,"got in"),g&&setTimeout.turn(e)}(),t||h.on("in",{"@":e["#"]})}r.on.get=function(t,r){var n=r._,o=t.get,s=o["#"],a=n.graph[s],c=o["."],u=(n.next||(n.next={}))[s],d=(t._||{}).DBG=t.DBG;if(d&&(d.g=+new Date),!a)return n.on("get",t);if(c){if(("string"!=typeof c||i===a[c])&&!((u||"").next||"")[c])return void n.on("get",t);a=f({},c,l(a,c),a[c],s)}a&&e(t,a),n.on("get",t)},r.on.get.ack=e}(),r.chain.opt=function(e){e=e||{};var t=this._,n=e.peers||e;return Object.plain(e)||(e={}),Object.plain(t.opt)||(t.opt=e),"string"==typeof n&&(n=[n]),Object.plain(t.opt.peers)||(t.opt.peers={}),n instanceof Array&&(e.peers={},n.forEach((function(r){var n={};n.id=n.url=r,e.peers[r]=t.opt.peers[r]=t.opt.peers[r]||n}))),s(e,(function e(t){var r=this[t];this&&this.hasOwnProperty(t)||"string"==typeof r||Object.empty(r)?this[t]=r:(!r||r.constructor===Object||r instanceof Array)&&s(r,e)})),t.opt.from=e,r.on("opt",t),t.opt.uuid=t.opt.uuid||function(e){return r.state().toString(36).replace(".","")+String.random(e||12)},this};var i,o,s=function(e,t){Object.keys(e).forEach(t,e)},a=String.random,c=setTimeout.turn,u=r.valid,l=r.state.is,f=r.state.ify,d={};r.log=function(){return!r.log.off&&o.log.apply(o,arguments),[].slice.call(arguments).join(" ")},r.log.once=function(e,t,n){return(n=r.log.once)[e]=n[e]||0,n[e]++||r.log(t)},"undefined"!=typeof window&&((window.GUN=window.Gun=r).window=window);try{void 0!==n&&(n.exports=r)}catch(e){}e.exports=r,(r.window||{}).console=(r.window||{}).console||{log:function(){}},(o=console).only=function(e,t){return o.only.i&&e===o.only.i&&o.only.i++&&(o.log.apply(o,arguments)||t)},r.log.once("welcome","Hello wonderful person! :) Thanks for using GUN, please ask for help on http://chat.gun.eco if anything takes you longer than 5min to figure out!")}))(t,"./root"),t((function(e){t("./root").chain.back=function(e,t){if(-1===(e=e||1)||1/0===e)return this._.root.$;if(1===e)return(this._.back||this._).$;var i=this._;if("string"==typeof e&&(e=e.split(".")),e instanceof Array){for(var o=0,s=e.length,a=i;o<s;o++)a=(a||n)[e[o]];return r!==a?t?this:a:(a=i.back)?a.$.back(e,t):void 0}if("function"==typeof e){var c;for(a={back:i};(a=a.back)&&r===(c=e(a,t)););return c}return"number"==typeof e?(i.back||i).$.back(e-1):this};var r,n={}}))(t,"./back"),t((function(e){var r=t("./root");function n(e,t){if(t=t||this.as||e.$._,(!e.$$||this===r.on)&&e.put&&!t.soul){var n=e.put||"",i=n["="]||n[":"],o=t.root,s=o.$.get(n["#"]).get(n["."])._;if("string"==typeof(i=u(i))){if(!(s.echo||(s.echo={}))[t.id]||(o.pass||"")[t.id]){if(a=o.pass){if(a[i+t.id])return;a[i+t.id]=1}(s.echo||(s.echo={}))[t.id]=t,t.has&&(t.link=i);var a,c=o.$.get(s.link=i)._;(c.echo||(c.echo={}))[s.id]=s,((a=t.ask||"")[""]||t.lex)&&c.on("out",{get:{"#":i}}),setTimeout.each(Object.keys(a),(function(e,t){e&&(t=a[e])&&t.on("out",{get:{"#":i,".":e}})}),0,99)}}else this===r.on&&((s.echo||(s.echo={}))[t.id]=t)}}function i(e,t){var r,n,o=e.put||"",a=s!==o["="]?o["="]:o[":"],c=t.root;if(s===a){if(t.soul&&s!==t.put)return;if(n=(e.$$||e.$||"")._||"",e["@"]&&(s!==n.put||s!==t.put))return;return(r=t.link||e.linked)&&delete(c.$.get(r)._.echo||"")[t.id],t.has&&(t.link=null),t.put=s,void setTimeout.each(Object.keys(t.next||""),(function(e,n){(n=t.next[e])&&(r&&delete(c.$.get(r).get(e)._.echo||"")[n.id],n.on("in",{get:e,put:s,$:n.$}))}),0,99)}t.soul||e.$$||(r=u(a),n=e.$._||"",(r!==n.link&&(!t.has||n.link)||(c.pass||"")[t.id]&&"string"!=typeof r)&&(delete(n.echo||"")[t.id],i({get:t.get,put:s,$:e.$,linked:e.linked=e.linked||n.link},t)))}function o(e,t){var n=this.as,i=n.$._,o=(i.root,n.get||""),a=(e.put||"")[o["#"]]||"";if(!e.put||"string"==typeof o["."]&&s===a[o["."]]){if(s!==i.put)return;if(!i.soul&&!i.has)return;return i.ack=(i.ack||0)+1,void i.on("in",{get:i.get,put:i.put=s,$:i.$,"@":e["@"]})}(e._||{}).miss=1,r.on.put(e)}r.chain.chain=function(e){var t,n=this,i=n._,o=new(e||n).constructor(n),s=o._;return s.root=t=i.root,s.id=++t.once,s.back=n._,s.on=r.on,s.on("in",r.on.in,s),s.on("out",r.on.out,s),o},r.on.out=function(e){var t,r,n=this.as,i=n.back,a=n.root;if(e.$||(e.$=n.$),this.to.next(e),!n.err){if(t=e.get){if(a.pass&&(a.pass[n.id]=n),n.lex&&Object.keys(n.lex).forEach((function(e){r[e]=n.lex[e]}),r=e.get=e.get||{}),t["#"]||n.soul){if(t["#"]=t["#"]||n.soul,e["#"]||(e["#"]=c(9)),i=a.$.get(t["#"])._,t=t["."]){if(l(i.put,t)&&(r=i.ask&&i.ask[t],(i.ask||(i.ask={}))[t]=i.$.get(t)._,i.on("in",{get:t,put:{"#":i.soul,".":t,":":i.put[t],">":d(a.graph[i.soul],t)}}),r))return}else{if(r=i.ask&&i.ask[""],(i.ask||(i.ask={}))[""]=i,s!==i.put&&(i.on("in",i),r))return;e.$=i.$}return a.ask(o,e),a.on("in",e)}if(t["."])return n.get?(e={get:{".":n.get},$:n.$},(i.ask||(i.ask={}))[n.get]=e.$._,i.on("out",e)):(e={get:n.lex?e.get:{},$:n.$},i.on("out",e));if((n.ask||(n.ask={}))[""]=n,n.get)return t["."]=n.get,(i.ask||(i.ask={}))[n.get]=e.$._,i.on("out",e)}return i.on("out",e)}n.on("in",{put:n.put=s,$:n.$})},r.on.in=function(e,t){var r,o=(t=t||this.as).root,c=e.$||(e.$=t.$),l=(c||"")._||a,f=e.put||"",p=f["#"],g=f["."],y=s!==f["="]?f["="]:f[":"],b=f[">"]||-1/0;if(s!==e.put&&(s===f["#"]||s===f["."]||s===f[":"]&&s===f["="]||s===f[">"]))return u(f)?void t.on("in",{$:l.back.$,put:{"#":p=l.back.soul,".":g=l.has||l.get,"=":f,">":d(l.back.put,g)},via:e}):(p=((f||"")._||"")["#"])?(c=t.root.$.get(p),setTimeout.each(Object.keys(f).sort(),(function(r){"_"!=r&&s!==(b=d(f,r))&&t.on("in",{$:c,put:{"#":p,".":r,"=":f[r],">":b},VIA:e})}))):void console.log("chain not yet supported for",f,"...",e,t);(e.seen||"")[t.id]||((e.seen||(e.seen=function(){}))[t.id]=t,t!==l&&(Object.keys(e).forEach((function(t){f[t]=e[t]}),f={}),f.get=t.get||f.get,t.soul||t.has?l.soul&&(f.$=t.$,f.$$=f.$$||l.$):f.$$$=f.$$$||t.$,e=f),i(e,t),(t.soul||e.$$)&&b>=d(o.graph[p],g)&&((f=o.$.get(p)._).put=h(f.put,g,b,y,p)),!l.soul&&b>=d(o.graph[p],g)&&(r=(o.$.get(p)._.next||"")[g])&&(r.put=y,"string"==typeof(f=u(y))&&(r.put=o.$.get(f)._.put||y)),this.to&&this.to.next(e),t.any&&setTimeout.each(Object.keys(t.any),(function(r){(r=t.any[r])&&r(e)}),0,99),t.echo&&setTimeout.each(Object.keys(t.echo),(function(r){(r=t.echo[r])&&r.on("in",e)}),0,99),((e.$$||"")._||l).soul&&(r=t.next)&&(r=r[g])&&(f={},Object.keys(e).forEach((function(t){f[t]=e[t]})),f.$=(e.$$||e.$).get(f.get=g),delete f.$$,delete f.$$$,r.on("in",f)),n(e,t))},r.on.link=n,r.on.unlink=i;var s,a={},c=String.random,u=r.valid,l=function(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)},f=r.state,d=f.is,h=f.ify}))(t,"./chain"),t((function(e){var r=t("./root");function n(e){var t=this.at||this.on;if(!e||t.soul||t.has)return this.off();if(e=(e=(e=e.$||e)._||e).id){var r;if(t.map,(r=this.seen||(this.seen={}))[e])return!0;r[e]=!0}}r.chain.get=function(e,t,a){var c,u;if("string"==typeof e){if(0==e.length)return(c=this.chain())._.err={err:r.log("0 length key!",e)},t&&t.call(c,c._.err),c;(c=((f=this._).next||o)[e])||(c=e&&function(e,t){var r=t._,n=r.next,i=t.chain()._;return n||(n=r.next={}),n[i.get=e]=i,t===r.root.$?i.soul=e:(r.soul||r.has)&&(i.has=e),i}(e,this)),c=c&&c.$}else{if("function"==typeof e){if(!0===t)return function(e,t,n,o){var s,a=e._,c=0;(s=a.soul||a.link)?t(s,o,a):a.jam?a.jam.push([t,o]):(a.jam=[[t,o]],e.get((function(e,t){if(!(i===e.put&&!a.root.opt.super&&(s=Object.keys(a.root.opt.peers).length)&&++c<=s)){t.rid(e);var n,o=(o=e.$)&&o._||{},u=0;for(s=a.jam,delete a.jam;n=s[u++];){var l=n[0];n=n[1],l&&l(o.link||o.soul||r.valid(e.put)||((e.put||{})._||{})["#"],n,e,t)}}}),{out:{get:{".":!0}}}))}(this,e,0,a),this;var l,f=(c=this)._,d=t||{},h=f.root;d.at=f,d.ok=e;var p={};function g(e,t,n){if(!g.stun&&(!(o=h.pass)||o[l])){var o,s=e.$._,a=(e.$$||"")._,c=(a||s).put,u=!s.has&&!s.soul,y={};if((u||i===c)&&(c=i===((o=e.put)||"")["="]?i===(o||"")[":"]?o:o[":"]:o["="]),"string"==typeof(o=r.valid(c))&&(c=i===(o=h.$.get(o)._.put)?d.not?i:c:o),!d.not||i!==c){if(i===d.stun){if((o=h.stun)&&o.on&&(f.$.back((function(e){if(o.on(""+e.id,y={}),(y.run||0)<g.id)return y})),!y.run&&o.on(""+s.id,y={}),!y.run&&a&&o.on(""+a.id,y={}),g.id>y.run&&(y.stun&&!y.stun.end||(y.stun=o.on("stun"),y.stun=y.stun&&y.stun.last),y.stun&&!y.stun.end)))return void((y.stun.add||(y.stun.add={}))[l]=function(){g(e,t,1)});if(i===c&&(n=0),(o=h.hatch)&&!o.end&&i===d.hatch&&!n){if(p[s.$._.id])return;return p[s.$._.id]=1,void o.push((function(){g(e,t,1)}))}p={}}if(h.pass){if(h.pass[l+s.id])return;h.pass[l+s.id]=1}d.on?d.ok.call(s.$,c,s.get,e,t||g):d.v2020?d.ok(e,t||g):(Object.keys(e).forEach((function(t){o[t]=e[t]}),o={}),(e=o).put=c,d.ok.call(d.as,e,t||g))}}}return g.at=f,(f.any||(f.any={}))[l=String.random(7)]=g,g.off=function(){g.stun=1,f.any&&delete f.any[l]},g.rid=n,g.id=d.run||++h.once,u=h.pass,(h.pass={})[l]=1,d.out=d.out||{get:{}},f.on("out",d.out),h.pass=u,c}if("number"==typeof e)return this.get(""+e,t,a);if("string"==typeof(u=s(e)))return this.get(u,t,a);(u=this.get.next)&&(c=u(this,e))}return c?(t&&"function"==typeof t&&c.get(t,a),c):((c=this.chain())._.err={err:r.log("Invalid get request!",e)},t&&t.call(c,c._.err),c)};var i,o={},s=r.valid}))(t,"./get"),t((function(e){var r=t("./root");function n(e,t){if(t){t=(t._||"").id||t;var n,i=e.root.stun||(e.root.stun={on:r.on}),o={};e.stun||(e.stun=i.on("stun",(function(){}))),(n=i.on(""+t))&&n.the.last.next(o),o.run>=e.run||i.on(""+t,(function(t){if(e.stun.end)return this.off(),void this.to.next(t);t.run=t.run||e.run,t.stun=t.stun||e.stun}))}}function i(e){if(e.err)i.end(e.stun,e.root);else if(!e.todo.length&&!e.end&&Object.empty(e.wait)){e.end=1;var t,n=e.$.back(-1)._,o=n.root,s=n.ask((function(t){o.on("ack",t),t.err&&!t.lack&&r.log(t),++a>(e.acks||0)&&this.off(),e.ack&&e.ack(t,this)}),e.opt),a=0,c=e.stun;(t=function(){c&&(i.end(c,o),setTimeout.each(Object.keys(c=c.add||""),(function(e){(e=c[e])&&e()})))}).hatch=t,e.ack&&!e.ok&&(e.ok=e.acks||9),e.via._.on("out",{put:e.out=e.graph,ok:e.ok&&{"@":e.ok+1},opt:e.opt,"#":s,_:t})}}r.chain.put=function(e,t,s){var l=this,f=l._,d=f.root;(s=s||{}).root=f.root,s.run||(s.run=d.once),n(s,f.id),s.ack=s.ack||t,s.via=s.via||l,s.data=s.data||e,s.soul||(s.soul=f.soul||"string"==typeof t&&t);var h=s.state=s.state||r.state();return"function"==typeof e?(e((function(e){s.data=e,l.put(o,o,s)})),l):s.soul?(s.$=d.$.get(s.soul),s.todo=[{it:s.data,ref:s.$}],s.turn=s.turn||a,s.ran=s.ran||i,function e(){var t,o,a,l,f,d=s.todo,p=d.pop(),g=p.it;if(p.ref&&p.ref._.id,n(s,p.ref),(l=p.todo)&&(g=g[o=l.pop()],l.length&&d.push(p)),o&&(d.path||(d.path=[])).push(o),!(t=c(g))&&!(f=r.is(g))){if(!Object.plain(g))return void i.err(s,"Invalid data: "+function(e,t){return e&&(t=e.constructor)&&t.name||typeof e}(g)+" at "+(s.via.back((function(e){e.get&&l.push(e.get)}),l=[])||l.join("."))+"."+(d.path||[]).join("."));for(var y=s.seen||(s.seen=[]),b=y.length;b--;)if(g===(l=y[b]).it){t=g=l.link;break}}if(o&&t)p.node=u(p.node,o,h,g);else{if(!s.seen)return void i.err(s,"Data at root of graph must be a node (an object).");s.seen.push(a={it:g,link:{},todo:f?[]:Object.keys(g).sort().reverse(),path:(d.path||[]).slice(),up:p}),p.node=u(p.node,o,h,a.link),!f&&a.todo.length&&d.push(a);var m=s.seen.length;function v(e,t){var r=a.link["#"];t&&(t.off(),t.rid(e));var i=r||e.soul||(l=(e.$$||e.$)._||"").soul||l.link||((l=l.put||"")._||"")["#"]||l["#"]||((l=e.put||"")&&e.$$?l["#"]:(l["="]||l[":"]||"")["#"]);!r&&n(s,e.$),i||p.link["#"]?(i||(i=[],(e.$$||e.$).back((function(e){if(l=e.soul||e.link)return i.push(l);i.push(e.get)})),i=i.reverse().join("/")),a.link["#"]=i,!f&&(((s.graph||(s.graph={}))[i]=a.node||(a.node={_:{}}))._["#"]=i),delete s.wait[m],a.wait&&setTimeout.each(a.wait,(function(e){e&&e()})),s.ran(s)):(p.wait||(p.wait=[])).push((function(){v(e,t)}))}(s.wait||(s.wait={}))[m]="",l=(a.ref=f?g:o?p.ref.get(o):p.ref)._,(l=g&&(g._||"")["#"]||l.soul||l.link)?v({soul:l}):a.ref.get(v,{run:s.run,v2020:1,out:{get:{".":" "}}})}if(!d.length)return s.ran(s);s.turn(e)}(),l):(function(e){var t,r=e.via._;e.via=e.via.back((function(r){if(r.soul||!r.get)return r.$;t=e.data,(e.data={})[r.get]=t})),e.via&&e.via._.soul||(e.via=r.root.$.get(((e.data||"")._||"")["#"]||r.$.back("opt.uuid")())),e.via.put(e.data,e.ack,e)}(s),l)},i.end=function(e,t){e.end=s,e.the.to===e&&e===e.the.last&&delete t.stun,e.off()},i.err=function(e,t){(e.ack||s).call(e,e.out={err:e.err=r.log(t)}),e.ran(e)};var o,s=function(){},a=setTimeout.turn,c=r.valid,u=r.state.ify}))(t,"./put"),t((function(e){var r=t("./root");t("./chain"),t("./back"),t("./put"),t("./get"),e.exports=r}))(t,"./index"),t((function(e){var r,n=t("./index");n.chain.on=function(e,t,r,n){var i,o=this,s=o._;if(s.root,"string"==typeof e)return t?(i=s.on(e,t,r||s,n),r&&r.$&&(r.subs||(r.subs=[])).push(i),o):s.on(e);var a=t;return(a=!0===a?{change:!0}:a||{}).not=1,a.on=1,o.get(e,a),o},n.chain.once=function(e,t){if(t=t||{},!e)return function(e,t,r){return n.log.once("valonce","Chainable val is experimental, its behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),(r=e.chain())._.nix=e.once((function(e,t){r._.on("in",this._)})),r._.lex=e._.lex,r}(this);var i,o=this,s=o._,a=s.root,c=(s.put,String.random(7));return o.get((function(o,u,l,f){var d=this,h=d._,p=h.one||(h.one={});function g(y){h.has||h.soul||(h={put:o,get:u}),r===(i=h.put)&&(i=((l.$$||"")._||"").put),"string"!=typeof n.valid(i)||(i=a.$.get(i)._.put)!==r||y?f.stun||""!==p[c]&&(p[c]="",(s.soul||s.has)&&f.off(),e.call(d,i,h.get),clearTimeout(p[c])):p[c]=setTimeout((function(){g(1)}),t.wait||99)}f.stun||""!==p[c]&&(!0!==(i=n.valid(o))?"string"!=typeof i&&(clearTimeout((s.one||"")[c]),clearTimeout(p[c]),p[c]=setTimeout(g,t.wait||99)):g())}),{on:1}),o},n.chain.off=function(){var e,t=this._,r=t.back;if(r)return t.ack=0,(e=r.next)&&e[t.get]&&delete e[t.get],(e=r.any)&&(delete r.any,r.any={}),(e=r.ask)&&delete e[t.get],(e=r.put)&&delete e[t.get],(e=t.soul)&&delete r.root.graph[e],(e=t.map)&&Object.keys(e).forEach((function(t,n){(n=e[t]).link&&r.root.$.get(n.link).off()})),(e=t.next)&&Object.keys(e).forEach((function(t,r){e[t].$.off()})),t.on("off",{}),this}}))(t,"./on"),t((function(e){var r=t("./index"),n=r.chain.get.next;function i(e){this.to.next(e);var t,n=this.as,i=e.$._,o=e.put;(i.soul||e.$$)&&((t=n.lex)&&!String.match(e.get||(o||"")["."],t["."]||t["#"]||t)||r.on.link(e,n))}r.chain.get.next=function(e,t){var r;return Object.plain(t)?(r=((r=t["#"])||"")["="]||r)?e.get(r):((r=e.chain()._).lex=t,e.on("in",(function(e){String.match(e.get||(e.put||"")["."],t["."]||t["#"]||t)&&r.on("in",e),this.to.next(e)})),r.$):(n||s)(e,t)},r.chain.map=function(e,t,n){var a,c,u=this,l=u._;return Object.plain(e)&&(a=e["."]?e:{".":e},e=o),e?(r.log.once("mapfn","Map functions are experimental, their behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),c=u.chain(),u.map().on((function(t,n,i,a){var u=(e||s).call(this,t,n,i,a);if(o!==u){if(t===u)return c._.on("in",i);if(r.is(u))return c._.on("in",u._);var l={};Object.keys(i.put).forEach((function(e){l[e]=i.put[e]}),l),l["="]=u,c._.on("in",{get:n,put:l})}})),c):((c=l.each)||((l.each=c=u.chain())._.lex=a||c._.lex||l.lex,c._.nix=u.back("nix"),u.on("in",i,c._)),c)};var o,s=function(){}}))(t,"./map"),t((function(e){var r=t("./index");r.chain.set=function(e,t,n){var i,o,s=this,a=s.back(-1);return t=t||function(){},(n=n||{}).item=n.item||e,(i=((e||"")._||"")["#"])&&((e={})["#"]=i),"string"==typeof(o=r.valid(e))?s.get(i=o).put(e,t,n):r.is(e)?(s.put((function(n){e.get((function(e,i,a){if(!e)return t.call(s,{err:r.log('Only a node can be linked! Not "'+a.put+'"!')});(o={})[e]={"#":e},n(o)}),!0)})),e):(Object.plain(e)&&(e=a.get(i=s.back("opt.uuid")()).put(e)),s.get(i||a.back("opt.uuid")(7)).put(e,t,n))}}))(t,"./set"),t((function(e){t("./shim");var r,n=function(){},i=JSON.parseAsync||function(e,t,r){var n=+new Date;try{t(void 0,JSON.parse(e,r),o.sucks(+new Date-n))}catch(e){t(e)}},o=JSON.stringifyAsync||function(e,t,r,n){var i=+new Date;try{t(void 0,JSON.stringify(e,r,n),o.sucks(+new Date-i))}catch(e){t(e)}};o.sucks=function(e){e>99&&(console.log("Warning: JSON blocking CPU detected. Add `gun/lib/yson.js` to fix."),o.sucks=n)};try{e.exports=function(e){var t=function(){},n=e.opt||{};n.log=n.log||console.log,n.gap=n.gap||n.wait||0,n.max=n.max||.3*(n.memory?999*n.memory*999:3e8),n.pack=n.pack||.01*n.max*.01,n.puff=n.puff||9;var s=setTimeout.turn||setTimeout,a=e.dup,c=a.check,u=a.track,l=(new Date,t.hear=function(e,r){if(e){if(n.max<=e.length)return t.say({dam:"!",err:"Message too big!"},r);t===this&&(l.d+=e.length||0,++l.c);var o,a=r.SH=+new Date,c=e[0];return"["===c?(i(e,(function(e,i){if(e||!i)return t.say({dam:"!",err:"DAM JSON parse error."},r);console.STAT&&console.STAT(+new Date,i.length,"# on hear batch");var o=n.puff;!function e(){for(var n,a=+new Date,c=0;c<o&&(n=i[c++]);)t.hear(n,r);i=i.slice(c),console.STAT&&console.STAT(a,+new Date-a,"hear loop"),f(r),i.length&&s(e,0)}()})),void(e="")):"{"===c||(e["#"]||Object.plain(e))&&(o=e)?o?l.one(o,r,a):void i(e,(function(e,n){if(e||!n)return t.say({dam:"!",err:"DAM JSON parse error."},r);l.one(n,r,a)})):void 0}});function f(e){var t=e.batch,r="string"==typeof t;if(r&&(t+="]"),e.batch=e.tail=null,t&&!(r?3>t.length:!t.length)){if(!r)try{t=1===t.length?t[0]:JSON.stringify(t)}catch(e){return n.log("DAM JSON stringify error",e)}t&&d(t,e)}}function d(e,r){try{var n=r.wire;r.say?r.say(e):n.send&&n.send(e),t.say.d+=e.length||0,++t.say.c}catch(t){(r.queue=r.queue||[]).push(e)}}l.one=function(r,n,i){var o,s,l,f,d;if(r.DBG&&(r.DBG=d={DBG:r.DBG}),d&&(d.h=i),d&&(d.hp=+new Date),(o=r["#"])||(o=r["#"]=String.random(9)),!((l=c(o))||(s=r["##"])&&(l=r["@"]||r.get&&o)&&a.check(f=l+s))){if((r._=function(){}).via=t.leap=n,(l=r["><"])&&"string"==typeof l&&l.slice(0,99).split(",").forEach((function(e){this[e]=1}),r._.yo={}),l=r.dam)return(l=t.hear[l])&&l(r,n,e),void u(o);(l=r.ok)&&(r._.near=l["/"]),i=+new Date,d&&(d.is=i),n.SI=o,u.ed=function(e){o===e&&(u.ed=0,(e=a.s[o])&&(e.via=n,r.get&&(e.it=r)))},e.on("in",t.last=r),d&&(d.hd=+new Date),console.STAT&&console.STAT(i,+new Date-i,r.get?"msg get":r.put?"msg put":"msg"),u(o),f&&u(f),t.leap=t.last=null}},l.c=l.d=0,function(){var e,i=0;function l(e,t){var r;return t instanceof Object?(Object.keys(t).sort().forEach(h,{to:r={},on:t}),r):t}function h(e){this.to[e]=this.on[e]}t.hash=function(e,r){var n,i,a,c=+new Date;o(e.put,(function o(u,l){var f=(i||(i=a=l||"")).slice(0,32768);n=String.hash(f,n),(i=i.slice(32768))?s(o,0):(console.STAT&&console.STAT(c,+new Date-c,"say json+hash"),e._.$put=a,e["##"]=n,t.say(e,r),delete e._.$put)}),l)},(t.say=function(o,c){var l;if((l=this)&&(l=l.to)&&l.next&&l.next(o),!o)return!1;var h,p,g,y=o["@"],b=o._||(o._=function(){}),m=o.DBG,v=+new Date;if(b.y=b.y||v,c||m&&(m.y=v),(h=o["#"])||(h=o["#"]=String.random(9)),!e&&u(h),(p=o["##"])||r===o.put||b.via||!y){if(!c&&y&&(c=(l=a.s[y])&&(l.via||(l=l.it)&&(l=l._)&&l.via)||(l=t.last)&&y===l["#"]&&t.leap),!c&&y){if(a.s[y])return;return console.STAT&&console.STAT(+new Date,++i,"total no peer to ack to"),!1}if(y&&!o.put&&!p&&((a.s[y]||"").it||"")["##"])return!1;if(!c&&t.way)return t.way(o);if(m&&(m.yh=+new Date),g=b.raw){if(m&&(m.yr=+new Date),!c||!c.id){if(!Object.plain(c||n.peers))return!1;v=+new Date,n.puff;var w=n.peers,A=Object.keys(c||n.peers||{});return console.STAT&&console.STAT(v,+new Date-v,"peer keys"),void function r(){var n=+new Date;e=1;var i=b.raw;b.raw=g;for(var a,l=0;l<9&&(a=(A||"")[l++]);)(a=w[a]||(c||"")[a])&&t.say(o,a);b.raw=i,e=0,A=A.slice(l),console.STAT&&console.STAT(n,+new Date-n,"say loop"),A.length&&(s(r,0),y&&u(y))}()}if(!c.wire&&t.wire&&t.wire(c),h!==c.last){if(c.last=h,c===b.via)return!1;if((l=b.yo)&&(l[c.url]||l[c.pid]||l[c.id]))return!1;if(console.STAT&&console.STAT(v,((m||b).yp=+new Date)-(b.y||v),"say prep"),!e&&y&&u(y),c.batch){if(c.tail=(l=c.tail||0)+g.length,c.tail<=n.pack)return void(c.batch+=(l?",":"")+g);f(c)}c.batch="[";var E=+new Date;setTimeout((function(){console.STAT&&console.STAT(E,+new Date-E,"0ms TO"),f(c)}),n.gap),d(g,c),console.STAT&&y===c.SI&&console.STAT(v,+new Date-c.SH,"say ack")}}else t.raw(o,c)}else t.hash(o,c)}).c=t.say.d=0,t.raw=function(e,i){if(!e)return"";var s,u,l=e._||{};if(u=l.raw)return u;if("string"==typeof e)return e;var f=e["##"],d=e["@"];if(f&&d){if(!l.via&&c(d+f))return!1;if(u=(a.s[d]||"").it){if(f===u["##"])return!1;u["##"]||(u["##"]=f)}}if(!e.dam&&!e["@"]){var h=0,p=[];for(var g in u=n.peers){var y=u[g];if(p.push(y.url||y.pid||y.id),++h>6)break}h>1&&(e["><"]=p.join())}if(e.put&&(u=e.ok)&&(e.ok={"@":(u["@"]||1)-1,"/":u["/"]==e._.near?t.near:u["/"]}),s=l.$put)return u={},Object.keys(e).forEach((function(t){u[t]=e[t]})),u.put=":])([:",void o(u,(function(e,t){if(!e){var n=+new Date;u=t.indexOf('"put":":])([:"'),b(r,t=t.slice(0,u+6)+s+t.slice(u+14)),console.STAT&&console.STAT(n,+new Date-n,"say slice")}}));function b(r,n){r||(l.raw=n,t.say(e,i))}o(e,b)}}(),t.near=0,t.hi=function(r){var i;r.wire?(r.id?n.peers[r.url||r.id]=r:(i=r.id=r.id||r.url||String.random(9),t.say({dam:"?",pid:e.opt.pid},n.peers[i]=r),delete a.s[r.last]),r.met||(t.near++,r.met=+new Date,e.on("hi",r)),i=r.queue,r.queue=[],setTimeout.each(i||[],(function(e){d(e,r)}),0,9)):t.wire(r.length&&{url:r,id:r}||r)},t.bye=function(r){r.met&&--t.near,delete r.met,e.on("bye",r);var n=+new Date;n-=r.met||n,t.bye.time=((t.bye.time||n)+n)/2},t.hear["!"]=function(e,t){n.log("Error:",e.err)},t.hear["?"]=function(e,r){e.pid&&(r.pid||(r.pid=e.pid),e["@"])||(t.say({dam:"?",pid:n.pid,"@":e["#"]},r),delete a.s[r.last])},t.hear.mob=function(e,r){if(e.peers){var n=Object.keys(e.peers),i=n[Math.random()*n.length|0];i&&(t.bye(r),t.hi(i))}},e.on("create",(function(e){e.opt.pid=e.opt.pid||String.random(9),this.to.next(e),e.on("out",t.say)})),e.on("bye",(function(e,t){e=n.peers[e.id||e]||e,this.to.next(e),e.bye?e.bye():(t=e.wire)&&t.close&&t.close(),delete n.peers[e.id],e.wire=null}));var h={};return e.on("bye",(function(e,r){this.to.next(e),(r=console.STAT)&&(r.peers=t.near),(r=e.url)&&(h[r]=!0,setTimeout((function(){delete h[r]}),n.lack||9e3))})),e.on("hi",(function(r,i){if(this.to.next(r),(i=console.STAT)&&(i.peers=t.near),!n.super){var o=Object.keys(e.next||"");o.length>9999&&!console.SUBS&&console.log(console.SUBS="Warning: You have more than 10K live GETs, which might use more bandwidth than your screen can show - consider `.off()`."),setTimeout.each(o,(function(i){var o=e.next[i];n.super||(o.ask||"")[""]?t.say({get:{"#":i}},r):setTimeout.each(Object.keys(o.ask||""),(function(n){n&&t.say({"##":String.hash((e.graph[i]||"")[n]),get:{"#":i,".":n}},r)}))}))}})),t}}catch(e){}}))(t,"./mesh"),t((function(e){var r=t("./index");r.Mesh=t("./mesh"),r.on("opt",(function(e){if(this.to.next(e),!e.once){var t=e.opt;if(!1!==t.WebSocket){var n=r.window||{},i=t.WebSocket||n.WebSocket||n.webkitWebSocket||n.mozWebSocket;if(i){t.WebSocket=i;var o=t.mesh=t.mesh||r.Mesh(e);o.wire||t.wire,o.wire=t.wire=c,setTimeout((function(){!t.super&&e.on("out",{dam:"hi"})}),1);var s=1998,a=""+void 0!=typeof document&&document}}}function c(e){try{if(!e||!e.url)return n&&n(e);var r=e.url.replace(/^http/,"ws"),n=e.wire=new t.WebSocket(r);return n.onclose=function(){u(e),t.mesh.bye(e)},n.onerror=function(t){u(e)},n.onopen=function(){t.mesh.hi(e)},n.onmessage=function(r){r&&t.mesh.hear(r.data||r,e)},n}catch(r){t.mesh.bye(e)}}function u(e){clearTimeout(e.defer),t.peers[e.url]&&(a&&e.retry<=0||(e.retry=(e.retry||t.retry+1||60)-(-e.tried+(e.tried=+new Date)<4*s?1:0),e.defer=setTimeout((function t(){if(a&&a.hidden)return setTimeout(t,s);c(e)}),s)))}}))}))(t,"./websocket"),t((function(e){if("undefined"!=typeof Gun){var t;try{t=(Gun.window||function(){}).localStorage}catch(e){}t||(Gun.log("Warning: No localStorage exists to persist data to!"),t={setItem:function(e,t){this[e]=t},removeItem:function(e){delete this[e]},getItem:function(e){return this[e]}}),JSON.parseAsync;var r=JSON.stringifyAsync||function(e,t,r,n){try{t(void 0,JSON.stringify(e,r,n))}catch(e){t(e)}};Gun.on("create",(function e(n){this.to.next(n);var i,o,s,a,c=n.opt,u=(n.graph,[]);if(!1!==c.localStorage){c.prefix=c.file||"gun/";try{i=e[c.prefix]=e[c.prefix]||JSON.parse(s=t.getItem(c.prefix))||{}}catch(t){i=e[c.prefix]={}}s=(s||"").length,n.on("get",(function(e){this.to.next(e);var t,r,n,o=e.get;o&&(t=o["#"])&&((r=i[t]||void 0)&&(n=o["."])&&!Object.plain(n)&&(r=Gun.state.ify({},n,Gun.state.is(r,n),r[n],t)),Gun.on.get.ack(e,r))})),n.on("put",(function(e){this.to.next(e);var t=e.put,r=t["#"],c=t["."],f=e["#"],d=e.ok||"";i[r]=Gun.state.ify(i[r],c,t[">"],t[":"],r),a&&s>4999880?n.on("in",{"@":f,err:"localStorage max!"}):(e["@"]||e._.via&&!(Math.random()<d["@"]/d["/"])||u.push(f),o||(o=setTimeout(l,9+s/333)))}))}function l(){if(u.length||!((setTimeout.turn||"").s||"").length){var e=u;clearTimeout(o),o=!1,u=[],r(i,(function(r,o){try{!r&&t.setItem(c.prefix,o)}catch(e){r=a=e||"localStorage failure"}r&&(Gun.log(r+" Consider using GUN's IndexedDB plugin for RAD for more storage space, https://gun.eco/docs/RAD#install"),n.on("localStorage:error",{err:r,get:c.prefix,put:i})),s=o.length,setTimeout.each(e,(function(e){n.on("in",{"@":e,err:r,ok:0})}),0,99)}))}else setTimeout(l,99)}}))}}))(t,"./localStorage")}(),function(){if(""+E!=typeof Gun){var e=function(e){console.warn("Warning! Deprecated internal utility will break in next version:",e)},t=Gun;t.fn=t.fn||{is:function(t){return e("fn"),!!t&&"function"==typeof t}},t.bi=t.bi||{is:function(t){return e("bi"),t instanceof Boolean||"boolean"==typeof t}},t.num=t.num||{is:function(t){return e("num"),!n(t)&&(t-parseFloat(t)+1>=0||1/0===t||-1/0===t)}},t.text=t.text||{is:function(t){return e("text"),"string"==typeof t}},t.text.ify=t.text.ify||function(r){return e("text.ify"),t.text.is(r)?r:"undefined"!=typeof JSON?JSON.stringify(r):r&&r.toString?r.toString():r},t.text.random=t.text.random||function(t,r){e("text.random");var n="";for(t=t||24,r=r||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";t>0;)n+=r.charAt(Math.floor(Math.random()*r.length)),t--;return n},t.text.match=t.text.match||function(t,r){var n,i;return e("text.match"),"string"==typeof t&&("string"==typeof r&&(r={"=":r}),t===(n=(r=r||{})["="]||r["*"]||r[">"]||r["<"])||i===r["="]&&(n=r["*"]||r[">"]||r["<"],t.slice(0,(n||"").length)===n||i===r["*"]&&(i!==r[">"]&&i!==r["<"]?t>=r[">"]&&t<=r["<"]:i!==r[">"]&&t>=r[">"]||i!==r["<"]&&t<=r["<"])))},t.text.hash=t.text.hash||function(t,r){if(e("text.hash"),"string"==typeof t){if(r=r||0,!t.length)return r;for(var n=0,i=t.length;n<i;++n)r=(r<<5)-r+t.charCodeAt(n),r|=0;return r}},t.list=t.list||{is:function(t){return e("list"),t instanceof Array}},t.list.slit=t.list.slit||Array.prototype.slice,t.list.sort=t.list.sort||function(t){return e("list.sort"),function(e,r){return e&&r?(e=e[t])<(r=r[t])?-1:e>r?1:0:0}},t.list.map=t.list.map||function(t,r,n){return e("list.map"),s(t,r,n)},t.list.index=1,t.obj=t.boj||{is:function(t){return e("obj"),!!t&&(t instanceof Object&&t.constructor===Object||"Object"===Object.prototype.toString.call(t).match(/^\[object (\w+)\]$/)[1])}},t.obj.put=t.obj.put||function(t,r,n){return e("obj.put"),(t||{})[r]=n,t},t.obj.has=t.obj.has||function(t,r){return e("obj.has"),t&&Object.prototype.hasOwnProperty.call(t,r)},t.obj.del=t.obj.del||function(t,r){if(e("obj.del"),t)return t[r]=null,delete t[r],t},t.obj.as=t.obj.as||function(t,r,n,i){return e("obj.as"),t[r]=t[r]||(i===n?{}:n)},t.obj.ify=t.obj.ify||function(t){if(e("obj.ify"),i(t))return t;try{t=JSON.parse(t)}catch(e){t={}}return t},function(){function r(e,t){o(this,t)&&void 0!==this[t]||(this[t]=e)}t.obj.to=t.obj.to||function(t,n){return e("obj.to"),s(t,r,n=n||{}),n}}(),t.obj.copy=t.obj.copy||function(t){return e("obj.copy"),t?JSON.parse(JSON.stringify(t)):t},function(){function r(e,t){var r=this.n;if(!r||!(t===r||i(r)&&o(r,t)))return void 0!==t||void 0}t.obj.empty=t.obj.empty||function(t,n){return e("obj.empty"),!t||!s(t,r,{n:n})}}(),function(){function r(e,t){if(2===arguments.length)return r.r=r.r||{},void(r.r[e]=t);r.r=r.r||[],r.r.push(e)}var s,a=Object.keys;Object.keys=Object.keys||function(e){return s(e,(function(e,t,r){r(t)}))},t.obj.map=s=t.obj.map||function(s,c,u){e("obj.map");var l,f,d,h,p,g=0,y="function"==typeof c;if(r.r=l,a&&i(s)&&(h=a(s),p=!0),u=u||{},n(s)||h)for(f=(h||s).length;g<f;g++){var b=g+t.list.index;if(y){if((d=p?c.call(u,s[h[g]],h[g],r):c.call(u,s[g],b,r))!==l)return d}else if(c===s[p?h[g]:g])return h?h[g]:b}else for(g in s)if(y){if(o(s,g)&&(d=u?c.call(u,s[g],g,r):c(s[g],g,r))!==l)return d}else if(c===s[g])return g;return y?r.r:t.list.index?0:-1}}(),t.time=t.time||{},t.time.is=t.time.is||function(t){return e("time"),t?t instanceof Date:+(new Date).getTime()};var r=t.fn.is,n=t.list.is,i=(A=t.obj).is,o=A.has,s=A.map,a={is:function(t){return e("val.is"),t!==E&&(null===t||t!==1/0&&(!!(f(t)||u(t)||l(t))||a.link.is(t)||!1))}};a.link=a.rel={_:"#"},function(){function t(e,t){var r=this;return r.id?r.id=!1:t==c&&f(e)?void(r.id=e):r.id=!1}a.link.is=function(r){if(e("val.link.is"),r&&r[c]&&!r._&&i(r)){var n={};if(s(r,t,n),n.id)return n.id}return!1}}(),a.link.ify=function(t){return e("val.link.ify"),d({},c,t)},t.obj.has._=".";var c=a.link._,u=t.bi.is,l=t.num.is,f=t.text.is,d=(i=(A=t.obj).is,A.put);s=A.map,t.val=t.val||a;var h={_:"_",soul:function(t,r){return e("node.soul"),t&&t._&&t._[r||y]}};h.soul.ify=function(t,r){return e("node.soul.ify"),r="string"==typeof r?{soul:r}:r||{},(t=t||{})._=t._||{},t._[y]=r.soul||t._[y]||g(),t},h.soul._=a.link._,function(){function t(e,t){if(t!==h._)return!a.is(e)||void(this.cb&&this.cb.call(this.as,e,t,this.n,this.s))}h.is=function(r,n,o){var a;return e("node.is"),!!i(r)&&!!(a=h.soul(r))&&!s(r,t,{as:o,cb:n,s:a,n:r})}}(),function(){function t(e,t){var r,n=this.o;n.map?void 0===(r=n.map.call(this.as,e,""+t,n.node))?p(n.node,t):n.node&&(n.node[t]=r):a.is(e)&&(n.node[t]=e)}h.ify=function(r,n,i){return e("node.ify"),n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n={map:n}):n={},n.map&&(n.node=n.map.call(i,r,E,n.node||{})),(n.node=h.soul.ify(n.node||{},n))&&s(r,t,{o:n,as:i}),n.node}}(),i=(A=t.obj).is;var p=A.del,g=(s=A.map,t.text.random),y=h.soul._;t.node=t.node||h;var b=t.state;b.lex=function(){return e("state.lex"),b().toString(36).replace(".","")},b.to=function(t,r,n){e("state.to");var o=(t||{})[r];return i(o)&&(o=m(o)),b.ify(n,r,b.is(t,r),o,h.soul(t))},function(){function t(e,t){v!==t&&b.ify(this.o,t,this.s)}b.map=function(n,a,c){var u;e("state.map");var f=i(f=n||a)?f:null;return n=r(n=n||a)?n:null,f&&!n?(a=l(a)?a:b(),f[v]=f[v]||{},s(f,t,{o:f,s:a}),f):(c=c||i(a)?a:u,a=l(a)?a:b(),function(e,r,i,s){if(!n)return t.call({o:i,s:a},e,r),e;n.call(c||this||{},e,r,i,s),o(i,r)&&u===i[r]||t.call({o:i,s:a},e,r)})}}(),(A=t.obj).as,o=A.has,i=A.is,s=A.map;var m=A.copy,v=(l=t.num.is,r=t.fn.is,h._),w={};!function(){function t(e,t){if(!e||t!==h.soul(e)||!h.is(e,this.fn,this.as))return!0;this.cb&&(r.n=e,r.as=this.as,this.cb.call(r.as,e,t,r))}function r(e){e&&h.is(r.n,e,r.as)}w.is=function(r,n,o,a){return e("graph.is"),!(!r||!i(r)||P(r)||s(r,t,{cb:n,fn:o,as:a}))}}(),function(){function r(e,t){var r;return(r=function(e,t){for(var r,n=e.seen,i=n.length;i--;)if(r=n[i],t.obj===r.obj)return r;n.push(t)}(e,t))?r:(t.env=e,t.soul=s,h.ify(t.obj,n,t)&&(t.link=t.link||a.link.ify(h.soul(t.node)),t.obj!==e.shell&&(e.graph[a.link.is(t.link)]=t.node)),t)}function n(e,t,n){var i,s,u=this,l=u.env;if(h._===t&&o(e,a.link._))return n._;if(i=c(e,t,n,u,l)){if(t||(u.node=u.node||n||{},o(e,h._)&&h.soul(e)&&(u.node._=m(e._)),u.node=h.soul.ify(u.node,a.link.is(u.link)),u.link=u.link||a.link.ify(h.soul(u.node))),(s=l.map)&&(s.call(l.as||{},e,t,n,u),o(n,t))){if(e=n[t],E===e)return void p(n,t);if(!(i=c(e,t,n,u,l)))return}if(!t)return u.node;if(!0===i)return e;if((s=r(l,{obj:e,path:u.path.concat(t)})).node)return s.link}}function s(e){var t=this,r=a.link.is(t.link),n=t.env.graph;t.link=t.link||a.link.ify(e),t.link[a.link._]=e,t.node&&t.node[h._]&&(t.node[h._][a.link._]=e),o(n,r)&&(n[e]=n[r],p(n,r))}function c(e,r,n,o,s){var u;return!!a.is(e)||(i(e)?1:(u=s.invalid)?c(e=u.call(s.as||{},e,r,n),r,n,o,s):(s.err="Invalid value at '"+o.path.concat(r).join(".")+"'!",void(t.list.is(e)&&(s.err+=" Use `.set(item)` instead of an Array."))))}w.ify=function(t,n,i){e("graph.ify");var o={path:[],obj:t};return n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n.map=n):n={},"string"==typeof i&&(n.soul=n.soul||i,i=E),n.soul&&(o.link=a.link.ify(n.soul)),n.shell=(i||{}).shell,n.graph=n.graph||{},n.seen=n.seen||[],n.as=n.as||i,r(n,o),n.root=o.node,n.graph}}(),w.node=function(t){e("graph.node");var r=h.soul(t);if(r)return d({},r,t)},function(){function t(e,t){var r,n;if(h._!==t)(r=a.link.is(e))?(n=this.opt.seen[r])?this.obj[t]=n:this.obj[t]=this.opt.seen[r]=w.to(this.graph,r,this.opt):this.obj[t]=e;else{if(P(e,a.link._))return;this.obj[t]=m(e)}}w.to=function(r,n,i){if(e("graph.to"),r){var o={};return i=i||{seen:{}},s(r[n],t,{obj:o,graph:r,opt:i}),o}}}(),r=t.fn.is,i=(A=t.obj).is,p=A.del,o=A.has;var A,E,P=A.empty;d=A.put,s=A.map,m=A.copy,t.graph=t.graph||w}}()},4830:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},4880:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0;var n=r(5212),i=r(7214),o=r(9724);t.throttle=function(e,t){return n.operate((function(r,n){var s=null!=t?t:{},a=s.leading,c=void 0===a||a,u=s.trailing,l=void 0!==u&&u,f=!1,d=null,h=null,p=!1,g=function(){null==h||h.unsubscribe(),h=null,l&&(m(),p&&n.complete())},y=function(){h=null,p&&n.complete()},b=function(t){return h=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,g,y))},m=function(){if(f){f=!1;var e=d;d=null,n.next(e),!p&&b(e)}};r.subscribe(i.createOperatorSubscriber(n,(function(e){f=!0,d=e,(!h||h.closed)&&(c?m():b(e))}),(function(){p=!0,(!(l&&f&&h)||h.closed)&&n.complete()})))}))}},4885:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(8051);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},4891:function(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},4933:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebauthnPlugin=void 0;const n=r(4586),i=r(7510),o=r(5628),s=r(4193),a=r(3358);class c extends n.BasePlugin{name="webauthn";version="1.0.0";description="Provides WebAuthn authentication functionality for ShogunCore";webauthn=null;initialize(e){super.initialize(e),this.webauthn=new i.Webauthn(e.gun),(0,o.log)("WebAuthn plugin initialized")}destroy(){this.webauthn=null,super.destroy(),(0,o.log)("WebAuthn plugin destroyed")}assertWebauthn(){if(this.assertInitialized(),!this.webauthn)throw new Error("WebAuthn module not initialized");return this.webauthn}isSupported(){return this.assertWebauthn().isSupported()}async generateCredentials(e,t,r=!1){return this.assertWebauthn().generateCredentials(e,t,r)}async createAccount(e,t,r=!1){return this.assertWebauthn().createAccount(e,t,r)}async authenticateUser(e,t,r){return this.assertWebauthn().authenticateUser(e,t,r)}abortAuthentication(){this.assertWebauthn().abortAuthentication()}async removeDevice(e,t,r){return this.assertWebauthn().removeDevice(e,t,r)}async login(e){(0,o.log)("Login with WebAuthn");try{const t=this.assertInitialized();if((0,o.log)(`Attempting WebAuthn login for user: ${e}`),!e)throw new Error("Username required for WebAuthn login");if(!this.isSupported())throw new Error("WebAuthn is not supported by this browser");const r=await this.generateCredentials(e,null,!0);if(!r?.success)throw new Error(r?.error||"WebAuthn verification failed");const n=s.ethers.keccak256(s.ethers.toUtf8Bytes(r.credentialId||""));t.setAuthMethod("webauthn");const i=await t.login(e,n);return i.success?((0,o.log)(`WebAuthn login completed successfully for user: ${e}`),{...i,username:e,credentialId:r.credentialId}):i}catch(e){return(0,o.logError)(`Error during WebAuthn login: ${e}`),a.ErrorHandler.handle(a.ErrorType.WEBAUTHN,"WEBAUTHN_LOGIN_ERROR",e.message||"Error during WebAuthn login",e),{success:!1,error:e.message||"Error during WebAuthn login"}}}async signUp(e){(0,o.log)("Sign up with WebAuthn");try{const t=this.assertInitialized();if((0,o.log)(`Attempting WebAuthn registration for user: ${e}`),!e)throw new Error("Username required for WebAuthn registration");if(!this.isSupported())throw new Error("WebAuthn is not supported by this browser");const r=await this.generateCredentials(e,null,!1);if(!r?.success)throw new Error(r?.error||"Unable to generate WebAuthn credentials");const n=s.ethers.keccak256(s.ethers.toUtf8Bytes(r.credentialId||""));t.setAuthMethod("webauthn");const i=await t.signUp(e,n);return i.success?((0,o.log)(`WebAuthn registration completed successfully for user: ${e}`),t.emit("webauthn:register",{username:e,credentialId:r.credentialId}),t.emit("auth:signup",{userPub:i.userPub,username:e,method:"webauthn"}),{...i,username:e,credentialId:r.credentialId}):i}catch(e){return(0,o.logError)(`Error during WebAuthn registration: ${e}`),a.ErrorHandler.handle(a.ErrorType.WEBAUTHN,"WEBAUTHN_SIGNUP_ERROR",e.message||"Error during WebAuthn registration",e),{success:!1,error:e.message||"Error during WebAuthn registration"}}}async loginWithWebAuthn(e){return this.login(e)}async signUpWithWebAuthn(e){return this.signUp(e)}}t.WebauthnPlugin=c},4945:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketProvider=t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=void 0;const n=r(8672),i=r(5347),o=r(2371);class s{#Q;#f;get filter(){return JSON.parse(this.#f)}#ue;#le;#fe;constructor(e,t){this.#Q=e,this.#f=JSON.stringify(t),this.#ue=null,this.#le=null,this.#fe=null}start(){this.#ue=this.#Q.send("eth_subscribe",this.filter).then((e=>(this.#Q._register(e,this),e)))}stop(){this.#ue.then((e=>{this.#Q.destroyed||this.#Q.send("eth_unsubscribe",[e])})),this.#ue=null}pause(e){(0,i.assert)(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#le=!!e}resume(){this.#le=null}_handleMessage(e){if(null!=this.#ue&&null===this.#le){let t=this.#fe;t=null==t?this._emit(this.#Q,e):t.then((async()=>{await this._emit(this.#Q,e)})),this.#fe=t.then((()=>{this.#fe===t&&(this.#fe=null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}t.SocketSubscriber=s;class a extends s{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}t.SocketBlockSubscriber=a;class c extends s{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}t.SocketPendingSubscriber=c;class u extends s{#de;get logFilter(){return JSON.parse(this.#de)}constructor(e,t){super(e,["logs",t]),this.#de=JSON.stringify(t)}async _emit(e,t){e.emit(this.logFilter,e._wrapLog(t,e._network))}}t.SocketEventSubscriber=u;class l extends o.JsonRpcApiProvider{#he;#pe;#ge;constructor(e,t){const r=Object.assign({},null!=t?t:{});(0,i.assertArgument)(null==r.batchMaxCount||1===r.batchMaxCount,"sockets-based providers do not support batches","options.batchMaxCount",t),r.batchMaxCount=1,null==r.staticNetwork&&(r.staticNetwork=!0),super(e,r),this.#he=new Map,this.#pe=new Map,this.#ge=new Map}_getSubscriber(e){switch(e.type){case"close":return new n.UnmanagedSubscriber("close");case"block":return new a(this);case"pending":return new c(this);case"event":return new u(this,e.filter);case"orphan":if("drop-log"===e.filter.orphan)return new n.UnmanagedSubscriber("drop-log")}return super._getSubscriber(e)}_register(e,t){this.#pe.set(e,t);const r=this.#ge.get(e);if(r){for(const e of r)t._handleMessage(e);this.#ge.delete(e)}}async _send(e){(0,i.assertArgument)(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const t=new Promise(((t,r)=>{this.#he.set(e.id,{payload:e,resolve:t,reject:r})}));return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await t]}async _processMessage(e){const t=JSON.parse(e);if(t&&"object"==typeof t&&"id"in t){const e=this.#he.get(t.id);if(null==e)return void this.emit("error",(0,i.makeError)("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:t}));this.#he.delete(t.id),e.resolve(t)}else{if(!t||"eth_subscription"!==t.method)return void this.emit("error",(0,i.makeError)("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:t}));{const e=t.params.subscription,r=this.#pe.get(e);if(r)r._handleMessage(t.params.result);else{let r=this.#ge.get(e);null==r&&(r=[],this.#ge.set(e,r)),r.push(t.params.result)}}}}async _write(e){throw new Error("sub-classes must override this")}}t.SocketProvider=l},4948:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(8246),s=r(5212),a=r(7652),c=r(3916),u=r(1898),l=r(6404);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?u.pipe(e.apply(void 0,i([],n(t))),c.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},4950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(8051);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},4967:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(1484),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function d(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function h(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=i,a=o,c=o,u=i;for(;r!==i;){const e=n/r,t=n%r,i=s-c*e,o=a-u*e;n=r,r=t,s=c,a=u,c=i,u=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&d(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const u=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,c=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,u),f=e.pow(i,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,o<<BigInt(s-t-1));c=e.sqr(r),l=e.mul(l,r),f=e.mul(f,c),s=t}return l}}function g(e){if(e%c===a){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===u){const t=(e-u)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),r))throw new Error("Cannot find square root");return c}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=d,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=h,t.tonelliShanks=p,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function m(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function A(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=b,t.FpInvertBatch=m,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?h(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>b(l,e,t),div:(t,r)=>f(t*h(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:s.sqrt||(e=>u(l,e)),invertBatch:e=>m(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,c):(0,n.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=w,t.getMinHashLength=A,t.mapHashToField=function(e,t,r=!1){const i=e.length,s=w(t),a=A(t);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const c=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)}},4975:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},5019:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(1245),i=r(5212),o=r(7214);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},5047:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherscanProvider=t.EtherscanPlugin=void 0;const n=r(8456),i=r(9288),o=r(7778),s=r(5347),a=r(8672),c=r(5317),u=r(4491),l=r(9973),f="org.ethers.plugins.provider.Etherscan";class d extends u.NetworkPlugin{baseUrl;constructor(e){super(f),(0,s.defineProperties)(this,{baseUrl:e})}clone(){return new d(this.baseUrl)}}t.EtherscanPlugin=d;const h=["enableCcipRead"];let p=1;class g extends a.AbstractProvider{network;apiKey;#ye;constructor(e,t){const r=null!=t?t:null;super();const n=c.Network.from(e);this.#ye=n.getPlugin(f),(0,s.defineProperties)(this,{apiKey:r,network:n})}getBaseUrl(){if(this.#ye)return this.#ye.baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}(0,s.assertArgument)(!1,"unsupported network","network",this.network)}getUrl(e,t){let r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),"");return this.apiKey&&(r+=`&apikey=${this.apiKey}`),`https://api.etherscan.io/v2/api?chainid=${this.network.chainId}&module=${e}${r}`}getPostUrl(){return`https://api.etherscan.io/v2/api?chainid=${this.network.chainId}`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t.chainid=this.network.chainId,t}async detectNetwork(){return this.network}async fetch(e,t,r){const n=p++,i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null;this.emit("debug",{action:"sendRequest",id:n,url:i,payload:o});const a=new s.FetchRequest(i);a.setThrottleParams({slotInterval:1e3}),a.retryFunc=(e,t,r)=>(this.isCommunityResource()&&(0,l.showThrottleMessage)("Etherscan"),Promise.resolve(!0)),a.processFunc=async(t,r)=>{const i=r.hasBody()?JSON.parse((0,s.toUtf8String)(r.body)):{},o=("string"==typeof i.result?i.result:"").toLowerCase().indexOf("rate limit")>=0;return"proxy"===e?i&&0==i.status&&"NOTOK"==i.message&&o&&(this.emit("debug",{action:"receiveError",id:n,reason:"proxy-NOTOK",error:i}),r.throwThrottleError(i.result,2e3)):o&&(this.emit("debug",{action:"receiveError",id:n,reason:"null result",error:i.result}),r.throwThrottleError(i.result,2e3)),r},o&&(a.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),a.body=Object.keys(o).map((e=>`${e}=${o[e]}`)).join("&"));const c=await a.send();try{c.assertOk()}catch(e){this.emit("debug",{action:"receiveError",id:n,error:e,reason:"assertOk"}),(0,s.assert)(!1,"response error","SERVER_ERROR",{request:a,response:c})}c.hasBody()||(this.emit("debug",{action:"receiveError",id:n,error:"missing body",reason:"null body"}),(0,s.assert)(!1,"missing response","SERVER_ERROR",{request:a,response:c}));const u=JSON.parse((0,s.toUtf8String)(c.body));return"proxy"===e?("2.0"!=u.jsonrpc&&(this.emit("debug",{action:"receiveError",id:n,result:u,reason:"invalid JSON-RPC"}),(0,s.assert)(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:a,response:c,info:{result:u}})),u.error&&(this.emit("debug",{action:"receiveError",id:n,result:u,reason:"JSON-RPC error"}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:n,result:u}),u.result):0!=u.status||"No records found"!==u.message&&"No transactions found"!==u.message?((1!=u.status||"string"==typeof u.message&&!u.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:n,result:u}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:n,result:u}),u.result):(this.emit("debug",{action:"receiveRequest",id:n,result:u}),u.result)}_getTransactionPostData(e){const t={};for(let r in e){if(h.indexOf(r)>=0)continue;if(null==e[r])continue;let n=e[r];if(!("type"===r&&0===n||"blockTag"===r&&"latest"===n)){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r])n=(0,s.toQuantity)(n);else if("accessList"===r)n="["+(0,o.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]";else if("blobVersionedHashes"===r){if(0===n.length)continue;(0,s.assert)(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else n=(0,s.hexlify)(n);t[r]=n}}return t}_checkError(e,t,r){let i="";if((0,s.isError)(t,"SERVER_ERROR")){try{i=t.info.result.error.message}catch(e){}if(!i)try{i=t.info.message}catch(e){}}if("estimateGas"===e.method&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&(0,s.assert)(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),("call"===e.method||"estimateGas"===e.method)&&i.match(/execution reverted/i)){let r="";try{r=t.info.result.error.data}catch(t){}const i=n.AbiCoder.getBuiltinCallException(e.method,e.transaction,r);throw i.info={request:e,error:t},i}if(i&&"broadcastTransaction"===e.method){const t=o.Transaction.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&(0,s.assert)(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t}),i.match(/insufficient funds/)&&(0,s.assert)(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&(0,s.assert)(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:t})}throw t}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if("mainnet"===this.network.name)return"1000000000";if("optimism"===this.network.name)return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((t=>this._checkError(e,t,e.signedTransaction)));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});(0,s.assert)(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if("latest"!==e.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_call";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}case"estimateGas":{const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return"mainnet"!==this.network.name?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let t=this._getAddress(e);var r;(r=t)&&"function"==typeof r.then&&(t=await t);try{const e=await this.fetch("contract",{action:"getabi",address:t}),r=JSON.parse(e);return new i.Contract(t,r,this)}catch(e){return null}}isCommunityResource(){return null==this.apiKey}}t.EtherscanProvider=g},5059:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.sha256=void 0;const n=r(7155),i=r(5347),o=function(e){return(0,n.createHash)("sha256").update(e).digest()},s=function(e){return(0,n.createHash)("sha512").update(e).digest()};let a=o,c=s,u=!1,l=!1;function f(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}function d(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(c(t))}t.sha256=f,f._=o,f.lock=function(){u=!0},f.register=function(e){if(u)throw new Error("sha256 is locked");a=e},Object.freeze(f),t.sha512=d,d._=s,d.lock=function(){l=!0},d.register=function(e){if(l)throw new Error("sha512 is locked");c=e},Object.freeze(f)},5128:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(8051),i=r(9724),o=r(6808),s=r(5212),a=r(7214);t.groupBy=function(e,t,r,c){return s.operate((function(s,u){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,c=t.connector):l=t;var f=new Map,d=function(e){f.forEach(e),e(u)},h=function(e){return d((function(t){return t.error(e)}))},p=0,g=!1,y=new a.OperatorSubscriber(u,(function(t){try{var s=e(t),d=f.get(s);if(!d){f.set(s,d=c?c():new o.Subject);var b=(v=s,w=d,(A=new n.Observable((function(e){p++;var t=w.subscribe(e);return function(){t.unsubscribe(),0===--p&&g&&y.unsubscribe()}}))).key=v,A);if(u.next(b),r){var m=a.createOperatorSubscriber(d,(function(){d.complete(),null==m||m.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));y.add(i.innerFrom(r(b)).subscribe(m))}}d.next(l?l(t):t)}catch(e){h(e)}var v,w,A}),(function(){return d((function(e){return e.complete()}))}),h,(function(){return f.clear()}),(function(){return g=!0,0===p}));s.subscribe(y)}))}},5130:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(6808).Subject);t.AsyncSubject=o},5145:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},5156:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(6808),i=r(5212),o=r(7214),s=r(9724);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,c=function(e){i.error(e),r.error(e)},u=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void c(e)}t.subscribe(a=o.createOperatorSubscriber(r,u,u,c))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),c,(function(){null==a||a.unsubscribe(),i=null})))}))}},5191:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponse=t.FetchRequest=t.FetchCancelSignal=void 0;const n=r(1949),i=r(7415),o=r(1500),s=r(8166),a=r(3948),c=r(3271);let u=(0,c.createGetUrl)();const l=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),f=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let d=!1;async function h(e,t){try{const t=e.match(l);if(!t)throw new Error("invalid data");return new w(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?(0,n.decodeBase64)(t[3]):(r=t[3],(0,a.toUtf8Bytes)(r.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))))))}catch(t){return new w(599,"BAD REQUEST (invalid data: URI)",{},null,new v(e))}var r}function p(e){return async function(t,r){try{const r=t.match(f);if(!r)throw new Error("invalid link");return new v(`${e}${r[2]}`)}catch(e){return new w(599,"BAD REQUEST (invalid IPFS URI)",{},null,new v(t))}}}const g={data:h,ipfs:p("https://gateway.ipfs.io/ipfs/")},y=new WeakMap;class b{#be;#me;constructor(e){this.#be=[],this.#me=!1,y.set(e,(()=>{if(!this.#me){this.#me=!0;for(const e of this.#be)setTimeout((()=>{e()}),0);this.#be=[]}}))}addListener(e){(0,o.assert)(!this.#me,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#be.push(e)}get cancelled(){return this.#me}checkSignal(){(0,o.assert)(!this.cancelled,"cancelled","CANCELLED",{})}}function m(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}t.FetchCancelSignal=b;class v{#ve;#we;#Ae;#Ee;#Pe;#se;#Oe;#Se;#_e;#ke;#Te;#xe;#Re;#Ie;#Ce;get url(){return this.#se}set url(e){this.#se=String(e)}get body(){return null==this.#Oe?null:new Uint8Array(this.#Oe)}set body(e){if(null==e)this.#Oe=void 0,this.#Se=void 0;else if("string"==typeof e)this.#Oe=(0,a.toUtf8Bytes)(e),this.#Se="text/plain";else if(e instanceof Uint8Array)this.#Oe=e,this.#Se="application/octet-stream";else{if("object"!=typeof e)throw new Error("invalid body");this.#Oe=(0,a.toUtf8Bytes)(JSON.stringify(e)),this.#Se="application/json"}}hasBody(){return null!=this.#Oe}get method(){return this.#Ee?this.#Ee:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#Ee=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#Ae);return this.#_e&&(e.authorization=`Basic ${(0,n.encodeBase64)((0,a.toUtf8Bytes)(this.#_e))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#Se&&(e["content-type"]=this.#Se),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#Ae[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#Ae={}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r<t.length){const n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#_e||null}setCredentials(e,t){(0,o.assertArgument)(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#_e=`${e}:${t}`}get allowGzip(){return this.#we}set allowGzip(e){this.#we=!!e}get allowInsecureAuthentication(){return!!this.#ve}set allowInsecureAuthentication(e){this.#ve=!!e}get timeout(){return this.#Pe}set timeout(e){(0,o.assertArgument)(e>=0,"timeout must be non-zero","timeout",e),this.#Pe=e}get preflightFunc(){return this.#ke||null}set preflightFunc(e){this.#ke=e}get processFunc(){return this.#Te||null}set processFunc(e){this.#Te=e}get retryFunc(){return this.#xe||null}set retryFunc(e){this.#xe=e}get getUrlFunc(){return this.#Ce||u}set getUrlFunc(e){this.#Ce=e}constructor(e){this.#se=String(e),this.#ve=!1,this.#we=!0,this.#Ae={},this.#Ee="",this.#Pe=3e5,this.#Ie={slotInterval:250,maxAttempts:12},this.#Ce=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#Oe?(0,i.hexlify)(this.#Oe):"null"}>`}setThrottleParams(e){null!=e.slotInterval&&(this.#Ie.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#Ie.maxAttempts=e.maxAttempts)}async#Ne(e,t,r,n,i){if(e>=this.#Ie.maxAttempts)return i.makeServerError("exceeded maximum retry limit");(0,o.assert)(A()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await function(e){return new Promise((t=>setTimeout(t,e)))}(r);let s=this.clone();const a=(s.url.split(":")[0]||"").toLowerCase();if(a in g){const e=await g[a](s.url,m(n.#Re));if(e instanceof w){let t=e;if(this.processFunc){m(n.#Re);try{t=await this.processFunc(s,t)}catch(e){null!=e.throttle&&"number"==typeof e.stall||t.makeServerError("error in post-processing function",e).assertOk()}}return t}s=e}this.preflightFunc&&(s=await this.preflightFunc(s));const c=await this.getUrlFunc(s,m(n.#Re));let u=new w(c.statusCode,c.statusMessage,c.headers,c.body,n);if(301===u.statusCode||302===u.statusCode){try{const r=u.headers.location||"";return s.redirect(r).#Ne(e+1,t,0,n,u)}catch(e){}return u}if(429===u.statusCode&&(null==this.retryFunc||await this.retryFunc(s,u,e))){const r=u.headers["retry-after"];let i=this.#Ie.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof r&&r.match(/^[1-9][0-9]*$/)&&(i=parseInt(r)),s.clone().#Ne(e+1,t,i,n,u)}if(this.processFunc){m(n.#Re);try{u=await this.processFunc(s,u)}catch(r){null!=r.throttle&&"number"==typeof r.stall||u.makeServerError("error in post-processing function",r).assertOk();let i=this.#Ie.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return r.stall>=0&&(i=r.stall),s.clone().#Ne(e+1,t,i,n,u)}}return u}send(){return(0,o.assert)(null==this.#Re,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#Re=new b(this),this.#Ne(0,A()+this.timeout,0,this,new w(0,"",{},null,this))}cancel(){(0,o.assert)(null!=this.#Re,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=y.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();(0,o.assert)("GET"===this.method&&("https"!==t||"http"!==r)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const n=new v(e);return n.method="GET",n.allowGzip=this.allowGzip,n.timeout=this.timeout,n.#Ae=Object.assign({},this.#Ae),this.#Oe&&(n.#Oe=new Uint8Array(this.#Oe)),n.#Se=this.#Se,n}clone(){const e=new v(this.url);return e.#Ee=this.#Ee,this.#Oe&&(e.#Oe=this.#Oe),e.#Se=this.#Se,e.#Ae=Object.assign({},this.#Ae),e.#_e=this.#_e,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#ke=this.#ke,e.#Te=this.#Te,e.#xe=this.#xe,e.#Ie=Object.assign({},this.#Ie),e.#Ce=this.#Ce,e}static lockConfig(){d=!0}static getGateway(e){return g[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(d)throw new Error("gateways locked");g[e]=t}static registerGetUrl(e){if(d)throw new Error("gateways locked");u=e}static createGetUrlFunc(e){return(0,c.createGetUrl)(e)}static createDataGateway(){return h}static createIpfsGatewayFunc(e){return p(e)}}t.FetchRequest=v;class w{#je;#Be;#Ae;#Oe;#s;#Me;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#Oe?(0,i.hexlify)(this.#Oe):"null"}>`}get statusCode(){return this.#je}get statusMessage(){return this.#Be}get headers(){return Object.assign({},this.#Ae)}get body(){return null==this.#Oe?null:new Uint8Array(this.#Oe)}get bodyText(){try{return null==this.#Oe?"":(0,a.toUtf8String)(this.#Oe)}catch(e){(0,o.assert)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,o.assert)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r<t.length){const n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,r,n,i){this.#je=e,this.#Be=t,this.#Ae=Object.keys(r).reduce(((e,t)=>(e[t.toLowerCase()]=String(r[t]),e)),{}),this.#Oe=null==n?null:new Uint8Array(n),this.#s=i||null,this.#Me={message:""}}makeServerError(e,t){let r;r=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const n=new w(599,r,this.headers,this.body,this.#s||void 0);return n.#Me={message:e,error:t},n}throwThrottleError(e,t){null==t?t=-1:(0,o.assertArgument)(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);const r=new Error(e||"throttling requests");throw(0,s.defineProperties)(r,{stall:t,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#Oe}get request(){return this.#s}ok(){return""===this.#Me.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#Me;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let n=null;try{this.#Oe&&(n=(0,a.toUtf8String)(this.#Oe))}catch(e){}(0,o.assert)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:r,responseBody:n,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function A(){return(new Date).getTime()}t.FetchResponse=w},5212:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(281);function i(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},5239:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroAddress=void 0,t.ZeroAddress="0x0000000000000000000000000000000000000000"},5255:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroHash=void 0,t.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},5266:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(8051),i=r(439),o=r(9724),s=r(6404),a=r(7214),c=r(3916),u=r(5810);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,d=l.keys,h=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(d?u.createObject(d,r):r),e.complete())})))},c=0;c<t;c++)s(c);else e.complete()}));return r?h.pipe(c.mapOneOrManyArgs(r)):h}},5279:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=r(4885),o=r(5212),s=r(7214);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},5307:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnectorPlugin=t.NostrConnector=t.Web3ConnectorPlugin=t.Web3Connector=t.WebauthnPlugin=t.Webauthn=t.BasePlugin=void 0;var n=r(4586);Object.defineProperty(t,"BasePlugin",{enumerable:!0,get:function(){return n.BasePlugin}});var i=r(7510);Object.defineProperty(t,"Webauthn",{enumerable:!0,get:function(){return i.Webauthn}});var o=r(4933);Object.defineProperty(t,"WebauthnPlugin",{enumerable:!0,get:function(){return o.WebauthnPlugin}});var s=r(8089);Object.defineProperty(t,"Web3Connector",{enumerable:!0,get:function(){return s.Web3Connector}});var a=r(8098);Object.defineProperty(t,"Web3ConnectorPlugin",{enumerable:!0,get:function(){return a.Web3ConnectorPlugin}});var c=r(7897);Object.defineProperty(t,"NostrConnector",{enumerable:!0,get:function(){return c.NostrConnector}});var u=r(8050);Object.defineProperty(t,"NostrConnectorPlugin",{enumerable:!0,get:function(){return u.NostrConnectorPlugin}})},5312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;const n=r(2291),i=r(5347),o=r(9943);function s(e){return(1<<e)-1<<8-e&255}function a(e,t){(0,i.assertNormalize)("NFKD"),null==t&&(t=o.LangEn.wordlist());const r=t.split(e);(0,i.assertArgument)(r.length%3==0&&r.length>=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const a=new Uint8Array(Math.ceil(11*r.length/8));let c=0;for(let e=0;e<r.length;e++){let n=t.getWordIndex(r[e].normalize("NFKD"));(0,i.assertArgument)(n>=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)n&1<<10-e&&(a[c>>3]|=1<<7-c%8),c++}const u=32*r.length/3,l=s(r.length/3),f=(0,i.getBytes)((0,n.sha256)(a.slice(0,u/8)))[0]&l;return(0,i.assertArgument)(f===(a[a.length-1]&l),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,i.hexlify)(a.slice(0,u/8))}function c(e,t){(0,i.assertArgument)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=o.LangEn.wordlist());const r=[0];let a=11;for(let t=0;t<e.length;t++)a>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],a-=8):(r[r.length-1]<<=a,r[r.length-1]|=e[t]>>8-a,r.push(e[t]&(1<<8-a)-1&255),a+=3);const c=e.length/4,u=parseInt((0,n.sha256)(e).substring(2,4),16)&s(c);return r[r.length-1]<<=c,r[r.length-1]|=u>>8-c,t.join(r.map((e=>t.getWord(e))))}const u={};class l{phrase;password;wordlist;entropy;constructor(e,t,r,n,s){null==n&&(n=""),null==s&&(s=o.LangEn.wordlist()),(0,i.assertPrivate)(e,u,"Mnemonic"),(0,i.defineProperties)(this,{phrase:r,password:n,wordlist:s,entropy:t})}computeSeed(){const e=(0,i.toUtf8Bytes)("mnemonic"+this.password,"NFKD");return(0,n.pbkdf2)((0,i.toUtf8Bytes)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){const n=a(e,r);return e=c((0,i.getBytes)(n),r),new l(u,n,e,t,r)}static fromEntropy(e,t,r){const n=(0,i.getBytes)(e,"entropy"),o=c(n,r);return new l(u,(0,i.hexlify)(n),o,t,r)}static entropyToPhrase(e,t){return c((0,i.getBytes)(e,"entropy"),t)}static phraseToEntropy(e,t){return a(e,t)}static isValidMnemonic(e,t){try{return a(e,t),!0}catch(e){}return!1}}t.Mnemonic=l},5317:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const n=r(7778),i=r(5347),o=r(4491),s=new Map;class a{#Fe;#A;#Le;constructor(e,t){this.#Fe=e,this.#A=(0,i.getBigInt)(t),this.#Le=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#Fe}set name(e){this.#Fe=e}get chainId(){return this.#A}set chainId(e){this.#A=(0,i.getBigInt)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,i.getBigInt)(e.chainId)}catch(e){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#Le.values())}attachPlugin(e){if(this.#Le.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Le.set(e.name,e.clone()),this}getPlugin(e){return this.#Le.get(e)||null}getPlugins(e){return this.plugins.filter((t=>t.name.split("#")[0]===e))}clone(){const e=new a(this.name,this.chainId);return this.plugins.forEach((t=>{e.attachPlugin(t.clone())})),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new o.GasCostPlugin;let r=t.txBase;if(null==e.to&&(r+=t.txCreate),e.data)for(let n=2;n<e.data.length;n+=2)"00"===e.data.substring(n,n+2)?r+=t.txDataZero:r+=t.txDataNonzero;if(e.accessList){const i=(0,n.accessListify)(e.accessList);for(const e in i)r+=t.txAccessListAddress+t.txAccessListStorageKey*i[e].storageKeys.length}return r}static from(e){if(function(){function e(e,t,r){const n=function(){const n=new a(e,t);return null!=r.ensNetwork&&n.attachPlugin(new o.EnsPlugin(null,r.ensNetwork)),n.attachPlugin(new o.GasCostPlugin),(r.plugins||[]).forEach((e=>{n.attachPlugin(e)})),n};a.register(e,n),a.register(t,n),r.altNames&&r.altNames.forEach((e=>{a.register(e,n)}))}l||(l=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[u("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[u("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1}))}(),null==e)return a.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){const t=s.get(e);if(t)return t();if("bigint"==typeof e)return new a("unknown",e);(0,i.assertArgument)(!1,"unknown network","network",e)}if("function"==typeof e.clone)return e.clone();if("object"==typeof e){(0,i.assertArgument)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);const t=new a(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new o.EnsPlugin(e.ensAddress,e.ensNetwork)),t}(0,i.assertArgument)(!1,"invalid network","network",e)}static register(e,t){"number"==typeof e&&(e=BigInt(e));const r=s.get(e);r&&(0,i.assertArgument)(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),s.set(e,t)}}function c(e,t){const r=String(e);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const n=r.split(".");if(1===n.length&&n.push(""),2!==n.length)throw new Error(`invalid gwei value: ${e}`);for(;n[1].length<t;)n[1]+="0";if(n[1].length>9){let e=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||e++,n[1]=e.toString()}return BigInt(n[0]+n[1])}function u(e){return new o.FetchUrlFeeDataNetworkPlugin(e,(async(e,t,r)=>{let n;r.setHeader("User-Agent","ethers");try{const[t,i]=await Promise.all([r.send(),e()]);n=t;const o=n.bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:c(o.maxFee,9),maxPriorityFeePerGas:c(o.maxPriorityFee,9)}}catch(e){(0,i.assert)(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:n,error:e})}}))}t.Network=a;let l=!1},5336:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7557),i=r(2318),o=r(9175),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>d)*p)%h,t&f&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[g,y]=(0,i.split)(c,!0),b=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),m=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=b(o,s,1)^r[n],c=m(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],o=b(t,i,n),c=m(t,i,n),u=s[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=v;class w extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const A=(e,t,r)=>(0,o.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=A(6,144,28),t.sha3_256=A(6,136,32),t.sha3_384=A(6,104,48),t.sha3_512=A(6,72,64),t.keccak_224=A(1,144,28),t.keccak_256=A(1,136,32),t.keccak_384=A(1,104,48),t.keccak_512=A(1,72,64);const E=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},5345:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},5347:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.encodeRlp=t.decodeRlp=t.defineProperties=t.resolveProperties=t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.toBigInt=t.getUint=t.getNumber=t.getBigInt=t.mask=t.toTwos=t.fromTwos=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.makeError=t.assertNormalize=t.assertPrivate=t.assertArgumentCount=t.assertArgument=t.assert=t.isError=t.isCallException=t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=void 0,t.uuidV4=t.Utf8ErrorFuncs=void 0;var n=r(8567);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return n.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return n.encodeBase58}});var i=r(1949);Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return i.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return i.encodeBase64}});var o=r(7415);Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return o.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return o.getBytesCopy}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return o.isBytesLike}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return o.hexlify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return o.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return o.dataSlice}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return o.stripZerosLeft}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return o.zeroPadValue}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return o.zeroPadBytes}});var s=r(1500);Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return s.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return s.isError}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return s.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return s.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return s.assertArgumentCount}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return s.assertPrivate}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return s.assertNormalize}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return s.makeError}});var a=r(7698);Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return a.EventPayload}});var c=r(5191);Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return c.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return c.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return c.FetchCancelSignal}});var u=r(9412);Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return u.FixedNumber}});var l=r(6508);Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return l.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return l.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return l.mask}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return l.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return l.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return l.getUint}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return l.toBigInt}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return l.toNumber}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return l.toBeHex}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return l.toBeArray}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return l.toQuantity}});var f=r(8166);Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return f.resolveProperties}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return f.defineProperties}});var d=r(7780);Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}});var h=r(2831);Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return h.encodeRlp}});var p=r(436);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return p.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return p.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return p.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return p.parseUnits}});var g=r(3948);Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return g.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return g.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return g.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return g.Utf8ErrorFuncs}});var y=r(7744);Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return y.uuidV4}})},5349:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=void 0;const n=r(4193),i=r(3358),o=r(8711);class s extends o.BaseContract{constructor(e){super(e.registryAddress,o.REGISTRY_ABI,e)}async isRegisteredRelay(e){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.isRegisteredRelay(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_IS_REGISTERED_FAILED",`Failed to check if relay at ${e} is registered`,t),!1}}async isRelayActive(e){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.isRelayActive(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_IS_ACTIVE_FAILED",`Failed to check if relay at ${e} is active`,t),!1}}async findRelayByUrl(e){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.findRelayByUrl(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_FIND_RELAY_FAILED",`Failed to find relay with URL ${e}`,t),n.ethers.ZeroAddress}}async getRelayInfo(e){try{if(!this.contract)throw new Error("Registry contract not initialized");const[t,r,n,i,o]=await this.contract.getRelayInfo(e);return{owner:t,url:r,metadata:n,registrationTime:i,active:o}}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_RELAY_INFO_FAILED",`Failed to get relay info for ${e}`,t),null}}async getRelayCountByOwner(e){try{if(!this.contract)throw new Error("Registry contract not initialized");const t=await this.contract.getRelayCountByOwner(e);return Number(t)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_RELAY_COUNT_FAILED",`Failed to get relay count for owner ${e}`,t),0}}async getRelaysByOwner(e,t=0,r=10){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.getRelaysByOwner(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_RELAYS_BY_OWNER_FAILED",`Failed to get relays for owner ${e}`,t),null}}async getAllRelays(e=!0,t=0,r=10){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.getAllRelays(e,t,r)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_ALL_RELAYS_FAILED","Failed to get all relays",e),null}}async registerRelay(e,t,r){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.registerRelay(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_REGISTER_RELAY_FAILED",`Failed to register relay at ${e}`,t),null}}async updateRelay(e,t="",r=""){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateRelay(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_UPDATE_RELAY_FAILED",`Failed to update relay at ${e}`,t),null}}async deactivateRelay(e){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.deactivateRelay(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_DEACTIVATE_RELAY_FAILED",`Failed to deactivate relay at ${e}`,t),null}}async reactivateRelay(e){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.reactivateRelay(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_REACTIVATE_RELAY_FAILED",`Failed to reactivate relay at ${e}`,t),null}}async setRegistrationOpen(e){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setRegistrationOpen(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_SET_REGISTRATION_OPEN_FAILED",`Failed to set registration open to ${e}`,t),null}}}t.Registry=s},5362:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(1415),i=r(719);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},5440:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(9328),i=r(4708),o=r(3506),s=r(5212),a=r(7214);t.single=function(e){return s.operate((function(t,r){var s,c=!1,u=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){u=!0,e&&!e(n,l++,t)||(c&&r.error(new i.SequenceError("Too many matching values")),c=!0,s=n)}),(function(){c?(r.next(s),r.complete()):r.error(u?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},5455:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(5212);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},5456:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptSync=t.scrypt=void 0;const n=r(5663),i=r(5347);let o=!1,s=!1;const a=async function(e,t,r,i,o,s,a){return await(0,n.scryptAsync)(e,t,{N:r,r:i,p:o,dkLen:s,onProgress:a})},c=function(e,t,r,i,o,s){return(0,n.scrypt)(e,t,{N:r,r:i,p:o,dkLen:s})};let u=a,l=c;async function f(e,t,r,n,o,s,a){const c=(0,i.getBytes)(e,"passwd"),l=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(await u(c,l,r,n,o,s,a))}function d(e,t,r,n,o,s){const a=(0,i.getBytes)(e,"passwd"),c=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(l(a,c,r,n,o,s))}t.scrypt=f,f._=a,f.lock=function(){s=!0},f.register=function(e){if(s)throw new Error("scrypt is locked");u=e},Object.freeze(f),t.scryptSync=d,d._=c,d.lock=function(){o=!0},d.register=function(e){if(o)throw new Error("scryptSync is locked");l=e},Object.freeze(d)},5462:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(u,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function u(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),s.shift(),s.length&&c(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(281);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},5513:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=t.onErrorResumeNextWith=void 0;var o=r(7652),s=r(1903);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.argsOrArgArray(e);return function(e){return s.onErrorResumeNext.apply(void 0,i([e],n(r)))}}t.onErrorResumeNextWith=a,t.onErrorResumeNext=a},5544:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(5212),i=r(2574);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},5565:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(5212),i=r(8531);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},5601:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTransactionResponse=t.formatTransactionReceipt=t.formatReceiptLog=t.formatBlock=t.formatLog=t.formatUint256=t.formatHash=t.formatData=t.formatBoolean=t.object=t.arrayOf=t.allowNull=void 0;const n=r(646),i=r(2291),o=r(7778),s=r(5347),a=BigInt(0);function c(e,t){return function(r){return null==r?t:e(r)}}function u(e,t){return r=>{if(t&&null==r)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map((t=>e(t)))}}function l(e,t){return r=>{const n={};for(const i in e){let o=i;if(t&&i in t&&!(o in r))for(const e of t[i])if(e in r){o=e;break}try{const t=e[i](r[o]);void 0!==t&&(n[i]=t)}catch(e){const t=e instanceof Error?e.message:"not-an-error";(0,s.assert)(!1,`invalid value for value.${i} (${t})`,"BAD_DATA",{value:r})}}return n}}function f(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,s.assertArgument)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function d(e){return(0,s.assertArgument)((0,s.isHexString)(e,!0),"invalid data","value",e),e}function h(e){return(0,s.assertArgument)((0,s.isHexString)(e,32),"invalid hash","value",e),e}t.allowNull=c,t.arrayOf=u,t.object=l,t.formatBoolean=f,t.formatData=d,t.formatHash=h,t.formatUint256=function(e){if(!(0,s.isHexString)(e))throw new Error("invalid uint256");return(0,s.zeroPadValue)(e,32)};const p=l({address:n.getAddress,blockHash:h,blockNumber:s.getNumber,data:d,index:s.getNumber,removed:c(f,!1),topics:u(h),transactionHash:h,transactionIndex:s.getNumber},{index:["logIndex"]});t.formatLog=function(e){return p(e)};const g=l({hash:c(h),parentHash:h,parentBeaconBlockRoot:c(h,null),number:s.getNumber,timestamp:s.getNumber,nonce:c(d),difficulty:s.getBigInt,gasLimit:s.getBigInt,gasUsed:s.getBigInt,stateRoot:c(h,null),receiptsRoot:c(h,null),blobGasUsed:c(s.getBigInt,null),excessBlobGas:c(s.getBigInt,null),miner:c(n.getAddress),prevRandao:c(h,null),extraData:d,baseFeePerGas:c(s.getBigInt)},{prevRandao:["mixHash"]});t.formatBlock=function(e){const t=g(e);return t.transactions=e.transactions.map((e=>"string"==typeof e?e:v(e))),t};const y=l({transactionIndex:s.getNumber,blockNumber:s.getNumber,transactionHash:h,address:n.getAddress,topics:u(h),data:d,index:s.getNumber,blockHash:h},{index:["logIndex"]});function b(e){return y(e)}t.formatReceiptLog=b;const m=l({to:c(n.getAddress,null),from:c(n.getAddress,null),contractAddress:c(n.getAddress,null),index:s.getNumber,root:c(s.hexlify),gasUsed:s.getBigInt,blobGasUsed:c(s.getBigInt,null),logsBloom:c(d),blockHash:h,hash:h,logs:u(b),blockNumber:s.getNumber,cumulativeGasUsed:s.getBigInt,effectiveGasPrice:c(s.getBigInt),blobGasPrice:c(s.getBigInt,null),status:c(s.getNumber),type:c(s.getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function v(e){e.to&&(0,s.getBigInt)(e.to)===a&&(e.to="0x0000000000000000000000000000000000000000");const t=l({hash:h,index:c(s.getNumber,void 0),type:e=>"0x"===e||null==e?0:(0,s.getNumber)(e),accessList:c(o.accessListify,null),blobVersionedHashes:c(u(h,!0),null),authorizationList:c(u((e=>{let t;if(e.signature)t=e.signature;else{let r=e.yParity;"0x1b"===r?r=0:"0x1c"===r&&(r=1),t=Object.assign({},e,{yParity:r})}return{address:(0,n.getAddress)(e.address),chainId:(0,s.getBigInt)(e.chainId),nonce:(0,s.getBigInt)(e.nonce),signature:i.Signature.from(t)}}),!1),null),blockHash:c(h,null),blockNumber:c(s.getNumber,null),transactionIndex:c(s.getNumber,null),from:n.getAddress,gasPrice:c(s.getBigInt),maxPriorityFeePerGas:c(s.getBigInt),maxFeePerGas:c(s.getBigInt),maxFeePerBlobGas:c(s.getBigInt,null),gasLimit:s.getBigInt,to:c(n.getAddress,null),value:s.getBigInt,nonce:s.getNumber,data:d,creates:c(n.getAddress,null),chainId:c(s.getBigInt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=(0,n.getCreateAddress)(t)),1!==e.type&&2!==e.type||null!=e.accessList||(t.accessList=[]),e.signature?t.signature=i.Signature.from(e.signature):t.signature=i.Signature.from(e),null==t.chainId){const e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&(0,s.getBigInt)(t.blockHash)===a&&(t.blockHash=null),t}t.formatTransactionReceipt=function(e){return m(e)},t.formatTransactionResponse=v},5606:function(e){var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,c=[],u=!1,l=-1;function f(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(a=c,c=[];++l<t;)a&&a[l].run();l=-1,t=c.length}a=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||u||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},5628:function(e,t,r){"use strict";var n=r(5606);Object.defineProperty(t,"__esModule",{value:!0}),t.enableDebug=function(){o=!0,s("Debug mode enabled")},t.disableDebug=function(){o=!1},t.configureLogging=function(e){i={...i,...e}},t.log=s,t.logError=a,t.logWarn=c,t.logDebug=u,t.logWithLevel=function(e,t,...r){switch(e){case"error":a(t,...r);break;case"warn":c(t,...r);break;case"debug":u(t,...r);break;default:s(t,...r)}};let i={enabled:"true"===n.env.DEBUG,level:"info",prefix:"[ShogunSDK]"},o=!1;function s(e,...t){const r=`[${(new Date).toISOString()}] ${e}`;console.log(r,...t)}function a(e,...t){const r=(new Date).toISOString();console.error(`[${r}] ERROR: ${e}`,...t)}function c(e,...t){const r=(new Date).toISOString();console.warn(`[${r}] WARNING: ${e}`,...t)}function u(e,...t){if(!o)return;const r=(new Date).toISOString();console.debug(`[${r}] DEBUG: ${e}`,...t)}},5650:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9724),i=r(2071),o=r(5455);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},5663:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptAsync=t.scrypt=void 0;const n=r(7557),i=r(2623),o=r(8941),s=r(9175),a=(e,t)=>e<<t|e>>>32-t;function c(e,t,r,n,i,o){let s=e[t++]^r[n++],c=e[t++]^r[n++],u=e[t++]^r[n++],l=e[t++]^r[n++],f=e[t++]^r[n++],d=e[t++]^r[n++],h=e[t++]^r[n++],p=e[t++]^r[n++],g=e[t++]^r[n++],y=e[t++]^r[n++],b=e[t++]^r[n++],m=e[t++]^r[n++],v=e[t++]^r[n++],w=e[t++]^r[n++],A=e[t++]^r[n++],E=e[t++]^r[n++],P=s,O=c,S=u,_=l,k=f,T=d,x=h,R=p,I=g,C=y,N=b,j=m,B=v,M=w,F=A,L=E;for(let e=0;e<8;e+=2)k^=a(P+B|0,7),I^=a(k+P|0,9),B^=a(I+k|0,13),P^=a(B+I|0,18),C^=a(T+O|0,7),M^=a(C+T|0,9),O^=a(M+C|0,13),T^=a(O+M|0,18),F^=a(N+x|0,7),S^=a(F+N|0,9),x^=a(S+F|0,13),N^=a(x+S|0,18),_^=a(L+j|0,7),R^=a(_+L|0,9),j^=a(R+_|0,13),L^=a(j+R|0,18),O^=a(P+_|0,7),S^=a(O+P|0,9),_^=a(S+O|0,13),P^=a(_+S|0,18),x^=a(T+k|0,7),R^=a(x+T|0,9),k^=a(R+x|0,13),T^=a(k+R|0,18),j^=a(N+C|0,7),I^=a(j+N|0,9),C^=a(I+j|0,13),N^=a(C+I|0,18),B^=a(L+F|0,7),M^=a(B+L|0,9),F^=a(M+B|0,13),L^=a(F+M|0,18);i[o++]=s+P|0,i[o++]=c+O|0,i[o++]=u+S|0,i[o++]=l+_|0,i[o++]=f+k|0,i[o++]=d+T|0,i[o++]=h+x|0,i[o++]=p+R|0,i[o++]=g+I|0,i[o++]=y+C|0,i[o++]=b+N|0,i[o++]=m+j|0,i[o++]=v+B|0,i[o++]=w+M|0,i[o++]=A+F|0,i[o++]=E+L|0}function u(e,t,r,n,i){let o=n+0,s=n+16*i;for(let n=0;n<16;n++)r[s+n]=e[t+16*(2*i-1)+n];for(let n=0;n<i;n++,o+=16,t+=16)c(r,s,e,t,r,o),n>0&&(s+=16),c(r,o,e,t+=16,r,s)}function l(e,t,r){const a=(0,s.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:c,r:u,p:l,dkLen:f,asyncTick:d,maxmem:h,onProgress:p}=a;if((0,n.number)(c),(0,n.number)(u),(0,n.number)(l),(0,n.number)(f),(0,n.number)(d),(0,n.number)(h),void 0!==p&&"function"!=typeof p)throw new Error("progressCb should be function");const g=128*u,y=g/4;if(c<=1||c&c-1||c>=2**(g/8)||c>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(l<0||l>137438953440/g)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(f<0||f>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const b=g*(c+l);if(b>h)throw new Error(`Scrypt: parameters too large, ${b} (128 * r * (N + p)) > ${h} (maxmem)`);const m=(0,o.pbkdf2)(i.sha256,e,t,{c:1,dkLen:g*l}),v=(0,s.u32)(m),w=(0,s.u32)(new Uint8Array(g*c)),A=(0,s.u32)(new Uint8Array(g));let E=()=>{};if(p){const e=2*c*l,t=Math.max(Math.floor(e/1e4),1);let r=0;E=()=>{r++,!p||r%t&&r!==e||p(r/e)}}return{N:c,r:u,p:l,dkLen:f,blockSize32:y,V:w,B32:v,B:m,tmp:A,blockMixCb:E,asyncTick:d}}function f(e,t,r,n,s){const a=(0,o.pbkdf2)(i.sha256,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),s.fill(0),a}t.scrypt=function(e,t,r){const{N:n,r:i,p:o,dkLen:s,blockSize32:a,V:c,B32:d,B:h,tmp:p,blockMixCb:g}=l(e,t,r);for(let e=0;e<o;e++){const t=a*e;for(let e=0;e<a;e++)c[e]=d[t+e];for(let e=0,t=0;e<n-1;e++)u(c,t,c,t+=a,i),g();u(c,(n-1)*a,d,t,i),g();for(let e=0;e<n;e++){const e=d[t+a-16]%n;for(let r=0;r<a;r++)p[r]=d[t+r]^c[e*a+r];u(p,0,d,t,i),g()}}return f(e,s,h,c,p)},t.scryptAsync=async function(e,t,r){const{N:n,r:i,p:o,dkLen:a,blockSize32:c,V:d,B32:h,B:p,tmp:g,blockMixCb:y,asyncTick:b}=l(e,t,r);for(let e=0;e<o;e++){const t=c*e;for(let e=0;e<c;e++)d[e]=h[t+e];let r=0;await(0,s.asyncLoop)(n-1,b,(()=>{u(d,r,d,r+=c,i),y()})),u(d,(n-1)*c,h,t,i),y(),await(0,s.asyncLoop)(n,b,(()=>{const e=h[t+c-16]%n;for(let r=0;r<c;r++)g[r]=h[t+r]^d[e*c+r];u(g,0,h,t,i),y()}))}return f(e,a,p,d,g)}},5717:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},5726:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(9879);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},5736:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=5736,e.exports=t},5754:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;const n=r(8869);class i extends n.Coder{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}t.AnonymousCoder=i},5761:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(9328);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},5774:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(5212),i=r(7214);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},5797:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(2326),i=r(2885),o=r(5825);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},5810:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},5825:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(8051),i=r(2326),o=r(8596),s=r(5345);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},5855:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfuraProvider=t.InfuraWebSocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a=r(873),c="84842078b09946638c03157f83405213";class u extends a.WebSocketProvider{projectId;projectSecret;constructor(e,t){const r=new l(e,t),i=r._getConnection();(0,n.assert)(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"}),super(i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),r._network),(0,n.defineProperties)(this,{projectId:r.projectId,projectSecret:r.projectSecret})}isCommunityResource(){return this.projectId===c}}t.InfuraWebSocketProvider=u;class l extends s.JsonRpcProvider{projectId;projectSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=c),null==r&&(r=null),super(l.getRequest(i,t,r),i,{staticNetwork:i}),(0,n.defineProperties)(this,{projectId:t,projectSecret:r})}_getProvider(e){try{return new l(e,this.projectId,this.projectSecret)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.projectId===c}static getWebSocketProvider(e,t){return new u(e,t)}static getRequest(e,t,r){null==t&&(t=c),null==r&&(r=null);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":case"base-goerli":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bsc-mainnet.infura.io";case"bnbt":return"bsc-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v3/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===c&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("InfuraProvider"),!0)),o}}t.InfuraProvider=l},5863:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.Result=t.checkResultErrors=void 0;const n=r(2291),i=r(1181),o=r(5347),s=r(954),a=r(8869);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return a.Result}});const c=r(189),u=r(9976);class l{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,signature:i,topic:t,args:r})}}t.LogDescription=l;class f{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const i=e.name,s=e.format();(0,o.defineProperties)(this,{fragment:e,name:i,args:r,signature:s,selector:t,value:n})}}t.TransactionDescription=f;class d{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,args:r,signature:i,selector:t})}}t.ErrorDescription=d;class h{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){(0,o.defineProperties)(this,{hash:e,_isIndexed:!0})}}t.Indexed=h;const p={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"},g={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&p[e.toString()]&&(t=p[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class y{fragments;deploy;fallback;receive;#Ue;#De;#Ge;#He;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#Ge=new Map,this.#Ue=new Map,this.#De=new Map;const r=[];for(const e of t)try{r.push(c.Fragment.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}(0,o.defineProperties)(this,{fragments:Object.freeze(r)});let n=null,i=!1;this.#He=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let r;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void(0,o.defineProperties)(this,{deploy:e});case"fallback":return void(0===e.inputs.length?i=!0:((0,o.assertArgument)(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,i=n.payable));case"function":r=this.#Ge;break;case"event":r=this.#De;break;case"error":r=this.#Ue;break;default:return}const s=e.format();r.has(s)||r.set(s,e)})),this.deploy||(0,o.defineProperties)(this,{deploy:c.ConstructorFragment.from("constructor()")}),(0,o.defineProperties)(this,{fallback:n,receive:i})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return s.AbiCoder.defaultAbiCoder()}#ze(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#Ge.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#Ge)t.split("(")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,i=!0;u.Typed.isTyped(e)&&"overrides"===e.type&&(i=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||i&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i<t.length;i++)if(u.Typed.isTyped(t[i])){if(i>=r.length){if("overrides"===t[i].type)continue;n.splice(e,1);break}if(t[i].type!==r[i].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#Ge.get(c.FunctionFragment.from(e).format())||null}getFunctionName(e){const t=this.#ze(e,null,!1);return(0,o.assertArgument)(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#ze(e,null,!1)}getFunction(e,t){return this.#ze(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#Ge.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#Ge.get(n),r)}}#We(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#De.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#De)t.split("(")[0]===e&&n.push(r);if(t){for(let e=n.length-1;e>=0;e--)n[e].inputs.length<t.length&&n.splice(e,1);for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i<t.length;i++)if(u.Typed.isTyped(t[i])&&t[i].type!==r[i].baseType){n.splice(e,1);break}}}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#De.get(c.EventFragment.from(e).format())||null}getEventName(e){const t=this.#We(e,null,!1);return(0,o.assertArgument)(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#We(e,null,!1)}getEvent(e,t){return this.#We(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#De.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#De.get(n),r)}}getError(e,t){if((0,o.isHexString)(e)){const t=e.toLowerCase();if(g[t])return c.ErrorFragment.from(g[t].signature);for(const e of this.#Ue.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const t=[];for(const[r,n]of this.#Ue)r.split("(")[0]===e&&t.push(n);if(0===t.length)return"Error"===e?c.ErrorFragment.from("error Error(string)"):"Panic"===e?c.ErrorFragment.from("error Panic(uint256)"):null;if(t.length>1){const r=t.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}if("Error(string)"===(e=c.ErrorFragment.from(e).format()))return c.ErrorFragment.from("error Error(string)");if("Panic(uint256)"===e)return c.ErrorFragment.from("error Panic(uint256)");return this.#Ue.get(e)||null}forEachError(e){const t=Array.from(this.#Ue.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#Ue.get(n),r)}}_decodeParams(e,t){return this.#He.decode(e,t)}_encodeParams(e,t){return this.#He.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);(0,o.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,o.assertArgument)((0,o.dataSlice)(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,o.dataSlice)(t,4))}encodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);(0,o.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,o.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.assertArgument)((0,o.dataSlice)(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,o.dataSlice)(t,4))}encodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}let r="invalid length for result data";const n=(0,o.getBytesCopy)(t);if(n.length%32==0)try{return this.#He.decode(e.outputs,n)}catch(e){r="could not decode result data"}(0,o.assert)(!1,r,"BAD_DATA",{value:(0,o.hexlify)(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){const r=(0,o.getBytes)(e,"data"),n=s.AbiCoder.getBuiltinCallException("call",t,r);if(n.message.startsWith("execution reverted (unknown custom error)")){const e=(0,o.hexlify)(r.slice(0,4)),t=this.getError(e);if(t)try{const e=this.#He.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message="execution reverted (coult not decode custom error)"}}const i=this.parseTransaction(t);return i&&(n.invocation={method:i.name,signature:i.signature,args:i.args}),n}encodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.hexlify)(this.#He.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}(0,o.assert)(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});const r=[];e.anonymous||r.push(e.topicHash);const s=(e,t)=>"string"===e.type?(0,i.id)(t):"bytes"===e.type?(0,n.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=(0,o.toBeHex)(t):e.type.match(/^bytes/)?t=(0,o.zeroPadBytes)(t,32):"address"===e.type&&this.#He.encode(["address"],[t]),(0,o.zeroPadValue)((0,o.hexlify)(t),32));for(t.forEach(((t,n)=>{const i=e.inputs[n];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?(0,o.assertArgument)(!1,"filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>s(i,e)))):r.push(s(i,t)):(0,o.assertArgument)(null==t,"cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}const r=[],s=[],a=[];return e.anonymous||r.push(e.topicHash),(0,o.assertArgument)(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const c=t[o];if(e.indexed)if("string"===e.type)r.push((0,i.id)(c));else if("bytes"===e.type)r.push((0,n.keccak256)(c));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this.#He.encode([e.type],[c]))}else s.push(e),a.push(c)})),{data:this.#He.encode(s,a),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;(0,o.assertArgument)((0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const n=[],i=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(c.ParamType.from({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(i.push(e),s.push(!1))}));const u=null!=r?this.#He.decode(n,(0,o.concat)(r)):null,l=this.#He.decode(i,t,!0),f=[],d=[];let p=0,g=0;return e.inputs.forEach(((e,t)=>{let r=null;if(e.indexed)if(null==u)r=new h(null);else if(s[t])r=new h(u[g++]);else try{r=u[g++]}catch(e){r=e}else try{r=l[p++]}catch(e){r=e}f.push(r),d.push(e.name||null)})),a.Result.fromItems(f,d)}parseTransaction(e){const t=(0,o.getBytes)(e.data,"tx.data"),r=(0,o.getBigInt)(null!=e.value?e.value:0,"tx.value"),n=this.getFunction((0,o.hexlify)(t.slice(0,4)));if(!n)return null;const i=this.#He.decode(n.inputs,t.slice(4));return new f(n,n.selector,i,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new l(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=(0,o.hexlify)(e),r=this.getError((0,o.dataSlice)(t,0,4));if(!r)return null;const n=this.#He.decode(r.inputs,(0,o.dataSlice)(t,4));return new d(r,r.selector,n)}static from(e){return e instanceof y?e:"string"==typeof e?new y(JSON.parse(e)):"function"==typeof e.formatJson?new y(e.formatJson()):"function"==typeof e.format?new y(e.format("json")):new y(e)}}t.Interface=y},5881:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(3275),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},5884:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(8051),i=r(9724);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},5887:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(6757),i=r(4478);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},5904:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(8051),i=r(9724),o=r(4885);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},5934:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(5212),i=r(7214);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},5936:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(8087),i=r(9724),o=r(4885),s=r(6404),a=r(7058);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),c=s.popNumber(e,1/0),u=e;return u.length?1===u.length?i.innerFrom(u[0]):n.mergeAll(c)(a.from(u,r)):o.EMPTY}},6002:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2052),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},6013:function(e,t){"use strict";var r,n,i,o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.AES=void 0;const a={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],u=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],l=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],d=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],h=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],p=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],m=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],v=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],w=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],A=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],E=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function P(e){const t=[];for(let r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}class O{get key(){return o(this,r,"f").slice()}constructor(e){if(r.set(this,void 0),n.set(this,void 0),i.set(this,void 0),!(this instanceof O))throw Error("AES must be instanitated with `new`");s(this,r,new Uint8Array(e),"f");const t=a[this.key.length];if(null==t)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");s(this,i,[],"f"),s(this,n,[],"f");for(let e=0;e<=t;e++)o(this,i,"f").push([0,0,0,0]),o(this,n,"f").push([0,0,0,0]);const l=4*(t+1),f=this.key.length/4,d=P(this.key);let h;for(let e=0;e<f;e++)h=e>>2,o(this,i,"f")[h][e%4]=d[e],o(this,n,"f")[t-h][e%4]=d[e];let p,g=0,y=f;for(;y<l;){if(p=d[f-1],d[0]^=u[p>>16&255]<<24^u[p>>8&255]<<16^u[255&p]<<8^u[p>>24&255]^c[g]<<24,g+=1,8!=f)for(let e=1;e<f;e++)d[e]^=d[e-1];else{for(let e=1;e<f/2;e++)d[e]^=d[e-1];p=d[f/2-1],d[f/2]^=u[255&p]^u[p>>8&255]<<8^u[p>>16&255]<<16^u[p>>24&255]<<24;for(let e=f/2+1;e<f;e++)d[e]^=d[e-1]}let e,r,s=0;for(;s<f&&y<l;)e=y>>2,r=y%4,o(this,i,"f")[e][r]=d[s],o(this,n,"f")[t-e][r]=d[s++],y++}for(let e=1;e<t;e++)for(let t=0;t<4;t++)p=o(this,n,"f")[e][t],o(this,n,"f")[e][t]=v[p>>24&255]^w[p>>16&255]^A[p>>8&255]^E[255&p]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=o(this,i,"f").length-1,r=[0,0,0,0];let n=P(e);for(let e=0;e<4;e++)n[e]^=o(this,i,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=f[n[t]>>24&255]^d[n[(t+1)%4]>>16&255]^h[n[(t+2)%4]>>8&255]^p[255&n[(t+3)%4]]^o(this,i,"f")[e][t];n=r.slice()}const s=new Uint8Array(16);let a=0;for(let e=0;e<4;e++)a=o(this,i,"f")[t][e],s[4*e]=255&(u[n[e]>>24&255]^a>>24),s[4*e+1]=255&(u[n[(e+1)%4]>>16&255]^a>>16),s[4*e+2]=255&(u[n[(e+2)%4]>>8&255]^a>>8),s[4*e+3]=255&(u[255&n[(e+3)%4]]^a);return s}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=o(this,n,"f").length-1,r=[0,0,0,0];let i=P(e);for(let e=0;e<4;e++)i[e]^=o(this,n,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=g[i[t]>>24&255]^y[i[(t+3)%4]>>16&255]^b[i[(t+2)%4]>>8&255]^m[255&i[(t+1)%4]]^o(this,n,"f")[e][t];i=r.slice()}const s=new Uint8Array(16);let a=0;for(let e=0;e<4;e++)a=o(this,n,"f")[t][e],s[4*e]=255&(l[i[e]>>24&255]^a>>24),s[4*e+1]=255&(l[i[(e+3)%4]>>16&255]^a>>16),s[4*e+2]=255&(l[i[(e+2)%4]>>8&255]^a>>8),s[4*e+3]=255&(l[255&i[(e+1)%4]]^a);return s}}t.AES=O,r=new WeakMap,n=new WeakMap,i=new WeakMap},6035:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9663);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},6065:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=void 0;const n=r(646),i=r(2291),o=r(5347),s=new RegExp("^bytes([0-9]+)$"),a=new RegExp("^(u?int)([0-9]*)$"),c=new RegExp("^(.*)\\[([0-9]*)\\]$");function u(e,t,r){switch(e){case"address":return r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)((0,n.getAddress)(t));case"string":return(0,o.toUtf8Bytes)(t);case"bytes":return(0,o.getBytes)(t);case"bool":return t=t?"0x01":"0x00",r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)(t)}let i=e.match(a);if(i){let n="int"===i[1],s=parseInt(i[2]||"256");return(0,o.assertArgument)((!i[2]||i[2]===String(s))&&s%8==0&&0!==s&&s<=256,"invalid number type","type",e),r&&(s=256),n&&(t=(0,o.toTwos)(t,s)),(0,o.getBytes)((0,o.zeroPadValue)((0,o.toBeArray)(t),s/8))}if(i=e.match(s),i){const n=parseInt(i[1]);return(0,o.assertArgument)(String(n)===i[1]&&0!==n&&n<=32,"invalid bytes type","type",e),(0,o.assertArgument)((0,o.dataLength)(t)===n,`invalid value for ${e}`,"value",t),r?(0,o.getBytes)((0,o.zeroPadBytes)(t,32)):t}if(i=e.match(c),i&&Array.isArray(t)){const r=i[1],n=parseInt(i[2]||String(t.length));(0,o.assertArgument)(n===t.length,`invalid array length for ${e}`,"value",t);const s=[];return t.forEach((function(e){s.push(u(r,e,!0))})),(0,o.getBytes)((0,o.concat)(s))}(0,o.assertArgument)(!1,"invalid type","type",e)}function l(e,t){(0,o.assertArgument)(e.length===t.length,"wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(u(e,t[n]))})),(0,o.hexlify)((0,o.concat)(r))}t.solidityPacked=l,t.solidityPackedKeccak256=function(e,t){return(0,i.keccak256)(l(e,t))},t.solidityPackedSha256=function(e,t){return(0,i.sha256)(l(e,t))}},6075:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(7478),i=r(281);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},6081:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(7652),s=r(6677);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},6131:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(4885),i=r(5212),o=r(7214),s=r(9724),a=r(5825);t.repeat=function(e){var t,r,c=1/0;return null!=e&&("object"==typeof e?(t=e.count,c=void 0===t?1/0:t,r=e.delay):c=e),c<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,u=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),c=o.createOperatorSubscriber(t,(function(){c.unsubscribe(),l()}));e.subscribe(c)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<c?n?u():r=!0:t.complete()}))),r&&u()};l()}))}},6153:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6201:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(680),i=r(7699);t.switchAll=function(){return n.switchMap(i.identity)}},6245:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=void 0,t.EtherSymbol="Ξ",t.MessagePrefix="Ethereum Signed Message:\n"},6297:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},6328:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(5212),s=r(201),a=r(6404),c=r(7058);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(c.from(i([t],n(e)),r)).subscribe(o)}))}},6342:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeOfOperation=void 0;const n=r(6013);t.ModeOfOperation=class{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new n.AES(t)},name:{enumerable:!0,value:e}})}}},6355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(6872);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},6404:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(281),i=r(8596);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},6508:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.getNumber=t.toBigInt=t.getUint=t.getBigInt=t.mask=t.toTwos=t.fromTwos=void 0;const n=r(7415),i=r(1500),o=BigInt(0),s=BigInt(1),a=9007199254740991;function c(e,t){switch(typeof e){case"bigint":return e;case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){(0,i.assertArgument)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid BigNumberish value",t||"value",e)}function u(e,t){const r=c(e,t);return(0,i.assert)(r>=o,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}t.fromTwos=function(e,t){const r=u(e,"value"),n=BigInt(d(t,"width"));return(0,i.assert)(r>>n===o,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-s?-((~r&(s<<n)-s)+s):r},t.toTwos=function(e,t){let r=c(e,"value");const n=BigInt(d(t,"width")),a=s<<n-s;return r<o?(r=-r,(0,i.assert)(r<=a,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),(~r&(s<<n)-s)+s):((0,i.assert)(r<a,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),r)},t.mask=function(e,t){const r=u(e,"value"),n=BigInt(d(t,"bits"));return r&(s<<n)-s},t.getBigInt=c,t.getUint=u;const l="0123456789abcdef";function f(e){if(e instanceof Uint8Array){let t="0x0";for(const r of e)t+=l[r>>4],t+=l[15&r];return BigInt(t)}return c(e)}function d(e,t){switch(typeof e){case"bigint":return(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),Number(e);case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return d(BigInt(e),t)}catch(r){(0,i.assertArgument)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid numeric value",t||"value",e)}function h(e){const t=u(e,"value");if(t===o)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}t.toBigInt=f,t.getNumber=d,t.toNumber=function(e){return d(f(e))},t.toBeHex=function(e,t){let r=u(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{const n=d(t,"width");for((0,i.assert)(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r},t.toBeArray=h,t.toQuantity=function(e){let t=(0,n.hexlify)((0,n.isBytesLike)(e)?e:h(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}},6526:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractEventPayload=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.UndecodedEventLog=t.EventLog=void 0;const n=r(3807),i=r(5347);class o extends n.Log{interface;fragment;args;constructor(e,t,r){super(e,e.provider);const n=t.decodeEventLog(r,e.data,e.topics);(0,i.defineProperties)(this,{args:n,fragment:r,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}t.EventLog=o;class s extends n.Log{error;constructor(e,t){super(e,e.provider),(0,i.defineProperties)(this,{error:t})}}t.UndecodedEventLog=s;class a extends n.TransactionReceipt{#Ve;constructor(e,t,r){super(r,t),this.#Ve=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#Ve.getEvent(e.topics[0]):null;if(t)try{return new o(e,this.#Ve,t)}catch(t){return new s(e,t)}return e}))}}t.ContractTransactionReceipt=a;class c extends n.TransactionResponse{#Ve;constructor(e,t,r){super(r,t),this.#Ve=e}async wait(e,t){const r=await super.wait(e,t);return null==r?null:new a(this.#Ve,this.provider,r)}}t.ContractTransactionResponse=c;class u extends i.EventPayload{log;constructor(e,t,r,n){super(e,t,r),(0,i.defineProperties)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}t.ContractUnknownEventPayload=u,t.ContractEventPayload=class extends u{constructor(e,t,r,n,s){super(e,t,r,new o(s,e.interface,n));const a=e.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,i.defineProperties)(this,{args:a,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}},6569:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(5130),i=r(4359);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},6591:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=void 0;var n=r(9011);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return n.Wordlist}});var i=r(9943);Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return i.LangEn}});var o=r(2684);Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return o.WordlistOwl}});var s=r(8725);Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return s.WordlistOwlA}});var a=r(2431);Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return a.wordlists}})},6606:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(5212),i=r(5717),o=r(7214),s=r(9724);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,c=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,c,i.noop))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},6632:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(6872),i=r(9724),o=r(5212),s=r(7214);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},6640:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryPoint=void 0;const n=r(4193),i=r(3358),o=r(8711);class s extends o.BaseContract{constructor(e){super(e.entryPointAddress,o.ENTRY_POINT_ABI,e)}async getRegistryAddress(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.registry()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_REGISTRY_FAILED","Failed to get registry address",e),null}}async getServiceFeePercentage(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const e=await this.contract.serviceFeePercentage();return Number(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_FEE_PERCENTAGE_FAILED","Failed to get service fee percentage",e),null}}async calculateFee(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.calculateFee(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_CALCULATE_FEE_FAILED","Failed to calculate fee",e),null}}async checkSubscription(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.checkSubscription(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_CHECK_SUBSCRIPTION_FAILED",`Failed to check subscription for user ${e} on relay ${t}`,r),!1}}async hasRegisteredPubKey(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.hasRegisteredPubKey(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_HAS_REGISTERED_PUBKEY_FAILED",`Failed to check if user ${e} has registered pubkey on relay ${t}`,r),!1}}async isPubKeySubscribed(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const r=t instanceof Uint8Array?n.ethers.hexlify(t):t;return await this.contract.isPubKeySubscribed(e,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_IS_PUBKEY_SUBSCRIBED_FAILED",`Failed to check if pubkey is subscribed on relay ${e}`,t),!1}}async batchCheckPubKeySubscription(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(e.length!==t.length)throw new Error("Array lengths must match");const r=t.map((e=>e instanceof Uint8Array?n.ethers.hexlify(e):e));return await this.contract.batchCheckPubKeySubscription(e,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_CHECK_PUBKEYS_FAILED","Failed to batch check public key subscriptions",t),Array(e.length).fill(!1)}}async getSubscriptionDetails(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const[r,i]=await this.contract.getSubscriptionDetails(e,t);return{expires:r,pubKey:n.ethers.hexlify(i)}}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_SUBSCRIPTION_DETAILS_FAILED",`Failed to get subscription details for user ${e} on relay ${t}`,r),null}}async batchCheckSubscriptions(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.batchCheckSubscriptions(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_CHECK_SUBSCRIPTIONS_FAILED",`Failed to batch check subscriptions for user ${e}`,r),Array(t.length).fill(!1)}}async batchCheckPubKeys(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.batchCheckPubKeys(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_CHECK_PUBKEYS_FAILED",`Failed to batch check pubkeys for user ${e}`,r),Array(t.length).fill(!1)}}async getStatistics(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const[e,t,r,n,i,o,s]=await this.contract.getStatistics();return{userCount:e,totalSubscriptions:t,totalViaUrl:r,totalViaDirect:n,totalAmountProcessed:i,totalFeesCollected:o,currentBalance:s}}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_STATISTICS_FAILED","Failed to get EntryPoint statistics",e),null}}async subscribeViaUrl(e,t,r,o){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const i=r instanceof Uint8Array?n.ethers.hexlify(r):r,s={value:o||n.ethers.parseEther("0.01")};return await this.contract.subscribeViaUrl(e,t,i,s)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_SUBSCRIBE_VIA_URL_FAILED",`Failed to subscribe via URL ${e} for ${t} months`,r),null}}async subscribeDirect(e,t,r,o){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const i=r instanceof Uint8Array?n.ethers.hexlify(r):r,s={value:o||n.ethers.parseEther("0.01")};return await this.contract.subscribeDirect(e,t,i,s)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_SUBSCRIBE_DIRECT_FAILED",`Failed to subscribe directly to relay ${e} for ${t} months`,r),null}}async batchSubscribe(e,t,r,o){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");if(e.length!==r.length)throw new Error("Array lengths must match");const i=r.map((e=>e instanceof Uint8Array?n.ethers.hexlify(e):e)),s={value:o||n.ethers.parseEther("0.01")*BigInt(e.length)};return await this.contract.batchSubscribe(e,t,i,s)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_SUBSCRIBE_FAILED",`Failed to batch subscribe to ${e.length} relays for ${t} months`,r),null}}async updateRegistry(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateRegistry(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_UPDATE_REGISTRY_FAILED",`Failed to update registry to ${e}`,t),null}}async updateServiceFee(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateServiceFee(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_UPDATE_SERVICE_FEE_FAILED",`Failed to update service fee to ${e}`,t),null}}async withdrawFees(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.withdrawFees()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_WITHDRAW_FEES_FAILED","Failed to withdraw fees",e),null}}async isRelayInProtocolMode(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return 1===await this.contract.isRelayInProtocolMode(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_IS_RELAY_IN_PROTOCOL_MODE_FAILED",`Failed to check if relay ${e} is in protocol mode`,t),!1}}}t.EntryPoint=s},6677:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(9795),s=r(5212),a=r(7699);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},6680:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(8051),i=r(281);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},6707:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(5212),i=r(2574);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},6744:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(5212),i=r(7214);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},6749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(1415),s=r(5212);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},6757:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(4772),s=r(5726),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&r===t._scheduled&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},6791:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(9546),s=r(1587);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},6805:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(8051),i=r(4891),o=r(281),s=r(8619);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},6806:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnkrProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a);const i={polling:!0,staticNetwork:r};super(c.getRequest(r,t),r,i),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("AnkrProvider"),!0)),r}getRpcError(e,t){return"eth_sendRawTransaction"===e.method&&t&&t.error&&"INTERNAL_ERROR: could not replace existing tx"===t.error.message&&(t.error.message="replacement transaction underpriced"),super.getRpcError(e,t)}isCommunityResource(){return this.apiKey===a}}t.AnkrProvider=c},6808:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var s=r(8051),a=r(9879),c=r(839),u=r(4830),l=r(2688),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new d(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new c.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,u.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new d(e,t)},t}(s.Observable);t.Subject=f;var d=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=d},6872:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(5212),i=r(7214);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},6911:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(5212),i=r(7214),o=r(9724),s=r(5717);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},6920:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(8051),i=r(281),o=r(3916);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},6930:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const n=r(2291),i=r(5347),o=r(8394),s=r(22),a=r(7570),c=r(1650),u=r(5312);function l(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class f extends o.BaseWallet{constructor(e,t){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new n.SigningKey(e):e,t)}connect(e){return new f(this.signingKey,e)}async encrypt(e,t){const r={address:this.address,privateKey:this.privateKey};return await(0,c.encryptKeystoreJson)(r,e,{progressCallback:t})}encryptSync(e){const t={address:this.address,privateKey:this.privateKey};return(0,c.encryptKeystoreJsonSync)(t,e)}static#Ke(e){if((0,i.assertArgument)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const t=u.Mnemonic.fromEntropy(e.mnemonic.entropy),r=s.HDNodeWallet.fromMnemonic(t,e.mnemonic.path);if(r.address===e.address&&r.privateKey===e.privateKey)return r;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new f(e.privateKey);return(0,i.assertArgument)(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t}static async fromEncryptedJson(e,t,r){let n=null;return(0,c.isKeystoreJson)(e)?n=await(0,c.decryptKeystoreJson)(e,t,r):(0,a.isCrowdsaleJson)(e)&&(r&&(r(0),await l(0)),n=(0,a.decryptCrowdsaleJson)(e,t),r&&(r(1),await l(0))),f.#Ke(n)}static fromEncryptedJsonSync(e,t){let r=null;return(0,c.isKeystoreJson)(e)?r=(0,c.decryptKeystoreJsonSync)(e,t):(0,a.isCrowdsaleJson)(e)?r=(0,a.decryptCrowdsaleJson)(e,t):(0,i.assertArgument)(!1,"invalid JSON wallet","json","[ REDACTED ]"),f.#Ke(r)}static createRandom(e){const t=s.HDNodeWallet.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const r=s.HDNodeWallet.fromPhrase(e);return t?r.connect(t):r}}t.Wallet=f},6975:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(5212),s=r(7214),a=r(9724),c=r(7699),u=r(5717),l=r(6404);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),d=e.map((function(){return!1})),h=!1,p=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,h||d[t]||(d[t]=!0,(h=d.every(c.identity))&&(d=null))}),u.noop))},g=0;g<l;g++)p(g);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(h){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},6977:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(6749);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},7005:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const n=r(1295),i=r(5347),o=BigInt(0),s=BigInt(1),a=BigInt(2),c=BigInt(27),u=BigInt(28),l=BigInt(35),f={};function d(e){return(0,i.zeroPadValue)((0,i.toBeArray)(e),32)}class h{#$e;#qe;#Je;#Qe;get r(){return this.#$e}set r(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid r","value",e),this.#$e=(0,i.hexlify)(e)}get s(){return this.#qe}set s(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid s","value",e);const t=(0,i.hexlify)(e);(0,i.assertArgument)(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#qe=t}get v(){return this.#Je}set v(e){const t=(0,i.getNumber)(e,"value");(0,i.assertArgument)(27===t||28===t,"invalid v","v",e),this.#Je=t}get networkV(){return this.#Qe}get legacyChainId(){const e=this.networkV;return null==e?null:h.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,i.getBytes)(this.s);return this.yParity&&(e[0]|=128),(0,i.hexlify)(e)}get compactSerialized(){return(0,i.concat)([this.r,this.yParityAndS])}get serialized(){return(0,i.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,i.assertPrivate)(e,f,"Signature"),this.#$e=t,this.#qe=r,this.#Je=n,this.#Qe=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new h(f,this.r,this.s,this.v);return this.networkV&&(e.#Qe=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=(0,i.getBigInt)(e,"v");return t==c||t==u?o:((0,i.assertArgument)(t>=l,"invalid EIP-155 v","v",e),(t-l)/a)}static getChainIdV(e,t){return(0,i.getBigInt)(e)*a+BigInt(35+t-27)}static getNormalizedV(e){const t=(0,i.getBigInt)(e);return t===o||t===c?27:t===s||t===u?28:((0,i.assertArgument)(t>=l,"invalid v","v",e),t&s?27:28)}static from(e){function t(t,r){(0,i.assertArgument)(t,r,"signature",e)}if(null==e)return new h(f,n.ZeroHash,n.ZeroHash,27);if("string"==typeof e){const r=(0,i.getBytes)(e,"signature");if(64===r.length){const e=(0,i.hexlify)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new h(f,e,(0,i.hexlify)(t),n)}if(65===r.length){const e=(0,i.hexlify)(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const o=h.getNormalizedV(r[64]);return new h(f,e,(0,i.hexlify)(n),o)}t(!1,"invalid raw signature length")}if(e instanceof h)return e.clone();const r=e.r;t(null!=r,"missing r");const o=d(r),s=function(e,r){if(null!=e)return d(e);if(null!=r){t((0,i.isHexString)(r,32),"invalid yParityAndS");const e=(0,i.getBytes)(r);return e[0]&=127,(0,i.hexlify)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&(0,i.getBytes)(s)[0]),"non-canonical s");const{networkV:a,v:c}=function(e,r,n){if(null!=e){const t=(0,i.getBigInt)(e);return{networkV:t>=l?t:void 0,v:h.getNormalizedV(t)}}if(null!=r)return t((0,i.isHexString)(r,32),"invalid yParityAndS"),{v:128&(0,i.getBytes)(r)[0]?28:27};if(null!=n){switch((0,i.getNumber)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),u=new h(f,o,s,c);return a&&(u.#Qe=a),t(null==e.yParity||(0,i.getNumber)(e.yParity,"sig.yParity")===u.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===u.yParityAndS,"yParityAndS mismatch"),u}}t.Signature=h},7007:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=p(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7024:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9619);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},7058:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(131),i=r(9724);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},7120:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkError=t.MultipleAuthError=t.TimeoutError=t.UserExists=t.InvalidCredentials=t.AuthError=t.GunError=void 0;class r extends Error{constructor(e){super(e),this.name="GunError"}}t.GunError=r;class n extends r{constructor(e){super(e),this.name="AuthError"}}t.AuthError=n,t.InvalidCredentials=class extends n{constructor(e="Credenziali non valide"){super(e),this.name="InvalidCredentials"}},t.UserExists=class extends n{constructor(e="Utente già esistente"){super(e),this.name="UserExists"}},t.TimeoutError=class extends r{constructor(e="Timeout durante l'operazione"){super(e),this.name="TimeoutError"}},t.MultipleAuthError=class extends n{constructor(e="Autenticazione multipla in corso"){super(e),this.name="MultipleAuthError"}},t.NetworkError=class extends r{}},7155:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.pbkdf2Sync=t.createHmac=t.createHash=void 0;const n=r(9615),i=r(8941),o=r(2623),s=r(102),a=r(5347),c=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}(),u=c.crypto||c.msCrypto;t.createHash=function(e){switch(e){case"sha256":return o.sha256.create();case"sha512":return s.sha512.create()}(0,a.assertArgument)(!1,"invalid hashing algorithm name","algorithm",e)},t.createHmac=function(e,t){const r={sha256:o.sha256,sha512:s.sha512}[e];return(0,a.assertArgument)(null!=r,"invalid hmac algorithm","algorithm",e),n.hmac.create(r,t)},t.pbkdf2Sync=function(e,t,r,n,c){const u={sha256:o.sha256,sha512:s.sha512}[c];return(0,a.assertArgument)(null!=u,"invalid pbkdf2 algorithm","algorithm",c),(0,i.pbkdf2)(u,e,t,{c:r,dkLen:n})},t.randomBytes=function(e){(0,a.assert)(null!=u,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,a.assertArgument)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return u.getRandomValues(t),t}},7214:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(2708);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},7215:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=void 0;const n=r(646),i=r(2291),o=r(7778),s=r(5347),a=r(1993),c=new Uint8Array(32);c.fill(0);const u=BigInt(-1),l=BigInt(0),f=BigInt(1),d=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),h=(0,s.toBeHex)(f,32),p=(0,s.toBeHex)(l,32),g={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},y=["name","version","chainId","verifyingContract","salt"];function b(e){return function(t){return(0,s.assertArgument)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const m={name:b("name"),version:b("version"),chainId:function(e){const t=(0,s.getBigInt)(e,"domain.chainId");return(0,s.assertArgument)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):(0,s.toQuantity)(t)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}(0,s.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=(0,s.getBytes)(e,"domain.salt");return(0,s.assertArgument)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,s.hexlify)(t)}};function v(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);(0,s.assertArgument)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const i=(0,s.mask)(d,r?n-1:n),o=r?(i+f)*u:l;return function(t){const n=(0,s.getBigInt)(t,"value");return(0,s.assertArgument)(n>=o&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,s.toBeHex)(r?(0,s.toTwos)(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0,s.assertArgument)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){const n=(0,s.getBytes)(t);return(0,s.assertArgument)(n.length===r,`invalid length for ${e}`,"value",t),function(e){const t=(0,s.getBytes)(e),r=t.length%32;return r?(0,s.concat)([t,c.slice(r)]):(0,s.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,s.zeroPadValue)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?h:p};case"bytes":return function(e){return(0,i.keccak256)(e)};case"string":return function(e){return(0,a.id)(e)}}return null}function w(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}function A(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class E{primaryType;#Ye;get types(){return JSON.parse(this.#Ye)}#Ze;#Xe;constructor(e){this.#Ze=new Map,this.#Xe=new Map;const t=new Map,r=new Map,n=new Map,i={};Object.keys(e).forEach((o=>{i[o]=e[o].map((({name:t,type:r})=>{let{base:n,index:i}=A(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(i||"")}})),t.set(o,new Set),r.set(o,[]),n.set(o,new Set)})),this.#Ye=JSON.stringify(i);for(const n in i){const o=new Set;for(const a of i[n]){(0,s.assertArgument)(!o.has(a.name),`duplicate variable name ${JSON.stringify(a.name)} in ${JSON.stringify(n)}`,"types",e),o.add(a.name);const i=A(a.type).base;(0,s.assertArgument)(i!==n,`circular type reference to ${JSON.stringify(i)}`,"types",e),v(i)||((0,s.assertArgument)(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(n),t.get(n).add(i))}}const o=Array.from(r.keys()).filter((e=>0===r.get(e).length));(0,s.assertArgument)(0!==o.length,"missing primary type","types",e),(0,s.assertArgument)(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,s.defineProperties)(this,{primaryType:o[0]}),function i(o,a){(0,s.assertArgument)(!a.has(o),`circular type reference to ${JSON.stringify(o)}`,"types",e),a.add(o);for(const e of t.get(o))if(r.has(e)){i(e,a);for(const t of a)n.get(t).add(e)}a.delete(o)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#Ze.set(e,w(e,i[e])+r.map((e=>w(e,i[e]))).join(""))}}getEncoder(e){let t=this.#Xe.get(e);return t||(t=this.#et(e),this.#Xe.set(e,t)),t}#et(e){{const t=v(e);if(t)return t}const t=A(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{(0,s.assertArgument)(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let o=n.map(r);return this.#Ze.has(e)&&(o=o.map(i.keccak256)),(0,i.keccak256)((0,s.concat)(o))}}const r=this.types[e];if(r){const t=(0,a.id)(this.#Ze.get(e));return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#Ze.has(r)?(0,i.keccak256)(n):n}));return n.unshift(t),(0,s.concat)(n)}}(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#Ze.get(e);return(0,s.assertArgument)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,i.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(v(e))return r(e,t);const n=A(e).array;if(n)return(0,s.assertArgument)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map((e=>this._visit(n.prefix,e,r)));const i=this.types[e];if(i)return i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{});(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new E(e)}static getPrimaryType(e){return E.from(e).primaryType}static hashStruct(e,t,r){return E.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=g[r];(0,s.assertArgument)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>y.indexOf(e.name)-y.indexOf(t.name))),E.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,s.concat)(["0x1901",E.hashDomain(e),E.from(t).hash(r)])}static hash(e,t,r){return(0,i.keccak256)(E.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const i={};e.verifyingContract&&!(0,s.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=E.from(t);o.visit(r,((e,t)=>("address"!==e||(0,s.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t))}}static getPayload(e,t,r){E.hashDomain(e);const n={},i=[];y.forEach((t=>{const r=e[t];null!=r&&(n[t]=m[t](r),i.push({name:t,type:g[t]}))}));const o=E.from(t);t=o.types;const a=Object.assign({},t);return(0,s.assertArgument)(null==a.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=i,o.encode(r),{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,s.hexlify)((0,s.getBytes)(t));if(e.match(/^u?int/))return(0,s.getBigInt)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,s.assertArgument)("string"==typeof t,"invalid string","value",t),t}(0,s.assertArgument)(!1,"unsupported type","type",e)}))}}}t.TypedDataEncoder=E,t.verifyTypedData=function(e,t,r,n){return(0,o.recoverAddress)(E.hash(e,t,r),n)}},7245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(2326),i=r(4880),o=r(5825);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},7262:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIcapAddress=t.getAddress=void 0;const n=r(2291),i=r(5347),o=BigInt(0),s=BigInt(36);function a(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const o=(0,i.getBytes)((0,n.keccak256)(r));for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&o[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);function u(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>c[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const l=function(){const e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function f(e){if((0,i.assertArgument)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=a(e);return(0,i.assertArgument)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,i.assertArgument)(e.substring(2,4)===u(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=o;for(let r=0;r<e.length;r++)t=t*s+l[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return a("0x"+t)}(0,i.assertArgument)(!1,"invalid address","address",e)}t.getAddress=f,t.getIcapAddress=function(e){let t=BigInt(f(e)).toString(36).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+u("XE00"+t)+t}},7281:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(7699),o=r(8596),s=r(5884),a=r(6805);t.generate=function(e,t,r,c,u){var l,f,d,h;function p(){var e;return n(this,(function(n){switch(n.label){case 0:e=h,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,d(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(h=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,d=void 0===f?i.identity:f,u=l.scheduler):(h=e,!c||o.isScheduler(c)?(d=i.identity,u=c):d=c),s.defer(u?function(){return a.scheduleIterable(p(),u)}:p)}},7307:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;const n=r(3238),i=r(5347);let o=!1;const s=function(e){return(0,n.ripemd160)(e)};let a=s;function c(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}t.ripemd160=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new TypeError("ripemd160 is locked");a=e},Object.freeze(c)},7314:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(6808).Subject);t.BehaviorSubject=o},7398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;const n=r(5347),i=r(9976),o=r(8869),s=BigInt(0),a=BigInt(1),c=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class u extends o.Coder{size;signed;constructor(e,t,r){const i=(t?"int":"uint")+8*e;super(i,i,r,!1),(0,n.defineProperties)(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=(0,n.getBigInt)(i.Typed.dereference(t,this.type)),u=(0,n.mask)(c,8*o.WordSize);if(this.signed){let e=(0,n.mask)(u,8*this.size-1);(r>e||r<-(e+a))&&this._throwError("value out-of-bounds",t),r=(0,n.toTwos)(r,8*o.WordSize)}else(r<s||r>(0,n.mask)(u,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=(0,n.mask)(e.readValue(),8*this.size);return this.signed&&(t=(0,n.fromTwos)(t,8*this.size)),t}}t.NumberCoder=u},7400:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(281),i=r(5212),o=r(7214),s=r(7699);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},7405:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayVerifier=t.RelayEventType=void 0,t.getRelayUrls=l,t.getRegisteredPubKeys=async function(e,t,r,n=!0){try{const o=[],s=await l(e,n);if(r&&r.length>0){for(const e of r)for(const r of s)if(await t.hasRegisteredPubKey(e,r.address)){const n=await t.getSubscriptionDetails(e,r.address);n&&n.pubKey&&o.push({relayAddress:r.address,relayUrl:r.url,pubKey:n.pubKey,userAddress:e,expires:n.expires})}}else for(const t of s)try{new i.SimpleRelay({relayAddress:t.address,registryAddress:e.getAddress(),providerUrl:void e.getAddress()})}catch(e){console.error(`Error processing relay ${t.address}:`,e)}const a={};for(const e of o)a[e.pubKey]||(a[e.pubKey]={pubKey:e.pubKey,relays:[]}),a[e.pubKey].relays.push({relayAddress:e.relayAddress,relayUrl:e.relayUrl,userAddress:e.userAddress,expires:e.expires});return a}catch(e){return console.error("Failed to fetch registered public keys:",e),{}}},t.getSubscriptionHistory=async function(e,t="month"){try{const e=new Date,r=[];let n;switch(t){case"day":n=24;for(let t=0;t<n;t++){const n=new Date(e);n.setHours(n.getHours()-t),r.push({date:n.toISOString(),count:Math.floor(10*Math.random())+1})}break;case"week":n=7;for(let t=0;t<n;t++){const n=new Date(e);n.setDate(n.getDate()-t),r.push({date:n.toISOString().split("T")[0],count:Math.floor(25*Math.random())+5})}break;default:n=30;for(let t=0;t<n;t++){const n=new Date(e);n.setDate(n.getDate()-t),r.push({date:n.toISOString().split("T")[0],count:Math.floor(50*Math.random())+10})}}return r.sort(((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()))}catch(e){return console.error("Failed to fetch subscription history:",e),[]}},t.getRelayPerformance=async function(e,t){try{if(!await e.isRegisteredRelay(t))throw new Error(`Relay ${t} non è registrato`);const r=await e.getRelayInfo(t);if(!r)throw new Error(`Impossibile ottenere informazioni per il relay ${t}`);return{uptime:r.active?5*Math.random()+95:0,responseTime:Math.floor(500*Math.random())+50,successRate:r.active?10*Math.random()+90:0,lastChecked:(new Date).toISOString()}}catch(e){return console.error(`Failed to fetch performance for relay ${t}:`,e),{uptime:0,responseTime:0,successRate:0,lastChecked:(new Date).toISOString()}}},t.getNetworkSummary=async function(e,t){try{const r=await e.getAllRelays(!1,0,1e3);if(!r)throw new Error("Impossibile ottenere l'elenco dei relay");let i=0;for(const t of r.relays)await e.isRelayActive(t)&&i++;const o=await t.getStatistics();n.ethers.parseEther("0");const s=n.ethers.parseEther("0.01");return{totalRelays:Number(r.total),activeRelays:i,totalSubscriptions:o?Number(o.totalSubscriptions):0,activeSubscriptions:o?.7*Number(o.totalSubscriptions):0,averagePrice:n.ethers.formatEther(s),totalProcessedAmount:o?n.ethers.formatEther(o.totalAmountProcessed):"0",totalFeesCollected:o?n.ethers.formatEther(o.totalFeesCollected):"0"}}catch(e){return console.error("Failed to fetch network summary:",e),{totalRelays:0,activeRelays:0,totalSubscriptions:0,activeSubscriptions:0,averagePrice:"0",totalProcessedAmount:"0",totalFeesCollected:"0"}}},t.subscribeToRelayEvents=function(e,t){u.on("relayEvent",t);const r=setInterval((()=>{const e=Object.values(c),t=e[Math.floor(Math.random()*e.length)],r={type:t,timestamp:Date.now(),relayAddress:`0x${Math.random().toString(16).substring(2,42)}`,userAddress:t.includes("Subscription")?`0x${Math.random().toString(16).substring(2,42)}`:void 0,transactionHash:`0x${Math.random().toString(16).substring(2,66)}`};u.emit("relayEvent",r)}),1e4);return()=>{clearInterval(r),u.removeListener("relayEvent",t)}},t.getUsageDataForChart=async function(e,t,r){try{const e=new Date,n=[];let i=0,o="",s="";switch(r){case"daily":i=24;break;case"weekly":i=7;break;default:i=30}for(let o=0;o<i;o++){const i=new Date(e);if("daily"===r){i.setHours(i.getHours()-o);const e=`${i.getHours()}:00`;let r=0;switch(t){case"subscriptions":r=Math.floor(15*Math.random())+1;break;case"revenue":r=.5*Math.random()+.1;break;case"users":r=Math.floor(20*Math.random())+5}n.push({label:e,value:r})}else{i.setDate(i.getDate()-o);const e=i.toISOString().split("T")[0];let r=0;switch(t){case"subscriptions":r=Math.floor(50*Math.random())+10;break;case"revenue":r=2*Math.random()+.5;break;case"users":r=Math.floor(100*Math.random())+20}n.push({label:e,value:r})}}switch(t){case"subscriptions":o="Sottoscrizioni",s="Numero di sottoscrizioni "+("daily"===r?"giornaliere":"weekly"===r?"settimanali":"mensili");break;case"revenue":o="Ricavi",s=`Ricavi ${"daily"===r?"giornalieri":"weekly"===r?"settimanali":"mensili"} in ETH`;break;case"users":o="Utenti",s="Numero di utenti attivi "+("daily"===r?"giornalieri":"weekly"===r?"settimanali":"mensili")}return{dataPoints:n.sort(((e,t)=>"daily"===r?parseInt(e.label.split(":")[0])-parseInt(t.label.split(":")[0]):new Date(e.label).getTime()-new Date(t.label).getTime())),title:o,description:s}}catch(e){return console.error(`Failed to fetch chart data for ${t}:`,e),{dataPoints:[],title:"Errore",description:"Impossibile caricare i dati"}}};const n=r(4193),i=r(8777),o=r(7007),s=r(3358),a=r(5628);var c;!function(e){e.NEW_SUBSCRIPTION="newSubscription",e.SUBSCRIPTION_EXPIRED="subscriptionExpired",e.RELAY_REGISTERED="relayRegistered",e.RELAY_DEACTIVATED="relayDeactivated",e.RELAY_REACTIVATED="relayReactivated"}(c||(t.RelayEventType=c={}));const u=new o.EventEmitter;async function l(e,t=!0){try{const r=[];let n=0;const i=100;let o=!0;for(;o;){const s=await e.getAllRelays(t,n,i);if(s&&0!==s.relays.length){for(const t of s.relays){const n=await e.getRelayInfo(t);n&&n.url&&r.push({url:n.url,address:t})}n+=s.relays.length,o=n<Number(s.total)}else o=!1}return r}catch(e){return console.error("Failed to fetch relay URLs:",e),[]}}t.RelayVerifier=class{registry=null;entryPoint=null;simpleRelay=null;constructor(e,t,r){this.registry=e??null,this.entryPoint=t??null,this.simpleRelay=r??null}async isPublicKeyAuthorized(e,t){try{if(this.simpleRelay)try{if(await this.simpleRelay.isSubscribed(t))return!0}catch(e){(0,a.logError)("Error checking SimpleRelay subscription:",e)}if(this.entryPoint&&this.registry)try{const e=await this.registry.getAllRelays(!0,0,100);if(e&&e.relays&&e.relays.length>0)for(const r of e.relays)if(await this.entryPoint.isPubKeySubscribed(r,t))return!0}catch(e){(0,a.logError)("Error checking EntryPoint subscriptions:",e)}return!1}catch(e){return s.ErrorHandler.handle(s.ErrorType.CONTRACT,"RELAY_VERIFIER_ERROR","Error in isPublicKeyAuthorized check",e),!1}}async isUserSubscribedToRelay(e,t){try{return this.simpleRelay&&this.simpleRelay.getAddress()===e?await this.simpleRelay.isSubscribed(t):!!this.entryPoint&&await this.entryPoint.isPubKeySubscribed(e,t)}catch(t){return s.ErrorHandler.handle(s.ErrorType.CONTRACT,"RELAY_VERIFIER_ERROR",`Error checking subscription to relay ${e}`,t),!1}}async getAllRelays(e=!0,t=0,r=100){try{if(!this.registry)return[];const n=await this.registry.getAllRelays(e,t,r);return n?.relays||[]}catch(e){return s.ErrorHandler.handle(s.ErrorType.CONTRACT,"RELAY_VERIFIER_ERROR","Error getting all relays",e),[]}}setRegistry(e){this.registry=e}setEntryPoint(e){this.entryPoint=e}setSimpleRelay(e){this.simpleRelay=e}}},7406:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(4120),i=r(5934),o=r(9724);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7415:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=void 0;const n=r(1500);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}(0,n.assertArgument)(!1,"invalid BytesLike value",t||"value",e)}function o(e,t){return i(e,t,!1)}function s(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||"number"==typeof t&&e.length!==2+2*t||!0===t&&e.length%2!=0)}t.getBytes=o,t.getBytesCopy=function(e,t){return i(e,t,!0)},t.isHexString=s,t.isBytesLike=function(e){return s(e,!0)||e instanceof Uint8Array};const a="0123456789abcdef";function c(e){const t=o(e);let r="0x";for(let e=0;e<t.length;e++){const n=t[e];r+=a[(240&n)>>4]+a[15&n]}return r}function u(e,t,r){const i=o(e);(0,n.assert)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});const s=new Uint8Array(t);return s.fill(0),r?s.set(i,t-i.length):s.set(i,0),c(s)}t.hexlify=c,t.concat=function(e){return"0x"+e.map((e=>c(e).substring(2))).join("")},t.dataLength=function(e){return s(e,!0)?(e.length-2)/2:o(e).length},t.dataSlice=function(e,t,r){const i=o(e);return null!=r&&r>i.length&&(0,n.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),c(i.slice(null==t?0:t,null==r?i.length:r))},t.stripZerosLeft=function(e){let t=c(e).substring(2);for(;t.startsWith("00");)t=t.substring(2);return"0x"+t},t.zeroPadValue=function(e,t){return u(e,t,!0)},t.zeroPadBytes=function(e,t){return u(e,t,!1)}},7474:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(8596),s=r(8051),a=r(5455),c=r(3916),u=r(2071),l=r(5130);t.bindCallbackInternals=function e(t,r,f,d){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,d).apply(this,n).pipe(c.mapOneOrManyArgs(f))};d=f}return d?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(d),u.observeOn(d))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var c=new l.AsyncSubject,u=!0;return new s.Observable((function(s){var a=c.subscribe(s);if(u){u=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void c.error(n)}c.next(1<e.length?e:e[0]),f=!0,l&&c.complete()}])),f&&c.complete(),l=!0}return a}))}}},7478:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(6872),i=r(9724),o=r(5212),s=r(2574),a=r(281);t.mergeMap=function e(t,r,c){return void 0===c&&(c=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),c):("number"==typeof r&&(c=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,c)})))}},7510:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Webauthn=void 0;const n=r(4193),i=r(3358),o=r(4134),s=r(5628),a=r(1731),c={rpName:"Shogun Wallet",timeout:6e4,userVerification:"preferred",attestation:"none",authenticatorAttachment:"platform",requireResidentKey:!1};class u extends o.EventEmitter{config;gunInstance;credential;abortController=null;constructor(e,t){super(),this.gunInstance=e,this.credential=null,this.config={...c,...t,rpId:t?.rpId??window.location.hostname.split(":")[0]}}validateUsername(e){if(!e||"string"!=typeof e)throw new Error("Username must be a non-empty string");if(e.length<3||e.length>64)throw new Error("Username must be between 3 and 64 characters");if(!/^[a-zA-Z0-9_-]+$/.test(e))throw new Error("Username can only contain letters, numbers, underscores and hyphens")}async createAccount(e,t,r=!1){try{this.validateUsername(e);const n=3;let i=null;for(let o=1;o<=n;o++)try{const n=await this.generateCredentials(e,t,r);if(n.success)return this.emit(a.WebAuthnEventType.DEVICE_REGISTERED,{type:a.WebAuthnEventType.DEVICE_REGISTERED,data:{username:e,deviceInfo:n.deviceInfo},timestamp:Date.now()}),n;i=new Error(n.error??"Unknown error")}catch(e){if(i=e,o<n){await new Promise((e=>setTimeout(e,1e3*o)));continue}}throw i||new Error("Failed to create account after retries")}catch(e){throw this.emit(a.WebAuthnEventType.ERROR,{type:a.WebAuthnEventType.ERROR,data:{error:e.message},timestamp:Date.now()}),e}}async authenticateUser(e,t,r={}){try{if(this.validateUsername(e),!t){const e=new Error("No WebAuthn credentials found for this username");return i.ErrorHandler.handle(i.ErrorType.WEBAUTHN,"NO_CREDENTIALS",e.message,e),{success:!1,error:e.message}}this.abortAuthentication(),this.abortController=new AbortController;const n=r.timeout||this.config.timeout,o=setTimeout((()=>this.abortController?.abort()),n);try{const i={challenge:this.generateChallenge(e),allowCredentials:[],timeout:n,userVerification:r.userVerification||this.config.userVerification,rpId:this.config.rpId},o=await navigator.credentials.get({publicKey:i,signal:this.abortController.signal});if(!o)throw new Error("WebAuthn verification failed");const{password:s}=this.generateCredentialsFromSalt(e,t),c=this.getDeviceInfo(o.id),u={success:!0,username:e,password:s,credentialId:this.bufferToBase64(o.rawId),deviceInfo:c};return this.emit(a.WebAuthnEventType.AUTHENTICATION_SUCCESS,{type:a.WebAuthnEventType.AUTHENTICATION_SUCCESS,data:{username:e,deviceInfo:c},timestamp:Date.now()}),u}finally{clearTimeout(o),this.abortController=null}}catch(t){const r=t instanceof Error?t.message:"Unknown WebAuthn error";return this.emit(a.WebAuthnEventType.AUTHENTICATION_FAILED,{type:a.WebAuthnEventType.AUTHENTICATION_FAILED,data:{username:e,error:r},timestamp:Date.now()}),i.ErrorHandler.handle(i.ErrorType.WEBAUTHN,"AUTH_ERROR",r,t),{success:!1,error:r}}}abortAuthentication(){this.abortController&&(this.abortController.abort(),this.abortController=null)}getDeviceInfo(e){const t=this.getPlatformInfo();return{deviceId:e,timestamp:Date.now(),name:t.name,platform:t.platform,lastUsed:Date.now()}}getPlatformInfo(){if("undefined"==typeof navigator)return{name:"unknown",platform:"unknown"};const e=navigator.platform,t=navigator.userAgent;return/iPhone|iPad|iPod/.test(e)?{name:"iOS Device",platform:e}:/Android/.test(t)?{name:"Android Device",platform:e}:/Win/.test(e)?{name:"Windows Device",platform:e}:/Mac/.test(e)?{name:"Mac Device",platform:e}:/Linux/.test(e)?{name:"Linux Device",platform:e}:{name:"Unknown Device",platform:e}}generateChallenge(e){const t=Date.now().toString(),r=this.getRandomBytes(32),n=`${e}-${t}-${this.uint8ArrayToHex(r)}`;return(new TextEncoder).encode(n)}getRandomBytes(e){if("undefined"!=typeof window&&window.crypto)return window.crypto.getRandomValues(new Uint8Array(e));throw new Error("No cryptographic implementation available")}uint8ArrayToHex(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}bufferToBase64(e){const t=new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),"");return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}generateCredentialsFromSalt(e,t){const r=n.ethers.toUtf8Bytes(e+t);return{password:n.ethers.sha256(r)}}isSupported(){return"undefined"!=typeof window&&void 0!==window.PublicKeyCredential}async createCredential(e){try{const t=crypto.getRandomValues(new Uint8Array(32)),r=(new TextEncoder).encode(e),n={challenge:t,rp:{name:"Shogun Wallet",..."localhost"!==this.config.rpId&&{id:this.config.rpId}},user:{id:r,name:e,displayName:e},pubKeyCredParams:[{type:"public-key",alg:-7}],timeout:this.config.timeout,attestation:this.config.attestation,authenticatorSelection:{authenticatorAttachment:this.config.authenticatorAttachment,userVerification:this.config.userVerification,requireResidentKey:this.config.requireResidentKey}};(0,s.logDebug)("Attempting to create credentials with options:",n);const i=await navigator.credentials.create({publicKey:n});if(!i)throw new Error("Credential creation failed");(0,s.logDebug)("Credentials created successfully:",i);const o=i,a={id:o.id,rawId:o.rawId,type:o.type,response:{clientDataJSON:o.response.clientDataJSON},getClientExtensionResults:o.getClientExtensionResults};return"attestationObject"in o.response&&(a.response.attestationObject=o.response.attestationObject),this.credential=a,a}catch(e){(0,s.logError)("Detailed error in credential creation:",e);const t=e instanceof Error?e.message:"Unknown error";throw new Error(`Error creating credentials: ${t}`)}}async generateCredentials(e,t,r=!1){try{if(r){const t=await this.verifyCredential(e);return{success:t.success,error:t.error,credentialId:t.credentialId,username:t.username}}{const t=await this.createCredential(e),r=t.id;let n=null;return t?.response?.getPublicKey&&(n=t.response.getPublicKey()),{success:!0,credentialId:r,publicKey:n}}}catch(e){return(0,s.logError)("Error in generateCredentials:",e),{success:!1,error:e instanceof Error?e.message:"Unknown error during WebAuthn operation"}}}async verifyCredential(e){try{const t={challenge:crypto.getRandomValues(new Uint8Array(32)),timeout:this.config.timeout,userVerification:this.config.userVerification,..."localhost"!==this.config.rpId&&{rpId:this.config.rpId}};this.credential?.rawId&&(t.allowCredentials=[{id:this.credential.rawId,type:"public-key"}]);const r=await navigator.credentials.get({publicKey:t});return r?{success:!0,credentialId:r.id,username:e}:{success:!1,error:"Credential verification failed"}}catch(e){return(0,s.logError)("Error verifying credentials:",e),{success:!1,error:e instanceof Error?e.message:"Unknown error verifying credentials"}}}async saveToGun(e,t){if(this.gunInstance)try{await this.gunInstance.get(`webauthn_${e}`).put({credentialId:t.id,type:t.type,timestamp:Date.now()})}catch(e){(0,s.logError)("Error saving credentials to Gun:",e)}}async removeDevice(e,t,r){if(!r||!r.credentials||!r.credentials[t])return{success:!1};const n={...r};return n.credentials&&delete n.credentials[t],{success:!0,updatedCredentials:n}}async sign(e){return await navigator.credentials.get({publicKey:{challenge:new Uint8Array(16),rpId:this.config.rpId}})}}t.Webauthn=u,"undefined"!=typeof window?window.Webauthn=u:void 0!==r.g&&(r.g.Webauthn=u)},7552:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(281);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},7557:function(e,t){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a;const c={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};t.default=c},7570:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptCrowdsaleJson=t.isCrowdsaleJson=void 0;const n=r(8165),i=r(646),o=r(2291),s=r(1181),a=r(5347),c=r(8634);t.isCrowdsaleJson=function(e){try{if(JSON.parse(e).encseed)return!0}catch(e){}return!1},t.decryptCrowdsaleJson=function(e,t){const r=JSON.parse(e),u=(0,c.getPassword)(t),l=(0,i.getAddress)((0,c.spelunk)(r,"ethaddr:string!")),f=(0,c.looseArrayify)((0,c.spelunk)(r,"encseed:string!"));(0,a.assertArgument)(f&&f.length%16==0,"invalid encseed","json",e);const d=(0,a.getBytes)((0,o.pbkdf2)(u,u,2e3,32,"sha256")).slice(0,16),h=f.slice(0,16),p=f.slice(16),g=new n.CBC(d,h),y=(0,n.pkcs7Strip)((0,a.getBytes)(g.decrypt(p)));let b="";for(let e=0;e<y.length;e++)b+=String.fromCharCode(y[e]);return{address:l,privateKey:(0,s.id)(b)}}},7609:function(e,t,r){"use strict";var n,i,o,s,a=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},c=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CFB=void 0;const u=r(6342);class l extends u.ModeOfOperation{constructor(e,t,r=8){if(super("CFB",e,l),n.add(this),i.set(this,void 0),o.set(this,void 0),!Number.isInteger(r)||r%8)throw new TypeError("invalid segmentSize");if(Object.defineProperties(this,{segmentSize:{enumerable:!0,value:r}}),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");a(this,i,new Uint8Array(t),"f")}else a(this,i,new Uint8Array(16),"f");a(this,o,this.iv,"f")}get iv(){return new Uint8Array(c(this,i,"f"))}encrypt(e){if(8*e.length%this.segmentSize)throw new TypeError("invalid plaintext size (must be multiple of segmentSize bytes)");const t=this.segmentSize/8,r=new Uint8Array(e);for(let e=0;e<r.length;e+=t){const i=this.aes.encrypt(c(this,o,"f"));for(let n=0;n<t;n++)r[e+n]^=i[n];c(this,n,"m",s).call(this,r.subarray(e))}return r}decrypt(e){if(8*e.length%this.segmentSize)throw new TypeError("invalid ciphertext size (must be multiple of segmentSize bytes)");const t=this.segmentSize/8,r=new Uint8Array(e);for(let i=0;i<r.length;i+=t){const a=this.aes.encrypt(c(this,o,"f"));for(let e=0;e<t;e++)r[i+e]^=a[e];c(this,n,"m",s).call(this,e.subarray(i))}return r}}t.CFB=l,i=new WeakMap,o=new WeakMap,n=new WeakSet,s=function(e){const t=this.segmentSize/8;c(this,o,"f").set(c(this,o,"f").subarray(t)),c(this,o,"f").set(e.subarray(0,t),16-t)}},7652:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},7698:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventPayload=void 0;const n=r(8166);t.EventPayload=class{filter;emitter;#tt;constructor(e,t,r){this.#tt=t,(0,n.defineProperties)(this,{emitter:e,filter:r})}async removeListener(){null!=this.#tt&&await this.emitter.off(this.filter,this.#tt)}}},7699:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},7703:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwlA=void 0;const n=r(5347),i=r(9610),o=r(2426);t.decodeOwlA=function(e,t){let r=(0,o.decodeOwl)(e).join(",");return t.split(/,/g).forEach((e=>{const o=e.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);(0,n.assertArgument)(null!==o,"internal error parsing accents","accents",t);let s=0;const a=(0,i.decodeBits)(parseInt(o[3]),o[4]),c=parseInt(o[2]),u=new RegExp(`([${o[1]}])`,"g");r=r.replace(u,((e,t)=>(0===--a[s]&&(t=String.fromCharCode(t.charCodeAt(0),c),s++),t)))})),r.split(",")}},7744:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidV4=void 0;const n=r(7415);t.uuidV4=function(e){const t=(0,n.getBytes)(e,"randomBytes");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},7778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.recoverAddress=t.computeAddress=t.authorizationify=t.accessListify=void 0;var n=r(7918);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return n.accessListify}});var i=r(2963);Object.defineProperty(t,"authorizationify",{enumerable:!0,get:function(){return i.authorizationify}});var o=r(778);Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return o.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return o.recoverAddress}});var s=r(1398);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return s.Transaction}})},7780:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeRlp=void 0;const n=r(7415),i=r(1500),o=r(7415);function s(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function a(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function c(e,t,r,n){const o=[];for(;r<t+1+n;){const s=u(e,r);o.push(s.result),r+=s.consumed,(0,i.assert)(r<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:o}}function u(e,t){(0,i.assert)(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});const r=t=>{(0,i.assert)(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const i=a(e,t+1,n);return r(t+1+n+i),c(e,t,t+1+n,n+i)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),c(e,t,t+1,n)}if(e[t]>=184){const i=e[t]-183;r(t+1+i);const o=a(e,t+1,i);return r(t+1+i+o),{consumed:1+i+o,result:(0,n.hexlify)(e.slice(t+1+i,t+1+i+o))}}if(e[t]>=128){const i=e[t]-128;return r(t+1+i),{consumed:1+i,result:(0,n.hexlify)(e.slice(t+1,t+1+i))}}return{consumed:1,result:s(e[t])}}t.decodeRlp=function(e){const t=(0,o.getBytes)(e,"data"),r=u(t,0);return(0,i.assertArgument)(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}},7782:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(381),i=r(3405);t.shareReplay=function(e,t,r){var o,s,a,c,u=!1;return e&&"object"==typeof e?(o=e.bufferSize,c=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,u=void 0!==(a=e.refCount)&&a,r=e.scheduler):c=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(c,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}},7783:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(5212),i=r(7214),o=r(9724),s=r(5717);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},7802:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(5212);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},7812:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(6808),i=r(9724),o=r(5212),s=r(1071),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},7841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlchemyProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}async _perform(e){if("getTransactionResult"===e.method){const{trace:t,tx:r}=await(0,n.resolveProperties)({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(null==t||null==r)return null;let i,o=!1;try{i=t[0].result.output,o="Reverted"===t[0].error}catch(e){}if(i)return(0,n.assert)(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:r,invocation:null,revert:null}),i;(0,n.assert)(!1,"could not parse trace result","BAD_DATA",{value:t})}return await super._perform(e)}isCommunityResource(){return this.apiKey===a}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v2/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("alchemy"),!0)),r}}t.AlchemyProvider=c},7873:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(8051),i=r(8619);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},7876:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(5212),i=r(7214),o=r(5717),s=r(9724);t.distinct=function(e,t){return n.operate((function(r,n){var a=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;a.has(r)||(a.add(r),n.next(t))}))),t&&s.innerFrom(t).subscribe(i.createOperatorSubscriber(n,(function(){return a.clear()}),o.noop))}))}},7897:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnector=void 0;const n=r(5628),i=r(3358),o=r(4134);class s extends o.EventEmitter{MESSAGE_TO_SIGN="I Love Shogun!";DEFAULT_CONFIG={cacheDuration:864e5,maxRetries:3,retryDelay:1e3,timeout:6e4,network:"mainnet",useApi:!1};config;signatureCache=new Map;connectedAddress=null;connectedType=null;manualKeyPair=null;constructor(e={}){super(),this.config={...this.DEFAULT_CONFIG,...e},this.setupEventListeners()}setupEventListeners(){}cleanup(){this.removeAllListeners(),this.connectedAddress=null,this.connectedType=null,this.manualKeyPair=null}getCachedSignature(e){const t=this.signatureCache.get(e);if(t){if(Date.now()-t.timestamp<=this.config.cacheDuration)return t.signature;this.signatureCache.delete(e)}try{const t=`shogun_bitcoin_sig_${e}`,r=localStorage.getItem(t);if(r){const n=JSON.parse(r);if(Date.now()-n.timestamp<=this.config.cacheDuration)return this.signatureCache.set(e,n),n.signature;localStorage.removeItem(t)}}catch(e){(0,n.logError)("Error reading signature cache from localStorage:",e)}return null}cacheSignature(e,t){const r={signature:t,timestamp:Date.now(),address:e};this.signatureCache.set(e,r);try{const t=`shogun_bitcoin_sig_${e}`;localStorage.setItem(t,JSON.stringify(r)),(0,n.log)(`Cached signature for address: ${e.substring(0,10)}...`)}catch(e){(0,n.logError)("Error saving signature cache to localStorage:",e)}}clearSignatureCache(e){if(e){this.signatureCache.delete(e);try{const t=`shogun_bitcoin_sig_${e}`;localStorage.removeItem(t),(0,n.log)(`Cleared signature cache for address: ${e.substring(0,10)}...`)}catch(e){(0,n.logError)("Error clearing signature cache from localStorage:",e)}}else{this.signatureCache.clear();try{const e=[];for(let t=0;t<localStorage.length;t++){const r=localStorage.key(t);r&&r.startsWith("shogun_bitcoin_sig_")&&e.push(r)}e.forEach((e=>localStorage.removeItem(e))),(0,n.log)(`Cleared all signature caches (${e.length} entries)`)}catch(e){(0,n.logError)("Error clearing all signature caches from localStorage:",e)}}}validateAddress(e){if(!e)throw new Error("Address not provided");try{const t=String(e).trim();if("nostr"===this.connectedType){if(!/^(npub1|[0-9a-f]{64})/.test(t))throw new Error("Invalid Nostr public key format")}else if(!/^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,59}$/.test(t))throw new Error("Invalid Bitcoin address format");return t}catch(e){throw i.ErrorHandler.handle(i.ErrorType.VALIDATION,"INVALID_ADDRESS","Invalid Bitcoin address provided",e),e}}isAlbyAvailable(){return(0,n.logWarn)("Alby support is deprecated, use Nostr instead"),!1}isNostrExtensionAvailable(){return"undefined"!=typeof window&&!!window.nostr}isAvailable(){return this.isNostrExtensionAvailable()||null!==this.manualKeyPair}async connectWallet(e="nostr"){(0,n.log)(`Connecting to Bitcoin wallet via ${e}...`);try{let t;switch(e){case"alby":(0,n.log)("Alby is deprecated, redirecting to Nostr"),t=await this.connectNostr();break;case"nostr":t=await this.connectNostr();break;case"manual":t=await this.connectManual();break;default:throw new Error(`Unsupported wallet type: ${e}`)}return t.success&&t.address&&(this.connectedAddress=t.address,this.connectedType=e,(0,n.log)(`Successfully connected to ${e} wallet: ${t.address}`),this.emit("wallet_connected",{address:t.address,type:this.connectedType})),t}catch(t){return(0,n.logError)(`Error connecting to ${e} wallet:`,t),{success:!1,error:t.message||"Failed to connect to wallet"}}}async connectNostr(){if(!this.isNostrExtensionAvailable())return{success:!1,error:"Nostr extension is not available. Please install a Nostr compatible extension."};try{const e=await window.nostr.getPublicKey();if(!e)throw new Error("Could not get public key from Nostr extension");this.connectedAddress=e,this.connectedType="nostr",this.emit("connected",{address:e,type:"nostr"});const t=`nostr_${e.substring(0,10)}`;return{success:!0,address:e,username:t,extensionType:"nostr"}}catch(e){throw new Error(`Nostr connection error: ${e.message}`)}}async connectManual(){if(!this.manualKeyPair)return{success:!1,error:"No manual key pair configured. Use setKeyPair() first."};this.connectedAddress=this.manualKeyPair.address,this.connectedType="manual",this.emit("connected",{address:this.manualKeyPair.address,type:"manual"});const e=`btc_${this.manualKeyPair.address.substring(0,10)}`;return{success:!0,address:this.manualKeyPair.address,username:e,extensionType:"manual"}}setKeyPair(e){this.manualKeyPair=e,e.address&&(this.connectedAddress=e.address,this.connectedType="manual")}async generateCredentials(e){(0,n.logDebug)(`Generating credentials for address: ${e}`);try{const t=this.validateAddress(e),r=this.getCachedSignature(t);if(r)return(0,n.logDebug)("Using cached signature"),await this.generateCredentialsFromSignature(t,r);const i=this.MESSAGE_TO_SIGN;let o;try{return o=await this.generateDeterministicSignature(t),(0,n.log)("Using deterministic signature for consistency"),this.cacheSignature(t,o),await this.generateCredentialsFromSignature(t,o)}catch(e){(0,n.logError)("Error generating deterministic signature:",e);try{o=await this.requestSignatureWithTimeout(t,i,this.config.timeout),this.cacheSignature(t,o),(0,n.log)("Using real Nostr signature as fallback")}catch(e){(0,n.logError)("Error requesting signature:",e),o=await this.generateDeterministicSignature(t),this.cacheSignature(t,o),(0,n.log)("Using deterministic signature as final fallback")}}return await this.generateCredentialsFromSignature(t,o)}catch(e){throw(0,n.logError)("Error generating credentials:",e),e}}async generateDeterministicSignature(e){const t=`${e}_${this.MESSAGE_TO_SIGN}_shogun_deterministic`;let r="",i=0;for(let e=0;e<t.length;e++)i=31*i+t.charCodeAt(e)&4294967295,e%4==3&&(r+=i.toString(16).padStart(8,"0"));for(;r.length<128;)i=31*i+r.length&4294967295,r+=i.toString(16).padStart(8,"0");let o=r.substring(0,128);return o=o.toLowerCase().replace(/[^0-9a-f]/g,"0"),o.length<128?o=o.padEnd(128,"0"):o.length>128&&(o=o.substring(0,128)),(0,n.log)(`Generated deterministic signature: ${o.substring(0,16)}... (${o.length} chars)`),o}async generateCredentialsFromSignature(e,t){return(0,n.log)("Generating credentials from signature"),{username:`${e.toLowerCase()}`,password:await this.generatePassword(t),message:this.MESSAGE_TO_SIGN,signature:t}}async generatePassword(e){if(!e)throw new Error("Invalid signature");try{const t=e.toLowerCase().replace(/[^a-f0-9]/g,"");let r="",n=0;for(let e=0;e<t.length;e++)n=31*n+t.charCodeAt(e)&4294967295,e%8==7&&(r+=n.toString(16).padStart(8,"0"));for(;r.length<64;)n=31*n+r.length&4294967295,r+=n.toString(16).padStart(8,"0");return r.substring(0,64)}catch(e){throw(0,n.logError)("Error generating password:",e),new Error("Failed to generate password from signature")}}async verifySignature(e,t,r){try{if((0,n.log)(`Verifying signature for address: ${r}`),!t||!e)return(0,n.logError)("Invalid message or signature for verification"),!1;if((0,n.log)(`Signature to verify: ${t.substring(0,20)}... (length: ${t.length})`),(0,n.log)(`Message to verify: ${e}`),"nostr"===this.connectedType||"alby"===this.connectedType){(0,n.log)("Using Nostr-specific verification");try{if(r.toLowerCase()!==this.connectedAddress?.toLowerCase())return(0,n.logError)("Address mismatch in signature verification"),(0,n.logError)(`Expected: ${this.connectedAddress}, Got: ${r}`),!1;const e=/^[0-9a-f]+$/i.test(t),i=t.length>=64;return(0,n.log)(`Signature format check: hex=${e}, length=${i} (${t.length} chars)`),e?i?((0,n.log)("Nostr signature appears valid"),!0):((0,n.logError)(`Invalid signature length: ${t.length} (minimum 64 required)`),!1):((0,n.logError)("Invalid signature format - not a valid hex string"),(0,n.logError)(`Signature contains invalid characters: ${t}`),!1)}catch(e){return(0,n.logError)("Error in signature verification:",e),!1}}else if("manual"===this.connectedType&&this.manualKeyPair){(0,n.log)("Using manual verification for keypair");try{const e=r.toLowerCase()===this.manualKeyPair.address.toLowerCase();return(0,n.log)(`Manual verification - address match: ${e}`),e}catch(e){return(0,n.logError)("Error in manual signature verification:",e),!1}}if(this.config.useApi&&this.config.apiUrl){(0,n.log)("Using API-based verification");try{return!0}catch(e){return(0,n.logError)("API verification error:",e),!1}}return(0,n.logWarn)("No specific verification method available, signature cannot be fully verified"),!1}catch(e){return(0,n.logError)("Error verifying signature:",e),!1}}getConnectedAddress(){return this.connectedAddress}getConnectedType(){return this.connectedType}requestSignatureWithTimeout(e,t,r=3e4){return new Promise(((n,i)=>{const o=setTimeout((()=>{i(new Error("Signature request timed out"))}),r);this.requestSignature(e,t).then((e=>{clearTimeout(o),n(e)})).catch((e=>{clearTimeout(o),i(e)}))}))}async requestSignature(e,t){if(!this.connectedType)throw new Error("No wallet connected");try{switch(this.connectedType){case"alby":if((0,n.logWarn)("Alby is deprecated, redirecting signature request to Nostr"),!window.nostr)throw new Error("Nostr extension not available");const r={kind:1,created_at:Math.floor(Date.now()/1e3),tags:[],content:t,pubkey:e};return(await window.nostr.signEvent(r)).sig;case"nostr":(0,n.log)("Requesting Nostr signature for message:",t);const i={kind:1,created_at:Math.floor(Date.now()/1e3),tags:[],content:t,pubkey:e},o=await window.nostr.signEvent(i);(0,n.log)("Received Nostr signature:",o.sig.substring(0,20)+"...");let s=o.sig;return s&&"string"==typeof s&&(s=s.replace(/[^a-f0-9]/gi,"").toLowerCase(),s.length>128?s=s.substring(0,128):s.length<128&&(s=s.padStart(128,"0")),(0,n.log)(`Normalized Nostr signature: ${s.substring(0,10)}...`)),s;case"manual":if((0,n.log)("Using manual key pair for signature"),!this.manualKeyPair)throw new Error("No manual key pair available");const a=`${this.manualKeyPair.privateKey.substring(0,32)}_${t}_${Date.now()}`;return(0,n.log)("Generated manual signature:",a.substring(0,20)+"..."),a;default:throw new Error(`Unsupported wallet type: ${this.connectedType}`)}}catch(e){throw(0,n.logError)("Error requesting signature:",e),new Error(`Failed to get signature: ${e.message}`)}}}t.NostrConnector=s},7918:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accessListify=void 0;const n=r(646),i=r(5347);function o(e,t){return{address:(0,n.getAddress)(e),storageKeys:t.map(((e,t)=>((0,i.assertArgument)((0,i.isHexString)(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}t.accessListify=function(e){if(Array.isArray(e))return e.map(((t,r)=>Array.isArray(t)?((0,i.assertArgument)(2===t.length,"invalid slot set",`value[${r}]`,t),o(t[0],t[1])):((0,i.assertArgument)(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),o(t.address,t.storageKeys))));(0,i.assertArgument)(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return o(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}},7933:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(8246),i=r(719);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7966:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIdPendingSubscriber=t.FilterIdEventSubscriber=t.FilterIdSubscriber=void 0;const n=r(5347),i=r(4338);class o{#Q;#rt;#Y;#te;#U;#nt;constructor(e){this.#Q=e,this.#rt=null,this.#Y=this.#ee.bind(this),this.#te=!1,this.#U=null,this.#nt=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#ee(e){try{null==this.#rt&&(this.#rt=this._subscribe(this.#Q));let e=null;try{e=await this.#rt}catch(e){if(!(0,n.isError)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e)return this.#rt=null,void this.#Q._recoverSubscriber(this,this._recover(this.#Q));const t=await this.#Q.getNetwork();if(this.#U||(this.#U=t),this.#U.chainId!==t.chainId)throw new Error("chaid changed");if(this.#nt)return;const r=await this.#Q.send("eth_getFilterChanges",[e]);await this._emitResults(this.#Q,r)}catch(e){console.log("@TODO",e)}this.#Q.once("block",this.#Y)}#it(){const e=this.#rt;e&&(this.#rt=null,e.then((e=>{this.#Q.destroyed||this.#Q.send("eth_uninstallFilter",[e])})))}start(){this.#te||(this.#te=!0,this.#ee(-2))}stop(){this.#te&&(this.#te=!1,this.#nt=!0,this.#it(),this.#Q.off("block",this.#Y))}pause(e){e&&this.#it(),this.#Q.off("block",this.#Y)}resume(){this.start()}}t.FilterIdSubscriber=o,t.FilterIdEventSubscriber=class extends o{#ot;constructor(e,t){var r;super(e),this.#ot=(r=t,JSON.parse(JSON.stringify(r)))}_recover(e){return new i.PollingEventSubscriber(e,this.#ot)}async _subscribe(e){return await e.send("eth_newFilter",[this.#ot])}async _emitResults(e,t){for(const r of t)e.emit(this.#ot,e._wrapLog(r,e._network))}},t.FilterIdPendingSubscriber=class extends o{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const r of t)e.emit("pending",r)}}},7977:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(6632),i=r(7699);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},8026:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;const n=r(8869),i=new Uint8Array([]);class o extends n.Coder{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(i)}decode(e){return e.readBytes(0),null}}t.NullCoder=o},8032:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(6328);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},8050:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnectorPlugin=void 0;const n=r(4586),i=r(7897),o=r(5628),s=r(3358);class a extends n.BasePlugin{name="nostr";version="1.0.0";description="Provides Bitcoin wallet connection and authentication for ShogunCore";bitcoinConnector=null;initialize(e){super.initialize(e),this.bitcoinConnector=new i.NostrConnector,(0,o.log)("Bitcoin wallet plugin initialized")}destroy(){this.bitcoinConnector&&this.bitcoinConnector.cleanup(),this.bitcoinConnector=null,super.destroy(),(0,o.log)("Bitcoin wallet plugin destroyed")}assertBitcoinConnector(){if(this.assertInitialized(),!this.bitcoinConnector)throw new Error("Bitcoin wallet module not initialized");return this.bitcoinConnector}isAvailable(){return this.assertBitcoinConnector().isAvailable()}isAlbyAvailable(){return(0,o.log)("Alby is deprecated, using Nostr instead"),this.isNostrExtensionAvailable()}isNostrExtensionAvailable(){return this.assertBitcoinConnector().isNostrExtensionAvailable()}async connectBitcoinWallet(e="nostr"){return"alby"===e&&((0,o.log)("Alby is deprecated, using Nostr instead"),e="nostr"),this.assertBitcoinConnector().connectWallet(e)}async generateCredentials(e){return(0,o.log)("Calling credential generation for Bitcoin wallet"),this.assertBitcoinConnector().generateCredentials(e)}cleanup(){this.assertBitcoinConnector().cleanup()}clearSignatureCache(e){this.assertBitcoinConnector().clearSignatureCache(e)}async verifySignature(e,t,r){return this.assertBitcoinConnector().verifySignature(e,t,r)}async generatePassword(e){return this.assertBitcoinConnector().generatePassword(e)}async login(e){(0,o.log)("Login with Bitcoin wallet");try{const t=this.assertInitialized();if((0,o.log)(`Bitcoin wallet login attempt for address: ${e}`),!e)throw(0,s.createError)(s.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Bitcoin address required for login");if(!this.isAvailable())throw(0,s.createError)(s.ErrorType.ENVIRONMENT,"BITCOIN_WALLET_UNAVAILABLE","No Bitcoin wallet available in the browser");(0,o.log)("Generating credentials for Bitcoin wallet login...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Bitcoin wallet credentials not generated correctly or signature missing");if((0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying Bitcoin wallet signature..."),!await this.verifySignature(r.message,r.signature,e))throw(0,o.logError)(`Signature verification failed for address: ${e}`),(0,s.createError)(s.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","Bitcoin wallet signature verification failed");(0,o.log)("Bitcoin wallet signature verified successfully."),t.setAuthMethod("nostr"),(0,o.log)("Logging in using core login method...");const n=await t.login(r.username,r.password);if(!n.success)throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"BITCOIN_LOGIN_FAILED",n.error||"Failed to log in with Bitcoin credentials");return t.emit("auth:login",{userPub:n.userPub,username:r.username,method:"bitcoin"}),n}catch(e){const t=e?.type||s.ErrorType.AUTHENTICATION,r=e?.code||"BITCOIN_LOGIN_ERROR",n=e?.message||"Unknown error during Bitcoin wallet login";return{success:!1,error:s.ErrorHandler.handle(t,r,n,e).message}}}async signUp(e){(0,o.log)("Sign up with Bitcoin wallet");try{const t=this.assertInitialized();if((0,o.log)(`Bitcoin wallet signup attempt for address: ${e}`),!e)throw(0,s.createError)(s.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Bitcoin address required for signup");if(!this.isAvailable())throw(0,s.createError)(s.ErrorType.ENVIRONMENT,"BITCOIN_WALLET_UNAVAILABLE","No Bitcoin wallet available in the browser");(0,o.log)("Generating credentials for Bitcoin wallet signup...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Bitcoin wallet credentials not generated correctly or signature missing");if((0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying Bitcoin wallet signature..."),!await this.verifySignature(r.message,r.signature,e))throw(0,o.logError)(`Signature verification failed for address: ${e}`),(0,s.createError)(s.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","Bitcoin wallet signature verification failed");(0,o.log)("Bitcoin wallet signature verified successfully."),t.setAuthMethod("nostr"),(0,o.log)("Signing up using core signUp method...");const n=await t.signUp(r.username,r.password);if(!n.success){if(n.error&&(n.error.includes("User already created")||n.error.includes("already created")||n.error.includes("già creato")))return{success:!1,error:"User already exists. Please try logging in instead. If login fails, try clearing the signature cache and registering again."};throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"BITCOIN_SIGNUP_FAILED",n.error||"Failed to sign up with Bitcoin credentials")}return t.emit("auth:signup",{userPub:n.userPub,username:r.username,method:"bitcoin"}),n}catch(e){const t=e?.type||s.ErrorType.AUTHENTICATION,r=e?.code||"BITCOIN_SIGNUP_ERROR",n=e?.message||"Unknown error during Bitcoin wallet signup";return{success:!1,error:s.ErrorHandler.handle(t,r,n,e).message}}}async loginWithBitcoinWallet(e){return this.login(e)}async signUpWithBitcoinWallet(e){return this.signUp(e)}}t.NostrConnectorPlugin=a},8051:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(2708),i=r(9879),o=r(2884),s=r(1898),a=r(3728),c=r(281),u=r(2688),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&c.isFunction(e.next)&&c.isFunction(e.error)&&c.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return u.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},8072:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(6808),i=r(5212),o=r(7214),s=r(5717),a=r(9724);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var c=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),c)),a.innerFrom(e).subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,c)),function(){null==i||i.unsubscribe(),i=null}}))}},8087:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(7478),i=r(7699);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},8089:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Connector=void 0;const n=r(4193),i=r(5628),o=r(3358),s=r(4134);class a extends s.EventEmitter{MESSAGE_TO_SIGN="I Love Shogun!";DEFAULT_CONFIG={cacheDuration:18e5,maxRetries:3,retryDelay:1e3,timeout:6e4};config;signatureCache=new Map;provider=null;customProvider=null;customWallet=null;constructor(e={}){super(),this.config={...this.DEFAULT_CONFIG,...e},this.initProvider(),this.setupEventListeners()}initProvider(){if("undefined"!=typeof window&&window.ethereum)try{this.provider=new n.ethers.BrowserProvider(window.ethereum),(0,i.logDebug)("BrowserProvider initialized successfully")}catch(e){(0,i.logError)("Failed to initialize BrowserProvider",e)}else(0,i.logWarn)("Window.ethereum is not available")}async setupProvider(){try{"undefined"!=typeof window&&window.ethereum?(this.provider=new n.ethers.BrowserProvider(window.ethereum),(0,i.logDebug)("BrowserProvider initialized successfully")):(0,i.logWarn)("Window.ethereum is not available")}catch(e){(0,i.logError)("Failed to initialize BrowserProvider",e)}}setupEventListeners(){this.provider&&(this.provider.on("network",((e,t)=>{this.emit("chainChanged",e)})),window.ethereum?.on&&window.ethereum.on("accountsChanged",(e=>{this.emit("accountsChanged",e)})))}cleanup(){this.provider&&this.provider.removeAllListeners(),this.removeAllListeners()}getCachedSignature(e){const t=this.signatureCache.get(e);return t?Date.now()-t.timestamp>this.config.cacheDuration?(this.signatureCache.delete(e),null):t.signature:null}cacheSignature(e,t){this.signatureCache.set(e,{signature:t,timestamp:Date.now(),address:e})}validateAddress(e){if(!e)throw new Error("Address not provided");try{const t=String(e).trim().toLowerCase();if(!n.ethers.isAddress(t))throw new Error("Invalid address format");return n.ethers.getAddress(t)}catch(e){throw o.ErrorHandler.handle(o.ErrorType.VALIDATION,"INVALID_ADDRESS","Invalid Ethereum address provided",e),e}}async connectMetaMask(){try{if((0,i.logDebug)("Attempting to connect to MetaMask..."),!this.provider&&((0,i.logDebug)("Provider not initialized, setting up..."),this.initProvider(),!this.provider))throw new Error("MetaMask is not available. Please install MetaMask extension.");(0,i.logDebug)("Requesting account access...");let e=[];if(window.ethereum)try{e=await window.ethereum.request({method:"eth_requestAccounts"}),(0,i.logDebug)(`Accounts requested successfully: ${e.length} accounts returned`)}catch(e){throw(0,i.logError)("Error requesting MetaMask accounts:",e),new Error("User denied account access")}e&&0!==e.length||(0,i.logDebug)("No accounts found, trying to get signer...");for(let e=1;e<=this.config.maxRetries;e++)try{(0,i.logDebug)(`Attempt ${e} to get signer...`);const t=await this.provider.getSigner(),r=await t.getAddress();if(!r)throw(0,i.logError)("No address returned from signer"),new Error("No accounts found in MetaMask");(0,i.logDebug)(`Signer address obtained: ${r}`);const n=`${r.toLowerCase()}`;return this.emit("connected",{address:r}),(0,i.logDebug)(`MetaMask connected successfully with address: ${r}`),{success:!0,address:r,username:n}}catch(t){if((0,i.logError)(`Error in connection attempt ${e}:`,t),e===this.config.maxRetries)throw t;(0,i.logDebug)(`Retrying in ${this.config.retryDelay}ms...`),await new Promise((e=>setTimeout(e,this.config.retryDelay)))}throw new Error("Failed to connect after retries")}catch(e){return(0,i.logError)("Failed to connect to MetaMask:",e),o.ErrorHandler.handle(o.ErrorType.NETWORK,"METAMASK_CONNECTION_ERROR",e.message??"Unknown error while connecting to MetaMask",e),{success:!1,error:e.message}}}async generateCredentials(e){(0,i.log)("Generating credentials for address:",e);try{const t=this.validateAddress(e);(0,i.log)("Valid Address:",t);const r=this.getCachedSignature(t);if(r)return(0,i.log)("Using cached signature for address:",t),this.generateCredentialsFromSignature(t,r);try{(0,i.log)("Request signature with timeout");const e=await this.requestSignatureWithTimeout(t,this.MESSAGE_TO_SIGN,this.config.timeout);return this.cacheSignature(t,e),this.generateCredentialsFromSignature(t,e)}catch(e){return(0,i.logWarn)(`Failed to get signature: ${e}. Using fallback method.`),this.generateFallbackCredentials(t)}}catch(e){throw o.ErrorHandler.handle(o.ErrorType.AUTHENTICATION,"CREDENTIALS_GENERATION_ERROR",e.message??"Error generating MetaMask credentials",e),e}}generateCredentialsFromSignature(e,t){return(0,i.log)("Generating credentials from signature"),{username:`${e.toLowerCase()}`,password:n.ethers.keccak256(n.ethers.toUtf8Bytes(`${t}:${e.toLowerCase()}`)),message:this.MESSAGE_TO_SIGN,signature:t}}generateFallbackCredentials(e){(0,i.logWarn)("Using fallback credentials generation for address:",e);const t=`mm_${e.toLowerCase()}`,r=`SHOGUN_FALLBACK:${e.toLowerCase()}`;return{username:t,password:n.ethers.keccak256(n.ethers.toUtf8Bytes(r)),message:r,signature:n.ethers.keccak256(n.ethers.toUtf8Bytes(r))}}static isMetaMaskAvailable(){const e=window.ethereum;return"undefined"!=typeof window&&void 0!==e&&!0===e?.isMetaMask}requestSignatureWithTimeout(e,t,r=3e4){return new Promise(((n,o)=>{let s=setTimeout((()=>{s=null,o(new Error("Timeout requesting signature"))}),r);const a=()=>{s&&(clearTimeout(s),s=null),window.ethereum?.removeListener&&window.ethereum.removeListener("accountsChanged",c)},c=e=>{a(),o(e)};return window.ethereum?.on&&window.ethereum.on("accountsChanged",c),(0,i.log)("Initialize and Sign"),(async()=>{try{if(!this.provider&&(this.initProvider(),!this.provider))throw new Error("Provider not initialized");const r=await this.provider.getSigner(),o=await r.getAddress();if((0,i.log)("Signer:",r),(0,i.log)("Signer Address:",o),o.toLowerCase()!==e.toLowerCase())throw new Error(`Signer address (${o}) does not match expected address (${e})`);(0,i.log)(`Requesting signature for message: ${t}`);const s=await r.signMessage(t);(0,i.log)("Signature obtained successfully"),a(),n(s)}catch(e){(0,i.logError)("Failed to request signature:",e),a(),o(e)}})()}))}isAvailable(){return"undefined"!=typeof window&&!!window.ethereum}setCustomProvider(e,t){if(!e||"string"!=typeof e)throw new Error("Invalid RPC URL");if(!t||"string"!=typeof t)throw new Error("Invalid private key");try{this.customProvider=new n.ethers.JsonRpcProvider(e),this.customWallet=new n.ethers.Wallet(t,this.customProvider),(0,i.logDebug)("Custom provider configured successfully")}catch(e){throw new Error(`Error configuring provider: ${e.message??"Unknown error"}`)}}async getSigner(){try{if(this.customWallet)return this.customWallet;if(this.provider||this.initProvider(),!this.provider)throw new Error("Provider not initialized");return await this.provider.getSigner()}catch(e){throw new Error(`Unable to get Ethereum signer: ${e.message||"Unknown error"}`)}}async getProvider(){return this.customProvider?this.customProvider:(this.provider||this.initProvider(),this.provider)}async generatePassword(e){if(!e)throw new Error("Invalid signature");return n.ethers.keccak256(n.ethers.toUtf8Bytes(e)).slice(2,66)}async verifySignature(e,t){if(!e||!t)throw new Error("Invalid message or signature");try{return n.ethers.verifyMessage(e,t)}catch(e){throw new Error("Invalid message or signature")}}async getEthereumSigner(){if(!a.isMetaMaskAvailable())throw new Error("MetaMask not found. Please install MetaMask to continue.");try{const e=window.ethereum;return await e.request({method:"eth_requestAccounts"}),new n.ethers.BrowserProvider(e).getSigner()}catch(e){throw new Error(`Error accessing MetaMask: ${e.message??"Unknown error"}`)}}}t.Web3Connector=a,"undefined"!=typeof window?window.Web3Connector=a:void 0!==r.g&&(r.g.Web3Connector=a)},8098:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3ConnectorPlugin=void 0;const n=r(4586),i=r(8089),o=r(5628),s=r(4193),a=r(3358);class c extends n.BasePlugin{name="web3";version="1.0.0";description="Provides Ethereum wallet connection and authentication for ShogunCore";metamask=null;initialize(e){super.initialize(e),this.metamask=new i.Web3Connector,(0,o.log)("MetaMask plugin initialized")}destroy(){this.metamask&&this.metamask.cleanup(),this.metamask=null,super.destroy(),(0,o.log)("MetaMask plugin destroyed")}assertMetaMask(){if(this.assertInitialized(),!this.metamask)throw new Error("MetaMask module not initialized");return this.metamask}isAvailable(){return this.assertMetaMask().isAvailable()}async connectMetaMask(){return this.assertMetaMask().connectMetaMask()}async generateCredentials(e){return(0,o.log)("Calling credential generation"),this.assertMetaMask().generateCredentials(e)}cleanup(){this.assertMetaMask().cleanup()}setCustomProvider(e,t){this.assertMetaMask().setCustomProvider(e,t)}async getSigner(){return this.assertMetaMask().getSigner()}async getProvider(){return this.assertMetaMask().getProvider()}async generatePassword(e){return this.assertMetaMask().generatePassword(e)}async verifySignature(e,t){return this.assertMetaMask().verifySignature(e,t)}async login(e){(0,o.log)("Login with MetaMask");try{const t=this.assertInitialized();if((0,o.log)(`MetaMask login attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Ethereum address required for MetaMask login");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"METAMASK_UNAVAILABLE","MetaMask is not available in the browser");(0,o.log)("Generating credentials for MetaMask login...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","MetaMask credentials not generated correctly or signature missing");(0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying MetaMask signature...");const n=s.ethers.verifyMessage(r.message,r.signature);if(n.toLowerCase()!==e.toLowerCase())throw(0,o.logError)(`Signature verification failed. Expected: ${e}, Got: ${n}`),(0,a.createError)(a.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","MetaMask signature verification failed. Address mismatch.");(0,o.log)("MetaMask signature verified successfully."),t.setAuthMethod("web3"),(0,o.log)("Logging in using core login method...");const i=await t.login(r.username,r.password);if(!i.success)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"METAMASK_LOGIN_FAILED",i.error||"Failed to log in with MetaMask credentials");return t.emit("auth:login",{userPub:i.userPub,username:r.username,method:"metamask"}),i}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"METAMASK_LOGIN_ERROR",n=e?.message||"Unknown error during MetaMask login";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}async signUp(e){(0,o.log)("Sign up with MetaMask");try{const t=this.assertInitialized();if((0,o.log)(`MetaMask registration attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Ethereum address required for MetaMask registration");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"METAMASK_UNAVAILABLE","MetaMask is not available in the browser");(0,o.log)("Generating credentials for MetaMask registration...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","MetaMask credentials not generated correctly or signature missing");(0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying MetaMask signature...");const n=s.ethers.verifyMessage(r.message,r.signature);if(n.toLowerCase()!==e.toLowerCase())throw(0,o.logError)(`Signature verification failed. Expected: ${e}, Got: ${n}`),(0,a.createError)(a.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","MetaMask signature verification failed. Address mismatch.");(0,o.log)("MetaMask signature verified successfully."),t.setAuthMethod("web3"),(0,o.log)("Signing up using core signUp method...");const i=await t.signUp(r.username,r.password);if(!i.success)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"METAMASK_SIGNUP_FAILED",i.error||"Failed to sign up with MetaMask credentials");return t.emit("auth:signup",{userPub:i.userPub,username:r.username,method:"metamask"}),i}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"METAMASK_SIGNUP_ERROR",n=e?.message||"Unknown error during MetaMask registration";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}async loginWithMetaMask(e){return this.login(e)}async signUpWithMetaMask(e){return this.signUp(e)}}t.Web3ConnectorPlugin=c},8156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(197),t),i(r(5307),t)},8165:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=t.OFB=t.ECB=t.CTR=t.CFB=t.CBC=t.ModeOfOperation=t.AES=void 0;var n=r(6013);Object.defineProperty(t,"AES",{enumerable:!0,get:function(){return n.AES}});var i=r(6342);Object.defineProperty(t,"ModeOfOperation",{enumerable:!0,get:function(){return i.ModeOfOperation}});var o=r(2977);Object.defineProperty(t,"CBC",{enumerable:!0,get:function(){return o.CBC}});var s=r(7609);Object.defineProperty(t,"CFB",{enumerable:!0,get:function(){return s.CFB}});var a=r(4164);Object.defineProperty(t,"CTR",{enumerable:!0,get:function(){return a.CTR}});var c=r(1485);Object.defineProperty(t,"ECB",{enumerable:!0,get:function(){return c.ECB}});var u=r(226);Object.defineProperty(t,"OFB",{enumerable:!0,get:function(){return u.OFB}});var l=r(8420);Object.defineProperty(t,"pkcs7Pad",{enumerable:!0,get:function(){return l.pkcs7Pad}}),Object.defineProperty(t,"pkcs7Strip",{enumerable:!0,get:function(){return l.pkcs7Strip}})},8166:function(e,t){"use strict";function r(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=e,i}Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=t.resolveProperties=void 0,t.resolveProperties=async function(e){const t=Object.keys(e);return(await Promise.all(t.map((t=>Promise.resolve(e[t]))))).reduce(((e,r,n)=>(e[t[n]]=r,e)),{})},t.defineProperties=function(e,t,n){for(let i in t){let o=t[i];const s=n?n[i]:null;s&&r(o,s,i),Object.defineProperty(e,i,{enumerable:!0,value:o,writable:!1})}}},8183:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(5212),i=r(7214);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},8246:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(8051),i=r(439),o=r(7058),s=r(7699),a=r(3916),c=r(6404),u=r(5810),l=r(7214),f=r(8619);function d(e,t,r){return void 0===r&&(r=s.identity),function(n){h(t,(function(){for(var i=e.length,s=new Array(i),a=i,c=i,u=function(i){h(t,(function(){var u=o.from(e[i],t),f=!1;u.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,c--),c||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)u(f)}),n)}}function h(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=c.popScheduler(e),l=c.popResultSelector(e),f=i.argsArgArrayOrObject(e),h=f.args,p=f.keys;if(0===h.length)return o.from([],r);var g=new n.Observable(d(h,r,p?function(e){return u.createObject(p,e)}:s.identity));return l?g.pipe(a.mapOneOrManyArgs(l)):g},t.combineLatestInit=d},8263:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(281);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},8269:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(7058);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},8284:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},8394:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWallet=void 0;const n=r(646),i=r(1181),o=r(3996),s=r(7778),a=r(5347);class c extends o.AbstractSigner{address;#st;constructor(e,t){super(t),(0,a.assertArgument)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#st=e;const r=(0,s.computeAddress)(this.signingKey.publicKey);(0,a.defineProperties)(this,{address:r})}get signingKey(){return this.#st}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new c(this.#st,e)}async signTransaction(e){e=(0,o.copyRequest)(e);const{to:t,from:r}=await(0,a.resolveProperties)({to:e.to?(0,n.resolveAddress)(e.to,this):void 0,from:e.from?(0,n.resolveAddress)(e.from,this):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&((0,a.assertArgument)((0,n.getAddress)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const i=s.Transaction.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign((0,i.hashMessage)(e)).serialized}authorizeSync(e){(0,a.assertArgument)("string"==typeof e.address,"invalid address for authorizeSync","auth.address",e);const t=this.signingKey.sign((0,i.hashAuthorization)(e));return Object.assign({},{address:(0,n.getAddress)(e.address),nonce:(0,a.getBigInt)(e.nonce||0),chainId:(0,a.getBigInt)(e.chainId||0)},{signature:t})}async authorize(e){return e=Object.assign({},e,{address:await(0,n.resolveAddress)(e.address,this)}),this.authorizeSync(await this.populateAuthorization(e))}async signTypedData(e,t,r){const n=await i.TypedDataEncoder.resolveNames(e,t,r,(async e=>{(0,a.assert)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const t=await this.provider.resolveName(e);return(0,a.assert)(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t}));return this.signingKey.sign(i.TypedDataEncoder.hash(n.domain,t,n.value)).serialized}}t.BaseWallet=c},8420:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=void 0,t.pkcs7Pad=function(e){const t=16-e.length%16,r=new Uint8Array(e.length+t);r.set(e);for(let n=e.length;n<r.length;n++)r[n]=t;return r},t.pkcs7Strip=function(e){if(e.length<16)throw new TypeError("PKCS#7 invalid length");const t=e[e.length-1];if(t>16)throw new TypeError("PKCS#7 padding byte out of range");const r=e.length-t;for(let n=0;n<t;n++)if(e[r+n]!==t)throw new TypeError("PKCS#7 invalid padding byte");return new Uint8Array(e.subarray(0,r))}},8456:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=t.Result=t.TransactionDescription=t.LogDescription=t.ErrorDescription=t.Interface=t.Indexed=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.Fragment=t.FallbackFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.encodeBytes32String=t.decodeBytes32String=t.AbiCoder=void 0;var n=r(954);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return n.AbiCoder}});var i=r(9414);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}});var o=r(189);Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return o.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return o.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return o.EventFragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return o.FallbackFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return o.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return o.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return o.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return o.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return o.StructFragment}});var s=r(5863);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return s.ErrorDescription}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return s.Result}});var a=r(9976);Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return a.Typed}})},8461:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(680),i=r(5212);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},8464:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(4359),i=r(281),o=r(7812);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},8510:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(2623),i=r(9175),o=r(4967),s=r(1705),a=r(1484),c=r(1761),u=r(3562),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),f=e*e*e%t,d=f*f*e%t,p=(0,o.pow2)(d,r,t)*d%t,g=(0,o.pow2)(p,r,t)*d%t,b=(0,o.pow2)(g,h,t)*f%t,m=(0,o.pow2)(b,i,t)*b%t,v=(0,o.pow2)(m,s,t)*m%t,w=(0,o.pow2)(v,c,t)*v%t,A=(0,o.pow2)(w,u,t)*w%t,E=(0,o.pow2)(A,c,t)*v%t,P=(0,o.pow2)(E,r,t)*d%t,O=(0,o.pow2)(P,a,t)*m%t,S=(0,o.pow2)(O,n,t)*f%t,_=(0,o.pow2)(S,h,t);if(!y.eql(y.sqr(_),e))throw new Error("Cannot find square root");return _}const y=(0,o.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),c=p(s*e,t),u=p(-n*e,t);let l=(0,o.mod)(e-c*r-u*i,t),h=(0,o.mod)(-c*n-u*s,t);const g=l>a,y=h>a;if(g&&(l=t-l),y&&(h=t-h),l>a||h>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:y,k2:h}}}},n.sha256);const b=BigInt(0),m=e=>"bigint"==typeof e&&b<e&&e<l,v={};function w(e,...t){let r=v[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,a.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,a.concatBytes)(r,...t))}const A=e=>e.toRawBytes(!0).slice(1),E=e=>(0,a.numberToBytesBE)(e,32),P=e=>(0,o.mod)(e,l),O=e=>(0,o.mod)(e,f),S=t.secp256k1.ProjectivePoint;function _(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=S.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:O(-r),bytes:A(n)}}function k(e){if(!m(e))throw new Error("bad x: need 0 < x < p");const t=P(e*e);let r=g(P(t*e+BigInt(7)));r%h!==b&&(r=P(-r));const n=new S(e,r,d);return n.assertValidity(),n}function T(...e){return O((0,a.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function x(e,t,r){const n=(0,a.ensureBytes)("signature",e,64),i=(0,a.ensureBytes)("message",t),o=(0,a.ensureBytes)("publicKey",r,32);try{const e=k((0,a.bytesToNumberBE)(o)),t=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!m(t))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&b<l&&l<f))return!1;const d=T(E(t),A(e),i),h=(s=e,c=r,u=O(-d),S.BASE.multiplyAndAddUnsafe(s,c,u));return!(!h||!h.hasEvenY()||h.toAffine().x!==t)}catch(e){return!1}var s,c,u,l}t.schnorr={getPublicKey:function(e){return _(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,a.ensureBytes)("message",e),{bytes:o,scalar:s}=_(t),c=(0,a.ensureBytes)("auxRand",r,32),u=E(s^(0,a.bytesToNumberBE)(w("BIP0340/aux",c))),l=w("BIP0340/nonce",u,o,n),f=O((0,a.bytesToNumberBE)(l));if(f===b)throw new Error("sign failed: k is zero");const{bytes:d,scalar:h}=_(f),p=T(d,o,n),g=new Uint8Array(64);if(g.set(d,0),g.set(E(O(h+p*s)),32),!x(g,n,o))throw new Error("sign: Invalid signature produced");return g},verify:x,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:k,pointToBytes:A,numberToBytesBE:a.numberToBytesBE,bytesToNumberBE:a.bytesToNumberBE,taggedHash:w,mod:o.mod}};const R=(()=>(0,c.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),I=(()=>(0,s.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),C=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=I(y.create(e[0]));return R(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=C.hashToCurve,t.encodeToCurve=C.encodeToCurve},8531:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(7214);t.scanInternals=function(e,t,r,i,o){return function(s,a){var c=r,u=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;u=c?e(u,t,r):(c=!0,t),i&&a.next(u)}),o&&function(){c&&a.next(u),a.complete()}))}}},8567:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase58=t.encodeBase58=void 0;const n=r(7415),i=r(1500),o=r(6508),s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let a=null;function c(e){if(null==a){a={};for(let e=0;e<58;e++)a[s[e]]=BigInt(e)}const t=a[e];return(0,i.assertArgument)(null!=t,"invalid base58 value","letter",e),t}const u=BigInt(0),l=BigInt(58);t.encodeBase58=function(e){const t=(0,n.getBytes)(e);let r=(0,o.toBigInt)(t),i="";for(;r;)i=s[Number(r%l)]+i,r/=l;for(let e=0;e<t.length&&!t[e];e++)i=s[0]+i;return i},t.decodeBase58=function(e){let t=u;for(let r=0;r<e.length;r++)t*=l,t+=c(e[r]);return t}},8589:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(2070);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},8590:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(6808),i=r(8051),o=r(5884),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,c=void 0===a||a,u=n(),l=new i.Observable((function(e){return u.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(u),c&&r.add((function(){return u=n()}))),r},l}},8596:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(281);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},8616:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9724),o=r(8051),s=r(7478),a=r(4975),c=r(281),u=r(3916),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],d=["on","off"];function h(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,p,g){if(c.isFunction(p)&&(g=p,p=void 0),g)return e(t,r,p).pipe(u.mapOneOrManyArgs(g));var y=n(function(e){return c.isFunction(e.addEventListener)&&c.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,p)}})):function(e){return c.isFunction(e.addListener)&&c.isFunction(e.removeListener)}(t)?l.map(h(t,r)):function(e){return c.isFunction(e.on)&&c.isFunction(e.off)}(t)?d.map(h(t,r)):[],2),b=y[0],m=y[1];if(!b&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,p)}))(i.innerFrom(t));if(!b)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return b(t),function(){return m(t)}}))}},8619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},8634:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spelunk=t.getPassword=t.zpad=t.looseArrayify=void 0;const n=r(5347);function i(e){return"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),(0,n.getBytesCopy)(e)}t.looseArrayify=i,t.zpad=function(e,t){for(e=String(e);e.length<t;)e="0"+e;return e},t.getPassword=function(e){return"string"==typeof e?(0,n.toUtf8Bytes)(e,"NFKC"):(0,n.getBytesCopy)(e)},t.spelunk=function(e,t){const r=t.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);(0,n.assertArgument)(null!=r,"invalid path","path",t);const o=r[1],s=r[3],a="!"===r[4];let c=e;for(const e of o.toLowerCase().split(".")){if(Array.isArray(c)){if(!e.match(/^[0-9]+$/))break;c=c[parseInt(e)]}else if("object"==typeof c){let t=null;for(const r in c)if(r.toLowerCase()===e){t=c[r];break}c=t}else c=null;if(null==c)break}if((0,n.assertArgument)(!a||null!=c,"missing required value","path",o),s&&null!=c){if("int"===s){if("string"==typeof c&&c.match(/^-?[0-9]+$/))return parseInt(c);if(Number.isSafeInteger(c))return c}if("number"===s&&"string"==typeof c&&c.match(/^-?[0-9.]*$/))return parseFloat(c);if("data"===s&&"string"==typeof c)return i(c);if("array"===s&&Array.isArray(c))return c;if(s===typeof c)return c;(0,n.assertArgument)(!1,`wrong type found for ${s} `,"path",o)}return c}},8672:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractProvider=t.UnmanagedSubscriber=void 0;const n=r(646),i=r(1295),o=r(9288),s=r(1181),a=r(7778),c=r(5347),u=r(1691),l=r(5601),f=r(5317),d=r(3807),h=r(4338),p=BigInt(2);function g(e){return e&&"function"==typeof e.then}function y(e,t){return e+":"+JSON.stringify(t,((e,t)=>{if(null==t)return"null";if("bigint"==typeof t)return`bigint:${t.toString()}`;if("string"==typeof t)return t.toLowerCase();if("object"==typeof t&&!Array.isArray(t)){const e=Object.keys(t);return e.sort(),e.reduce(((e,r)=>(e[r]=t[r],e)),{})}return t}))}class b{name;constructor(e){(0,c.defineProperties)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function m(e){return(e=Array.from(new Set(e).values())).sort(),e}async function v(e,t){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,c.isHexString)(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:y("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:y("orphan",t),filter:(r=t,JSON.parse(JSON.stringify(r)))}}var r;if(e.address||e.topics){const r=e,i={topics:(r.topics||[]).map((e=>null==e?null:Array.isArray(e)?m(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(r.address){const e=[],o=[],s=r=>{(0,c.isHexString)(r)?e.push(r):o.push((async()=>{e.push(await(0,n.resolveAddress)(r,t))})())};Array.isArray(r.address)?r.address.forEach(s):s(r.address),o.length&&await Promise.all(o),i.address=m(e.map((e=>e.toLowerCase())))}return{filter:i,tag:y("event",i),type:"event"}}(0,c.assertArgument)(!1,"unknown ProviderEvent","event",e)}function w(){return(new Date).getTime()}t.UnmanagedSubscriber=b;const A={cacheTimeout:250,pollingInterval:4e3};function E(e,t){try{const r=P(e,t);if(r)return(0,c.toUtf8String)(r)}catch(e){}return null}function P(e,t){if("0x"===e)return null;try{const r=(0,c.getNumber)((0,c.dataSlice)(e,t,t+32)),n=(0,c.getNumber)((0,c.dataSlice)(e,r,r+32));return(0,c.dataSlice)(e,r+32,r+32+n)}catch(e){}return null}function O(e){const t=(0,c.toBeArray)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function S(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}t.AbstractProvider=class{#pe;#Le;#at;#ct;#ut;#lt;#ft;#dt;#ht;#pt;#gt;#j;constructor(e,t){if(this.#j=Object.assign({},A,t||{}),"any"===e)this.#lt=!0,this.#ut=null;else if(e){const t=f.Network.from(e);this.#lt=!1,this.#ut=Promise.resolve(t),setTimeout((()=>{this.emit("network",t,null)}),0)}else this.#lt=!1,this.#ut=null;this.#dt=-1,this.#ft=new Map,this.#pe=new Map,this.#Le=new Map,this.#at=null,this.#ct=!1,this.#ht=1,this.#pt=new Map,this.#gt=!1}get pollingInterval(){return this.#j.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#Le.values())}attachPlugin(e){if(this.#Le.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Le.set(e.name,e.connect(this)),this}getPlugin(e){return this.#Le.get(e)||null}get disableCcipRead(){return this.#gt}set disableCcipRead(e){this.#gt=!!e}async#yt(e){const t=this.#j.cacheTimeout;if(t<0)return await this._perform(e);const r=y(e.method,e);let n=this.#ft.get(r);return n||(n=this._perform(e),this.#ft.set(r,n),setTimeout((()=>{this.#ft.get(r)===n&&this.#ft.delete(r)}),t)),await n}async ccipReadFetch(e,t,r){if(this.disableCcipRead||0===r.length||null==e.to)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let t=0;t<r.length;t++){const s=r[t],a=s.replace("{sender}",n).replace("{data}",i),u=new c.FetchRequest(a);-1===s.indexOf("{data}")&&(u.body={data:i,sender:n}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:u,index:t,urls:r});let l,f="unknown error";try{l=await u.send()}catch(e){o.push(e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:{error:e}});continue}try{const e=l.bodyJson;if(e.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:u,result:e}),e.data;e.message&&(f=e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:e})}catch(e){}(0,c.assert)(l.statusCode<400||l.statusCode>=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:s,errorMessage:f}}),o.push(f)}(0,c.assert)(!1,`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,t){return new d.Block((0,l.formatBlock)(e),this)}_wrapLog(e,t){return new d.Log((0,l.formatLog)(e),this)}_wrapTransactionReceipt(e,t){return new d.TransactionReceipt((0,l.formatTransactionReceipt)(e),this)}_wrapTransactionResponse(e,t){return new d.TransactionResponse((0,l.formatTransactionResponse)(e),this)}_detectNetwork(){(0,c.assert)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,c.assert)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=(0,c.getNumber)(await this.#yt({method:"getBlockNumber"}),"%response");return this.#dt>=0&&(this.#dt=e),e}_getAddress(e){return(0,n.resolveAddress)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,c.isHexString)(e)?(0,c.isHexString)(e,32)?e:(0,c.toQuantity)(e):("bigint"==typeof e&&(e=(0,c.getNumber)(e,"blockTag")),"number"==typeof e?e>=0?(0,c.toQuantity)(e):this.#dt>=0?(0,c.toQuantity)(this.#dt+e):this.getBlockNumber().then((t=>(0,c.toQuantity)(t+e))):void(0,c.assertArgument)(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const t=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?m(e.map((e=>e.toLowerCase()))):e.toLowerCase())),r="blockHash"in e?e.blockHash:void 0,n=(e,n,i)=>{let o;switch(e.length){case 0:break;case 1:o=e[0];break;default:e.sort(),o=e}if(r&&(null!=n||null!=i))throw new Error("invalid filter");const s={};return o&&(s.address=o),t.length&&(s.topics=t),n&&(s.fromBlock=n),i&&(s.toBlock=i),r&&(s.blockHash=r),s};let i,o,s=[];if(e.address)if(Array.isArray(e.address))for(const t of e.address)s.push(this._getAddress(t));else s.push(this._getAddress(e.address));return"fromBlock"in e&&(i=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),s.filter((e=>"string"!=typeof e)).length||null!=i&&"string"!=typeof i||null!=o&&"string"!=typeof o?Promise.all([Promise.all(s),i,o]).then((e=>n(e[0],e[1],e[2]))):n(s,i,o)}_getTransactionRequest(e){const t=(0,d.copyRequest)(e),r=[];if(["to","from"].forEach((e=>{if(null==t[e])return;const i=(0,n.resolveAddress)(t[e],this);g(i)?r.push(async function(){t[e]=await i}()):t[e]=i})),null!=t.blockTag){const e=this._getBlockTag(t.blockTag);g(e)?r.push(async function(){t.blockTag=await e}()):t.blockTag=e}return r.length?async function(){return await Promise.all(r),t}():t}async getNetwork(){if(null==this.#ut){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#ut===e&&(this.#ut=null),t}})();return this.#ut=e,(await e).clone()}const e=this.#ut,[t,r]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==r.chainId&&(this.#lt?(this.emit("network",r,t),this.#ut===e&&(this.#ut=Promise.resolve(r))):(0,c.assert)(!1,`network changed: ${t.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:t,gasPrice:r,priorityFee:n}=await(0,c.resolveProperties)({_block:this.#bt("latest",!1),gasPrice:(async()=>{try{const e=await this.#yt({method:"getGasPrice"});return(0,c.getBigInt)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{const e=await this.#yt({method:"getPriorityFee"});return(0,c.getBigInt)(e,"%response")}catch(e){}return null})()});let i=null,o=null;const s=this._wrapBlock(t,e);return s&&s.baseFeePerGas&&(o=null!=n?n:BigInt("1000000000"),i=s.baseFeePerGas*p+o),new d.FeeData(r,i,o)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const e=new c.FetchRequest(r.url),n=await r.processFunc(t,this,e);return new d.FeeData(n.gasPrice,n.maxFeePerGas,n.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return g(t)&&(t=await t),(0,c.getBigInt)(await this.#yt({method:"estimateGas",transaction:t}),"%response")}async#mt(e,t,r){(0,c.assert)(r<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});const i=(0,d.copyRequest)(e);try{return(0,c.hexlify)(await this._perform({method:"call",transaction:i,blockTag:t}))}catch(e){if(!this.disableCcipRead&&(0,c.isCallException)(e)&&e.data&&r>=0&&"latest"===t&&null!=i.to&&"0x556f1830"===(0,c.dataSlice)(e.data,0,4)){const o=e.data,s=await(0,n.resolveAddress)(i.to,this);let a;try{a=function(e){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,c.assert)((0,c.dataLength)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=(0,c.dataSlice)(e,0,32);(0,c.assert)((0,c.dataSlice)(r,0,12)===(0,c.dataSlice)(T,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=(0,c.dataSlice)(r,12);try{const r=[],n=(0,c.getNumber)((0,c.dataSlice)(e,32,64)),i=(0,c.getNumber)((0,c.dataSlice)(e,n,n+32)),o=(0,c.dataSlice)(e,n+32);for(let e=0;e<i;e++){const t=E(o,32*e);if(null==t)throw new Error("abort");r.push(t)}t.urls=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=P(e,64);if(null==r)throw new Error("abort");t.calldata=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}(0,c.assert)((0,c.dataSlice)(e,100,128)===(0,c.dataSlice)(T,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=(0,c.dataSlice)(e,96,100);try{const r=P(e,128);if(null==r)throw new Error("abort");t.extraData=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map((e=>t[e])),t}((0,c.dataSlice)(e.data,4))}catch(e){(0,c.assert)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}(0,c.assert)(a.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:a.errorArgs}});const u=await this.ccipReadFetch(i,a.calldata,a.urls);(0,c.assert)(null!=u,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:e.data,errorArgs:a.errorArgs}});const l={to:s,data:(0,c.concat)([a.selector,k([u,a.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const e=await this.#mt(l,t,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:e}),e}}throw e}}async#vt(e){const{value:t}=await(0,c.resolveProperties)({network:this.getNetwork(),value:e});return t}async call(e){const{tx:t,blockTag:r}=await(0,c.resolveProperties)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#vt(this.#mt(t,r,e.enableCcipRead?0:-1))}async#wt(e,t,r){let n=this._getAddress(t),i=this._getBlockTag(r);return"string"==typeof n&&"string"==typeof i||([n,i]=await Promise.all([n,i])),await this.#vt(this.#yt(Object.assign(e,{address:n,blockTag:i})))}async getBalance(e,t){return(0,c.getBigInt)(await this.#wt({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return(0,c.getNumber)(await this.#wt({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return(0,c.hexlify)(await this.#wt({method:"getCode"},e,t))}async getStorage(e,t,r){const n=(0,c.getBigInt)(t,"position");return(0,c.hexlify)(await this.#wt({method:"getStorage",position:n},e,r))}async broadcastTransaction(e){const{blockNumber:t,hash:r,network:n}=await(0,c.resolveProperties)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=a.Transaction.from(e);if(i.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,n).replaceableTransaction(t)}async#bt(e,t){if((0,c.isHexString)(e,32))return await this.#yt({method:"getBlock",blockHash:e,includeTransactions:t});let r=this._getBlockTag(e);return"string"!=typeof r&&(r=await r),await this.#yt({method:"getBlock",blockTag:r,includeTransactions:t})}async getBlock(e,t){const{network:r,params:n}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#bt(e,!!t)});return null==n?null:this._wrapBlock(n,r)}async getTransaction(e){const{network:t,params:r}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#yt({method:"getTransaction",hash:e})});return null==r?null:this._wrapTransactionResponse(r,t)}async getTransactionReceipt(e){const{network:t,params:r}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#yt({method:"getTransactionReceipt",hash:e})});if(null==r)return null;if(null==r.gasPrice&&null==r.effectiveGasPrice){const t=await this.#yt({method:"getTransaction",hash:e});if(null==t)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(r,t)}async getTransactionResult(e){const{result:t}=await(0,c.resolveProperties)({network:this.getNetwork(),result:this.#yt({method:"getTransactionResult",hash:e})});return null==t?null:(0,c.hexlify)(t)}async getLogs(e){let t=this._getFilter(e);g(t)&&(t=await t);const{network:r,params:n}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#yt({method:"getLogs",filter:t})});return n.map((e=>this._wrapLog(e,r)))}_getProvider(e){(0,c.assert)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await u.EnsResolver.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=(0,n.getAddress)(e);const t=(0,s.namehash)(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await u.EnsResolver.getEnsAddress(this),n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],this),s=await n.resolver(t);if(null==s||s===i.ZeroAddress)return null;const a=new o.Contract(s,["function name(bytes32) view returns (string)"],this),c=await a.name(t);return await this.resolveName(c)!==e?null:c}catch(e){if((0,c.isError)(e,"BAD_DATA")&&"0x"===e.value)return null;if((0,c.isError)(e,"CALL_EXCEPTION"))return null;throw e}}async waitForTransaction(e,t,r){const n=null!=t?t:1;return 0===n?this.getTransactionReceipt(e):new Promise((async(t,i)=>{let o=null;const s=async r=>{try{const i=await this.getTransactionReceipt(e);if(null!=i&&r-i.blockNumber+1>=n)return t(i),void(o&&(clearTimeout(o),o=null))}catch(e){console.log("EEE",e)}this.once("block",s)};null!=r&&(o=setTimeout((()=>{null!=o&&(o=null,this.off("block",s),i((0,c.makeError)("timeout","TIMEOUT",{reason:"timeout"})))}),r)),s(await this.getBlockNumber())}))}async waitForBlock(e){(0,c.assert)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=this.#pt.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#pt.delete(e))}_setTimeout(e,t){null==t&&(t=0);const r=this.#ht++,n=()=>{this.#pt.delete(r),e()};if(this.paused)this.#pt.set(r,{timer:null,func:n,time:t});else{const e=setTimeout(n,t);this.#pt.set(r,{timer:e,func:n,time:w()})}return r}_forEachSubscriber(e){for(const t of this.#pe.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new b(e.type);case"block":{const e=new h.PollingBlockSubscriber(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new h.PollingBlockTagSubscriber(this,e.type);case"event":return new h.PollingEventSubscriber(this,e.filter);case"transaction":return new h.PollingTransactionSubscriber(this,e.hash);case"orphan":return new h.PollingOrphanSubscriber(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const r of this.#pe.values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=t,r.started&&t.start(),null!=this.#at&&t.pause(this.#at);break}}async#At(e,t){let r=await v(e,this);return"event"===r.type&&t&&t.length>0&&!0===t[0].removed&&(r=await v({orphan:"drop-log",log:t[0]},this)),this.#pe.get(r.tag)||null}async#Et(e){const t=await v(e,this),r=t.tag;let n=this.#pe.get(r);return n||(n={subscriber:this._getSubscriber(t),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#pe.set(r,n)),n}async on(e,t){const r=await this.#Et(e);return r.listeners.push({listener:t,once:!1}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#at&&r.subscriber.pause(this.#at)),this}async once(e,t){const r=await this.#Et(e);return r.listeners.push({listener:t,once:!0}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#at&&r.subscriber.pause(this.#at)),this}async emit(e,...t){const r=await this.#At(e,t);if(!r||0===r.listeners.length)return!1;const n=r.listeners.length;return r.listeners=r.listeners.filter((({listener:r,once:n})=>{const i=new c.EventPayload(this,n?null:r,e);try{r.call(this,...t,i)}catch(e){}return!n})),0===r.listeners.length&&(r.started&&r.subscriber.stop(),this.#pe.delete(r.tag)),n>0}async listenerCount(e){if(e){const t=await this.#At(e);return t?t.listeners.length:0}let t=0;for(const{listeners:e}of this.#pe.values())t+=e.length;return t}async listeners(e){if(e){const t=await this.#At(e);return t?t.listeners.map((({listener:e})=>e)):[]}let t=[];for(const{listeners:e}of this.#pe.values())t=t.concat(e.map((({listener:e})=>e)));return t}async off(e,t){const r=await this.#At(e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return t&&0!==r.listeners.length||(r.started&&r.subscriber.stop(),this.#pe.delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:r,subscriber:n}=await this.#Et(e);r&&n.stop(),this.#pe.delete(t)}else for(const[e,{started:t,subscriber:r}]of this.#pe)t&&r.stop(),this.#pe.delete(e);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#ct}destroy(){this.removeAllListeners();for(const e of this.#pt.keys())this._clearTimeout(e);this.#ct=!0}get paused(){return null!=this.#at}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#dt=-1,null!=this.#at){if(this.#at==!!e)return;(0,c.assert)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((t=>t.pause(e))),this.#at=!!e;for(const e of this.#pt.values())e.timer&&clearTimeout(e.timer),e.time=w()-e.time}resume(){if(null!=this.#at){this._forEachSubscriber((e=>e.resume())),this.#at=null;for(const e of this.#pt.values()){let t=e.time;t<0&&(t=0),e.time=w(),setTimeout(e.func,t)}}}};const _=new Uint8Array([]);function k(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(_),r+=32;for(let n=0;n<e.length;n++){const i=(0,c.getBytes)(e[n]);t[n]=O(r),t.push(O(i.length)),t.push(S(i)),r+=32+32*Math.ceil(i.length/32)}return(0,c.concat)(t)}const T="0x0000000000000000000000000000000000000000000000000000000000000000"},8710:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(381),i=r(8464),o=r(281);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},8711:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseContract=t.ENTRY_POINT_ABI=t.SIMPLE_RELAY_ABI=t.REGISTRY_ABI=t.RelayOperatingMode=void 0;const n=r(4193),i=r(3358),o=r(5628);var s;t.REGISTRY_ABI=["function isRegisteredRelay(address _relayAddress) external view returns (bool)","function isRelayActive(address _relayAddress) external view returns (bool)","function findRelayByUrl(string calldata _url) external view returns (address)","function getRelayInfo(address _relayAddress) external view returns (address owner, string memory url, string memory metadata, uint256 registrationTime, bool active)","function getRelayCountByOwner(address _owner) external view returns (uint256)","function getRelaysByOwner(address _owner, uint256 _offset, uint256 _limit) external view returns (tuple(address[] relays, uint256 total, uint256 offset, uint256 limit))","function getAllRelays(bool _onlyActive, uint256 _offset, uint256 _limit) external view returns (tuple(address[] relays, uint256 total, uint256 offset, uint256 limit))","function registerRelay(address _relayAddress, string calldata _url, string calldata _metadata) external","function updateRelay(address _relayAddress, string calldata _newUrl, string calldata _newMetadata) external","function deactivateRelay(address _relayAddress) external","function reactivateRelay(address _relayAddress) external","function setRegistrationOpen(bool _isOpen) external"],t.SIMPLE_RELAY_ABI=["function isSubscriptionActive(address _user) external view returns (bool)","function getUserSubscriptionInfo(address _user) external view returns (uint256 expires, bytes memory pubKey)","function isAuthorizedByPubKey(bytes calldata _pubKey) external view returns (bool)","function isSubscribed(bytes calldata _pubKey) external view returns (bool)","function pricePerMonth() external view returns (uint256)","function daysPerMonth() external view returns (uint256)","function relayUrl() external view returns (string)","function getRelayOperationalConfig() external view returns (string memory _url, uint256 _price, uint256 _daysInMonth)","function mode() external view returns (uint8)","function registryAddress() external view returns (address)","function entryPointAddress() external view returns (address)","function isRegisteredInRegistry() external view returns (bool)","function getRelayMode() external view returns (uint8 _mode, address _registry, address _entryPoint, bool _isRegistered)","function setRegistry(address _registryAddress, bool _autoRegister, string calldata _metadata) external","function setEntryPoint(address _entryPointAddress, bool _enableProtocolMode) external","function setOperatingMode(uint8 _newMode) external","function registerInRegistry(string calldata _metadata) external","function subscribe(uint256 _months, bytes calldata _pubKey) external payable","function setPrice(uint256 _newPrice) external","function setDaysPerMonth(uint256 _days) external","function updateRelayUrl(string calldata _newUrl) external","function withdrawFunds() external","function decommissionAndWithdrawAllFunds() external","function execute(address _to, uint256 _value, bytes calldata _data) external returns (bool success, bytes memory result)"],t.ENTRY_POINT_ABI=["function registry() external view returns (address)","function serviceFeePercentage() external view returns (uint256)","function calculateFee(uint256 _amount) external view returns (uint256)","function checkSubscription(address _user, address _relayAddress) external view returns (bool)","function hasRegisteredPubKey(address _user, address _relayAddress) external view returns (bool)","function isPubKeySubscribed(address _relayAddress, bytes calldata _pubKey) external view returns (bool)","function batchCheckPubKeySubscription(address[] calldata _relayAddresses, bytes[] calldata _pubKeys) external view returns (bool[] memory)","function getSubscriptionDetails(address _user, address _relayAddress) external view returns (uint256 expires, bytes memory pubKey)","function batchCheckSubscriptions(address _user, address[] calldata _relayAddresses) external view returns (bool[] memory)","function batchCheckPubKeys(address _user, address[] calldata _relayAddresses) external view returns (bool[] memory)","function getStatistics() external view returns (uint256 _userCount, uint256 _totalSubscriptions, uint256 _totalViaUrl, uint256 _totalViaDirect, uint256 _totalAmountProcessed, uint256 _totalFeesCollected, uint256 _currentBalance)","function subscribeViaUrl(string calldata _relayUrl, uint256 _months, bytes calldata _pubKey) external payable","function subscribeDirect(address _relayAddress, uint256 _months, bytes calldata _pubKey) external payable","function batchSubscribe(address[] calldata _relayAddresses, uint256 _months, bytes[] calldata _pubKeys) external payable","function updateRegistry(address _newRegistry) external","function updateServiceFee(uint256 _newFeePercentage) external","function withdrawFees() external"],function(e){e[e.SINGLE=0]="SINGLE",e[e.PROTOCOL=1]="PROTOCOL"}(s||(t.RelayOperatingMode=s={})),t.BaseContract=class{provider=null;signer=null;contract=null;contractAddress;constructor(e,t,r){if(this.contractAddress=e,r.provider?this.provider=r.provider:r.providerUrl&&(this.provider=new n.ethers.JsonRpcProvider(r.providerUrl)),this.signer=r.signer||null,this.provider)try{this.signer?this.contract=new n.ethers.Contract(e,t,this.signer):this.contract=new n.ethers.Contract(e,t,this.provider)}catch(t){i.ErrorHandler.handle(i.ErrorType.CONTRACT,"CONTRACT_INIT_FAILED",`Failed to initialize contract at ${e}`,t)}else(0,o.logError)("No provider available for contract initialization")}setProvider(e){this.provider=e,this.contract&&(this.contract=this.contract.connect(e))}setSigner(e){this.signer=e,this.contract&&this.signer&&(this.contract=this.contract.connect(e))}getAddress(){return this.contractAddress}}},8717:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=t.hashMessage=void 0;const n=r(2291),i=r(1295),o=r(7778),s=r(5347);function a(e){return"string"==typeof e&&(e=(0,s.toUtf8Bytes)(e)),(0,n.keccak256)((0,s.concat)([(0,s.toUtf8Bytes)(i.MessagePrefix),(0,s.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=a,t.verifyMessage=function(e,t){const r=a(e);return(0,o.recoverAddress)(r,t)}},8719:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;const n=r(9976),i=r(8869);class o extends i.Coder{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const r=n.Typed.dereference(t,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}t.BooleanCoder=o},8725:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwlA=void 0;const n=r(2684),i=r(7703);class o extends n.WordlistOwl{#Pt;constructor(e,t,r,n){super(e,t,n),this.#Pt=r}get _accent(){return this.#Pt}_decodeWords(){return(0,i.decodeOwlA)(this._data,this._accent)}}t.WordlistOwlA=o},8766:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;const n=r(3948),i=r(9976),o=r(2348);class s extends o.DynamicBytesCoder{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,n.toUtf8Bytes)(i.Typed.dereference(t,"string")))}decode(e){return(0,n.toUtf8String)(super.decode(e))}}t.StringCoder=s},8777:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleRelay=void 0;const n=r(4193),i=r(3358),o=r(8711);class s extends o.BaseContract{constructor(e){super(e.relayAddress,o.SIMPLE_RELAY_ABI,e)}async isSubscriptionActive(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.isSubscriptionActive(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_SUBSCRIPTION_ACTIVE_FAILED",`Failed to check if subscription is active for user ${e}`,t),!1}}async getUserSubscriptionInfo(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const[t,r]=await this.contract.getUserSubscriptionInfo(e),i=await this.contract.isSubscriptionActive(e);return{expires:t,pubKey:n.ethers.hexlify(r),isActive:i}}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_SUBSCRIPTION_INFO_FAILED",`Failed to get subscription info for user ${e}`,t),null}}async isAuthorizedByPubKey(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const t=e instanceof Uint8Array?n.ethers.hexlify(e):e;return await this.contract.isAuthorizedByPubKey(t)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_AUTHORIZED_FAILED","Failed to check if public key is authorized",e),!1}}async isSubscribed(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const t=e instanceof Uint8Array?n.ethers.hexlify(e):e;return await this.contract.isSubscribed(t)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_SUBSCRIBED_FAILED","Failed to check if public key is subscribed",e),!1}}async getPricePerMonth(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.pricePerMonth()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_PRICE_FAILED","Failed to get price per month",e),null}}async getDaysPerMonth(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const e=await this.contract.daysPerMonth();return Number(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_DAYS_PER_MONTH_FAILED","Failed to get days per month",e),null}}async getRelayUrl(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.relayUrl()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_URL_FAILED","Failed to get relay URL",e),null}}async getRelayOperationalConfig(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const[e,t,r]=await this.contract.getRelayOperationalConfig();return{url:e,price:t,daysInMonth:r}}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_CONFIG_FAILED","Failed to get relay operational config",e),null}}async subscribe(e,t){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const r=t instanceof Uint8Array?n.ethers.hexlify(t):t,i=await this.contract.pricePerMonth()*BigInt(e);return await this.contract.subscribe(e,r,{value:i})}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SUBSCRIBE_FAILED",`Failed to subscribe for ${e} months`,t),null}}async setPrice(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setPrice(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_PRICE_FAILED","Failed to set new price",e),null}}async setDaysPerMonth(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");if(e<1||e>31)throw new Error("Days must be between 1 and 31");return await this.contract.setDaysPerMonth(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_DAYS_PER_MONTH_FAILED",`Failed to set days per month to ${e}`,t),null}}async updateRelayUrl(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateRelayUrl(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_UPDATE_URL_FAILED",`Failed to update URL to ${e}`,t),null}}async withdrawFunds(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.withdrawFunds()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_WITHDRAW_FUNDS_FAILED","Failed to withdraw funds",e),null}}async decommissionAndWithdrawAllFunds(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.decommissionAndWithdrawAllFunds()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_DECOMMISSION_FAILED","Failed to decommission relay",e),null}}async execute(e,t,r){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const[i,o]=await this.contract.execute(e,t,r);return{success:i,result:n.ethers.hexlify(o)}}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_EXECUTE_FAILED",`Failed to execute transaction to ${e}`,t),null}}async getOperatingMode(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.mode()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_MODE_FAILED","Failed to get relay operating mode",e),null}}async getRegistryAddress(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.registryAddress()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_REGISTRY_ADDRESS_FAILED","Failed to get registry address",e),null}}async getEntryPointAddress(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.entryPointAddress()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_ENTRY_POINT_ADDRESS_FAILED","Failed to get entry point address",e),null}}async isRegisteredInRegistry(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.isRegisteredInRegistry()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_REGISTERED_FAILED","Failed to check if relay is registered in registry",e),!1}}async getRelayMode(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const[e,t,r,n]=await this.contract.getRelayMode();return{mode:e,registryAddress:t,entryPointAddress:r,isRegistered:n}}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_MODE_INFO_FAILED","Failed to get relay mode information",e),null}}async setRegistry(e,t=!1,r=""){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setRegistry(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_REGISTRY_FAILED",`Failed to set registry to ${e}`,t),null}}async setEntryPoint(e,t=!1){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setEntryPoint(e,t)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_ENTRY_POINT_FAILED",`Failed to set entry point to ${e}`,t),null}}async setOperatingMode(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setOperatingMode(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_MODE_FAILED",`Failed to set operating mode to ${e}`,t),null}}async registerInRegistry(e=""){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.registerInRegistry(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_REGISTER_IN_REGISTRY_FAILED","Failed to register relay in registry",e),null}}}t.SimpleRelay=s},8799:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(5212),i=r(7214);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},8817:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickNodeProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="919b412a057b5e9c9b6dce193c5a60242d6efadb";class c extends s.JsonRpcProvider{token;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{token:t})}_getProvider(e){try{return new c(e,this.token)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.token===a}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("QuickNodeProvider"),!0)),r}}t.QuickNodeProvider=c},8869:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=t.Writer=t.Coder=t.checkResultErrors=t.Result=t.WordSize=void 0;const n=r(5347);t.WordSize=32;const i=new Uint8Array(t.WordSize),o=["then"],s={},a=new WeakMap;function c(e){return a.get(e)}function u(e,t){a.set(e,t)}function l(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function f(e,t,r){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof d?f(c(e),e,r):e)):e.reduce(((e,n,i)=>{let o=t.getValue(n);return n in e||(r&&o instanceof d&&(o=f(c(o),o,r)),e[n]=o),e}),{})}class d extends Array{#Ot;constructor(...e){const t=e[0];let r=e[1],i=(e[2]||[]).slice(),a=!0;t!==s&&(r=e,i=[],a=!1),super(r.length),r.forEach(((e,t)=>{this[t]=e}));const f=i.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(u(this,Object.freeze(r.map(((e,t)=>{const r=i[t];return null!=r&&1===f.get(r)?r:null})))),this.#Ot=[],null==this.#Ot&&this.#Ot,!a)return;Object.freeze(this);const d=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const r=(0,n.getNumber)(t,"%index");if(r<0||r>=this.length)throw new RangeError("out of result range");const i=e[r];return i instanceof Error&&l(`index ${r}`,i),i}if(o.indexOf(t)>=0)return Reflect.get(e,t,r);const i=e[t];if(i instanceof Function)return function(...t){return i.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return u(d,c(this)),d}toArray(e){const t=[];return this.forEach(((r,n)=>{r instanceof Error&&l(`index ${n}`,r),e&&r instanceof d&&(r=r.toArray(e)),t.push(r)})),t}toObject(e){const t=c(this);return t.reduce(((r,i,o)=>((0,n.assert)(null!=i,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),f(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=c(this),n=[],i=[];for(let o=e;o<t;o++)n.push(this[o]),i.push(r[o]);return new d(s,n,i)}filter(e,t){const r=c(this),n=[],i=[];for(let o=0;o<this.length;o++){const s=this[o];s instanceof Error&&l(`index ${o}`,s),e.call(t,s,o,this)&&(n.push(s),i.push(r[o]))}return new d(s,n,i)}map(e,t){const r=[];for(let n=0;n<this.length;n++){const i=this[n];i instanceof Error&&l(`index ${n}`,i),r.push(e.call(t,i,n,this))}return r}getValue(e){const t=c(this).indexOf(e);if(-1===t)return;const r=this[t];return r instanceof Error&&l(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new d(s,e,t)}}function h(e){let r=(0,n.toBeArray)(e);return(0,n.assert)(r.length<=t.WordSize,"value out-of-bounds","BUFFER_OVERRUN",{buffer:r,length:t.WordSize,offset:r.length}),r.length!==t.WordSize&&(r=(0,n.getBytesCopy)((0,n.concat)([i.slice(r.length%t.WordSize),r]))),r}t.Result=d,t.checkResultErrors=function(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t},t.Coder=class{name;type;localName;dynamic;constructor(e,t,r,i){(0,n.defineProperties)(this,{name:e,type:t,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){(0,n.assertArgument)(!1,e,this.localName,t)}},t.Writer=class{#p;#St;constructor(){this.#p=[],this.#St=0}get data(){return(0,n.concat)(this.#p)}get length(){return this.#St}#_t(e){return this.#p.push(e),this.#St+=e.length,e.length}appendWriter(e){return this.#_t((0,n.getBytesCopy)(e.data))}writeBytes(e){let r=(0,n.getBytesCopy)(e);const o=r.length%t.WordSize;return o&&(r=(0,n.getBytesCopy)((0,n.concat)([r,i.slice(o)]))),this.#_t(r)}writeValue(e){return this.#_t(h(e))}writeUpdatableValue(){const e=this.#p.length;return this.#p.push(i),this.#St+=t.WordSize,t=>{this.#p[e]=h(t)}}};class p{allowLoose;#p;#r;#kt;#Tt;#xt;constructor(e,t,r){(0,n.defineProperties)(this,{allowLoose:!!t}),this.#p=(0,n.getBytesCopy)(e),this.#kt=0,this.#Tt=null,this.#xt=null!=r?r:1024,this.#r=0}get data(){return(0,n.hexlify)(this.#p)}get dataLength(){return this.#p.length}get consumed(){return this.#r}get bytes(){return new Uint8Array(this.#p)}#Rt(e){if(this.#Tt)return this.#Tt.#Rt(e);this.#kt+=e,(0,n.assert)(this.#xt<1||this.#kt<=this.#xt*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#xt} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#p),offset:this.#r,length:e,info:{bytesRead:this.#kt,dataLength:this.dataLength}})}#It(e,r,i){let o=Math.ceil(r/t.WordSize)*t.WordSize;return this.#r+o>this.#p.length&&(this.allowLoose&&i&&this.#r+r<=this.#p.length?o=r:(0,n.assert)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#p),length:this.#p.length,offset:this.#r+o})),this.#p.slice(this.#r,this.#r+o)}subReader(e){const t=new p(this.#p.slice(this.#r+e),this.allowLoose,this.#xt);return t.#Tt=this,t}readBytes(e,t){let r=this.#It(0,e,!!t);return this.#Rt(e),this.#r+=r.length,r.slice(0,e)}readValue(){return(0,n.toBigInt)(this.readBytes(t.WordSize))}readIndex(){return(0,n.toNumber)(this.readBytes(t.WordSize))}}t.Reader=p},8877:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(5212),i=r(9724),o=r(7214);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,c=!1,u=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}c&&r.complete()},l=function(){a=null,c&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,u,l))}),(function(){c=!0,(!n||!a||a.closed)&&r.complete()})))}))}},8907:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainstackProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371);function a(e){switch(e){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}(0,n.assertArgument)(!1,"unsupported network","network",e)}class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a(r.name)),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.apiKey===a(this._network.name)}static getRequest(e,t){null==t&&(t=a(e.name));const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a(e.name)&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("ChainstackProvider"),!0)),r}}t.ChainstackProvider=c},8941:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;const n=r(7557),i=r(9615),o=r(9175);function s(e,t,r,s){(0,n.hash)(e);const a=(0,o.checkOpts)({dkLen:32,asyncTick:10},s),{c:c,dkLen:u,asyncTick:l}=a;if((0,n.number)(c),(0,n.number)(u),(0,n.number)(l),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const f=(0,o.toBytes)(t),d=(0,o.toBytes)(r),h=new Uint8Array(u),p=i.hmac.create(e,f),g=p._cloneInto().update(d);return{c:c,dkLen:u,asyncTick:l,DK:h,PRF:p,PRFSalt:g}}function a(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}t.pbkdf2=function(e,t,r,n){const{c:i,dkLen:c,DK:u,PRF:l,PRFSalt:f}=s(e,t,r,n);let d;const h=new Uint8Array(4),p=(0,o.createView)(h),g=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const r=u.subarray(t,t+l.outputLen);p.setInt32(0,e,!1),(d=f._cloneInto(d)).update(h).digestInto(g),r.set(g.subarray(0,r.length));for(let e=1;e<i;e++){l._cloneInto(d).update(g).digestInto(g);for(let e=0;e<r.length;e++)r[e]^=g[e]}}return a(l,f,u,d,g)},t.pbkdf2Async=async function(e,t,r,n){const{c:i,dkLen:c,asyncTick:u,DK:l,PRF:f,PRFSalt:d}=s(e,t,r,n);let h;const p=new Uint8Array(4),g=(0,o.createView)(p),y=new Uint8Array(f.outputLen);for(let e=1,t=0;t<c;e++,t+=f.outputLen){const r=l.subarray(t,t+f.outputLen);g.setInt32(0,e,!1),(h=d._cloneInto(h)).update(p).digestInto(y),r.set(y.subarray(0,r.length)),await(0,o.asyncLoop)(i-1,u,(()=>{f._cloneInto(h).update(y).digestInto(y);for(let e=0;e<r.length;e++)r[e]^=y[e]}))}return a(f,d,l,h,y)}},8964:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=void 0;const n=r(7155);let i=!1;const o=function(e){return new Uint8Array((0,n.randomBytes)(e))};let s=o;function a(e){return s(e)}t.randomBytes=a,a._=o,a.lock=function(){i=!0},a.register=function(e){if(i)throw new Error("randomBytes is locked");s=e},Object.freeze(a)},8996:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=r(6808),o=r(9879),s=r(5212),a=r(9724),c=r(7214),u=r(5717),l=r(4830);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],d=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(c.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,h=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void d(e)}s.next(r.asObservable()),h.add(n.subscribe(c.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),h.unsubscribe()}),u.noop,d)))}),u.noop)),r.subscribe(c.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),d,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},9011:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wordlist=void 0;const n=r(5347);t.Wordlist=class{locale;constructor(e){(0,n.defineProperties)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}},9035:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(5212),i=r(8183);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},9054:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(9546),i=r(6404),o=r(5212);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},9095:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;const n=r(5347),i=r(9976),o=r(8869);class s extends o.Coder{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),(0,n.defineProperties)(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.getBytesCopy)(i.Typed.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return(0,n.hexlify)(e.readBytes(this.size))}}t.FixedBytesCoder=s},9148:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),s=0;s<r.length;s++)"default"!==r[s]&&i(t,e,r[s]);return o(t,e),t}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunCore=t.modules=void 0,t.initShogunBrowser=d;const c=r(8156);Object.defineProperty(t,"ShogunCore",{enumerable:!0,get:function(){return c.ShogunCore}});const u={webauthn:{webauthn:()=>Promise.resolve().then((()=>s(r(7510))))},web3:{web3Connector:()=>Promise.resolve().then((()=>s(r(8098))))},nostr:{nostrConnector:()=>Promise.resolve().then((()=>s(r(8050))))}};let l=null,f=null;function d(e){const t={...e};return l=new c.ShogunCore(t),f=l?.gun,"undefined"!=typeof window&&(window.shogun=l,window.shogunGun=f),l}t.modules={webauthn:{loadWebAuthn:u.webauthn.webauthn},web3:{loadMetaMask:u.web3.web3Connector},nostr:{loadNostrConnector:u.nostr.nostrConnector}},a(r(74),t),"undefined"!=typeof window&&(window.initShogunBrowser=d)},9175:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(5145),i=e=>e instanceof Uint8Array;if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=s(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=s,t.toBytes=a,t.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t},t.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},9197:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=void 0,t.N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t.WeiPerEther=BigInt("1000000000000000000"),t.MaxUint256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MinInt256=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),t.MaxInt256=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},9224:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(5212),i=r(7214);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},9229:function(e,t,r){e.exports=r(4827)},9244:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(7933);t.combineAll=n.combineLatestAll},9245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(1983),i=r(2036);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},9287:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=r(5212),o=r(7214),s=r(4830);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],c=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,u,l,f,d=null;c++%t===0&&a.push([]);try{for(var h=n(a),p=h.next();!p.done;p=h.next())(b=p.value).push(r),e<=b.length&&(d=null!=d?d:[]).push(b)}catch(e){o={error:e}}finally{try{p&&!p.done&&(u=h.return)&&u.call(h)}finally{if(o)throw o.error}}if(d)try{for(var g=n(d),y=g.next();!y.done;y=g.next()){var b=y.value;s.arrRemove(a,b),i.next(b)}}catch(e){l={error:e}}finally{try{y&&!y.done&&(f=g.return)&&f.call(g)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},9288:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndecodedEventLog=t.EventLog=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractUnknownEventPayload=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=void 0;var n=r(1008);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return n.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return n.Contract}});var i=r(406);Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return i.ContractFactory}});var o=r(6526);Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return o.ContractEventPayload}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return o.ContractUnknownEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return o.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return o.ContractTransactionResponse}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return o.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return o.UndecodedEventLog}})},9328:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9619);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},9330:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(5212),s=r(8087),a=r(6404),c=r(7058);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e),u=a.popNumber(e,1/0);return o.operate((function(t,o){s.mergeAll(u)(c.from(i([t],n(e)),r)).subscribe(o)}))}},9349:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockscoutProvider=void 0;const n=r(5347),i=r(5317),o=r(2371);class s extends o.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=i.Network.from(e);null==t&&(t=null),super(s.getRequest(r),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new s(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return null===this.apiKey}getRpcRequest(e){const t=super.getRpcRequest(e);return t&&"eth_estimateGas"===t.method&&1==t.args.length&&(t.args=t.args.slice(),t.args.push("latest")),t}getRpcError(e,t){const r=t?t.error:null;if(r&&-32015===r.code&&!(0,n.isHexString)(r.data||"",!0)){const e={"assert(false)":"01","arithmetic underflow or overflow":"11","division or modulo by zero":"12","out-of-bounds array access; popping on an empty array":"31","out-of-bounds access of an array or bytesN":"32"};let t="";"VM execution error."===r.message?t=e[r.data]||"":e[r.message||""]&&(t=e[r.message||""]),t&&(r.message+=` (reverted: ${r.data})`,r.data="0x4e487b7100000000000000000000000000000000000000000000000000000000000000"+t)}else r&&-32e3===r.code&&"wrong transaction nonce"===r.message&&(r.message+=" (nonce too low)");return super.getRpcError(e,t)}static getRequest(e){const t=new n.FetchRequest(function(e){switch(e){case"mainnet":return"https://eth.blockscout.com/api/eth-rpc";case"sepolia":return"https://eth-sepolia.blockscout.com/api/eth-rpc";case"holesky":return"https://eth-holesky.blockscout.com/api/eth-rpc";case"classic":return"https://etc.blockscout.com/api/eth-rpc";case"arbitrum":return"https://arbitrum.blockscout.com/api/eth-rpc";case"base":return"https://base.blockscout.com/api/eth-rpc";case"base-sepolia":return"https://base-sepolia.blockscout.com/api/eth-rpc";case"matic":return"https://polygon.blockscout.com/api/eth-rpc";case"optimism":return"https://optimism.blockscout.com/api/eth-rpc";case"optimism-sepolia":return"https://optimism-sepolia.blockscout.com/api/eth-rpc";case"xdai":return"https://gnosis.blockscout.com/api/eth-rpc"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name));return t.allowGzip=!0,t}}t.BlockscoutProvider=s},9364:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.onErrorResumeNextWith=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=void 0;var o=r(8051);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(4359);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2884);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var c=r(1875);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return c.animationFrames}});var u=r(6808);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return u.Subject}});var l=r(7314);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(381);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var d=r(5130);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return d.AsyncSubject}});var h=r(2105);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return h.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return h.asapScheduler}});var p=r(2326);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var g=r(9245);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return g.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return g.queueScheduler}});var y=r(5887);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return y.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return y.animationFrameScheduler}});var b=r(875);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return b.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return b.VirtualAction}});var m=r(5881);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return m.Scheduler}});var v=r(9879);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return v.Subscription}});var w=r(2708);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return w.Subscriber}});var A=r(1245);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return A.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return A.NotificationKind}});var E=r(1898);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return E.pipe}});var P=r(5717);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return P.noop}});var O=r(7699);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return O.identity}});var S=r(2560);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return S.isObservable}});var _=r(5761);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return _.lastValueFrom}});var k=r(841);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return k.firstValueFrom}});var T=r(7024);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return T.ArgumentOutOfRangeError}});var x=r(9328);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var R=r(3506);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return R.NotFoundError}});var I=r(839);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return I.ObjectUnsubscribedError}});var C=r(4708);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return C.SequenceError}});var N=r(1713);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return N.TimeoutError}});var j=r(9517);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return j.UnsubscriptionError}});var B=r(9750);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return B.bindCallback}});var M=r(1946);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return M.bindNodeCallback}});var F=r(8246);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return F.combineLatest}});var L=r(9546);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return L.concat}});var U=r(8590);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return U.connectable}});var D=r(5884);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return D.defer}});var G=r(4885);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return G.empty}});var H=r(5266);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return H.forkJoin}});var z=r(7058);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return z.from}});var W=r(8616);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return W.fromEvent}});var V=r(6920);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return V.fromEventPattern}});var K=r(7281);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return K.generate}});var $=r(9380);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return $.iif}});var q=r(2275);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return q.interval}});var J=r(5936);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Q=r(1934);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return Q.never}});var Y=r(1587);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return Y.of}});var Z=r(1903);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(8269);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(7406);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(9795);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(4385);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(6680);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5825);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(5904);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(1415);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(131);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ce=r(4885);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ce.EMPTY}});var ue=r(1934);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ue.NEVER}}),i(r(6153),t);var le=r(3728);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(8877);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var de=r(1608);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return de.auditTime}});var he=r(706);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return he.buffer}});var pe=r(9287);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return pe.bufferCount}});var ge=r(1719);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ge.bufferTime}});var ye=r(1778);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ye.bufferToggle}});var be=r(6606);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return be.bufferWhen}});var me=r(2719);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return me.catchError}});var ve=r(9244);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ve.combineAll}});var we=r(7933);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return we.combineLatestAll}});var Ae=r(2044);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return Ae.combineLatestWith}});var Ee=r(201);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Ee.concatAll}});var Pe=r(9512);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Pe.concatMap}});var Oe=r(9913);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Oe.concatMapTo}});var Se=r(8032);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Se.concatWith}});var _e=r(7812);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _e.connect}});var ke=r(8589);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return ke.count}});var Te=r(3143);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Te.debounce}});var xe=r(1762);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Re=r(8799);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Re.defaultIfEmpty}});var Ie=r(5797);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ie.delay}});var Ce=r(2885);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Ce.delayWhen}});var Ne=r(9818);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ne.dematerialize}});var je=r(7876);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return je.distinct}});var Be=r(9663);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Be.distinctUntilChanged}});var Me=r(6035);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Me.distinctUntilKeyChanged}});var Fe=r(1279);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Fe.elementAt}});var Le=r(6791);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Le.endWith}});var Ue=r(1361);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Ue.every}});var De=r(1464);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return De.exhaust}});var Ge=r(7977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Ge.exhaustAll}});var He=r(6632);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return He.exhaustMap}});var ze=r(5544);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return ze.expand}});var We=r(5934);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return We.filter}});var Ve=r(7802);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Ve.finalize}});var Ke=r(8183);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ke.find}});var $e=r(9035);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return $e.findIndex}});var qe=r(9980);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return qe.first}});var Je=r(5128);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Je.groupBy}});var Qe=r(2959);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Qe.ignoreElements}});var Ye=r(9915);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Ye.isEmpty}});var Ze=r(2568);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(6872);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(3337);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(5019);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(96);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(8087);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(4613);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(7478);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(6075);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(6707);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ct=r(9694);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ct.mergeWith}});var ut=r(142);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ut.min}});var lt=r(8464);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(2071);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var dt=r(5513);Object.defineProperty(t,"onErrorResumeNextWith",{enumerable:!0,get:function(){return dt.onErrorResumeNextWith}});var ht=r(6744);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ht.pairwise}});var pt=r(6355);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pt.pluck}});var gt=r(3197);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return gt.publish}});var yt=r(2955);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var bt=r(6569);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return bt.publishLast}});var mt=r(8710);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var vt=r(6677);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return vt.raceWith}});var wt=r(2070);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return wt.reduce}});var At=r(6131);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return At.repeat}});var Et=r(2139);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return Et.repeatWhen}});var Pt=r(3352);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Pt.retry}});var Ot=r(3956);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Ot.retryWhen}});var St=r(9224);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return St.refCount}});var _t=r(3434);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return _t.sample}});var kt=r(4143);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return kt.sampleTime}});var Tt=r(5565);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Tt.scan}});var xt=r(3929);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return xt.sequenceEqual}});var Rt=r(3405);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Rt.share}});var It=r(7782);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return It.shareReplay}});var Ct=r(5440);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Ct.single}});var Nt=r(3079);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Nt.skip}});var jt=r(2359);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return jt.skipLast}});var Bt=r(7783);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Bt.skipUntil}});var Mt=r(5774);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Mt.skipWhile}});var Ft=r(9054);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ft.startWith}});var Lt=r(5455);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Lt.subscribeOn}});var Ut=r(6201);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ut.switchAll}});var Dt=r(680);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Dt.switchMap}});var Gt=r(761);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Gt.switchMapTo}});var Ht=r(8461);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Ht.switchScan}});var zt=r(4383);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return zt.take}});var Wt=r(5279);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Wt.takeLast}});var Vt=r(6911);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Vt.takeUntil}});var Kt=r(598);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Kt.takeWhile}});var $t=r(7400);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return $t.tap}});var qt=r(4880);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return qt.throttle}});var Jt=r(7245);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Jt.throttleTime}});var Qt=r(632);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Qt.throwIfEmpty}});var Yt=r(2508);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Yt.timeInterval}});var Zt=r(1713);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Zt.timeout}});var Xt=r(597);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Xt.timeoutWith}});var er=r(3866);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return er.timestamp}});var tr=r(3484);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return tr.toArray}});var rr=r(8072);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return rr.window}});var nr=r(2893);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return nr.windowCount}});var ir=r(37);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return ir.windowTime}});var or=r(8996);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return or.windowToggle}});var sr=r(5156);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return sr.windowWhen}});var ar=r(6975);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ar.withLatestFrom}});var cr=r(5362);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return cr.zipAll}});var ur=r(6977);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},9380:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5884);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9412:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=void 0;const n=r(7415),i=r(1500),o=r(6508),s=r(8166),a=BigInt(-1),c=BigInt(0),u=BigInt(1),l=BigInt(5),f={};let d="0000";for(;d.length<80;)d+=d;function h(e){let t=d;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function p(e,t,r){const n=BigInt(t.width);if(t.signed){const t=u<<n-u;(0,i.assert)(null==r||e>=-t&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=e>c?(0,o.fromTwos)((0,o.mask)(e,n),n):-(0,o.fromTwos)((0,o.mask)(-e,n),n)}else{const t=u<<n;(0,i.assert)(null==r||e>=0&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=(e%t+t)%t&t-u}return e}function g(e){"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const o=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);(0,i.assertArgument)(o,"invalid fixed format","format",e),t="u"!==o[1],r=parseInt(o[2]),n=parseInt(o[3])}else if(e){const o=e,s=(e,t,r)=>null==o[e]?r:((0,i.assertArgument)(typeof o[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,o[e]),o[e]);t=s("signed","boolean",t),r=s("width","number",r),n=s("decimals","number",n)}return(0,i.assertArgument)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,i.assertArgument)(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n),{signed:t,width:r,decimals:n,name:(t?"":"u")+"fixed"+String(r)+"x"+String(n)}}class y{format;#Ct;#Nt;#jt;_value;constructor(e,t,r){(0,i.assertPrivate)(e,f,"FixedNumber"),this.#Nt=t,this.#Ct=r;const n=function(e,t){let r="";e<c&&(r="-",e*=a);let n=e.toString();if(0===t)return r+n;for(;n.length<=t;)n=d+n;const i=n.length-t;for(n=n.substring(0,i)+"."+n.substring(i);"0"===n[0]&&"."!==n[1];)n=n.substring(1);for(;"0"===n[n.length-1]&&"."!==n[n.length-2];)n=n.substring(0,n.length-1);return r+n}(t,r.decimals);(0,s.defineProperties)(this,{format:r.name,_value:n}),this.#jt=h(r.decimals)}get signed(){return this.#Ct.signed}get width(){return this.#Ct.width}get decimals(){return this.#Ct.decimals}get value(){return this.#Nt}#Bt(e){(0,i.assertArgument)(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#Mt(e,t){return e=p(e,this.#Ct,t),new y(f,e,this.#Ct)}#Ft(e,t){return this.#Bt(e),this.#Mt(this.#Nt+e.#Nt,t)}addUnsafe(e){return this.#Ft(e)}add(e){return this.#Ft(e,"add")}#Lt(e,t){return this.#Bt(e),this.#Mt(this.#Nt-e.#Nt,t)}subUnsafe(e){return this.#Lt(e)}sub(e){return this.#Lt(e,"sub")}#Ut(e,t){return this.#Bt(e),this.#Mt(this.#Nt*e.#Nt/this.#jt,t)}mulUnsafe(e){return this.#Ut(e)}mul(e){return this.#Ut(e,"mul")}mulSignal(e){this.#Bt(e);const t=this.#Nt*e.#Nt;return(0,i.assert)(t%this.#jt===c,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#Mt(t/this.#jt,"mulSignal")}#Dt(e,t){return(0,i.assert)(e.#Nt!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#Bt(e),this.#Mt(this.#Nt*this.#jt/e.#Nt,t)}divUnsafe(e){return this.#Dt(e)}div(e){return this.#Dt(e,"div")}divSignal(e){(0,i.assert)(e.#Nt!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#Bt(e);const t=this.#Nt*this.#jt;return(0,i.assert)(t%e.#Nt===c,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#Mt(t/e.#Nt,"divSignal")}cmp(e){let t=this.value,r=e.value;const n=this.decimals-e.decimals;return n>0?r*=h(n):n<0&&(t*=h(-n)),t<r?-1:t>r?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#Nt;return this.#Nt<c&&(e-=this.#jt-u),e=this.#Nt/this.#jt*this.#jt,this.#Mt(e,"floor")}ceiling(){let e=this.#Nt;return this.#Nt>c&&(e+=this.#jt-u),e=this.#Nt/this.#jt*this.#jt,this.#Mt(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,r=l*h(t-1);let n=this.value+r;const i=h(t);return n=n/i*i,p(n,this.#Ct,"round"),new y(f,n,this.#Ct)}isZero(){return this.#Nt===c}isNegative(){return this.#Nt<c}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return y.fromString(this.toString(),e)}static fromValue(e,t,r){const n=null==t?0:(0,o.getNumber)(t),s=g(r);let a=(0,o.getBigInt)(e,"value");const u=n-s.decimals;if(u>0){const t=h(u);(0,i.assert)(a%t===c,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),a/=t}else u<0&&(a*=h(-u));return p(a,s,"fromValue"),new y(f,a,s)}static fromString(e,t){const r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,i.assertArgument)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);const n=g(t);let o=r[2]||"0",s=r[3]||"";for(;s.length<n.decimals;)s+=d;(0,i.assert)(s.substring(n.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),s=s.substring(0,n.decimals);const a=BigInt(r[1]+o+s);return p(a,n,"fromString"),new y(f,a,n)}static fromBytes(e,t){let r=(0,o.toBigInt)((0,n.getBytes)(e,"value"));const i=g(t);return i.signed&&(r=(0,o.fromTwos)(r,i.width)),p(r,i,"fromBytes"),new y(f,r,i)}}t.FixedNumber=y},9414:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBytes32String=t.encodeBytes32String=void 0;const n=r(5347);t.encodeBytes32String=function(e){const t=(0,n.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,n.zeroPadBytes)(t,32)},t.decodeBytes32String=function(e){const t=(0,n.getBytes)(e,"bytes");if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,n.toUtf8String)(t.slice(0,r))}},9512:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(7478),i=r(281);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},9516:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(4120),i=r(5934);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},9517:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9619);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},9533:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(5881),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},9546:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(201),i=r(6404),o=r(7058);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},9596:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonceManager=void 0;const n=r(5347),i=r(3071);class o extends i.AbstractSigner{signer;#Gt;#Ht;constructor(e){super(e.provider),(0,n.defineProperties)(this,{signer:e}),this.#Gt=null,this.#Ht=0}async getAddress(){return this.signer.getAddress()}connect(e){return new o(this.signer.connect(e))}async getNonce(e){if("pending"===e){null==this.#Gt&&(this.#Gt=super.getNonce("pending"));const e=this.#Ht;return await this.#Gt+e}return super.getNonce(e)}increment(){this.#Ht++}reset(){this.#Ht=0,this.#Gt=null}async sendTransaction(e){const t=this.getNonce("pending");return this.increment(),(e=await this.signer.populateTransaction(e)).nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,r){return this.signer.signTypedData(e,t,r)}}t.NonceManager=o},9610:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBits=void 0,t.decodeBits=function(e,t){const r=(1<<e)-1,n=[];let i=0,o=0,s=0;for(let a=0;a<t.length;a++)for(i=i<<6|")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(t[a]),o+=6;o>=e;){const t=i>>o-e;i&=(1<<o-e)-1,o-=e,0===t?s+=r:(n.push(t+s),s=0)}return n}},9615:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7557),i=r(9175);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},9619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},9663:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(7699),i=r(5212),o=r(7214);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},9694:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(9330);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},9724:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var a=r(4975),c=r(7552),u=r(8051),l=r(629),f=r(8263),d=r(6297),h=r(2187),p=r(5462),g=r(281),y=r(2980),b=r(2884);function m(e){return new u.Observable((function(t){var r=e[b.observable]();if(g.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function v(e){return new u.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function w(e){return new u.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,y.reportUnhandledError)}))}function A(e){return new u.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function E(e){return new u.Observable((function(t){(function(e,t){var r,s,a,c;return n(this,void 0,void 0,(function(){var n,u;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=i.sent(),a={error:u},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(c=r.return)?[4,c.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function P(e){return E(p.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof u.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return m(e);if(a.isArrayLike(e))return v(e);if(c.isPromise(e))return w(e);if(f.isAsyncIterable(e))return E(e);if(h.isIterable(e))return A(e);if(p.isReadableStreamLike(e))return P(e)}throw d.createInvalidObservableTypeError(e)},t.fromInteropObservable=m,t.fromArrayLike=v,t.fromPromise=w,t.fromIterable=A,t.fromAsyncIterable=E,t.fromReadableStreamLike=P},9750:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(7474);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},9795:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(8051),i=r(9724),o=r(7652),s=r(7214);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},9818:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(1245),i=r(5212),o=r(7214);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},9879:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(281),a=r(9517),c=r(4830),u=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,c,u;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var d=n(f),h=d.next();!h.done;h=d.next())h.value.remove(this)}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}else f.remove(this);var p=this.initialTeardown;if(s.isFunction(p))try{p()}catch(e){u=e instanceof a.UnsubscriptionError?e.errors:[e]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var y=n(g),b=y.next();!b.done;b=y.next()){var m=b.value;try{l(m)}catch(e){u=null!=u?u:[],e instanceof a.UnsubscriptionError?u=o(o([],i(u)),i(e.errors)):u.push(e)}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(c=y.return)&&c.call(y)}finally{if(r)throw r.error}}}if(u)throw new a.UnsubscriptionError(u)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&c.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&c.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.isFunction(e)?e():e.unsubscribe()}t.Subscription=u,t.EMPTY_SUBSCRIPTION=u.EMPTY,t.isSubscription=function(e){return e instanceof u||e&&"closed"in e&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},9902:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackProvider=void 0;const n=r(5347),i=r(8672),o=r(5317),s=BigInt("1"),a=BigInt("2");function c(){return(new Date).getTime()}function u(e){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?{type:"bigint",value:t.toString()}:t))}const l={stallTimeout:400,priority:1,weight:1},f={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};function d(e){if(null==e)return"null";if(Array.isArray(e))return"["+e.map(d).join(",")+"]";if("object"==typeof e&&"function"==typeof e.toJSON)return d(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":case"number":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{"+t.map((t=>`${JSON.stringify(t)}:${d(e[t])}`)).join(",")+"}"}}throw console.log("Could not serialize",e),new Error("Hmm...")}function h(e,t){if("error"in t){const e=t.error;let r;return r=(0,n.isError)(e,"CALL_EXCEPTION")?d(Object.assign({},e,{shortMessage:void 0,reason:void 0,info:void 0})):d(e),{tag:r,value:e}}const r=t.result;return{tag:d(r),value:r}}function p(e,t){const r=new Map;for(const{value:e,tag:n,weight:i}of t){const t=r.get(n)||{value:e,weight:0};t.weight+=i,r.set(n,t)}let n=null;for(const t of r.values())t.weight>=e&&(!n||t.weight>n.weight)&&(n=t);if(n)return n.value}function g(e,t){let r=0;const n=new Map;let i=null;const o=[];for(const{value:e,tag:s,weight:a}of t)if(e instanceof Error){const t=n.get(s)||{value:e,weight:0};t.weight+=a,n.set(s,t),(null==i||t.weight>i.weight)&&(i=t)}else o.push(BigInt(e)),r+=a;if(r<e)return i&&i.weight>=e?i.value:void 0;o.sort(((e,t)=>e<t?-1:t>e?1:0));const c=Math.floor(o.length/2);return o.length%2?o[c]:(o[c-1]+o[c]+s)/a}function y(e,t){const r=p(e,t);if(void 0!==r)return r;for(const e of t)if(e.value)return e.value}class b extends i.AbstractProvider{quorum;eventQuorum;eventWorkers;#zt;#Wt;#Vt;constructor(e,t,r){super(t,r),this.#zt=e.map((e=>e instanceof i.AbstractProvider?Object.assign({provider:e},l,f):Object.assign({},l,e,f))),this.#Wt=-2,this.#Vt=null,r&&null!=r.quorum?this.quorum=r.quorum:this.quorum=Math.ceil(this.#zt.reduce(((e,t)=>e+t.weight),0)/2),this.eventQuorum=1,this.eventWorkers=1,(0,n.assertArgument)(this.quorum<=this.#zt.reduce(((e,t)=>e+t.weight),0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return this.#zt.map((e=>{const t=Object.assign({},e);for(const e in t)"_"===e[0]&&delete t[e];return t}))}async _detectNetwork(){return o.Network.from((0,n.getBigInt)(await this._perform({method:"chainId"})))}async _translatePerform(e,t){switch(t.method){case"broadcastTransaction":return await e.broadcastTransaction(t.signedTransaction);case"call":return await e.call(Object.assign({},t.transaction,{blockTag:t.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(t.transaction);case"getBalance":return await e.getBalance(t.address,t.blockTag);case"getBlock":{const r="blockHash"in t?t.blockHash:t.blockTag;return await e.getBlock(r,t.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(t.address,t.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(t.filter);case"getStorage":return await e.getStorage(t.address,t.position,t.blockTag);case"getTransaction":return await e.getTransaction(t.hash);case"getTransactionCount":return await e.getTransactionCount(t.address,t.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(t.hash);case"getTransactionResult":return await e.getTransactionResult(t.hash)}}#Kt(e){const t=Array.from(e).map((e=>e.config)),r=this.#zt.slice();!function(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}}(r),r.sort(((e,t)=>e.priority-t.priority));for(const e of r)if(!e._lastFatalError&&-1===t.indexOf(e))return e;return null}#$t(e,t){const r=this.#Kt(e);if(null==r)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},i=c();return n.perform=(async()=>{try{r.requests++;const e=await this._translatePerform(r.provider,t);n.result={result:e}}catch(e){r.errorResponses++,n.result={error:e}}const e=c()-i;r._totalTime+=e,r.rollingDuration=.95*r.rollingDuration+.05*e,n.perform=null})(),n.staller=(async()=>{var e;await(e=r.stallTimeout,new Promise((t=>{setTimeout(t,e)}))),n.staller=null})(),e.add(n),n}async#qt(){let e=this.#Vt;if(!e){const t=[];this.#zt.forEach((e=>{t.push((async()=>{await async function(e){for(;(e.blockNumber<0||e.blockNumber<0)&&(e._updateNumber||(e._updateNumber=(async()=>{try{const t=await e.provider.getBlockNumber();t>e.blockNumber&&(e.blockNumber=t)}catch(t){e.blockNumber=-2,e._lastFatalError=t,e._lastFatalErrorTimestamp=c()}e._updateNumber=null})()),await e._updateNumber,e.outOfSync++,!e._lastFatalError););}(e),e._lastFatalError||(e._network=await e.provider.getNetwork())})())})),this.#Vt=e=(async()=>{await Promise.all(t);let e=null;for(const t of this.#zt){if(t._lastFatalError)continue;const r=t._network;null==e?e=r.chainId:r.chainId!==e&&(0,n.assert)(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})()}await e}async#Jt(e,t){const r=[];for(const n of e)if(null!=n.result){const{tag:e,value:i}=h(t.method,n.result);r.push({tag:e,value:i,weight:n.config.weight})}if(!(r.reduce(((e,t)=>e+t.weight),0)<this.quorum)){switch(t.method){case"getBlockNumber":{-2===this.#Wt&&(this.#Wt=Math.ceil((0,n.getNumber)(g(this.quorum,this.#zt.filter((e=>!e._lastFatalError)).map((e=>({value:e.blockNumber,tag:(0,n.getNumber)(e.blockNumber).toString(),weight:e.weight})))))));const e=function(e,t){if(1===e)return(0,n.getNumber)(g(e,t),"%internal");const r=new Map,i=(e,t)=>{const n=r.get(e)||{result:e,weight:0};n.weight+=t,r.set(e,n)};for(const{weight:e,value:r}of t){const t=(0,n.getNumber)(r);i(t-1,e),i(t,e),i(t+1,e)}let o,s=0;for(const{weight:t,result:n}of r.values())t>=e&&(t>s||null!=o&&t===s&&n>o)&&(s=t,o=n);return o}(this.quorum,r);if(void 0===e)return;return e>this.#Wt&&(this.#Wt=e),this.#Wt}case"getGasPrice":case"getPriorityFee":case"estimateGas":return g(this.quorum,r);case"getBlock":return"blockTag"in t&&"pending"===t.blockTag?y(this.quorum,r):p(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return p(this.quorum,r);case"broadcastTransaction":return y(this.quorum,r)}(0,n.assert)(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${u(t.method)})`})}}async#Qt(e,t){if(0===e.size)throw new Error("no runners?!");const r=[];let i=0;for(const t of e)t.perform&&r.push(t.perform),t.staller?r.push(t.staller):t.didBump||(t.didBump=!0,i++);const o=await this.#Jt(e,t);if(void 0!==o){if(o instanceof Error)throw o;return o}for(let r=0;r<i;r++)this.#$t(e,t);return(0,n.assert)(r.length>0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:Array.from(e).map((e=>u(e.result)))}}),await Promise.race(r),await this.#Qt(e,t)}async _perform(e){if("broadcastTransaction"===e.method){const t=this.#zt.map((e=>null)),r=this.#zt.map((async({provider:r,weight:n},i)=>{try{const o=await r._perform(e);t[i]=Object.assign(h(e.method,{result:o}),{weight:n})}catch(r){t[i]=Object.assign(h(e.method,{error:r}),{weight:n})}}));for(;;){const e=t.filter((e=>null!=e));for(const{value:t}of e)if(!(t instanceof Error))return t;const i=p(this.quorum,t.filter((e=>null!=e)));if((0,n.isError)(i,"INSUFFICIENT_FUNDS"))throw i;const o=r.filter(((e,r)=>null==t[r]));if(0===o.length)break;await Promise.race(o)}const i=y(this.quorum,t);if((0,n.assert)(void 0!==i,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:t.map(u)}}),i instanceof Error)throw i;return i}await this.#qt();const t=new Set;let r=0;for(;;){const n=this.#$t(t,e);if(null==n)break;if(r+=n.config.weight,r>=this.quorum)break}const i=await this.#Qt(t,e);for(const e of t)e.perform&&null==e.result&&e.config.lateResponses++;return i}async destroy(){for(const{provider:e}of this.#zt)e.destroy();super.destroy()}}t.FallbackProvider=b},9913:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(9512),i=r(281);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},9915:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(5212),i=r(7214);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},9943:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LangEn=void 0;const n=r(2684);let i=null;class o extends n.WordlistOwl{constructor(){super("en","0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==i&&(i=new o),i}}t.LangEn=o},9973:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showThrottleMessage=void 0;const r=new Set;t.showThrottleMessage=function(e){r.has(e)||(r.add(e),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${e} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}},9976:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=void 0;const n=r(5347),i={};function o(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new c(i,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function s(e,t){return new c(i,`bytes${t||""}`,e,{size:t})}const a=Symbol.for("_ethers_typed");class c{type;value;#j;_typedSymbol;constructor(e,t,r,o){null==o&&(o=null),(0,n.assertPrivate)(i,e,"Typed"),(0,n.defineProperties)(this,{_typedSymbol:a,type:t,value:r}),this.#j=o,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.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"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#j}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#j?-1:!1===this.#j?this.value.length:null}static from(e,t){return new c(i,e,t)}static uint8(e){return o(e,8)}static uint16(e){return o(e,16)}static uint24(e){return o(e,24)}static uint32(e){return o(e,32)}static uint40(e){return o(e,40)}static uint48(e){return o(e,48)}static uint56(e){return o(e,56)}static uint64(e){return o(e,64)}static uint72(e){return o(e,72)}static uint80(e){return o(e,80)}static uint88(e){return o(e,88)}static uint96(e){return o(e,96)}static uint104(e){return o(e,104)}static uint112(e){return o(e,112)}static uint120(e){return o(e,120)}static uint128(e){return o(e,128)}static uint136(e){return o(e,136)}static uint144(e){return o(e,144)}static uint152(e){return o(e,152)}static uint160(e){return o(e,160)}static uint168(e){return o(e,168)}static uint176(e){return o(e,176)}static uint184(e){return o(e,184)}static uint192(e){return o(e,192)}static uint200(e){return o(e,200)}static uint208(e){return o(e,208)}static uint216(e){return o(e,216)}static uint224(e){return o(e,224)}static uint232(e){return o(e,232)}static uint240(e){return o(e,240)}static uint248(e){return o(e,248)}static uint256(e){return o(e,256)}static uint(e){return o(e,256)}static int8(e){return o(e,-8)}static int16(e){return o(e,-16)}static int24(e){return o(e,-24)}static int32(e){return o(e,-32)}static int40(e){return o(e,-40)}static int48(e){return o(e,-48)}static int56(e){return o(e,-56)}static int64(e){return o(e,-64)}static int72(e){return o(e,-72)}static int80(e){return o(e,-80)}static int88(e){return o(e,-88)}static int96(e){return o(e,-96)}static int104(e){return o(e,-104)}static int112(e){return o(e,-112)}static int120(e){return o(e,-120)}static int128(e){return o(e,-128)}static int136(e){return o(e,-136)}static int144(e){return o(e,-144)}static int152(e){return o(e,-152)}static int160(e){return o(e,-160)}static int168(e){return o(e,-168)}static int176(e){return o(e,-176)}static int184(e){return o(e,-184)}static int192(e){return o(e,-192)}static int200(e){return o(e,-200)}static int208(e){return o(e,-208)}static int216(e){return o(e,-216)}static int224(e){return o(e,-224)}static int232(e){return o(e,-232)}static int240(e){return o(e,-240)}static int248(e){return o(e,-248)}static int256(e){return o(e,-256)}static int(e){return o(e,-256)}static bytes1(e){return s(e,1)}static bytes2(e){return s(e,2)}static bytes3(e){return s(e,3)}static bytes4(e){return s(e,4)}static bytes5(e){return s(e,5)}static bytes6(e){return s(e,6)}static bytes7(e){return s(e,7)}static bytes8(e){return s(e,8)}static bytes9(e){return s(e,9)}static bytes10(e){return s(e,10)}static bytes11(e){return s(e,11)}static bytes12(e){return s(e,12)}static bytes13(e){return s(e,13)}static bytes14(e){return s(e,14)}static bytes15(e){return s(e,15)}static bytes16(e){return s(e,16)}static bytes17(e){return s(e,17)}static bytes18(e){return s(e,18)}static bytes19(e){return s(e,19)}static bytes20(e){return s(e,20)}static bytes21(e){return s(e,21)}static bytes22(e){return s(e,22)}static bytes23(e){return s(e,23)}static bytes24(e){return s(e,24)}static bytes25(e){return s(e,25)}static bytes26(e){return s(e,26)}static bytes27(e){return s(e,27)}static bytes28(e){return s(e,28)}static bytes29(e){return s(e,29)}static bytes30(e){return s(e,30)}static bytes31(e){return s(e,31)}static bytes32(e){return s(e,32)}static address(e){return new c(i,"address",e)}static bool(e){return new c(i,"bool",!!e)}static bytes(e){return new c(i,"bytes",e)}static string(e){return new c(i,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new c(i,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===a}static dereference(e,t){if(c.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}t.Typed=c},9980:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(9328),i=r(5934),o=r(4383),s=r(8799),a=r(632),c=r(7699);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?i.filter((function(t,r){return e(t,r,u)})):c.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},9990:function(e,t,r){"use strict";r.r(t),r.d(t,{__addDisposableResource:function(){return j},__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return O},__asyncValues:function(){return _},__await:function(){return P},__awaiter:function(){return p},__classPrivateFieldGet:function(){return I},__classPrivateFieldIn:function(){return N},__classPrivateFieldSet:function(){return C},__createBinding:function(){return y},__decorate:function(){return a},__disposeResources:function(){return M},__esDecorate:function(){return u},__exportStar:function(){return b},__extends:function(){return i},__generator:function(){return g},__importDefault:function(){return R},__importStar:function(){return x},__makeTemplateObject:function(){return k},__metadata:function(){return h},__param:function(){return c},__propKey:function(){return f},__read:function(){return v},__rest:function(){return s},__runInitializers:function(){return l},__setFunctionName:function(){return d},__spread:function(){return w},__spreadArray:function(){return E},__spreadArrays:function(){return A},__values:function(){return m}});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var y=(0,r[h])("accessor"===c?{get:f.get,set:f.set}:f[u],p);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=s(y.get))&&(f.get=a),(a=s(y.set))&&(f.set=a),(a=s(y.init))&&i.unshift(a)}else(a=s(y))&&("field"===c?i.unshift(a):f[u]=a)}l&&Object.defineProperty(l,n.name,f),d=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function g(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var y=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function b(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||y(t,e,r)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function A(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function E(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function P(e){return this instanceof P?(this.v=e,this):new P(e)}function O(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,u)}})),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=i[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,u):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return T(t,e),t}function R(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function j(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var B="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function M(e){function t(t){e.error=e.hasError?new B(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,(function(e){return t(e),i()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}t.default={__extends:i,__assign:o,__rest:s,__decorate:a,__param:c,__metadata:h,__awaiter:p,__generator:g,__createBinding:y,__exportStar:b,__values:m,__read:v,__spread:w,__spreadArrays:A,__spreadArray:E,__await:P,__asyncGenerator:O,__asyncDelegator:S,__asyncValues:_,__makeTemplateObject:k,__importStar:x,__importDefault:R,__classPrivateFieldGet:I,__classPrivateFieldSet:C,__classPrivateFieldIn:N,__addDisposableResource:j,__disposeResources:M}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var n=r(9148);return n.default}()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ShogunCore=t():e.ShogunCore=t()}(this,(function(){return function(){var e={22:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexedAccountPath=t.getAccountPath=t.HDNodeVoidWallet=t.HDNodeWallet=t.defaultPath=void 0;const n=r(2291),i=r(3996),o=r(7778),s=r(5347),a=r(9943),c=r(8394),u=r(5312),l=r(1650);t.defaultPath="m/44'/60'/0'/0/0";const f=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),d=2147483648,h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function p(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function g(e){const t=(0,s.getBytes)(e),r=(0,s.dataSlice)((0,n.sha256)((0,n.sha256)(t)),0,4),i=(0,s.concat)([t,r]);return(0,s.encodeBase58)(i)}const y={};function b(e,t,r,i){const o=new Uint8Array(37);e&d?((0,s.assert)(null!=i,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),o.set((0,s.getBytes)(i),1)):o.set((0,s.getBytes)(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const a=(0,s.getBytes)((0,n.computeHmac)("sha512",t,o));return{IL:a.slice(0,32),IR:a.slice(32)}}function m(e,t){const r=t.split("/");(0,s.assertArgument)(r.length>0,"invalid path","path",t),"m"===r[0]&&((0,s.assertArgument)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e<r.length;e++){const t=r[e];if(t.match(/^[0-9]+'$/)){const r=parseInt(t.substring(0,t.length-1));(0,s.assertArgument)(r<d,"invalid path index",`path[${e}]`,t),n=n.deriveChild(d+r)}else if(t.match(/^[0-9]+$/)){const r=parseInt(t);(0,s.assertArgument)(r<d,"invalid path index",`path[${e}]`,t),n=n.deriveChild(r)}else(0,s.assertArgument)(!1,"invalid path component",`path[${e}]`,t)}return n}class v extends c.BaseWallet{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,r,i,o,a,c,u,l){super(t,l),(0,s.assertPrivate)(e,y,"HDNodeWallet"),(0,s.defineProperties)(this,{publicKey:t.compressedPublicKey});const f=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(this.publicKey)),0,4);(0,s.defineProperties)(this,{parentFingerprint:r,fingerprint:f,chainCode:i,path:o,index:a,depth:c}),(0,s.defineProperties)(this,{mnemonic:u})}connect(e){return new v(y,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e)}#e(){const e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&"en"===t.wordlist.locale&&""===t.password&&(e.mnemonic={path:this.path,locale:"en",entropy:t.entropy}),e}async encrypt(e,t){return await(0,l.encryptKeystoreJson)(this.#e(),e,{progressCallback:t})}encryptSync(e){return(0,l.encryptKeystoreJsonSync)(this.#e(),e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),g((0,s.concat)(["0x0488ADE4",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,(0,s.concat)(["0x00",this.privateKey])]))}hasPath(){return null!=this.path}neuter(){return new w(y,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(e){const t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&d&&(r+="'"));const{IR:i,IL:o}=b(t,this.chainCode,this.publicKey,this.privateKey),a=new n.SigningKey((0,s.toBeHex)(((0,s.toBigInt)(o)+BigInt(this.privateKey))%h,32));return new v(y,a,this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return m(this,e)}static#t(e,t){(0,s.assertArgument)((0,s.isBytesLike)(e),"invalid seed","seed","[REDACTED]");const r=(0,s.getBytes)(e,"seed");(0,s.assertArgument)(r.length>=16&&r.length<=64,"invalid seed","seed","[REDACTED]");const i=(0,s.getBytes)((0,n.computeHmac)("sha512",f,r)),o=new n.SigningKey((0,s.hexlify)(i.slice(0,32)));return new v(y,o,"0x00000000",(0,s.hexlify)(i.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){const t=(0,s.toBeArray)((0,s.decodeBase58)(e));(0,s.assertArgument)(82===t.length||g(t.slice(0,78))===e,"invalid extended key","extendedKey","[ REDACTED ]");const r=t[4],i=(0,s.hexlify)(t.slice(5,9)),a=parseInt((0,s.hexlify)(t.slice(9,13)).substring(2),16),c=(0,s.hexlify)(t.slice(13,45)),u=t.slice(45,78);switch((0,s.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const e=(0,s.hexlify)(u);return new w(y,(0,o.computeAddress)(e),e,i,c,null,a,r,null)}case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new v(y,new n.SigningKey(u.slice(1)),i,c,null,a,r,null,null)}(0,s.assertArgument)(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(e,r,i){null==e&&(e=""),null==r&&(r=t.defaultPath),null==i&&(i=a.LangEn.wordlist());const o=u.Mnemonic.fromEntropy((0,n.randomBytes)(16),e,i);return v.#t(o.computeSeed(),o).derivePath(r)}static fromMnemonic(e,r){return r||(r=t.defaultPath),v.#t(e.computeSeed(),e).derivePath(r)}static fromPhrase(e,r,n,i){null==r&&(r=""),null==n&&(n=t.defaultPath),null==i&&(i=a.LangEn.wordlist());const o=u.Mnemonic.fromPhrase(e,r,i);return v.#t(o.computeSeed(),o).derivePath(n)}static fromSeed(e){return v.#t(e,null)}}t.HDNodeWallet=v;class w extends i.VoidSigner{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,i,o,a,c,u,l){super(t,l),(0,s.assertPrivate)(e,y,"HDNodeVoidWallet"),(0,s.defineProperties)(this,{publicKey:r});const f=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(r)),0,4);(0,s.defineProperties)(this,{publicKey:r,fingerprint:f,parentFingerprint:i,chainCode:o,path:a,index:c,depth:u})}connect(e){return new w(y,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),g((0,s.concat)(["0x0488B21E",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&d&&(r+="'"));const{IR:i,IL:a}=b(t,this.chainCode,this.publicKey,null),c=n.SigningKey.addPoints(a,this.publicKey,!0),u=(0,o.computeAddress)(c);return new w(y,u,c,this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.provider)}derivePath(e){return m(this,e)}}t.HDNodeVoidWallet=w,t.getAccountPath=function(e){const t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<d,"invalid account index","index",t),`m/44'/60'/${t}'/0/0`},t.getIndexedAccountPath=function(e){const t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<d,"invalid account index","index",t),`m/44'/60'/0'/0/${t}`}},37:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(6808),i=r(2326),o=r(9879),s=r(5212),a=r(7214),c=r(4830),u=r(6404),l=r(8619);t.windowTime=function(e){for(var t,r,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var h=null!==(t=u.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,g=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),c.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,h,(function(){return u(a)}),e)}};null!==p&&p>=0?l.executeSchedule(r,h,f,p,!0):s=!0,f();var d=function(e){return i.slice().forEach(e)},y=function(e){d((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){d((function(t){t.window.next(e),g<=++t.seen&&u(t)}))}),(function(){return y((function(e){return e.complete()}))}),(function(e){return y((function(t){return t.error(e)}))}))),function(){i=null}}))}},74:function(e,t){"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.AuthEvent=t.AuthState=t.CorePlugins=t.PluginCategory=void 0,function(e){e.Authentication="authentication",e.Wallet="wallet",e.Privacy="privacy",e.Identity="identity",e.Utility="utility"}(r||(t.PluginCategory=r={})),function(e){e.WebAuthn="webauthn",e.Web3="web3",e.Nostr="nostr"}(n||(t.CorePlugins=n={})),function(e){e.UNAUTHENTICATED="unauthenticated",e.AUTHENTICATING="authenticating",e.AUTHENTICATED="authenticated",e.AUTHENTICATION_FAILED="authentication_failed",e.WALLET_INITIALIZING="wallet_initializing",e.WALLET_READY="wallet_ready",e.ERROR="error"}(i||(t.AuthState=i={})),function(e){e.LOGIN_START="login_start",e.LOGIN_SUCCESS="login_success",e.LOGIN_FAILED="login_failed",e.LOGOUT="logout",e.WALLET_INIT_START="wallet_init_start",e.WALLET_INIT_SUCCESS="wallet_init_success",e.WALLET_INIT_FAILED="wallet_init_failed",e.ERROR="error"}(o||(t.AuthEvent=o={}))},96:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(2070),i=r(281);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},102:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;const n=r(915),i=r(2318),o=r(9175),[s,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends n.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:u,Fh:l,Fl:f,Gh:d,Gl:h,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,s,a,c,u,l,f,d,h,p,g]}set(e,t,r,n,i,o,s,a,c,u,l,f,d,h,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t),u[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],r=0|u[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),o=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),s=0|c[e-2],a=0|u[e-2],l=i.default.rotrSH(s,a,19)^i.default.rotrBH(s,a,61)^i.default.shrSH(s,a,6),f=i.default.rotrSL(s,a,19)^i.default.rotrBL(s,a,61)^i.default.shrSL(s,a,6),d=i.default.add4L(o,f,u[e-7],u[e-16]),h=i.default.add4H(d,n,l,c[e-7],c[e-16]);c[e]=0|h,u[e]=0|d}let{Ah:r,Al:n,Bh:o,Bl:l,Ch:f,Cl:d,Dh:h,Dl:p,Eh:g,El:y,Fh:b,Fl:m,Gh:v,Gl:w,Hh:A,Hl:E}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(g,y,14)^i.default.rotrSH(g,y,18)^i.default.rotrBH(g,y,41),P=i.default.rotrSL(g,y,14)^i.default.rotrSL(g,y,18)^i.default.rotrBL(g,y,41),O=g&b^~g&v,S=y&m^~y&w,_=i.default.add5L(E,P,S,a[e],u[e]),k=i.default.add5H(_,A,t,O,s[e],c[e]),T=0|_,x=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),I=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),R=r&o^r&f^o&f,C=n&l^n&d^l&d;A=0|v,E=0|w,v=0|b,w=0|m,b=0|g,m=0|y,({h:g,l:y}=i.default.add(0|h,0|p,0|k,0|T)),h=0|f,p=0|d,f=0|o,d=0|l,o=0|r,l=0|n;const N=i.default.add3L(T,I,C);r=i.default.add3H(N,k,x,R),n=0|N}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:l}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|l)),({h:f,l:d}=i.default.add(0|this.Ch,0|this.Cl,0|f,0|d)),({h:h,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|h,0|p)),({h:g,l:y}=i.default.add(0|this.Eh,0|this.El,0|g,0|y)),({h:b,l:m}=i.default.add(0|this.Fh,0|this.Fl,0|b,0|m)),({h:v,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:A,l:E}=i.default.add(0|this.Hh,0|this.Hl,0|A,0|E)),this.set(r,n,o,l,f,d,h,p,g,y,b,m,v,w,A,E)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=l;class f extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class d extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class h extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,o.wrapConstructor)((()=>new l)),t.sha512_224=(0,o.wrapConstructor)((()=>new f)),t.sha512_256=(0,o.wrapConstructor)((()=>new d)),t.sha384=(0,o.wrapConstructor)((()=>new h))},131:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5650),i=r(4530),o=r(4950),s=r(6805),a=r(7873),c=r(629),u=r(7552),l=r(4975),f=r(2187),d=r(8263),h=r(6297),p=r(5462),g=r(380);t.scheduled=function(e,t){if(null!=e){if(c.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(u.isPromise(e))return i.schedulePromise(e,t);if(d.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(p.isReadableStreamLike(e))return g.scheduleReadableStreamLike(e,t)}throw h.createInvalidObservableTypeError(e)}},142:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(2070),i=r(281);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},170:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArrayFromIndexedObject=t.getIndexedObjectFromArray=t.qs=t.getSet=t.getUUID=t.getTargetPub=t.getPub=t.getId=void 0,t.app_scoped=function(e,t){return t.length>0?`${t}-${e}`:e},t.getId=e=>e?._?.["#"],t.getPub=e=>{const t=/~([^@][^\.]+\.[^\.]+)/.exec(e);return t?t[1]:null},t.getTargetPub=e=>{const t=/~[^@][^\.]+\.[^\.]+.*~([^@][^\.]+\.[^\.]+)$/.exec(e);return t?t[1]:null},t.getUUID=e=>e.opt()._.opt.uuid(),t.getSet=(e,t)=>{const r=e[t];return r?Object.keys(r).filter((e=>"_"!==e)).map((e=>r[e])).filter((e=>e&&"object"==typeof e&&e["#"])).map((t=>e[t["#"]])).filter(Boolean):[]},t.qs=(e,t="?")=>{const r=Object.fromEntries(Object.entries(e).filter((([e,t])=>t))),n=JSON.stringify(r);return n?`${t}${n}`:""},t.getIndexedObjectFromArray=e=>e.reduce(((e,t)=>({...e,[t.id]:t})),{}),t.getArrayFromIndexedObject=e=>Object.values(e)},189:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructFragment=t.FunctionFragment=t.FallbackFragment=t.ConstructorFragment=t.EventFragment=t.ErrorFragment=t.NamedFragment=t.Fragment=t.ParamType=void 0;const n=r(5347),i=r(1181);function o(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const s=o("external public payable override".split(" ")),a="constant external internal payable private public pure view override",c=o(a.split(" ")),u="constructor error event fallback function receive struct",l=o(u.split(" ")),f="calldata memory storage payable indexed",d=o(f.split(" ")),h=o([u,f,"tuple returns",a].join(" ").split(" ")),p={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},g=new RegExp("^(\\s*)"),y=new RegExp("^([0-9]+)"),b=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),m=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#r;#n;get offset(){return this.#r}get length(){return this.#n.length-this.#r}constructor(e){this.#r=0,this.#n=e.slice()}clone(){return new w(this.#n)}reset(){this.#r=0}#i(e=0,t=0){return new w(this.#n.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#i(this.#r+1,e.match+1);return this.#r=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#r<e.match-1;){const e=this.peek().linkNext;t.push(this.#i(this.#r+1,e)),this.#r=e}return this.#r=e.match+1,t}peek(){if(this.#r>=this.#n.length)throw new Error("out-of-bounds");return this.#n[this.#r]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#r++,e}toString(){const e=[];for(let t=this.#r;t<this.#n.length;t++){const r=this.#n[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}}function A(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):"$EOI";throw new Error(`invalid token ${r} at ${s}: ${t}`)};let i=[],o=[],s=0;for(;s<e.length;){let a=e.substring(s),c=a.match(g);c&&(s+=c[1].length,a=e.substring(s));const u={depth:i.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(u);let l=p[a[0]]||"";if(l){if(u.type=l,u.text=a[0],s++,"OPEN_PAREN"===l)i.push(t.length-1),o.push(t.length-1);else if("CLOSE_PAREN"==l)0===i.length&&r("no matching open bracket"),u.match=i.pop(),t[u.match].match=t.length-1,u.depth--,u.linkBack=o.pop(),t[u.linkBack].linkNext=t.length-1;else if("COMMA"===l)u.linkBack=o.pop(),t[u.linkBack].linkNext=t.length-1,o.push(t.length-1);else if("OPEN_BRACKET"===l)u.type="BRACKET";else if("CLOSE_BRACKET"===l){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=(0,n.getNumber)(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(c=a.match(b),c){if(u.text=c[1],s+=u.text.length,h.has(u.text)){u.type="KEYWORD";continue}if(u.text.match(v)){u.type="TYPE";continue}u.type="ID"}else{if(c=a.match(y),!c)throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`);u.text=c[1],u.type="NUMBER",s+=u.text.length}}return new w(t.map((e=>Object.freeze(e))))}function E(e,t){let r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function P(e,t){if(t.peekKeyword(l)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function O(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function S(e){let t=O(e,c);return E(t,o("constant payable nonpayable".split(" "))),E(t,o("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function _(e,t){return e.popParams().map((e=>D.from(e,t)))}function k(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,n.getBigInt)(e.pop().text);throw new Error("invalid gas")}return null}function T(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const x=new RegExp(/^(.*)\[([0-9]*)\]$/);function I(e){const t=e.match(v);if((0,n.assertArgument)(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const R={},C=Symbol.for("_ethers_internal"),N="_ParamTypeInternal",j="_ErrorInternal",B="_EventInternal",M="_ConstructorInternal",F="_FallbackInternal",U="_FunctionInternal",L="_StructInternal";class D{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,i,o,s,a,c){if((0,n.assertPrivate)(e,R,"ParamType"),Object.defineProperty(this,C,{value:N}),s&&(s=Object.freeze(s.slice())),"array"===i){if(null==a||null==c)throw new Error("")}else if(null!=a||null!=c)throw new Error("");if("tuple"===i){if(null==s)throw new Error("")}else if(null!=s)throw new Error("");(0,n.defineProperties)(this,{name:t,type:r,baseType:i,indexed:o,components:s,arrayLength:a,arrayChildren:c})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}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 r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#o(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,o=t.slice();return o.forEach(((t,n)=>{i.#o(e,t,r,(e=>{o[n]=e}))})),void n(o)}if(this.isTuple()){const i=this.components;let o;if(Array.isArray(t))o=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");o=i.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(o.length!==this.components.length)throw new Error("array is wrong length");return o.forEach(((t,n)=>{i[n].#o(e,t,r,(e=>{o[n]=e}))})),void n(o)}const i=r(this.type,t);i.then?e.push(async function(){n(await i)}()):n(i)}async walkAsync(e,t){const r=[],n=[e];return this.#o(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(D.isParamType(e))return e;if("string"==typeof e)try{return D.from(A(e),t)}catch(t){(0,n.assertArgument)(!1,"invalid param type","obj",e)}else if(e instanceof w){let r="",n="",i=null;O(e,o(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",i=e.popParams().map((e=>D.from(e))),r=`tuple(${i.map((e=>e.format())).join(",")})`):(r=I(e.popType("TYPE")),n=r);let s=null,a=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new D(R,"",r,n,null,i,a,s),a=t.value,r+=t.text,n="array",i=null}let c=null;if(O(e,d).has("indexed")){if(!t)throw new Error("");c=!0}const u=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new D(R,u,r,n,c,i,a,s)}const r=e.name;(0,n.assertArgument)(!r||"string"==typeof r&&r.match(m),"invalid name","obj.name",r);let i=e.indexed;null!=i&&((0,n.assertArgument)(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,a=s.match(x);if(a){const t=parseInt(a[2]||"-1"),n=D.from({type:a[1],components:e.components});return new D(R,r||"",s,"array",i,null,t,n)}if("tuple"===s||s.startsWith("tuple(")||s.startsWith("(")){const t=null!=e.components?e.components.map((e=>D.from(e))):null;return new D(R,r||"",s,"tuple",i,t,null,null)}return s=I(e.type),new D(R,r||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[C]===N}}t.ParamType=D;class G{type;inputs;constructor(e,t,r){(0,n.assertPrivate)(e,R,"Fragment"),r=Object.freeze(r.slice()),(0,n.defineProperties)(this,{type:t,inputs:r})}static from(e){if("string"==typeof e){try{G.from(JSON.parse(e))}catch(e){}return G.from(A(e))}if(e instanceof w)switch(e.peekKeyword(l)){case"constructor":return V.from(e);case"error":return W.from(e);case"event":return K.from(e);case"fallback":case"receive":return $.from(e);case"function":return J.from(e);case"struct":return q.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return V.from(e);case"error":return W.from(e);case"event":return K.from(e);case"fallback":case"receive":return $.from(e);case"function":return J.from(e);case"struct":return q.from(e)}(0,n.assert)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,n.assertArgument)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return V.isFragment(e)}static isError(e){return W.isFragment(e)}static isEvent(e){return K.isFragment(e)}static isFunction(e){return J.isFragment(e)}static isStruct(e){return q.isFragment(e)}}t.Fragment=G;class H extends G{name;constructor(e,t,r,i){super(e,t,i),(0,n.assertArgument)("string"==typeof r&&r.match(m),"invalid identifier","name",r),i=Object.freeze(i.slice()),(0,n.defineProperties)(this,{name:r})}}function z(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}t.NamedFragment=H;class W extends H{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,C,{value:j})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+z(e,this.inputs)),t.join(" ")}static from(e){if(W.isFragment(e))return e;if("string"==typeof e)return W.from(A(e));if(e instanceof w){const t=P("error",e),r=_(e);return T(e),new W(R,t,r)}return new W(R,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===j}}t.ErrorFragment=W;class K extends H{anonymous;constructor(e,t,r,i){super(e,"event",t,r),Object.defineProperty(this,C,{value:B}),(0,n.defineProperties)(this,{anonymous:i})}get topicHash(){return(0,i.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+z(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return t=(t||[]).map((e=>D.from(e))),new K(R,e,t,!1).topicHash}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){const t=P("event",e),r=_(e,!0),n=!!O(e,o(["anonymous"])).has("anonymous");return T(e),new K(R,t,r,n)}return new K(R,e.name,e.inputs?e.inputs.map((e=>D.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[C]===B}}t.EventFragment=K;class V extends G{payable;gas;constructor(e,t,r,i,o){super(e,t,r),Object.defineProperty(this,C,{value:M}),(0,n.defineProperties)(this,{payable:i,gas:o})}format(e){if((0,n.assert)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${z(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){O(e,o(["constructor"]));const t=_(e),r=!!O(e,s).has("payable"),n=k(e);return T(e),new V(R,"constructor",t,r,n)}return new V(R,"constructor",e.inputs?e.inputs.map(D.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===M}}t.ConstructorFragment=V;class $ extends G{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,C,{value:F}),(0,n.defineProperties)(this,{payable:r})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if($.isFragment(e))return e;if("string"==typeof e)try{return $.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){const t=e.toString(),r=e.peekKeyword(o(["fallback","receive"]));if((0,n.assertArgument)(r,"type must be fallback or receive","obj",t),"receive"===e.popKeyword(o(["fallback","receive"]))){const t=_(e);return(0,n.assertArgument)(0===t.length,"receive cannot have arguments","obj.inputs",t),O(e,o(["payable"])),T(e),new $(R,[],!0)}let i=_(e);i.length?(0,n.assertArgument)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map((e=>e.format("minimal"))).join(", ")):i=[D.from("bytes")];const s=S(e);if((0,n.assertArgument)("nonpayable"===s||"payable"===s,"fallback cannot be constants","obj.stateMutability",s),O(e,o(["returns"])).has("returns")){const t=_(e);(0,n.assertArgument)(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return T(e),new $(R,i,"payable"===s)}if("receive"===e.type)return new $(R,[],!0);if("fallback"===e.type){const t=[D.from("bytes")],r="payable"===e.stateMutability;return new $(R,t,r)}(0,n.assertArgument)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[C]===F}}t.FallbackFragment=$;class J extends H{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,i,o,s){super(e,"function",t,i),Object.defineProperty(this,C,{value:U}),o=Object.freeze(o.slice());const a="view"===r||"pure"===r,c="payable"===r;(0,n.defineProperties)(this,{constant:a,gas:s,outputs:o,payable:c,stateMutability:r})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+z(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(z(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return t=(t||[]).map((e=>D.from(e))),new J(R,e,"view",t,[],null).selector}static from(e){if(J.isFragment(e))return e;if("string"==typeof e)try{return J.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){const t=P("function",e),r=_(e),n=S(e);let i=[];O(e,o(["returns"])).has("returns")&&(i=_(e));const s=k(e);return T(e),new J(R,t,n,r,i,s)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new J(R,e.name,t,e.inputs?e.inputs.map(D.from):[],e.outputs?e.outputs.map(D.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[C]===U}}t.FunctionFragment=J;class q extends H{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,C,{value:L})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return q.from(A(e))}catch(t){(0,n.assertArgument)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){const t=P("struct",e),r=_(e);return T(e),new q(R,t,r)}return new q(R,e.name,e.inputs?e.inputs.map(D.from):[])}static isFragment(e){return e&&e[C]===L}}t.StructFragment=q},197:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunCore=t.ShogunEventEmitter=t.ShogunStorage=t.Webauthn=t.Web3Connector=t.GunDB=t.RelayVerifier=void 0;const s=r(4101),a=r(2077),c=r(4134),u=r(5628),l=r(3358),f=r(4643),d=r(74),h=r(4933),p=r(8098),g=r(8050),y=o(r(9229));r(8030);var b=r(7405);Object.defineProperty(t,"RelayVerifier",{enumerable:!0,get:function(){return b.RelayVerifier}}),i(r(3358),t),i(r(2077),t),i(r(5307),t),i(r(6640),t),i(r(7405),t),i(r(5349),t),i(r(8777),t),i(r(74),t);var m=r(4101);Object.defineProperty(t,"GunDB",{enumerable:!0,get:function(){return m.GunDB}});var v=r(8089);Object.defineProperty(t,"Web3Connector",{enumerable:!0,get:function(){return v.Web3Connector}});var w=r(7510);Object.defineProperty(t,"Webauthn",{enumerable:!0,get:function(){return w.Webauthn}});var A=r(4643);Object.defineProperty(t,"ShogunStorage",{enumerable:!0,get:function(){return A.ShogunStorage}});var E=r(4465);Object.defineProperty(t,"ShogunEventEmitter",{enumerable:!0,get:function(){return E.ShogunEventEmitter}}),t.ShogunCore=class{static API_VERSION="2.0.0";_gun;_user=null;gundb;storage;eventEmitter;provider;config;rx;plugins=new Map;currentAuthMethod;constructor(e){(0,u.log)("Initializing ShogunSDK"),this.config=e,e.logging&&((0,u.configureLogging)(e.logging),(0,u.log)("Logging configured with custom settings")),this.storage=new f.ShogunStorage,this.eventEmitter=new c.EventEmitter,l.ErrorHandler.addListener((e=>{this.eventEmitter.emit("error",{action:e.code,message:e.message,type:e.type})})),(0,u.log)("Creating Gun instance...");try{e.gunInstance?((0,u.log)("Using provided Gun instance"),this._gun=e.gunInstance):((0,u.log)(`Creating new Gun instance with peers: ${JSON.stringify(e.peers)}`),this._gun=(0,y.default)(e.peers||[])),(0,u.log)("Gun instance created and validated successfully")}catch(e){throw(0,u.logError)("Error creating Gun instance:",e),new Error(`Failed to create Gun instance: ${e}`)}(0,u.log)("Initializing GunDB...");try{this.gundb=new s.GunDB(this._gun,e.scope||""),this._gun=this.gundb.gun,(0,u.log)("GunDB initialized successfully")}catch(e){throw(0,u.logError)("Error initializing GunDB:",e),new Error(`Failed to initialize GunDB: ${e}`)}(0,u.log)("Initialized Gun instance");try{this._user=this._gun.user().recall({sessionStorage:!0}),(0,u.log)("Gun user initialized successfully")}catch(e){throw(0,u.logError)("Error initializing Gun user:",e),new Error(`Failed to initialize Gun user: ${e}`)}if(this.rx=new a.GunRxJS(this._gun),this.registerBuiltinPlugins(e),e.plugins?.autoRegister&&e.plugins.autoRegister.length>0)for(const t of e.plugins.autoRegister)try{this.register(t),(0,u.log)(`Auto-registered plugin: ${t.name}`)}catch(e){(0,u.logError)(`Failed to auto-register plugin ${t.name}:`,e)}(0,u.log)("ShogunSDK initialized!")}get gun(){return this._gun}get user(){return this._user}registerBuiltinPlugins(e){try{if(e.webauthn?.enabled){const e=new h.WebauthnPlugin;e._category=d.PluginCategory.Authentication,this.register(e),(0,u.log)("Webauthn plugin registered")}if(e.web3?.enabled){const e=new p.Web3ConnectorPlugin;e._category=d.PluginCategory.Authentication,this.register(e),(0,u.log)("Web3Connector plugin registered")}if(e.nostr?.enabled){const e=new g.NostrConnectorPlugin;e._category=d.PluginCategory.Authentication,this.register(e),(0,u.log)("NostrConnector plugin registered")}}catch(e){(0,u.logError)("Error registering builtin plugins:",e)}}register(e){if(this.plugins.has(e.name))throw new Error(`Plugin with name "${e.name}" already registered`);e.initialize(this),this.plugins.set(e.name,e),(0,u.log)(`Registered plugin: ${e.name}`)}unregister(e){const t=this.plugins.get(e);t?(t.destroy&&t.destroy(),this.plugins.delete(e),(0,u.log)(`Unregistered plugin: ${e}`)):(0,u.log)(`Plugin "${e}" not found, nothing to unregister`)}getPlugin(e){return this.plugins.get(e)}hasPlugin(e){return this.plugins.has(e)}getPluginsByCategory(e){const t=[];return this.plugins.forEach((r=>{r._category===e&&t.push(r)})),t}getAuthenticationMethod(e){switch(e){case"webauthn":return this.getPlugin(d.CorePlugins.WebAuthn);case"web3":return this.getPlugin(d.CorePlugins.Web3);case"nostr":return this.getPlugin(d.CorePlugins.Nostr);default:return{login:(e,t)=>{this.login(e,t)},signUp:(e,t,r)=>{this.signUp(e,t,r)}}}}getRecentErrors(e=10){return l.ErrorHandler.getRecentErrors(e)}configureLogging(e){(0,u.configureLogging)(e),(0,u.log)("Logging reconfigured with new settings")}isLoggedIn(){return this.gundb.isLoggedIn()}logout(){try{if(!this.isLoggedIn())return void(0,u.log)("Logout ignored: user not authenticated");this.gundb.logout(),this.eventEmitter.emit("auth:logout",{}),(0,u.log)("Logout completed successfully")}catch(e){l.ErrorHandler.handle(l.ErrorType.AUTHENTICATION,"LOGOUT_FAILED",e instanceof Error?e.message:"Error during logout",e)}}async login(e,t){(0,u.log)("Login");try{if((0,u.log)(`Login attempt for user: ${e}`),!e||!t)return{success:!1,error:"Username and password are required"};this.currentAuthMethod||(this.currentAuthMethod="password",(0,u.log)("Authentication method set to default: password"));const r=this.config?.timeouts?.login??15e3,n=new Promise((async n=>{const i=setTimeout((()=>{n({success:!1,error:"Login timeout"})}),r);try{const r=await this.gundb.login(e,t);clearTimeout(i),r.success?n({success:!0,userPub:r.userPub,username:r.username}):n({success:!1,error:r.error||"Wrong user or password"})}catch(e){clearTimeout(i),n({success:!1,error:e.message||"Login error"})}})),i=await n;return i.success&&(this.eventEmitter.emit("auth:login",{userPub:i.userPub??""}),(0,u.log)(`Current auth method before wallet check: ${this.currentAuthMethod}`)),i}catch(e){return l.ErrorHandler.handle(l.ErrorType.AUTHENTICATION,"LOGIN_FAILED",e.message??"Unknown error during login",e),{success:!1,error:e.message??"Unknown error during login"}}}async signUp(e,t,r){(0,u.log)("Sign up");try{if(!e||!t)return{success:!1,error:"Username and password are required"};if(void 0!==r&&t!==r)return{success:!1,error:"Passwords do not match"};if(t.length<6)return{success:!1,error:"Password must be at least 6 characters long"};this.eventEmitter.emit("debug",{action:"signup_start",username:e,timestamp:Date.now()}),(0,u.log)(`Attempting user registration: ${e}`);const n=this.config?.timeouts?.signup??3e4,i=new Promise((async r=>{const i=setTimeout((()=>{r({success:!1,error:"Registration timeout"})}),n);try{const n=await this.gundb.signUp(e,t);clearTimeout(i),n.success?(this.eventEmitter.emit("debug",{action:"signup_complete",username:e,userPub:n.userPub,timestamp:Date.now()}),this.eventEmitter.emit("auth:signup",{userPub:n.userPub??"",username:e})):this.eventEmitter.emit("debug",{action:"signup_failed",username:e,error:n.error,timestamp:Date.now()}),r(n)}catch(e){clearTimeout(i),r({success:!1,error:e.message||"Registration error"})}}));return await i}catch(t){return(0,u.logError)(`Error during registration for user ${e}:`,t),this.eventEmitter.emit("debug",{action:"signup_exception",username:e,error:t.message||"Unknown error",timestamp:Date.now()}),{success:!1,error:t.message??"Unknown error during registration"}}}emit(e,t){return this.eventEmitter.emit(e,t)}on(e,t){return this.eventEmitter.on(e,t),this}once(e,t){return this.eventEmitter.once(e,t),this}off(e,t){return this.eventEmitter.off(e,t),this}removeAllListeners(e){return this.eventEmitter.removeAllListeners(e),this}setAuthMethod(e){(0,u.log)(`Setting authentication method from '${this.currentAuthMethod}' to '${e}'`),this.currentAuthMethod=e,(0,u.log)(`Authentication method successfully set to: ${e}`)}getAuthMethod(){return this.currentAuthMethod}}},201:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(8087);t.concatAll=function(){return n.mergeAll(1)}},226:function(e,t,r){"use strict";var n,i,o,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.OFB=void 0;const c=r(6342);class u extends c.ModeOfOperation{constructor(e,t){if(super("OFB",e,u),n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");s(this,n,new Uint8Array(t),"f")}else s(this,n,new Uint8Array(16),"f");s(this,i,this.iv,"f"),s(this,o,16,"f")}get iv(){return new Uint8Array(a(this,n,"f"))}encrypt(e){var t,r;if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)16===a(this,o,"f")&&(s(this,i,this.aes.encrypt(a(this,i,"f")),"f"),s(this,o,0,"f")),n[e]^=a(this,i,"f")[(s(this,o,(r=a(this,o,"f"),t=r++,r),"f"),t)];return n}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");return this.encrypt(e)}}t.OFB=u,n=new WeakMap,i=new WeakMap,o=new WeakMap},251:function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=d,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+h]=255&s,h+=p,s/=256,u-=8);e[r+h-p]|=128*g}},254:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserProvider=void 0;const n=r(5347),i=r(2371);class o extends i.JsonRpcApiPollingProvider{#s;#a;constructor(e,t,r){const i=Object.assign({},null!=r?r:{},{batchMaxCount:1});(0,n.assertArgument)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,i),this.#a=null,r&&r.providerInfo&&(this.#a=r.providerInfo),this.#s=async(t,r)=>{const n={method:t,params:r};this.emit("debug",{action:"sendEip1193Request",payload:n});try{const t=await e.request(n);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(e){const t=new Error(e.message);throw t.code=e.code,t.data=e.data,t.payload=n,this.emit("debug",{action:"receiveEip1193Error",error:t}),t}}}get providerInfo(){return this.#a}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){(0,n.assertArgument)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const t=await this.#s(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);const t=await this.send("eth_accounts",[]);return"number"==typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter((t=>t.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#s("eth_requestAccounts",[])}catch(e){const t=e.payload;throw this.getRpcError(t,{id:t.id,error:e})}return await super.getSigner(e)}static async discover(e){if(null==e&&(e={}),e.provider)return new o(e.provider);const t=e.window?e.window:"undefined"!=typeof window?window:null;if(null==t)return null;const r=e.anyProvider;if(r&&t.ethereum)return new o(t.ethereum);if(!("addEventListener"in t&&"dispatchEvent"in t&&"removeEventListener"in t))return null;const i=e.timeout?e.timeout:300;return 0===i?null:await new Promise(((s,a)=>{let c=[];const u=e=>{c.push(e.detail),r&&l()},l=()=>{if(clearTimeout(f),c.length)if(e&&e.filter){const t=e.filter(c.map((e=>Object.assign({},e.info))));if(null==t)s(null);else if(t instanceof o)s(t);else{let e=null;if(t.uuid&&(e=c.filter((e=>t.uuid===e.info.uuid))[0]),e){const{provider:t,info:r}=e;s(new o(t,void 0,{providerInfo:r}))}else a((0,n.makeError)("filter returned unknown info","UNSUPPORTED_OPERATION",{value:t}))}}else{const{provider:e,info:t}=c[0];s(new o(e,void 0,{providerInfo:t}))}else s(null);t.removeEventListener("eip6963:announceProvider",u)},f=setTimeout((()=>{l()}),i);t.addEventListener("eip6963:announceProvider",u),t.dispatchEvent(new Event("eip6963:requestProvider"))}))}}t.BrowserProvider=o},281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},345:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=void 0;const n=r(5347),i=r(7262);function o(e){return e&&"function"==typeof e.getAddress}async function s(e,t){const r=await t;return null!=r&&"0x0000000000000000000000000000000000000000"!==r||((0,n.assert)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,n.assertArgument)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,i.getAddress)(r)}t.isAddressable=o,t.isAddress=function(e){try{return(0,i.getAddress)(e),!0}catch(e){}return!1},t.resolveAddress=function(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,i.getAddress)(e):((0,n.assert)(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),s(e,t.resolveName(e))):o(e)?s(e,e.getAddress()):e&&"function"==typeof e.then?s(e,e):void(0,n.assertArgument)(!1,"unsupported addressable value","target",e)}},380:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(7873),i=r(5462);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},381:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(6808),s=r(3275),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,c=1;c<n.length&&n[c]<=s;c+=2)a=c;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},406:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractFactory=void 0;const n=r(8456),i=r(646),o=r(5347),s=r(1008);class a{interface;bytecode;runner;constructor(e,t,r){const i=n.Interface.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=(0,o.hexlify)((0,o.getBytes)(t)),(0,o.defineProperties)(this,{bytecode:t,interface:i,runner:r||null})}attach(e){return new s.BaseContract(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const r=this.interface.deploy;if(r.inputs.length+1===e.length&&(t=await(0,s.copyOverrides)(e.pop())),r.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const n=await(0,s.resolveArgs)(this.runner,r.inputs,e),i=(0,o.concat)([this.bytecode,this.interface.encodeDeploy(n)]);return Object.assign({},t,{data:i})}async deploy(...e){const t=await this.getDeployTransaction(...e);(0,o.assert)(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const r=await this.runner.sendTransaction(t),n=(0,i.getCreateAddress)(r);return new s.BaseContract(n,this.interface,this.runner,r)}connect(e){return new a(this.interface,this.bytecode,e)}static fromSolidity(e,t){(0,o.assertArgument)(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}}t.ContractFactory=a},432:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(4772),s=r(6002),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},t}(o.AsyncAction);t.AsapAction=a},436:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=t.formatEther=t.parseUnits=t.formatUnits=void 0;const n=r(1500),i=r(9412),o=r(6508),s=["wei","kwei","mwei","gwei","szabo","finney","ether"];function a(e,t){let r=18;if("string"==typeof t){const e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromValue(e,r,{decimals:r,width:512}).toString()}function c(e,t){(0,n.assertArgument)("string"==typeof e,"value must be a string","value",e);let r=18;if("string"==typeof t){const e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromString(e,{decimals:r,width:512}).value}t.formatUnits=a,t.parseUnits=c,t.formatEther=function(e){return a(e,18)},t.parseEther=function(e){return c(e,18)}},439:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},554:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=function(e){return"string"==typeof e&&44===e.length&&"="===e.charAt(43)},t.encrypt=async function(e,t){if(!Gun.SEA)throw new Error("SEA is not available");return Gun.SEA.encrypt(e,t)},t.decrypt=async function(e,t){if(!Gun.SEA)throw new Error("SEA is not available");return Gun.SEA.decrypt(e,t)},t.encFor=async function(e,t,r){const i=await n.SEA.secret(r.epub,t);return await n.SEA.encrypt(e,i)},t.decFrom=async function(e,t,r){const i=await n.SEA.secret(t.epub,r);return await n.SEA.decrypt(e,i)},t.hashText=i,t.hashObj=async function(e){let t="string"==typeof e?e:JSON.stringify(e);return{hash:await i(t),hashed:t}},t.secret=async function(e,t){return await n.SEA.secret(e,t)},t.getShortHash=async function(e,t){return await n.SEA.work(e,null,null,{name:"PBKDF2",encode:"hex",salt:t})},t.safeHash=function(e){if(e)return e.replace(/[+=/]/g,o)},t.unsafeHash=function(e){if(e)return e.replace(/[._-]/g,s)},t.safeJSONParse=function(e,t={}){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}},t.randomUUID=function(){throw new Error("Function not implemented.")};const n=r(9229);async function i(e){return await n.SEA.work(e,null,null,{name:"SHA-256"})}function o(e){switch(e){case"+":return"-";case"=":return".";case"/":return"_"}}function s(e){switch(e){case"-":return"+";case".":return"=";case"_":return"/"}}},597:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(2326),i=r(5345),o=r(1713);t.timeoutWith=function(e,t,r){var s,a,c;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(c=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:c})}},598:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(5212),i=r(7214);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},629:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2884),i=r(281);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},632:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(9328),i=r(5212),o=r(7214);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},646:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=void 0;var n=r(7262);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return n.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return n.getIcapAddress}});var i=r(1891);Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return i.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}});var o=r(345);Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}})},680:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9724),i=r(5212),o=r(7214);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,c=!1,u=function(){return c&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var c=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,c++):e)}),(function(){s=null,u()})))}),(function(){c=!0,u()})))}))}},706:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(5212),i=r(5717),o=r(7214),s=r(9724);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),s.innerFrom(e).subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},719:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(7699),i=r(3916),o=r(1898),s=r(7478),a=r(3484);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},761:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(680),i=r(281);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=t.computeAddress=void 0;const n=r(646),i=r(2291);function o(e){let t;return t="string"==typeof e?i.SigningKey.computePublicKey(e,!1):e.publicKey,(0,n.getAddress)((0,i.keccak256)("0x"+t.substring(4)).substring(26))}t.computeAddress=o,t.recoverAddress=function(e,t){return o(i.SigningKey.recoverPublicKey(e,t))}},839:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9619);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(9328),i=r(2708);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},873:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketProvider=void 0;const n=r(3913),i=r(4945);class o extends i.SocketProvider{#c;#u;get websocket(){if(null==this.#u)throw new Error("websocket closed");return this.#u}constructor(e,t,r){super(t,r),"string"==typeof e?(this.#c=()=>new n.WebSocket(e),this.#u=this.#c()):"function"==typeof e?(this.#c=e,this.#u=e()):(this.#c=null,this.#u=e),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(e){console.log("failed to start WebsocketProvider",e)}},this.websocket.onmessage=e=>{this._processMessage(e.data)}}async _write(e){this.websocket.send(e)}async destroy(){null!=this.#u&&(this.#u.close(),this.#u=null),super.destroy()}}t.WebSocketProvider=o},875:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(4772),s=r(9879),a=function(e){function t(t,r){void 0===t&&(t=c),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(9533).AsyncScheduler);t.VirtualTimeScheduler=a;var c=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(o.AsyncAction);t.VirtualAction=c},915:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(7557),i=r(9175);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+u,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},954:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbiCoder=void 0;const n=r(5347),i=r(8869),o=r(1355),s=r(3178),a=r(8719),c=r(2348),u=r(9095),l=r(8026),f=r(7398),d=r(8766),h=r(1693),p=r(189),g=r(646),y=r(5347),b=new Map;b.set(0,"GENERIC_PANIC"),b.set(1,"ASSERT_FALSE"),b.set(17,"OVERFLOW"),b.set(18,"DIVIDE_BY_ZERO"),b.set(33,"ENUM_RANGE_ERROR"),b.set(34,"BAD_STORAGE_DATA"),b.set(49,"STACK_UNDERFLOW"),b.set(50,"ARRAY_RANGE_ERROR"),b.set(65,"OUT_OF_MEMORY"),b.set(81,"UNINITIALIZED_FUNCTION_CALL");const m=new RegExp(/^bytes([0-9]*)$/),v=new RegExp(/^(u?int)([0-9]*)$/);let w=null,A=1024;class E{#l(e){if(e.isArray())return new s.ArrayCoder(this.#l(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new h.TupleCoder(e.components.map((e=>this.#l(e))),e.name);switch(e.baseType){case"address":return new o.AddressCoder(e.name);case"bool":return new a.BooleanCoder(e.name);case"string":return new d.StringCoder(e.name);case"bytes":return new c.BytesCoder(e.name);case"":return new l.NullCoder(e.name)}let t=e.type.match(v);if(t){let r=parseInt(t[2]||"256");return(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new f.NumberCoder(r/8,"int"===t[1],e.name)}if(t=e.type.match(m),t){let r=parseInt(t[1]);return(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","param",e),new u.FixedBytesCoder(r,e.name)}(0,n.assertArgument)(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#l(p.ParamType.from(e))));return new h.TupleCoder(t,"_").defaultValue()}encode(e,t){(0,n.assertArgumentCount)(t.length,e.length,"types/values length mismatch");const r=e.map((e=>this.#l(p.ParamType.from(e)))),o=new h.TupleCoder(r,"_"),s=new i.Writer;return o.encode(s,t),s.data}decode(e,t,r){const n=e.map((e=>this.#l(p.ParamType.from(e))));return new h.TupleCoder(n,"_").decode(new i.Reader(t,r,A))}static _setDefaultMaxInflation(e){(0,n.assertArgument)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),A=e}static defaultAbiCoder(){return null==w&&(w=new E),w}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let i="missing revert data",o=null,s=null;if(r){i="execution reverted";const e=(0,y.getBytes)(r);if(r=(0,y.hexlify)(r),0===e.length)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(e.length%32!=4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,y.hexlify)(e.slice(0,4)))try{o=n.decode(["string"],e.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch(e){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,y.hexlify)(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[t]},o=`Panic due to ${b.get(t)||"UNKNOWN"}(${t})`,i+=`: ${o}`}catch(e){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const a={to:t.to?(0,g.getAddress)(t.to):null,data:t.data||"0x"};return t.from&&(a.from=(0,g.getAddress)(t.from)),(0,y.makeError)(i,"CALL_EXCEPTION",{action:e,data:r,reason:o,transaction:a,invocation:null,revert:s})}(e,t,r,E.defaultAbiCoder())}}t.AbiCoder=E},1008:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.BaseContract=t.resolveArgs=t.copyOverrides=void 0;const n=r(8456),i=r(646),o=r(3807),s=r(5347),a=r(6526),c=BigInt(0);function u(e){return e&&"function"==typeof e.call}function l(e){return e&&"function"==typeof e.estimateGas}function f(e){return e&&"function"==typeof e.resolveName}function d(e){return e&&"function"==typeof e.sendTransaction}function h(e){if(null!=e){if(f(e))return e;if(e.provider)return e.provider}}class p{#f;fragment;constructor(e,t,r){if((0,s.defineProperties)(this,{fragment:t}),t.inputs.length<r.length)throw new Error("too many arguments");const n=g(e.runner,"resolveName"),o=f(n)?n:null;this.#f=async function(){const n=await Promise.all(t.inputs.map(((e,t)=>null==r[t]?null:e.walkAsync(r[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>(0,i.resolveAddress)(e,o)))):(0,i.resolveAddress)(t,o):t)))));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#f}}function g(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function y(e){return null==e?null:e.provider||null}async function b(e,t){const r=n.Typed.dereference(e,"overrides");(0,s.assertArgument)("object"==typeof r,"invalid overrides parameter","overrides",e);const i=(0,o.copyRequest)(r);return(0,s.assertArgument)(null==i.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,s.assertArgument)(null==i.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function m(e,t,r){const o=g(e,"resolveName"),s=f(o)?o:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(r[t],((e,t)=>(t=n.Typed.dereference(t,e),"address"===e?(0,i.resolveAddress)(t,s):t))))))}function v(e){const t=async function(t){const r=await b(t,["data"]);r.to=await e.getAddress(),r.from&&(r.from=await(0,i.resolveAddress)(r.from,h(e.runner)));const n=e.interface,o=(0,s.getBigInt)(r.value||c,"overrides.value")===c,a="0x"===(r.data||"0x");!n.fallback||n.fallback.payable||!n.receive||a||o||(0,s.assertArgument)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),(0,s.assertArgument)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data);const u=n.receive||n.fallback&&n.fallback.payable;return(0,s.assertArgument)(u||o,"cannot send value to non-payable fallback","overrides.value",r.value),(0,s.assertArgument)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){const n=e.runner;(0,s.assert)(d(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await n.sendTransaction(await t(r)),o=y(e.runner);return new a.ContractTransactionResponse(e.interface,o,i)},n=async e=>await r(e);return(0,s.defineProperties)(n,{_contract:e,estimateGas:async function(r){const n=g(e.runner,"estimateGas");return(0,s.assert)(l(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(r))},populateTransaction:t,send:r,staticCall:async function(r){const n=g(e.runner,"call");(0,s.assert)(u(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await t(r);try{return await n.call(i)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,i);throw t}}}),n}t.copyOverrides=b,t.resolveArgs=m;const w=Symbol.for("_ethersInternal_contract"),A=new WeakMap;function E(e){return A.get(e[w])}async function P(e,t){let r,n=null;if(Array.isArray(t)){const n=function(t){if((0,s.isHexString)(t,32))return t;const r=e.interface.getEvent(t);return(0,s.assertArgument)(r,"unknown fragment","name",t),r.topicHash};r=t.map((e=>null==e?null:Array.isArray(e)?e.map(n):n(e)))}else"*"===t?r=[null]:"string"==typeof t?(0,s.isHexString)(t,32)?r=[t]:(n=e.interface.getEvent(t),(0,s.assertArgument)(n,"unknown fragment","event",t),r=[n.topicHash]):(i=t)&&"object"==typeof i&&"getTopicFilter"in i&&"function"==typeof i.getTopicFilter&&i.fragment?r=await t.getTopicFilter():"fragment"in t?(n=t.fragment,r=[n.topicHash]):(0,s.assertArgument)(!1,"unknown event name","event",t);var i;return r=r.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()})),{fragment:n,tag:r.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:r}}async function O(e,t){const{subs:r}=E(e);return r.get((await P(e,t)).tag)||null}async function S(e,t,r){const n=y(e.runner);(0,s.assert)(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:c}=await P(e,r),{addr:u,subs:l}=E(e);let f=l.get(o);if(!f){const t={address:u||e,topics:c},s=t=>{let n=i;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){const o=n,s=i?e.interface.decodeEventLog(i,t.data,t.topics):[];k(e,r,s,(n=>new a.ContractEventPayload(e,n,r,o,t)))}else k(e,r,[],(n=>new a.ContractUnknownEventPayload(e,n,r,t)))};let d=[];f={tag:o,listeners:[],start:()=>{d.length||d.push(n.on(t,s))},stop:async()=>{if(0==d.length)return;let e=d;d=[],await Promise.all(e),n.off(t,s)}},l.set(o,f)}return f}let _=Promise.resolve();async function k(e,t,r,n){try{await _}catch(e){}const i=async function(e,t,r,n){await _;const i=await O(e,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter((({listener:t,once:i})=>{const o=Array.from(r);n&&o.push(n(i?null:t));try{t.call(e,...o)}catch(e){}return!i})),0===i.listeners.length&&(i.stop(),E(e).subs.delete(i.tag)),o>0}(e,t,r,n);return _=i,await i}const T=["then"];class x{target;interface;runner;filters;[w];fallback;constructor(e,t,r,o){(0,s.assertArgument)("string"==typeof e||(0,i.isAddressable)(e),"invalid value for Contract target","target",e),null==r&&(r=null);const c=n.Interface.from(t);let u;(0,s.defineProperties)(this,{target:e,runner:r,interface:c}),Object.defineProperty(this,w,{value:{}});let l=null,d=null;if(o){const e=y(r);d=new a.ContractTransactionResponse(this.interface,e,o)}let h=new Map;if("string"==typeof e)if((0,s.isHexString)(e))l=e,u=Promise.resolve(e);else{const t=g(r,"resolveName");if(!f(t))throw(0,s.makeError)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});u=t.resolveName(e).then((t=>{if(null==t)throw(0,s.makeError)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return E(this).addr=t,t}))}else u=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return E(this).addr=e,e}));var p;p={addrPromise:u,addr:l,deployTx:d,subs:h},A.set(this[w],p);const b=new Proxy({},{get:(e,t,r)=>{if("symbol"==typeof t||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return this.getEvent(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>T.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return(0,s.defineProperties)(this,{filters:b}),(0,s.defineProperties)(this,{fallback:c.receive||c.fallback?v(this):null}),new Proxy(this,{get:(e,t,r)=>{if("symbol"==typeof t||t in e||T.indexOf(t)>=0)return Reflect.get(e,t,r);try{return e.getFunction(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||T.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new x(this.target,this.interface,e)}attach(e){return new x(e,this.interface,this.runner)}async getAddress(){return await E(this).addrPromise}async getDeployedCode(){const e=y(this.runner);(0,s.assert)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=y(this.runner);return(0,s.assert)(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,r)=>{const n=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",n)}catch(e){r(e)}};n()}))}deploymentTransaction(){return E(this).deployTx}getFunction(e){"string"!=typeof e&&(e=e.format());const t=function(e,t){const r=function(...r){const n=e.interface.getFunction(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=async function(...t){const n=r(...t);let o={};if(n.inputs.length+1===t.length&&(o=await b(t.pop()),o.from&&(o.from=await(0,i.resolveAddress)(o.from,h(e.runner)))),n.inputs.length!==t.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const a=await m(e.runner,n.inputs,t);return Object.assign({},o,await(0,s.resolveProperties)({to:e.getAddress(),data:e.interface.encodeFunctionData(n,a)}))},o=async function(...e){const t=await f(...e);return 1===t.length?t[0]:t},c=async function(...t){const r=e.runner;(0,s.assert)(d(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await r.sendTransaction(await n(...t)),o=y(e.runner);return new a.ContractTransactionResponse(e.interface,o,i)},f=async function(...t){const i=g(e.runner,"call");(0,s.assert)(u(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const o=await n(...t);let a="0x";try{a=await i.call(o)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,o);throw t}const c=r(...t);return e.interface.decodeFunctionResult(c,a)},p=async(...e)=>r(...e).constant?await o(...e):await c(...e);return(0,s.defineProperties)(p,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:r,estimateGas:async function(...t){const r=g(e.runner,"estimateGas");return(0,s.assert)(l(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await n(...t))},populateTransaction:n,send:c,staticCall:o,staticCallResult:f}),Object.defineProperty(p,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getFunction(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),p}(this,e);return t}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){const r=function(...r){const n=e.interface.getEvent(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=function(...t){return new p(e,r(...t),t)};return(0,s.defineProperties)(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getEvent(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),n}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,r){null==t&&(t=0),null==r&&(r="latest");const{addr:n,addrPromise:i}=E(this),c=n||await i,{fragment:u,topics:l}=await P(this,e),f={address:c,topics:l,fromBlock:t,toBlock:r},d=y(this.runner);return(0,s.assert)(d,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await d.getLogs(f)).map((e=>{let t=u;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new a.EventLog(e,this.interface,t)}catch(t){return new a.UndecodedEventLog(e,t)}return new o.Log(e,d)}))}async on(e,t){const r=await S(this,"on",e);return r.listeners.push({listener:t,once:!1}),r.start(),this}async once(e,t){const r=await S(this,"once",e);return r.listeners.push({listener:t,once:!0}),r.start(),this}async emit(e,...t){return await k(this,e,t,null)}async listenerCount(e){if(e){const t=await O(this,e);return t?t.listeners.length:0}const{subs:t}=E(this);let r=0;for(const{listeners:e}of t.values())r+=e.length;return r}async listeners(e){if(e){const t=await O(this,e);return t?t.listeners.map((({listener:e})=>e)):[]}const{subs:t}=E(this);let r=[];for(const{listeners:e}of t.values())r=r.concat(e.map((({listener:e})=>e)));return r}async off(e,t){const r=await O(this,e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return null!=t&&0!==r.listeners.length||(r.stop(),E(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const t=await O(this,e);if(!t)return this;t.stop(),E(this).subs.delete(t.tag)}else{const{subs:e}=E(this);for(const{tag:t,stop:r}of e.values())r(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends x{constructor(t,r=null){super(t,e,r)}}}static from(e,t,r){return null==r&&(r=null),new this(e,t,r)}}t.BaseContract=x;class I extends(function(){return x}()){}t.Contract=I},1071:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(8051);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},1181:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.verifyAuthorization=t.hashAuthorization=void 0;var n=r(4027);Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return n.hashAuthorization}}),Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return n.verifyAuthorization}});var i=r(1993);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return i.id}});var o=r(3239);Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return o.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return o.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return o.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return o.dnsEncode}});var s=r(8717);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return s.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return s.verifyMessage}});var a=r(6065);Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return a.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return a.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return a.solidityPackedSha256}});var c=r(7215);Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return c.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return c.verifyTypedData}})},1245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(4885),o=r(1587),s=r(6680),a=r(281);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var c=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return u(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function u(e,t){var r,n,i,o=e,s=o.kind,a=o.value,c=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,c):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=c,t.observeNotification=u},1279:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(7024),i=r(5934),o=r(632),s=r(8799),a=r(4383);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(c){return c.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},1295:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=t.ZeroHash=t.ZeroAddress=void 0;var n=r(5239);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return n.ZeroAddress}});var i=r(5255);Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return i.ZeroHash}});var o=r(9197);Object.defineProperty(t,"N",{enumerable:!0,get:function(){return o.N}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return o.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return o.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return o.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return o.MaxInt256}});var s=r(6245);Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}})},1355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;const n=r(646),i=r(6508),o=r(9976),s=r(8869);class a extends s.Coder{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=o.Typed.dereference(t,"string");try{r=(0,n.getAddress)(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return(0,n.getAddress)((0,i.toBeHex)(e.readValue(),20))}}t.AddressCoder=a},1361:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(5212),i=r(7214);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},1398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;const n=r(646),i=r(5239),o=r(2291),s=r(5347),a=r(7918),c=r(2963),u=r(778),l=BigInt(0),f=BigInt(2),d=BigInt(27),h=BigInt(28),p=BigInt(35),g=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),y=131072;function b(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return r+=(0,o.sha256)(t).substring(4),"0x"+r}function m(e){return"0x"===e?null:(0,n.getAddress)(e)}function v(e,t){try{return(0,a.accessListify)(e)}catch(r){(0,s.assertArgument)(!1,r.message,t,e)}}function w(e,t){try{if(!Array.isArray(e))throw new Error("authorizationList: invalid array");const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(!Array.isArray(n))throw new Error(`authorization[${r}]: invalid array`);if(6!==n.length)throw new Error(`authorization[${r}]: wrong length`);if(!n[1])throw new Error(`authorization[${r}]: null address`);t.push({address:m(n[1]),nonce:E(n[2],"nonce"),chainId:E(n[0],"chainId"),signature:o.Signature.from({yParity:A(n[3],"yParity"),r:(0,s.zeroPadValue)(n[4],32),s:(0,s.zeroPadValue)(n[5],32)})})}return t}catch(r){(0,s.assertArgument)(!1,r.message,t,e)}}function A(e,t){return"0x"===e?0:(0,s.getNumber)(e,t)}function E(e,t){if("0x"===e)return l;const r=(0,s.getBigInt)(e,t);return(0,s.assertArgument)(r<=g,"value exceeds uint size",t,r),r}function P(e,t){const r=(0,s.getBigInt)(e,"value"),n=(0,s.toBeArray)(r);return(0,s.assertArgument)(n.length<=32,"value too large",`tx.${t}`,r),n}function O(e){return(0,a.accessListify)(e).map((e=>[e.address,e.storageKeys]))}function S(e,t){(0,s.assertArgument)(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid ${ param } hash",`value[${t}]`,e[t]);return e}function _(e,t){let r;try{if(r=A(t[0],"yParity"),0!==r&&1!==r)throw new Error("bad yParity")}catch(e){(0,s.assertArgument)(!1,"invalid yParity","yParity",t[0])}const n=(0,s.zeroPadValue)(t[1],32),i=(0,s.zeroPadValue)(t[2],32),a=o.Signature.from({r:n,s:i,yParity:r});e.signature=a}class k{#d;#h;#p;#g;#y;#b;#m;#v;#w;#A;#E;#P;#O;#S;#_;#k;#T;get type(){return this.#d}set type(e){switch(e){case null:this.#d=null;break;case 0:case"legacy":this.#d=0;break;case 1:case"berlin":case"eip-2930":this.#d=1;break;case 2:case"london":case"eip-1559":this.#d=2;break;case 3:case"cancun":case"eip-4844":this.#d=3;break;case 4:case"pectra":case"eip-7702":this.#d=4;break;default:(0,s.assertArgument)(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const e=this.#h;return null==e&&3===this.type?i.ZeroAddress:e}set to(e){this.#h=null==e?null:(0,n.getAddress)(e)}get nonce(){return this.#g}set nonce(e){this.#g=(0,s.getNumber)(e,"value")}get gasLimit(){return this.#y}set gasLimit(e){this.#y=(0,s.getBigInt)(e)}get gasPrice(){const e=this.#b;return null!=e||0!==this.type&&1!==this.type?e:l}set gasPrice(e){this.#b=null==e?null:(0,s.getBigInt)(e,"gasPrice")}get maxPriorityFeePerGas(){const e=this.#m;return null==e?2===this.type||3===this.type?l:null:e}set maxPriorityFeePerGas(e){this.#m=null==e?null:(0,s.getBigInt)(e,"maxPriorityFeePerGas")}get maxFeePerGas(){const e=this.#v;return null==e?2===this.type||3===this.type?l:null:e}set maxFeePerGas(e){this.#v=null==e?null:(0,s.getBigInt)(e,"maxFeePerGas")}get data(){return this.#p}set data(e){this.#p=(0,s.hexlify)(e)}get value(){return this.#w}set value(e){this.#w=(0,s.getBigInt)(e,"value")}get chainId(){return this.#A}set chainId(e){this.#A=(0,s.getBigInt)(e)}get signature(){return this.#E||null}set signature(e){this.#E=null==e?null:o.Signature.from(e)}get accessList(){const e=this.#P||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#P=null==e?null:(0,a.accessListify)(e)}get authorizationList(){const e=this.#T||null;return null==e&&4===this.type?[]:e}set authorizationList(e){this.#T=null==e?null:e.map((e=>(0,c.authorizationify)(e)))}get maxFeePerBlobGas(){const e=this.#O;return null==e&&3===this.type?l:e}set maxFeePerBlobGas(e){this.#O=null==e?null:(0,s.getBigInt)(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#S;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){(0,s.assertArgument)(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#S=e}get blobs(){return null==this.#k?null:this.#k.map((e=>Object.assign({},e)))}set blobs(e){if(null==e)return void(this.#k=null);const t=[],r=[];for(let n=0;n<e.length;n++){const i=e[n];if((0,s.isBytesLike)(i)){(0,s.assert)(this.#_,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=(0,s.getBytes)(i);if((0,s.assertArgument)(e.length<=y,"blob is too large",`blobs[${n}]`,i),e.length!==y){const t=new Uint8Array(y);t.set(e),e=t}const o=this.#_.blobToKzgCommitment(e),a=(0,s.hexlify)(this.#_.computeBlobKzgProof(e,o));t.push({data:(0,s.hexlify)(e),commitment:(0,s.hexlify)(o),proof:a}),r.push(b(1,o))}else{const e=(0,s.hexlify)(i.commitment);t.push({data:(0,s.hexlify)(i.data),commitment:e,proof:(0,s.hexlify)(i.proof)}),r.push(b(1,e))}}this.#k=t,this.#S=r}get kzg(){return this.#_}set kzg(e){this.#_=null==e?null:function(e){return{blobToKzgCommitment:t=>{if("computeBlobProof"in e){if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,s.getBytes)(e.blobToKzgCommitment((0,s.hexlify)(t)))}else if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,s.getBytes)(e.blobToKzgCommitment(t));if("blobToKZGCommitment"in e&&"function"==typeof e.blobToKZGCommitment)return(0,s.getBytes)(e.blobToKZGCommitment((0,s.hexlify)(t)));(0,s.assertArgument)(!1,"unsupported KZG library","kzg",e)},computeBlobKzgProof:(t,r)=>"computeBlobProof"in e&&"function"==typeof e.computeBlobProof?(0,s.getBytes)(e.computeBlobProof((0,s.hexlify)(t),(0,s.hexlify)(r))):"computeBlobKzgProof"in e&&"function"==typeof e.computeBlobKzgProof?e.computeBlobKzgProof(t,r):"computeBlobKZGProof"in e&&"function"==typeof e.computeBlobKZGProof?(0,s.getBytes)(e.computeBlobKZGProof((0,s.hexlify)(t),(0,s.hexlify)(r))):void(0,s.assertArgument)(!1,"unsupported KZG library","kzg",e)}}(e)}constructor(){this.#d=null,this.#h=null,this.#g=0,this.#y=l,this.#b=null,this.#m=null,this.#v=null,this.#p="0x",this.#w=l,this.#A=l,this.#E=null,this.#P=null,this.#O=null,this.#S=null,this.#_=null,this.#k=null,this.#T=null}get hash(){return null==this.signature?null:(0,o.keccak256)(this.#x(!0,!1))}get unsignedHash(){return(0,o.keccak256)(this.unsignedSerialized)}get from(){return null==this.signature?null:(0,u.recoverAddress)(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:o.SigningKey.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#x(e,t){(0,s.assert)(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const r=[P(e.nonce,"nonce"),P(e.gasPrice||0,"gasPrice"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data];let n=l;if(e.chainId!=l)n=(0,s.getBigInt)(e.chainId,"tx.chainId"),(0,s.assertArgument)(!t||null==t.networkV||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==l&&(r.push((0,s.toBeArray)(n)),r.push("0x"),r.push("0x")),(0,s.encodeRlp)(r);let i=BigInt(27+t.yParity);return n!==l?i=o.Signature.getChainIdV(n,t.v):BigInt(t.v)!==i&&(0,s.assertArgument)(!1,"tx.chainId/sig.v mismatch","sig",t),r.push((0,s.toBeArray)(i)),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s)),(0,s.encodeRlp)(r)}(this,r);case 1:return function(e,t){const r=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.gasPrice||0,"gasPrice"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data,O(e.accessList||[])];return t&&(r.push(P(t.yParity,"recoveryParam")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x01",(0,s.encodeRlp)(r)])}(this,r);case 2:return function(e,t){const r=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(e.maxFeePerGas||0,"maxFeePerGas"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data,O(e.accessList||[])];return t&&(r.push(P(t.yParity,"yParity")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x02",(0,s.encodeRlp)(r)])}(this,r);case 3:return function(e,t,r){const n=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(e.maxFeePerGas||0,"maxFeePerGas"),P(e.gasLimit,"gasLimit"),e.to||i.ZeroAddress,P(e.value,"value"),e.data,O(e.accessList||[]),P(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),S(e.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(n.push(P(t.yParity,"yParity")),n.push((0,s.toBeArray)(t.r)),n.push((0,s.toBeArray)(t.s)),r)?(0,s.concat)(["0x03",(0,s.encodeRlp)([n,r.map((e=>e.data)),r.map((e=>e.commitment)),r.map((e=>e.proof))])]):(0,s.concat)(["0x03",(0,s.encodeRlp)(n)])}(this,r,t?this.blobs:null);case 4:return function(e,t){const r=[P(e.chainId,"chainId"),P(e.nonce,"nonce"),P(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),P(e.maxFeePerGas||0,"maxFeePerGas"),P(e.gasLimit,"gasLimit"),e.to||"0x",P(e.value,"value"),e.data,O(e.accessList||[]),(n=e.authorizationList||[],n.map((e=>[P(e.chainId,"chainId"),e.address,P(e.nonce,"nonce"),P(e.signature.yParity,"yParity"),e.signature.r,e.signature.s])))];var n;return t&&(r.push(P(t.yParity,"yParity")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x04",(0,s.encodeRlp)(r)])}(this,r)}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#x(!0,!0)}get unsignedSerialized(){return this.#x(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#O||this.#S;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,s.assert)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,s.assert)(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,s.assert)(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return null!=this.type?i.push(this.type):this.authorizationList&&this.authorizationList.length?i.push(4):t?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(n&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return k.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new k;if("string"==typeof e){const t=(0,s.getBytes)(e);if(t[0]>=127)return k.from(function(e){const t=(0,s.decodeRlp)(e);(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const r={type:0,nonce:A(t[0],"nonce"),gasPrice:E(t[1],"gasPrice"),gasLimit:E(t[2],"gasLimit"),to:m(t[3]),value:E(t[4],"value"),data:(0,s.hexlify)(t[5]),chainId:l};if(6===t.length)return r;const n=E(t[6],"v"),i=E(t[7],"r"),a=E(t[8],"s");if(i===l&&a===l)r.chainId=n;else{let e=(n-p)/f;e<l&&(e=l),r.chainId=e,(0,s.assertArgument)(e!==l||n===d||n===h,"non-canonical legacy v","v",t[6]),r.signature=o.Signature.from({r:(0,s.zeroPadValue)(t[7],32),s:(0,s.zeroPadValue)(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return k.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",(0,s.hexlify)(e));const r={type:1,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),gasPrice:E(t[2],"gasPrice"),gasLimit:E(t[3],"gasLimit"),to:m(t[4]),value:E(t[5],"value"),data:(0,s.hexlify)(t[6]),accessList:v(t[7],"accessList")};return 8===t.length||_(r,t.slice(8)),r}(t));case 2:return k.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",(0,s.hexlify)(e));const r={type:2,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),maxPriorityFeePerGas:E(t[2],"maxPriorityFeePerGas"),maxFeePerGas:E(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:E(t[4],"gasLimit"),to:m(t[5]),value:E(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList")};return 9===t.length||_(r,t.slice(9)),r}(t));case 3:return k.from(function(e){let t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1)),r="3",n=null;if(4===t.length&&Array.isArray(t[0])){r="3 (network format)";const e=t[1],i=t[2],o=t[3];(0,s.assertArgument)(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),(0,s.assertArgument)(Array.isArray(i),"invalid network format: commitments not an array","fields[2]",i),(0,s.assertArgument)(Array.isArray(o),"invalid network format: proofs not an array","fields[3]",o),(0,s.assertArgument)(e.length===i.length,"invalid network format: blobs/commitments length mismatch","fields",t),(0,s.assertArgument)(e.length===o.length,"invalid network format: blobs/proofs length mismatch","fields",t),n=[];for(let r=0;r<t[1].length;r++)n.push({data:e[r],commitment:i[r],proof:o[r]});t=t[0]}(0,s.assertArgument)(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,"data",(0,s.hexlify)(e));const i={type:3,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),maxPriorityFeePerGas:E(t[2],"maxPriorityFeePerGas"),maxFeePerGas:E(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:E(t[4],"gasLimit"),to:m(t[5]),value:E(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList"),maxFeePerBlobGas:E(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};n&&(i.blobs=n),(0,s.assertArgument)(null!=i.to,`invalid address for transaction type: ${r}`,"data",e),(0,s.assertArgument)(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let t=0;t<i.blobVersionedHashes.length;t++)(0,s.assertArgument)((0,s.isHexString)(i.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,"data",e);return 11===t.length||_(i,t.slice(11)),i}(t));case 4:return k.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(10===t.length||13===t.length),"invalid field count for transaction type: 4","data",(0,s.hexlify)(e));const r={type:4,chainId:E(t[0],"chainId"),nonce:A(t[1],"nonce"),maxPriorityFeePerGas:E(t[2],"maxPriorityFeePerGas"),maxFeePerGas:E(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:E(t[4],"gasLimit"),to:m(t[5]),value:E(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList"),authorizationList:w(t[9],"authorizationList")};return 10===t.length||_(r,t.slice(10)),r}(t))}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new k;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=o.Signature.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.authorizationList&&(t.authorizationList=e.authorizationList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),(0,s.assertArgument)(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),(0,s.assertArgument)(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}t.Transaction=k},1415:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(8051),s=r(9724),a=r(7652),c=r(4885),u=r(7214),l=r(6404);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(u.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var c=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(c))):c),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},c=0;!e.closed&&c<f.length;c++)a(c);return function(){t=o=null}})):c.EMPTY}},1464:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(7977);t.exhaust=n.exhaustAll},1484:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function c(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function u(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r}function f(e,t){return l(e.toString(16).padStart(2*t,"0"))}function d(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=c,t.hexToNumber=u,t.hexToBytes=l,t.bytesToNumberBE=function(e){return u(a(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return u(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=f,t.numberToBytesLE=function(e,t){return f(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(c(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=d,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;const h=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=h(e),i=h(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),c=(e=h())=>{i=a(p([0]),e),n=a(),0!==e.length&&(i=a(p([1]),e),n=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return d(...r)};return(e,t)=>{let r;for(s(),c(e);!(r=t(u()));)c();return s(),r}};const g={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=g[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},1485:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ECB=void 0;const n=r(6342);class i extends n.ModeOfOperation{constructor(e){super("ECB",e,i)}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.encrypt(e.subarray(r,r+16)),r);return t}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.decrypt(e.subarray(r,r+16)),r);return t}}t.ECB=i},1500:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.makeError=t.isCallException=t.isError=void 0;const n=r(2205),i=r(8166);function o(e,t){if(null==e)return"null";if(null==t&&(t=new Set),"object"==typeof e){if(t.has(e))return"[Circular]";t.add(e)}if(Array.isArray(e))return"[ "+e.map((e=>o(e,t))).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return o(e.toJSON(),t);switch(typeof e){case"boolean":case"number":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const r=Object.keys(e);return r.sort(),"{ "+r.map((r=>`${o(r,t)}: ${o(e[r],t)}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function s(e,t){return e&&e.code===t}function a(e,t,r){let s,a=e;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${o(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];i.push(e+"="+o(t))}}i.push(`code=${t}`),i.push(`version=${n.version}`),i.length&&(e+=" ("+i.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":s=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(e);break;default:s=new Error(e)}return(0,i.defineProperties)(s,{code:t}),r&&Object.assign(s,r),null==s.shortMessage&&(0,i.defineProperties)(s,{shortMessage:a}),s}function c(e,t,r,n){if(!e)throw a(t,r,n)}t.isError=s,t.isCallException=function(e){return s(e,"CALL_EXCEPTION")},t.makeError=a,t.assert=c,t.assertArgument=function(e,t,r,n){c(e,t,"INVALID_ARGUMENT",{argument:r,value:n})},t.assertArgumentCount=function(e,t,r){null==r&&(r=""),r&&(r=": "+r),c(e>=t,"missing argument"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),c(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})};const u=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);t.assertNormalize=function(e){c(u.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})},t.assertPrivate=function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),c(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},1587:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(6404),i=r(7058);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1608:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(2326),i=r(8877),o=r(5825);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},1650:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encryptKeystoreJson=t.encryptKeystoreJsonSync=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=void 0;const n=r(8165),i=r(646),o=r(2291),s=r(7778),a=r(5347),c=r(8634),u=r(2205),l="m/44'/60'/0'/0/0";function f(e,t){const r=(0,a.getBytes)(t),u=(0,c.spelunk)(e,"crypto.ciphertext:data!"),f=(0,a.hexlify)((0,o.keccak256)((0,a.concat)([r.slice(16,32),u]))).substring(2);(0,a.assertArgument)(f===(0,c.spelunk)(e,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const d=function(e,t,r){if("aes-128-ctr"===(0,c.spelunk)(e,"crypto.cipher:string")){const i=(0,c.spelunk)(e,"crypto.cipherparams.iv:data!"),o=new n.CTR(t,i);return(0,a.hexlify)(o.decrypt(r))}(0,a.assert)(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}(e,r.slice(0,16),u),h=(0,s.computeAddress)(d);if(e.address){let t=e.address.toLowerCase();t.startsWith("0x")||(t="0x"+t),(0,a.assertArgument)((0,i.getAddress)(t)===h,"keystore address/privateKey mismatch","address",e.address)}const p={address:h,privateKey:d};if("0.1"===(0,c.spelunk)(e,"x-ethers.version:string")){const t=r.slice(32,64),i=(0,c.spelunk)(e,"x-ethers.mnemonicCiphertext:data!"),o=(0,c.spelunk)(e,"x-ethers.mnemonicCounter:data!"),s=new n.CTR(t,o);p.mnemonic={path:(0,c.spelunk)(e,"x-ethers.path:string")||l,locale:(0,c.spelunk)(e,"x-ethers.locale:string")||"en",entropy:(0,a.hexlify)((0,a.getBytes)(s.decrypt(i)))}}return p}function d(e){const t=(0,c.spelunk)(e,"crypto.kdf:string");if(t&&"string"==typeof t){if("scrypt"===t.toLowerCase()){const r=(0,c.spelunk)(e,"crypto.kdfparams.salt:data!"),n=(0,c.spelunk)(e,"crypto.kdfparams.n:int!"),i=(0,c.spelunk)(e,"crypto.kdfparams.r:int!"),o=(0,c.spelunk)(e,"crypto.kdfparams.p:int!");(0,a.assertArgument)(n>0&&!(n&n-1),"invalid kdf.N","kdf.N",n),(0,a.assertArgument)(i>0&&o>0,"invalid kdf","kdf",t);const s=(0,c.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,a.assertArgument)(32===s,"invalid kdf.dklen","kdf.dflen",s),{name:"scrypt",salt:r,N:n,r:i,p:o,dkLen:64}}if("pbkdf2"===t.toLowerCase()){const t=(0,c.spelunk)(e,"crypto.kdfparams.salt:data!"),r=(0,c.spelunk)(e,"crypto.kdfparams.prf:string!"),n=r.split("-").pop();(0,a.assertArgument)("sha256"===n||"sha512"===n,"invalid kdf.pdf","kdf.pdf",r);const i=(0,c.spelunk)(e,"crypto.kdfparams.c:int!"),o=(0,c.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,a.assertArgument)(32===o,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:t,count:i,dkLen:o,algorithm:n}}}(0,a.assertArgument)(!1,"unsupported key-derivation function","kdf",t)}function h(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}function p(e){const t=null!=e.salt?(0,a.getBytes)(e.salt,"options.salt"):(0,o.randomBytes)(32);let r=1<<17,n=8,i=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),(0,a.assertArgument)("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),(0,a.assertArgument)("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),(0,a.assertArgument)("number"==typeof i&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:i}}function g(e,t,r,i){const s=(0,a.getBytes)(r.privateKey,"privateKey"),f=null!=i.iv?(0,a.getBytes)(i.iv,"options.iv"):(0,o.randomBytes)(16);(0,a.assertArgument)(16===f.length,"invalid options.iv length","options.iv",i.iv);const d=null!=i.uuid?(0,a.getBytes)(i.uuid,"options.uuid"):(0,o.randomBytes)(16);(0,a.assertArgument)(16===d.length,"invalid options.uuid length","options.uuid",i.iv);const h=e.slice(0,16),p=e.slice(16,32),g=new n.CTR(h,f),y=(0,a.getBytes)(g.encrypt(s)),b=(0,o.keccak256)((0,a.concat)([p,y])),m={address:r.address.substring(2).toLowerCase(),id:(0,a.uuidV4)(d),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,a.hexlify)(f).substring(2)},ciphertext:(0,a.hexlify)(y).substring(2),kdf:"scrypt",kdfparams:{salt:(0,a.hexlify)(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:b.substring(2)}};if(r.mnemonic){const t=null!=i.client?i.client:`ethers/${u.version}`,s=r.mnemonic.path||l,f=r.mnemonic.locale||"en",d=e.slice(32,64),h=(0,a.getBytes)(r.mnemonic.entropy,"account.mnemonic.entropy"),p=(0,o.randomBytes)(16),g=new n.CTR(d,p),y=(0,a.getBytes)(g.encrypt(h)),b=new Date,v="UTC--"+b.getUTCFullYear()+"-"+(0,c.zpad)(b.getUTCMonth()+1,2)+"-"+(0,c.zpad)(b.getUTCDate(),2)+"T"+(0,c.zpad)(b.getUTCHours(),2)+"-"+(0,c.zpad)(b.getUTCMinutes(),2)+"-"+(0,c.zpad)(b.getUTCSeconds(),2)+".0Z--"+m.address;m["x-ethers"]={client:t,gethFilename:v,path:s,locale:f,mnemonicCounter:(0,a.hexlify)(p).substring(2),mnemonicCiphertext:(0,a.hexlify)(y).substring(2),version:"0.1"}}return JSON.stringify(m)}t.isKeystoreJson=function(e){try{const t=JSON.parse(e);if(3===(null!=t.version?parseInt(t.version):0))return!0}catch(e){}return!1},t.decryptKeystoreJsonSync=function(e,t){const r=JSON.parse(e),n=(0,c.getPassword)(t),i=d(r);if("pbkdf2"===i.name){const{salt:e,count:t,dkLen:s,algorithm:a}=i;return f(r,(0,o.pbkdf2)(n,e,t,s,a))}(0,a.assert)("scrypt"===i.name,"cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:s,N:u,r:l,p:h,dkLen:p}=i;return f(r,(0,o.scryptSync)(n,s,u,l,h,p))},t.decryptKeystoreJson=async function(e,t,r){const n=JSON.parse(e),i=(0,c.getPassword)(t),s=d(n);if("pbkdf2"===s.name){r&&(r(0),await h(0));const{salt:e,count:t,dkLen:a,algorithm:c}=s,u=(0,o.pbkdf2)(i,e,t,a,c);return r&&(r(1),await h(0)),f(n,u)}(0,a.assert)("scrypt"===s.name,"cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:u,N:l,r:p,p:g,dkLen:y}=s;return f(n,await(0,o.scrypt)(i,u,l,p,g,y,r))},t.encryptKeystoreJsonSync=function(e,t,r){null==r&&(r={});const n=(0,c.getPassword)(t),i=p(r),s=(0,o.scryptSync)(n,i.salt,i.N,i.r,i.p,64);return g((0,a.getBytes)(s),i,e,r)},t.encryptKeystoreJson=async function(e,t,r){null==r&&(r={});const n=(0,c.getPassword)(t),i=p(r),s=await(0,o.scrypt)(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return g((0,a.getBytes)(s),i,e,r)}},1666:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(9879).Subscription);t.Action=o},1691:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsResolver=t.BasicMulticoinProviderPlugin=t.MulticoinProviderPlugin=void 0;const n=r(646),i=r(1295),o=r(9288),s=r(1181),a=r(5347);function c(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):(0,a.assertArgument)(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class u{name;constructor(e){(0,a.defineProperties)(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}t.MulticoinProviderPlugin=u,t.BasicMulticoinProviderPlugin=class extends u{constructor(){super("org.ethers.plugins.provider.BasicMulticoin")}};const l=new RegExp("^(ipfs)://(.*)$","i"),f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),l,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class d{provider;address;name;#I;#R;constructor(e,t,r){(0,a.defineProperties)(this,{provider:e,address:t,name:r}),this.#I=null,this.#R=new o.Contract(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#I&&(this.#I=(async()=>{try{return await this.#R.supportsInterface("0x9061b923")}catch(e){if((0,a.isError)(e,"CALL_EXCEPTION"))return!1;throw this.#I=null,e}})()),await this.#I}async#C(e,t){t=(t||[]).slice();const r=this.#R.interface;t.unshift((0,s.namehash)(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(e),(0,a.assert)(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[(0,s.dnsEncode)(this.name,255),r.encodeFunctionData(n,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{const i=await this.#R[e](...t);return n?r.decodeFunctionResult(n,i)[0]:i}catch(e){if(!(0,a.isError)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#C("addr(bytes32)");return null==e||e===i.ZeroAddress?null:e}catch(e){if((0,a.isError)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<2147483648){let t=e+2147483648;const r=await this.#C("addr(bytes32,uint)",[t]);if((0,a.isHexString)(r,20))return(0,n.getAddress)(r)}let t=null;for(const r of this.provider.plugins)if(r instanceof u&&r.supportsCoinType(e)){t=r;break}if(null==t)return null;const r=await this.#C("addr(bytes32,uint)",[e]);if(null==r||"0x"===r)return null;const o=await t.decodeAddress(e,r);if(null!=o)return o;(0,a.assert)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const t=await this.#C("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){const e=await this.#C("contenthash(bytes32)");if(null==e||"0x"===e)return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e="e3010170"===t[1]?"ipfs":"ipns",r=parseInt(t[4],16);if(t[5].length===2*r)return`${e}://${(0,a.encodeBase58)("0x"+t[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return`bzz://${r[1]}`;(0,a.assert)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(null==t)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let r=0;r<f.length;r++){const n=t.match(f[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":case"data":return e.push({type:"url",value:t}),{linkage:e,url:t};case"ipfs":{const r=c(t);return e.push({type:"ipfs",value:t}),e.push({type:"url",value:r}),{linkage:e,url:r}}case"erc721":case"erc1155":{const r="erc721"===i?"tokenURI(uint256)":"uri(uint256)";e.push({type:i,value:t});const s=await this.getAddress();if(null==s)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const u=(n[2]||"").split("/");if(2!==u.length)return e.push({type:`!${i}caip`,value:n[2]||""}),{url:null,linkage:e};const f=u[1],d=new o.Contract(u[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if("erc721"===i){const t=await d.ownerOf(f);if(s!==t)return e.push({type:"!owner",value:t}),{url:null,linkage:e};e.push({type:"owner",value:t})}else if("erc1155"===i){const t=await d.balanceOf(s,f);if(!t)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:t.toString()})}let h=await d[r](f);if(null==h||"0x"===h)return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:h}),"erc1155"===i&&(h=h.replace("{id}",(0,a.toBeHex)(f,32).substring(2)),e.push({type:"metadata-url-expanded",value:h})),h.match(/^ipfs:/i)&&(h=c(h)),e.push({type:"metadata-url",value:h});let p={};const g=await new a.FetchRequest(h).send();g.assertOk();try{p=g.bodyJson}catch(t){try{e.push({type:"!metadata",value:g.bodyText})}catch(t){const r=g.body;return r&&e.push({type:"!metadata",value:(0,a.hexlify)(r)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!p)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(p)});let y=p.image;if("string"!=typeof y)return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(y.match(/^(https:\/\/|data:)/i));else{if(null==y.match(l))return e.push({type:"!imageUrl-ipfs",value:y}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:y}),y=c(y)}return e.push({type:"url",value:y}),{linkage:e,url:y}}}}}catch(e){}return{linkage:e,url:null}}static async getEnsAddress(e){const t=await e.getNetwork(),r=t.getPlugin("org.ethers.plugins.network.Ens");return(0,a.assert)(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),r.address}static async#N(e,t){const r=await d.getEnsAddress(e);try{const n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],e),a=await n.resolver((0,s.namehash)(t),{enableCcipRead:!0});return a===i.ZeroAddress?null:a}catch(e){throw e}}static async fromName(e,t){let r=t;for(;;){if(""===r||"."===r)return null;if("eth"!==t&&"eth"===r)return null;const n=await d.#N(e,r);if(null!=n){const i=new d(e,n,t);return r===t||await i.supportsWildcard()?i:null}r=r.split(".").slice(1).join(".")}}}t.EnsResolver=d},1693:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;const n=r(8166),i=r(9976),o=r(8869),s=r(3178);class a extends o.Coder{coders;constructor(e,t){let r=!1;const i=[];e.forEach((e=>{e.dynamic&&(r=!0),i.push(e.type)})),super("tuple","tuple("+i.join(",")+")",t,r),(0,n.defineProperties)(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){const r=i.Typed.dereference(t,"tuple");return(0,s.pack)(e,this.coders,r)}decode(e){return(0,s.unpack)(e,this.coders)}}t.TupleCoder=a},1705:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(4967),i=r(1484),o=r(1484),s=r(2422),{bytesToNumberBE:a,hexToBytes:c}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?c(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:s}=t.DER._parseInt(n.subarray(2)),{d:a,l:u}=t.DER._parseInt(s);if(u.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),c=r(s);return`30${r(s+o+4)}02${c}${i}02${a}${n}`}};const u=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"==typeof e&&u<e&&e<t.n}function p(e){if(!h(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:c}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=i.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let u;try{u="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(u=n.mod(u,c)),p(u),u}const y=new Map;function b(e){if(!(e instanceof m))throw new Error("ProjectivePoint expected")}class m{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof m)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?m.ZERO:new m(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}static fromHex(e){const t=m.fromAffine(c((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return m.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,y.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){b(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),u=r.eql(r.mul(n,a),r.mul(s,i));return c&&u}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,d),{px:o,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(o,o),h=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),l=r.mul(o,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(i,p),u=r.add(c,u),c=r.sub(h,u),u=r.add(h,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(i,l),p=r.mul(e,p),g=r.sub(f,p),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,g),u=r.add(u,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,g),c=r.sub(c,f),l=r.mul(p,h),l=r.add(l,l),l=r.add(l,l),new m(c,u,l)}add(e){b(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:c}=e;let u=r.ZERO,l=r.ZERO,f=r.ZERO;const h=t.a,p=r.mul(t.b,d);let g=r.mul(n,s),y=r.mul(i,a),v=r.mul(o,c),w=r.add(n,i),A=r.add(s,a);w=r.mul(w,A),A=r.add(g,y),w=r.sub(w,A),A=r.add(n,o);let E=r.add(s,c);return A=r.mul(A,E),E=r.add(g,v),A=r.sub(A,E),E=r.add(i,o),u=r.add(a,c),E=r.mul(E,u),u=r.add(y,v),E=r.sub(E,u),f=r.mul(h,A),u=r.mul(p,v),f=r.add(u,f),u=r.sub(y,f),f=r.add(y,f),l=r.mul(u,f),y=r.add(g,g),y=r.add(y,g),v=r.mul(h,v),A=r.mul(p,A),y=r.add(y,v),v=r.sub(g,v),v=r.mul(h,v),A=r.add(A,v),g=r.mul(y,A),l=r.add(l,g),g=r.mul(E,A),u=r.mul(w,u),u=r.sub(u,g),g=r.mul(w,y),f=r.mul(E,f),f=r.add(f,g),new m(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(m.ZERO)}wNAF(e){return w.wNAFCached(this,y,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}))}multiplyUnsafe(e){const n=m.ZERO;if(e===u)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:c}=i.splitScalar(e),f=n,d=n,h=this;for(;s>u||c>u;)s&l&&(f=f.add(h)),c&l&&(d=d.add(h)),h=h.double(),s>>=l,c>>=l;return o&&(f=f.negate()),a&&(d=d.negate()),d=new m(r.mul(d.px,i.beta),d.py,d.pz),f.add(d)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(o);let{p:u,f:l}=this.wNAF(t),{p:f,f:d}=this.wNAF(c);u=w.constTimeNegate(e,u),f=w.constTimeNegate(a,f),f=new m(r.mul(f.px,s.beta),f.py,f.pz),n=u.add(f),i=l.add(d)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return m.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=m.BASE,i=(e,t)=>t!==u&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(m,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(m,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}m.BASE=new m(t.Gx,t.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(m,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:f,isWithinCurveOrder:h}}function g(e,t){const r=e.ORDER;let n=u;for(let e=r-l;e%f===u;e/=f)n+=l;const i=n,o=f<<i-l-l,s=o*f,a=(r-l)/s,c=(a-l)/f,p=s-l,g=o,y=e.pow(t,a),b=e.pow(t,(a+l)/f);let m=(t,r)=>{let n=y,o=e.pow(r,p),s=e.sqr(o);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,r),s=e.mul(a,t);let u=e.mul(s,o);a=e.pow(u,g);let d=e.eql(a,e.ONE);o=e.mul(s,b),a=e.mul(u,n),s=e.cmov(o,s,d),u=e.cmov(a,u,d);for(let t=i;t>l;t--){let r=t-f;r=f<<r-l;let i=e.pow(u,r);const a=e.eql(i,e.ONE);o=e.mul(s,n),n=e.mul(n,n),i=e.mul(u,n),s=e.cmov(o,s,a),u=e.cmov(i,u,a)}return{isValid:d,value:s}};if(e.ORDER%h===d){const r=(e.ORDER-d)/h,n=e.sqrt(e.neg(t));m=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const c=e.mul(a,n),u=e.mul(e.sqr(a),i),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return m}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=r,f=a.BYTES+1,d=2*a.BYTES+1;function h(e){return n.mod(e,c)}function g(e){return n.invert(e,c)}const{ProjectivePoint:y,normPrivateKeyToScalar:b,weierstrassEquation:m,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===d&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${d} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(u<(o=e)&&o<a.ORDER))throw new Error("Point is not on curve");const t=m(e);let s=a.sqrt(t);return!(1&~r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var o}}),w=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function A(e){return e>c>>l}const E=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class P{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new P(E(e,0,t),E(e,t,2*t))}static fromDER(e){const{r:r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new P(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new P(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,s=k((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const c=2===i||3===i?t+r.n:t;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=1&i?"03":"02",l=y.fromHex(u+w(c)),f=g(c),d=h(-s*f),p=h(n*f),b=y.BASE.multiplyAndAddUnsafe(l,d,p);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return A(this.s)}normalizeS(){return this.hasHighS()?new P(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const O={isValidPrivateKey(e){try{return b(e),!0}catch(e){return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute(e=8,t=y.BASE){return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function S(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===d:r?n===2*f||n===2*d:e instanceof y}const _=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},k=r.bits2int_modN||function(e){return h(_(e))},T=i.bitMask(r.nBitLength);function x(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(u<=e&&e<T))throw new Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}const I={lowS:r.lowS,prehash:!1},R={lowS:r.lowS,prehash:!1};return y.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return y.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(S(e))throw new Error("first arg must be private key");if(!S(t))throw new Error("second arg must be public key");return y.fromHex(t).multiply(b(e)).toRawBytes(r)},sign:function(e,t,n=I){const{seed:s,k2sig:c}=function(e,t,n=I){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:c}=r;let{lowS:f,prehash:d,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),d&&(e=(0,o.ensureBytes)("prehashed msgHash",s(e)));const m=k(e),w=b(t),E=[x(w),x(m)];if(null!=p){const e=!0===p?c(a.BYTES):p;E.push((0,o.ensureBytes)("extraEntropy",e))}const O=i.concatBytes(...E),S=m;return{seed:O,k2sig:function(e){const t=_(e);if(!v(t))return;const r=g(t),n=y.BASE.multiply(t).toAffine(),i=h(n.x);if(i===u)return;const o=h(r*h(S+i*w));if(o===u)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return f&&A(o)&&(a=function(e){return A(e)?h(-e):e}(o),s^=1),new P(i,a,s)}}}(e,t,n),f=r;return i.createHmacDrbg(f.hash.outputLen,f.nByteLength,f.hmac)(s,c)},verify:function(e,n,i,s=R){const a=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:u}=s;let l,f;try{if("string"==typeof a||a instanceof Uint8Array)try{l=P.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=P.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new P(e,t)}}f=y.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&l.hasHighS())return!1;u&&(n=r.hash(n));const{r:d,s:p}=l,b=k(n),m=g(p),v=h(b*m),w=h(d*m),A=y.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!A&&h(A.x)===d},ProjectivePoint:y,Signature:P,utils:O}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,c,u,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),o=e.add(o,c),o=e.mul(o,s),u=e.mul(u,a),c=e.mul(u,t.B),o=e.add(o,c),l=e.mul(i,s);const{isValid:d,value:h}=r(o,u);f=e.mul(i,n),f=e.mul(f,h),l=e.cmov(l,s,d),f=e.cmov(f,h,d);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},1713:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(2326),i=r(5345),o=r(5212),s=r(9724),a=r(9619),c=r(7214),u=r(8619);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,d=r.with,h=void 0===d?l:d,p=r.scheduler,g=void 0===p?null!=t?t:n.asyncScheduler:p,y=r.meta,b=void 0===y?null:y;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=u.executeSchedule(t,g,(function(){try{r.unsubscribe(),s.innerFrom(h({meta:b,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(c.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-g.now():f)}))}},1719:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=r(9879),o=r(5212),s=r(7214),a=r(4830),c=r(2326),u=r(6404),l=r(8619);t.bufferTime=function(e){for(var t,r,f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];var h=null!==(t=u.popScheduler(f))&&void 0!==t?t:c.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,g=f[1]||1/0;return o.operate((function(t,r){var o=[],c=!1,u=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),c&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,h,(function(){return u(n)}),e)}};null!==p&&p>=0?l.executeSchedule(r,h,f,p,!0):c=!0,f();var d=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var c=a.value,l=c.buffer;l.push(e),g<=l.length&&u(c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==d||d.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(d)}))}},1731:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnEventType=void 0,function(e){e.DEVICE_REGISTERED="deviceRegistered",e.DEVICE_REMOVED="deviceRemoved",e.AUTHENTICATION_SUCCESS="authenticationSuccess",e.AUTHENTICATION_FAILED="authenticationFailed",e.ERROR="error"}(r||(t.WebAuthnEventType=r={}))},1752:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=t.UndecodedEventLog=t.EventLog=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=t.MessagePrefix=t.EtherSymbol=t.ZeroHash=t.N=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.ZeroAddress=t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=t.Typed=t.TransactionDescription=t.Result=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.FallbackFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.AbiCoder=t.encodeBytes32String=t.decodeBytes32String=t.version=void 0,t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanProvider=t.CloudflareProvider=t.ChainstackProvider=t.BlockscoutProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.AbstractProvider=t.VoidSigner=t.NonceManager=t.AbstractSigner=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.getDefaultProvider=t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.verifyAuthorization=t.hashAuthorization=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.SigningKey=t.Signature=t.lock=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=void 0,t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.isError=t.isCallException=t.makeError=t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.resolveProperties=t.defineProperties=t.zeroPadValue=t.zeroPadBytes=t.stripZerosLeft=t.isBytesLike=t.isHexString=t.hexlify=t.getBytesCopy=t.getBytes=t.dataSlice=t.dataLength=t.concat=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=t.Transaction=t.recoverAddress=t.computeAddress=t.authorizationify=t.accessListify=t.showThrottleMessage=t.copyRequest=t.UnmanagedSubscriber=t.SocketSubscriber=t.SocketPendingSubscriber=t.SocketEventSubscriber=t.SocketBlockSubscriber=t.MulticoinProviderPlugin=t.NetworkPlugin=t.GasCostPlugin=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EtherscanPlugin=t.EnsPlugin=t.Network=t.EnsResolver=void 0,t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.decryptCrowdsaleJson=t.isKeystoreJson=t.isCrowdsaleJson=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.Wallet=t.HDNodeVoidWallet=t.HDNodeWallet=t.BaseWallet=t.Mnemonic=t.uuidV4=t.encodeRlp=t.decodeRlp=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.mask=t.toTwos=t.fromTwos=t.toQuantity=t.toNumber=t.toBeHex=t.toBigInt=t.toBeArray=t.getUint=t.getNumber=t.getBigInt=t.FixedNumber=void 0;var n=r(2205);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}});var i=r(8456);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return i.FallbackFragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return i.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return i.StructFragment}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return i.ErrorDescription}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return i.Result}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}}),Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return i.Typed}});var o=r(646);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return o.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return o.getIcapAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return o.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return o.getCreate2Address}}),Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}});var s=r(1295);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return s.ZeroAddress}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return s.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return s.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return s.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return s.MaxInt256}}),Object.defineProperty(t,"N",{enumerable:!0,get:function(){return s.N}}),Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return s.ZeroHash}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}});var a=r(9288);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return a.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return a.Contract}}),Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return a.ContractFactory}}),Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return a.ContractEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return a.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return a.ContractTransactionResponse}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return a.ContractUnknownEventPayload}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return a.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return a.UndecodedEventLog}});var c=r(2291);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return c.computeHmac}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return c.randomBytes}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return c.keccak256}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return c.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}}),Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return c.pbkdf2}}),Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return c.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return c.scryptSync}}),Object.defineProperty(t,"lock",{enumerable:!0,get:function(){return c.lock}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return c.Signature}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return c.SigningKey}});var u=r(1181);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return u.id}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return u.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return u.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return u.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return u.dnsEncode}}),Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return u.hashAuthorization}}),Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return u.verifyAuthorization}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return u.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return u.verifyMessage}}),Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return u.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return u.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return u.solidityPackedSha256}}),Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return u.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return u.verifyTypedData}});var l=r(3996);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return l.getDefaultProvider}}),Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return l.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return l.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return l.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return l.TransactionResponse}}),Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return l.AbstractSigner}}),Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return l.NonceManager}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return l.VoidSigner}}),Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return l.AbstractProvider}}),Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return l.FallbackProvider}}),Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return l.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return l.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return l.JsonRpcSigner}}),Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return l.BrowserProvider}}),Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return l.AlchemyProvider}}),Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return l.AnkrProvider}}),Object.defineProperty(t,"BlockscoutProvider",{enumerable:!0,get:function(){return l.BlockscoutProvider}}),Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return l.ChainstackProvider}}),Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return l.CloudflareProvider}}),Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return l.EtherscanProvider}}),Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return l.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return l.InfuraWebSocketProvider}}),Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return l.PocketProvider}}),Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return l.QuickNodeProvider}}),Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return l.IpcSocketProvider}}),Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return l.SocketProvider}}),Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return l.WebSocketProvider}}),Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return l.EnsResolver}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return l.Network}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return l.EtherscanPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return l.MulticoinProviderPlugin}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return l.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return l.SocketEventSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return l.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return l.SocketSubscriber}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return l.UnmanagedSubscriber}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return l.copyRequest}}),Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return l.showThrottleMessage}});var f=r(7778);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return f.accessListify}}),Object.defineProperty(t,"authorizationify",{enumerable:!0,get:function(){return f.authorizationify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return f.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return f.recoverAddress}}),Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return f.Transaction}});var d=r(5347);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return d.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return d.encodeBase58}}),Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return d.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return d.encodeBase64}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return d.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return d.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return d.dataSlice}}),Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return d.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return d.getBytesCopy}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return d.hexlify}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return d.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return d.isBytesLike}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return d.stripZerosLeft}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return d.zeroPadBytes}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return d.zeroPadValue}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return d.defineProperties}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return d.resolveProperties}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return d.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return d.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return d.assertArgumentCount}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return d.assertNormalize}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return d.assertPrivate}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return d.makeError}}),Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return d.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return d.isError}}),Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return d.EventPayload}}),Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return d.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return d.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return d.FetchCancelSignal}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return d.FixedNumber}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return d.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return d.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return d.getUint}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return d.toBeArray}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return d.toBigInt}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return d.toBeHex}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return d.toNumber}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return d.toQuantity}}),Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return d.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return d.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return d.mask}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return d.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return d.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return d.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return d.parseUnits}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return d.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return d.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return d.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return d.Utf8ErrorFuncs}}),Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}}),Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return d.encodeRlp}}),Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return d.uuidV4}});var h=r(3279);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return h.Mnemonic}}),Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return h.BaseWallet}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return h.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return h.HDNodeVoidWallet}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return h.Wallet}}),Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return h.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return h.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return h.getIndexedAccountPath}}),Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return h.isCrowdsaleJson}}),Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return h.isKeystoreJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return h.decryptCrowdsaleJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return h.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return h.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return h.encryptKeystoreJsonSync}});var p=r(6591);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return p.LangEn}}),Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return p.WordlistOwl}}),Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return p.WordlistOwlA}}),Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return p.wordlists}})},1761:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(4967),i=r(1484),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function c(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function u(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){c(e),c(t),u(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const d=(0,i.concatBytes)(t,s(t.length,1)),h=s(0,l),p=s(r,2),g=new Array(f),y=n((0,i.concatBytes)(h,e,p,s(0,1),d));g[0]=n((0,i.concatBytes)(y,s(1,1),d));for(let e=1;e<=f;e++){const t=[a(y,g[e-1]),s(e+1,1),d];g[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,r)}function f(e,t,r,n,o){if(c(e),c(t),u(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function d(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:d,hash:h,expand:p,DST:g}=r;c(e),u(t);const y=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),b=s.toString(2).length,m=Math.ceil((b+a)/8),v=t*d*m;let w;if("xmd"===p)w=l(e,y,v,h);else if("xof"===p)w=f(e,y,v,a,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const A=new Array(t);for(let e=0;e<t;e++){const t=new Array(d);for(let r=0;r<d;r++){const i=m*(r+e*d),a=w.subarray(i,i+m);t[r]=(0,n.mod)(o(a),s)}A[e]=t}return A}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=d,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=d(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,i){const o=d(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s}}}},1762:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(2326),i=r(5212),o=r(7214);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,c=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function u(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);c()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(u,e),n.add(i))}),(function(){c(),n.complete()}),void 0,(function(){s=i=null})))}))}},1778:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=r(9879),o=r(5212),s=r(9724),a=r(7214),c=r(5717),u=r(4830);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){u.arrRemove(l,r),o.next(r),n.unsubscribe()}),c.noop)))}),c.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1875:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(8051),i=r(2931),o=r(5726);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},1891:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=void 0;const n=r(2291),i=r(5347),o=r(7262);t.getCreateAddress=function(e){const t=(0,o.getAddress)(e.from);let r=(0,i.getBigInt)(e.nonce,"tx.nonce").toString(16);return r="0"===r?"0x":r.length%2?"0x0"+r:"0x"+r,(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.encodeRlp)([t,r])),12))},t.getCreate2Address=function(e,t,r){const s=(0,o.getAddress)(e),a=(0,i.getBytes)(t,"salt"),c=(0,i.getBytes)(r,"initCodeHash");return(0,i.assertArgument)(32===a.length,"salt must be 32 bytes","salt",t),(0,i.assertArgument)(32===c.length,"initCodeHash must be 32 bytes","initCodeHash",r),(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.concat)(["0xff",s,a,c])),12))}},1898:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(7699);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},1903:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(8051),i=r(7652),o=r(7214),s=r(5717),a=r(9724);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.argsOrArgArray(e);return new n.Observable((function(e){var t=0,n=function(){if(t<r.length){var i=void 0;try{i=a.innerFrom(r[t++])}catch(e){return void n()}var c=new o.OperatorSubscriber(e,void 0,s.noop,s.noop);i.subscribe(c),c.add(n)}else e.complete()};n()}))}},1934:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(8051),i=r(5717);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},1946:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(7474);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1949:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBase64=t.decodeBase64=void 0;const n=r(7415);t.decodeBase64=function(e){e=atob(e);const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return(0,n.getBytes)(t)},t.encodeBase64=function(e){const t=(0,n.getBytes)(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}},1983:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(4772).AsyncAction);t.QueueAction=o},1993:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;const n=r(2291),i=r(5347);t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))}},2036:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(9533).AsyncScheduler);t.QueueScheduler=o},2044:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(4948);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},2052:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},2070:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(8531),i=r(5212);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2071:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(8619),i=r(5212),o=r(7214);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},2077:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GunRxJS=void 0;const n=r(9364),i=r(2794);t.GunRxJS=class{gun;user;constructor(e){this.gun=e,this.user=e.user().recall({sessionStorage:!0})}getUser(){return this.user}getUserPub(){return this.user.is?.pub}observe(e){return new n.Observable((t=>{const r="string"==typeof e?this.gun.get(e):e,n=r.on(((e,r)=>{if(null!=e)if("object"==typeof e&&null!==e){const r=this.removeGunMeta(e);t.next(r)}else t.next(e);else t.next(null)}));return()=>{n&&"function"==typeof n&&n(),r.off()}})).pipe((0,i.distinctUntilChanged)(((e,t)=>JSON.stringify(e)===JSON.stringify(t))))}match(e,t){return new n.Observable((r=>{const n="string"==typeof e?this.gun.get(e):e,i={},o=n.map().on(((e,n)=>{if("_"===n||!e)return;if(t&&!t(e))return void(i[n]&&(delete i[n],r.next(Object.values(i))));const o="object"==typeof e?this.removeGunMeta(e):e;i[n]=o,r.next(Object.values(i))}));return()=>{o&&"function"==typeof o&&o(),n.off()}}))}put(e,t){const r="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{r.put(t,(r=>{r.err?e.error(new Error(r.err)):(e.next(t),e.complete())}))}))}set(e,t){const r="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{r.set(t,(r=>{r.err?e.error(new Error(r.err)):(e.next(t),e.complete())}))}))}once(e){const t="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{t.once((t=>{if(null==t)return e.next(null),void e.complete();const r="object"==typeof t?this.removeGunMeta(t):t;e.next(r),e.complete()}))}))}compute(e,t){const r=e.map((e=>"string"==typeof e?this.observe(e):e));return new n.Observable((n=>{let i=new Array(e.length).fill(void 0),o=new Array(e.length).fill(!1);const s=r.map(((e,r)=>e.subscribe({next:e=>{if(i[r]=e,i.every((e=>void 0!==e)))try{const e=t(...i);n.next(e)}catch(e){n.error(e)}},error:e=>n.error(e),complete:()=>{o[r]=!0,o.every((e=>e))&&n.complete()}})));return()=>{s.forEach((e=>e.unsubscribe()))}}))}userPut(e,t){return new n.Observable((r=>{this.gun.user().get(e).put(t,(e=>{e.err?r.error(new Error(e.err)):(r.next(t),r.complete())}))}))}userGet(e){return this.observe(this.gun.user().get(e))}observeUser(e){return this.observe(this.gun.user().get(e))}removeGunMeta(e){if(!e||"object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((r=>{if("_"===r||"#"===r)return;const n=e[r];t[r]=n&&"object"==typeof n?this.removeGunMeta(n):n})),t}}},2105:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(432),i=r(3952);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},2139:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9724),i=r(6808),o=r(5212),s=r(7214);t.repeatWhen=function(e){return o.operate((function(t,r){var o,a,c=!1,u=!1,l=!1,f=function(){return l&&u&&(r.complete(),!0)},d=function(){l=!1,o=t.subscribe(s.createOperatorSubscriber(r,void 0,(function(){l=!0,!f()&&(a||(a=new i.Subject,n.innerFrom(e(a)).subscribe(s.createOperatorSubscriber(r,(function(){o?d():c=!0}),(function(){u=!0,f()})))),a).next()}))),c&&(o.unsubscribe(),o=null,c=!1,d())};d()}))}},2187:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(4891),i=r(281);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},2205:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="6.14.3"},2271:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloudflareProvider=void 0;const n=r(5347),i=r(5317),o=r(2371);class s extends o.JsonRpcProvider{constructor(e){null==e&&(e="mainnet");const t=i.Network.from(e);(0,n.assertArgument)("mainnet"===t.name,"unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}t.CloudflareProvider=s},2275:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(2326),i=r(5825);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},2291:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lock=t.Signature=t.SigningKey=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=void 0;const n=r(3192);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return n.computeHmac}});const i=r(3905);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return i.keccak256}});const o=r(7307);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return o.ripemd160}});const s=r(2862);Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return s.pbkdf2}});const a=r(8964);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return a.randomBytes}});const c=r(5456);Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return c.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return c.scryptSync}});const u=r(5059);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return u.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return u.sha512}});var l=r(4534);Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return l.SigningKey}});var f=r(7005);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return f.Signature}}),t.lock=function(){n.computeHmac.lock(),i.keccak256.lock(),s.pbkdf2.lock(),a.randomBytes.lock(),o.ripemd160.lock(),c.scrypt.lock(),c.scryptSync.lock(),u.sha256.lock(),u.sha512.lock(),a.randomBytes.lock()}},2318:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}t.fromBig=i,t.split=o;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const d=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=d;const h=(e,t)=>t;t.rotr32H=h;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=y;const b=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=b;const m=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=m,t.add=v;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const A=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=A;const E=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=E;const P=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=P;const O=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=O;const S=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=S;const _={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:d,rotr32H:h,rotr32L:p,rotlSH:g,rotlSL:y,rotlBH:b,rotlBL:m,add:v,add3L:w,add3H:A,add4L:E,add4H:P,add5H:S,add5L:O};t.default=_},2326:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(4772),i=r(9533);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},2347:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultProvider=void 0;const n=r(5347),i=r(6806),o=r(7841),s=r(8907),a=r(2271),c=r(5047),u=r(5855),l=r(8817),f=r(9902),d=r(2371),h=r(5317),p=r(873),g="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");t.getDefaultProvider=function(e,t){null==t&&(t={});const r=e=>"-"!==t[e]&&("string"==typeof t.exclusive?e===t.exclusive:!Array.isArray(t.exclusive)||-1!==t.exclusive.indexOf(e));if("string"==typeof e&&e.match(/^https?:/))return new d.JsonRpcProvider(e);if("string"==typeof e&&e.match(/^wss?:/)||(y=e)&&"function"==typeof y.send&&"function"==typeof y.close)return new p.WebSocketProvider(e);var y;let b=null;try{b=h.Network.from(e)}catch(e){}const m=[];if(r("publicPolygon")&&b&&("matic"===b.name?m.push(new d.JsonRpcProvider("https://polygon-rpc.com/",b,{staticNetwork:b})):"matic-amoy"===b.name&&m.push(new d.JsonRpcProvider("https://rpc-amoy.polygon.technology/",b,{staticNetwork:b}))),r("alchemy"))try{m.push(new o.AlchemyProvider(e,t.alchemy))}catch(e){}if(r("ankr")&&null!=t.ankr)try{m.push(new i.AnkrProvider(e,t.ankr))}catch(e){}if(r("chainstack"))try{m.push(new s.ChainstackProvider(e,t.chainstack))}catch(e){}if(r("cloudflare"))try{m.push(new a.CloudflareProvider(e))}catch(e){}if(r("etherscan"))try{m.push(new c.EtherscanProvider(e,t.etherscan))}catch(e){}if(r("infura"))try{let r,n=t.infura;"object"==typeof n&&(r=n.projectSecret,n=n.projectId),m.push(new u.InfuraProvider(e,n,r))}catch(e){}if(r("quicknode"))try{let r=t.quicknode;m.push(new l.QuickNodeProvider(e,r))}catch(e){}if((0,n.assert)(m.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),1===m.length)return m[0];let v=Math.floor(m.length/2);return v>2&&(v=2),b&&-1!==g.indexOf(b.name)&&(v=1),t&&t.quorum&&(v=t.quorum),new f.FallbackProvider(m,void 0,{quorum:v})}},2348:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesCoder=t.DynamicBytesCoder=void 0;const n=r(5347),i=r(8869);class o extends i.Coder{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,n.getBytesCopy)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}t.DynamicBytesCoder=o,t.BytesCoder=class extends o{constructor(e){super("bytes",e)}decode(e){return(0,n.hexlify)(super.decode(e))}}},2359:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(7699),i=r(5212),o=r(7214);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},2371:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcProvider=t.JsonRpcApiPollingProvider=t.JsonRpcApiProvider=t.JsonRpcSigner=void 0;const n=r(8456),i=r(646),o=r(1181),s=r(7778),a=r(5347),c=r(8672),u=r(3071),l=r(5317),f=r(7966),d=r(4338),h="bigint,boolean,function,number,string,symbol".split(/,/g);function p(e){if(null==e||h.indexOf(typeof e)>=0)return e;if("function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(p);if("object"==typeof e)return Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function g(e){return new Promise((t=>{setTimeout(t,e)}))}function y(e){return e?e.toLowerCase():e}function b(e){return e&&"number"==typeof e.pollingInterval}const m={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class v extends u.AbstractSigner{address;constructor(e,t){super(e),t=(0,i.getAddress)(t),(0,a.defineProperties)(this,{address:t})}connect(e){(0,a.assert)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const t=p(e),r=[];if(t.from){const n=t.from;r.push((async()=>{const r=await(0,i.resolveAddress)(n,this.provider);(0,a.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r})())}else t.from=this.address;if(null==t.gasLimit&&r.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){const e=t.to;r.push((async()=>{t.to=await(0,i.resolveAddress)(e,this.provider)})())}r.length&&await Promise.all(r);const n=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[n])}async sendTransaction(e){const t=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(e);return await new Promise(((e,n)=>{const i=[1e3,100];let o=0;const s=async()=>{try{const n=await this.provider.getTransaction(r);if(null!=n)return void e(n.replaceableTransaction(t))}catch(e){if((0,a.isError)(e,"CANCELLED")||(0,a.isError)(e,"BAD_DATA")||(0,a.isError)(e,"NETWORK_ERROR")||(0,a.isError)(e,"UNSUPPORTED_OPERATION"))return null==e.info&&(e.info={}),e.info.sendTransactionHash=r,void n(e);if((0,a.isError)(e,"INVALID_ARGUMENT")&&(o++,null==e.info&&(e.info={}),e.info.sendTransactionHash=r,o>10))return void n(e);this.provider.emit("error",(0,a.makeError)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout((()=>{s()}),i.pop()||4e3)};s()}))}async signTransaction(e){const t=p(e);if(t.from){const r=await(0,i.resolveAddress)(t.from,this.provider);(0,a.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r}else t.from=this.address;const r=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[r])}async signMessage(e){const t="string"==typeof e?(0,a.toUtf8Bytes)(e):e;return await this.provider.send("personal_sign",[(0,a.hexlify)(t),this.address.toLowerCase()])}async signTypedData(e,t,r){const n=p(r),s=await o.TypedDataEncoder.resolveNames(e,t,n,(async e=>{const t=await(0,i.resolveAddress)(e);return(0,a.assertArgument)(null!=t,"TypedData does not support null address","value",e),t}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(o.TypedDataEncoder.getPayload(s.domain,t,s.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const t="string"==typeof e?(0,a.toUtf8Bytes)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,a.hexlify)(t)])}}t.JsonRpcSigner=v;class w extends c.AbstractProvider{#j;#B;#M;#F;#U;#L;#D;#G(){if(this.#F)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#F=setTimeout((()=>{this.#F=null;const e=this.#M;for(this.#M=[];e.length;){const t=[e.shift()];for(;e.length&&t.length!==this.#j.batchMaxCount;)if(t.push(e.shift()),JSON.stringify(t.map((e=>e.payload))).length>this.#j.batchMaxSize){e.unshift(t.pop());break}(async()=>{const e=1===t.length?t[0].payload:t.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const r=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:r});for(const{resolve:e,reject:n,payload:i}of t){if(this.destroyed){n((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}const t=r.filter((e=>e.id===i.id))[0];if(null!=t)"error"in t?n(this.getRpcError(i,t)):e(t.result);else{const e=(0,a.makeError)("missing response for request","BAD_DATA",{value:r,info:{payload:i}});this.emit("error",e),n(e)}}}catch(e){this.emit("debug",{action:"receiveRpcError",error:e});for(const{reject:r}of t)r(e)}})()}}),e)}constructor(e,t){super(e,t),this.#B=1,this.#j=Object.assign({},m,t||{}),this.#M=[],this.#F=null,this.#L=null,this.#D=null;{let e=null;const t=new Promise((t=>{e=t}));this.#U={promise:t,resolve:e}}const r=this._getOption("staticNetwork");"boolean"==typeof r?((0,a.assertArgument)(!r||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),r&&null!=e&&(this.#L=l.Network.from(e))):r&&((0,a.assertArgument)(null==e||r.matches(e),"staticNetwork MUST match network object","options",t),this.#L=r)}_getOption(e){return this.#j[e]}get _network(){return(0,a.assert)(this.#L,"network is not available yet","NETWORK_ERROR"),this.#L}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&(0,a.getBigInt)(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=await this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}const t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#L)return this.#L}return this.#D?await this.#D:this.ready?(this.#D=(async()=>{try{const e=l.Network.from((0,a.getBigInt)(await this.send("eth_chainId",[])));return this.#D=null,e}catch(e){throw this.#D=null,e}})(),await this.#D):(this.#D=(async()=>{const e={id:this.#B++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let t;this.emit("debug",{action:"sendRpcPayload",payload:e});try{t=(await this._send(e))[0],this.#D=null}catch(e){throw this.#D=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:t}),"result"in t)return l.Network.from((0,a.getBigInt)(t.result));throw this.getRpcError(e,t)})(),await this.#D)}_start(){null!=this.#U&&null!=this.#U.resolve&&(this.#U.resolve(),this.#U=null,(async()=>{for(;null==this.#L&&!this.destroyed;)try{this.#L=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,a.makeError)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await g(1e3)}this.#G()})())}async _waitUntilReady(){if(null!=this.#U)return await this.#U.promise}_getSubscriber(e){return"pending"===e.type?new f.FilterIdPendingSubscriber(this):"event"===e.type?this._getOption("polling")?new d.PollingEventSubscriber(this,e.filter):new f.FilterIdEventSubscriber(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new c.UnmanagedSubscriber("orphan"):super._getSubscriber(e)}get ready(){return null==this.#U}getRpcTransaction(e){const t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((r=>{if(null==e[r])return;let n=r;"gasLimit"===r&&(n="gas"),t[n]=(0,a.toQuantity)((0,a.getBigInt)(e[r],`tx.${r}`))})),["from","to","data"].forEach((r=>{null!=e[r]&&(t[r]=(0,a.hexlify)(e[r]))})),e.accessList&&(t.accessList=(0,s.accessListify)(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),e.authorizationList&&(t.authorizationList=e.authorizationList.map((e=>{const t=(0,s.authorizationify)(e);return{address:t.address,nonce:(0,a.toQuantity)(t.nonce),chainId:(0,a.toQuantity)(t.chainId),yParity:(0,a.toQuantity)(t.signature.yParity),r:(0,a.toQuantity)(t.signature.r),s:(0,a.toQuantity)(t.signature.s)}}))),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[y(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[y(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[y(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[y(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(y):e.filter.address=y(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){const{method:r}=e,{error:i}=t;if("eth_estimateGas"===r&&i.message){const t=i.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return(0,a.makeError)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}});if(t.match(/nonce/i)&&t.match(/too low/i))return(0,a.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:e.params[0],info:{payload:e,error:i}})}if("eth_call"===r||"eth_estimateGas"===r){const t=E(i),o=n.AbiCoder.getBuiltinCallException("eth_call"===r?"call":"estimateGas",e.params[0],t?t.data:null);return o.info={error:i,payload:e},o}const o=JSON.stringify(function(e){const t=[];return P(e,t),t}(i));if("string"==typeof i.message&&i.message.match(/user denied|ethers-user-denied/i)){const t={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,a.makeError)("user rejected action","ACTION_REJECTED",{action:t[r]||"unknown",reason:"rejected",info:{payload:e,error:i}})}if("eth_sendRawTransaction"===r||"eth_sendTransaction"===r){const t=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return(0,a.makeError)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return(0,a.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return(0,a.makeError)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:i}});if(o.match(/only replay-protected/i))return(0,a.makeError)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:t,info:{error:i}}})}let s=!!o.match(/the method .* does not exist/i);return s||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(s=!0),s?(0,a.makeError)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):(0,a.makeError)("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,t){if(this.destroyed)return Promise.reject((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const r=this.#B++,n=new Promise(((n,i)=>{this.#M.push({resolve:n,reject:i,payload:{method:e,params:t,id:r,jsonrpc:"2.0"}})}));return this.#G(),n}async getSigner(e){null==e&&(e=0);const t=this.send("eth_accounts",[]);if("number"==typeof e){const r=await t;if(e>=r.length)throw new Error("no such account");return new v(this,r[e])}const{accounts:r}=await(0,a.resolveProperties)({network:this.getNetwork(),accounts:t});e=(0,i.getAddress)(e);for(const t of r)if((0,i.getAddress)(t)===e)return new v(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new v(this,e)))}destroy(){this.#F&&(clearTimeout(this.#F),this.#F=null);for(const{payload:e,reject:t}of this.#M)t((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#M=[],super.destroy()}}t.JsonRpcApiProvider=w;class A extends w{#H;constructor(e,t){super(e,t);let r=this._getOption("pollingInterval");null==r&&(r=m.pollingInterval),this.#H=r}_getSubscriber(e){const t=super._getSubscriber(e);return b(t)&&(t.pollingInterval=this.#H),t}get pollingInterval(){return this.#H}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#H=e,this._forEachSubscriber((e=>{b(e)&&(e.pollingInterval=this.#H)}))}}function E(e){if(null==e)return null;if("string"==typeof e.message&&e.message.match(/revert/i)&&(0,a.isHexString)(e.data))return{message:e.message,data:e.data};if("object"==typeof e){for(const t in e){const r=E(e[t]);if(r)return r}return null}if("string"==typeof e)try{return E(JSON.parse(e))}catch(e){}return null}function P(e,t){if(null!=e){if("string"==typeof e.message&&t.push(e.message),"object"==typeof e)for(const r in e)P(e[r],t);if("string"==typeof e)try{return P(JSON.parse(e),t)}catch(e){}}}t.JsonRpcApiPollingProvider=A,t.JsonRpcProvider=class extends A{#c;constructor(e,t,r){null==e&&(e="http://localhost:8545"),super(t,r),this.#c="string"==typeof e?new a.FetchRequest(e):e.clone()}_getConnection(){return this.#c.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){const t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");const r=await t.send();r.assertOk();let n=r.bodyJson;return Array.isArray(n)||(n=[n]),n}}},2398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="62e1ad51b37b8e00394bda3b";class c extends s.JsonRpcProvider{applicationId;applicationSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=a),null==r&&(r=null);const s={staticNetwork:i};super(c.getRequest(i,t,r),i,s),(0,n.defineProperties)(this,{applicationId:t,applicationSecret:r})}_getProvider(e){try{return new c(e,this.applicationId,this.applicationSecret)}catch(e){}return super._getProvider(e)}static getRequest(e,t,r){null==t&&(t=a);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v1/lb/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===a&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("PocketProvider"),!0)),o}isCommunityResource(){return this.applicationId===a}}t.PocketProvider=c},2422:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(4967),i=r(1484),o=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:c}=n(t);let u=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<a;e++){const t=e*c;let n=Number(o&f);o>>=h,n>c&&(n-=d,o+=s);const a=t,p=t+Math.abs(n)-1,g=e%2!=0,y=n<0;0===n?l=l.add(r(g,i[a])):u=u.add(r(y,i[p]))}return{p:u,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},2426:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwl=t.decode=void 0;const n=r(5347),i=/^[a-z]*$/i;function o(e,t){let r=97;return e.reduce(((e,n)=>(n===t?r++:n.match(i)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e)),[])}function s(e,t){for(let r=28;r>=0;r--)e=e.split(" !#$%&'()*+,-./<=>?@[]^_`{|}~"[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,t,n,i)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""}));if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return o(o(r,";"),":")}t.decode=s,t.decodeOwl=function(e){return(0,n.assertArgument)("0"===e[0],"unsupported auwl data","data",e),s(e.substring(59),e.substring(1,59))}},2431:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=void 0;const n=r(9943);t.wordlists={en:n.LangEn.wordlist()}},2508:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(2326),i=r(5212),o=r(7214);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},2560:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(8051),i=r(281);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2568:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(9328),i=r(5934),o=r(5279),s=r(632),a=r(8799),c=r(7699);t.last=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?i.filter((function(t,r){return e(t,r,u)})):c.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},2574:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9724),i=r(8619),o=r(7214);t.mergeInternals=function(e,t,r,s,a,c,u,l){var f=[],d=0,h=0,p=!1,g=function(){!p||f.length||d||t.complete()},y=function(e){return d<s?b(e):f.push(e)},b=function(e){c&&t.next(e),d++;var l=!1;n.innerFrom(r(e,h++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),c?y(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{d--;for(var e=function(){var e=f.shift();u?i.executeSchedule(t,u,(function(){return b(e)})):b(e)};f.length&&d<s;)e();g()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,y,(function(){p=!0,g()}))),function(){null==l||l()}}},2623:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(915),i=r(9175),o=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],r=c[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;c[e]=o+c[e-7]+n+c[e-16]|0}let{A:r,B:n,C:a,D:u,E:l,F:f,G:d,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&d)+s[e]+c[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;h=d,d=f,f=l,l=u+t|0,u=a,a=n,n=r,r=t+g|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,n,a,u,l,f,d,h)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new u)),t.sha224=(0,i.wrapConstructor)((()=>new l))},2684:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwl=void 0;const n=r(1181),i=r(5347),o=r(2426),s=r(9011);class a extends s.Wordlist{#p;#z;constructor(e,t,r){super(e),this.#p=t,this.#z=r,this.#W=null}get _data(){return this.#p}_decodeWords(){return(0,o.decodeOwl)(this.#p)}#W;#K(){if(null==this.#W){const e=this._decodeWords();if((0,n.id)(e.join("\n")+"\n")!==this.#z)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#W=e}return this.#W}getWord(e){const t=this.#K();return(0,i.assertArgument)(e>=0&&e<t.length,`invalid word index: ${e}`,"index",e),t[e]}getWordIndex(e){return this.#K().indexOf(e)}}t.WordlistOwl=a},2688:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3728),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},2708:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(281),s=r(9879),a=r(3728),c=r(2980),u=r(5717),l=r(2767),f=r(4808),d=r(2688),h=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new b(e,t,r)},r.prototype.next=function(e){this.isStopped?v(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?v(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?v(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=h;var p=Function.prototype.bind;function g(e,t){return p.call(e,t)}var y=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){m(e)}else m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){m(e)}},e}(),b=function(e){function t(t,r,n){var i,s,c=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:c&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return c.unsubscribe()},i={next:t.next&&g(t.next,s),error:t.error&&g(t.error,s),complete:t.complete&&g(t.complete,s)}):i=t,c.destination=new y(i),c}return i(t,e),t}(h);function m(e){a.config.useDeprecatedSynchronousErrorHandling?d.captureError(e):c.reportUnhandledError(e)}function v(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=b,t.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}},2719:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9724),i=r(7214),o=r(5212);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,c=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):c=!0}))),c&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},2767:function(e,t){"use strict";function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},2794:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(8877);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(1608);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(706);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(9287);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(1719);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var c=r(1778);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return c.bufferToggle}});var u=r(6606);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return u.bufferWhen}});var l=r(2719);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(9244);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var d=r(7933);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return d.combineLatestAll}});var h=r(4948);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return h.combineLatest}});var p=r(2044);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var g=r(6328);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return g.concat}});var y=r(201);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return y.concatAll}});var b=r(9512);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return b.concatMap}});var m=r(9913);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return m.concatMapTo}});var v=r(8032);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return v.concatWith}});var w=r(7812);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return w.connect}});var A=r(8589);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return A.count}});var E=r(3143);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return E.debounce}});var P=r(1762);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return P.debounceTime}});var O=r(8799);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return O.defaultIfEmpty}});var S=r(5797);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return S.delay}});var _=r(2885);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return _.delayWhen}});var k=r(9818);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return k.dematerialize}});var T=r(7876);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return T.distinct}});var x=r(9663);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var I=r(6035);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return I.distinctUntilKeyChanged}});var R=r(1279);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return R.elementAt}});var C=r(6791);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return C.endWith}});var N=r(1361);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return N.every}});var j=r(1464);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return j.exhaust}});var B=r(7977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return B.exhaustAll}});var M=r(6632);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return M.exhaustMap}});var F=r(5544);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return F.expand}});var U=r(5934);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return U.filter}});var L=r(7802);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return L.finalize}});var D=r(8183);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return D.find}});var G=r(9035);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return G.findIndex}});var H=r(9980);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return H.first}});var z=r(5128);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return z.groupBy}});var W=r(2959);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return W.ignoreElements}});var K=r(9915);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return K.isEmpty}});var V=r(2568);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return V.last}});var $=r(6872);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return $.map}});var J=r(3337);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return J.mapTo}});var q=r(5019);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return q.materialize}});var Q=r(96);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return Q.max}});var Y=r(9330);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Y.merge}});var Z=r(8087);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(4613);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(7478);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(6075);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(6707);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(9694);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(142);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(8464);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(2071);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(5513);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ce=r(6744);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ce.pairwise}});var ue=r(9516);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ue.partition}});var le=r(6355);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3197);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var de=r(2955);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return de.publishBehavior}});var he=r(6569);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return he.publishLast}});var pe=r(8710);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return pe.publishReplay}});var ge=r(6081);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ge.race}});var ye=r(6677);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ye.raceWith}});var be=r(2070);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return be.reduce}});var me=r(6131);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return me.repeat}});var ve=r(2139);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ve.repeatWhen}});var we=r(3352);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return we.retry}});var Ae=r(3956);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Ae.retryWhen}});var Ee=r(9224);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Ee.refCount}});var Pe=r(3434);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Pe.sample}});var Oe=r(4143);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Oe.sampleTime}});var Se=r(5565);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Se.scan}});var _e=r(3929);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return _e.sequenceEqual}});var ke=r(3405);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return ke.share}});var Te=r(7782);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Te.shareReplay}});var xe=r(5440);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Ie=r(3079);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ie.skip}});var Re=r(2359);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Re.skipLast}});var Ce=r(7783);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Ce.skipUntil}});var Ne=r(5774);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ne.skipWhile}});var je=r(9054);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return je.startWith}});var Be=r(5455);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Be.subscribeOn}});var Me=r(6201);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Me.switchAll}});var Fe=r(680);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Fe.switchMap}});var Ue=r(761);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Ue.switchMapTo}});var Le=r(8461);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Le.switchScan}});var De=r(4383);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return De.take}});var Ge=r(5279);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Ge.takeLast}});var He=r(6911);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return He.takeUntil}});var ze=r(598);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return ze.takeWhile}});var We=r(7400);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return We.tap}});var Ke=r(4880);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Ke.throttle}});var Ve=r(7245);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ve.throttleTime}});var $e=r(632);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return $e.throwIfEmpty}});var Je=r(2508);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Je.timeInterval}});var qe=r(1713);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return qe.timeout}});var Qe=r(597);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Qe.timeoutWith}});var Ye=r(3866);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Ye.timestamp}});var Ze=r(3484);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(8072);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(2893);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(37);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(8996);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(5156);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(6975);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(6749);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(5362);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(6977);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},2831:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRlp=void 0;const n=r(7415);function i(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function o(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(o(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=i(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call((0,n.getBytes)(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=i(t.length);return r.unshift(183+r.length),r.concat(t)}const s="0123456789abcdef";t.encodeRlp=function(e){let t="0x";for(const r of o(e))t+=s[r>>4],t+=s[15&r];return t}},2862:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=void 0;const n=r(7155),i=r(5347);let o=!1;const s=function(e,t,r,i,o){return(0,n.pbkdf2Sync)(e,t,r,i,o)};let a=s;function c(e,t,r,n,o){const s=(0,i.getBytes)(e,"password"),c=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(a(s,c,r,n,o))}t.pbkdf2=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new Error("pbkdf2 is locked");a=e},Object.freeze(c)},2884:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},2885:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(9546),i=r(4383),o=r(2959),s=r(3337),a=r(7478),c=r(9724);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return c.innerFrom(t(e,r)).pipe(i.take(1),s.mapTo(e))}))}},2893:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=r(6808),o=r(5212),s=r(7214);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],c=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,u;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(s)throw s.error}}var d=c-e+1;if(d>=0&&d%r===0&&a.shift().complete(),++c%r===0){var h=new i.Subject;a.push(h),o.next(h.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},2931:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},2955:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(7314),i=r(4359);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},2959:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(5212),i=r(7214),o=r(5717);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},2963:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizationify=void 0;const n=r(646),i=r(2291),o=r(5347);t.authorizationify=function(e){return{address:(0,n.getAddress)(e.address),nonce:(0,o.getBigInt)(null!=e.nonce?e.nonce:0),chainId:(0,o.getBigInt)(null!=e.chainId?e.chainId:0),signature:i.Signature.from(e.signature)}}},2977:function(e,t,r){"use strict";var n,i,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},s=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CBC=void 0;const a=r(6342);class c extends a.ModeOfOperation{constructor(e,t){if(super("ECC",e,c),n.set(this,void 0),i.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");o(this,n,new Uint8Array(t),"f")}else o(this,n,new Uint8Array(16),"f");o(this,i,this.iv,"f")}get iv(){return new Uint8Array(s(this,n,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){for(let t=0;t<16;t++)s(this,i,"f")[t]^=e[r+t];o(this,i,this.aes.encrypt(s(this,i,"f")),"f"),t.set(s(this,i,"f"),r)}return t}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){const n=this.aes.decrypt(e.subarray(r,r+16));for(let o=0;o<16;o++)t[r+o]=n[o]^s(this,i,"f")[o],s(this,i,"f")[o]=e[r+o]}return t}}t.CBC=c,n=new WeakMap,i=new WeakMap},2980:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3728),i=r(4808);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},3071:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VoidSigner=t.AbstractSigner=void 0;const n=r(646),i=r(7778),o=r(5347),s=r(3807);function a(e,t){if(e.provider)return e.provider;(0,o.assert)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function c(e,t){let r=(0,s.copyRequest)(t);if(null!=r.to&&(r.to=(0,n.resolveAddress)(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),(0,n.resolveAddress)(t,e)]).then((([e,t])=>((0,o.assertArgument)(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e)))}else r.from=e.getAddress();return await(0,o.resolveProperties)(r)}class u{provider;constructor(e){(0,o.defineProperties)(this,{provider:e||null})}async getNonce(e){return a(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await c(this,e)}async populateTransaction(e){const t=a(this,"populateTransaction"),r=await c(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){const t=(0,o.getBigInt)(r.chainId);(0,o.assertArgument)(t===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;const i=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!i?0!==r.type&&1!==r.type||!i||(0,o.assertArgument)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):(0,o.assertArgument)(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();(0,o.assert)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,o.assert)(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):(0,o.assert)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==r.type&&3!==r.type&&4!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await(0,o.resolveProperties)(r)}async populateAuthorization(e){const t=Object.assign({},e);return null==t.chainId&&(t.chainId=(await a(this,"getNetwork").getNetwork()).chainId),null==t.nonce&&(t.nonce=await this.getNonce()),t}async estimateGas(e){return a(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return a(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=a(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=a(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const n=i.Transaction.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}authorize(e){(0,o.assert)(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}t.AbstractSigner=u;class l extends u{address;constructor(e,t){super(t),(0,o.defineProperties)(this,{address:e})}async getAddress(){return this.address}connect(e){return new l(this.address,e)}#V(e,t){(0,o.assert)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#V("transactions","signTransaction")}async signMessage(e){this.#V("messages","signMessage")}async signTypedData(e,t,r){this.#V("typed-data","signTypedData")}}t.VoidSigner=l},3079:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(5934);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},3143:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(5212),i=r(5717),o=r(7214),s=r(9724);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,c=null,u=function(){if(null==c||c.unsubscribe(),c=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==c||c.unsubscribe(),n=!0,a=t,c=o.createOperatorSubscriber(r,u,i.noop),s.innerFrom(e(t)).subscribe(c)}),(function(){u(),r.complete()}),void 0,(function(){a=c=null})))}))}},3178:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=t.unpack=t.pack=void 0;const n=r(5347),i=r(9976),o=r(8869),s=r(5754);function a(e,t,r){let i=[];if(Array.isArray(r))i=r;else if(r&&"object"==typeof r){let e={};i=t.map((t=>{const i=t.localName;return(0,n.assert)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),(0,n.assert)(!e[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[i]=!0,r[i]}))}else(0,n.assertArgument)(!1,"invalid tuple value","tuple",r);(0,n.assertArgument)(t.length===i.length,"types/value length mismatch","tuple",r);let s=new o.Writer,a=new o.Writer,c=[];t.forEach(((e,t)=>{let r=i[t];if(e.dynamic){let t=a.length;e.encode(a,r);let n=s.writeUpdatableValue();c.push((e=>{n(e+t)}))}else e.encode(s,r)})),c.forEach((e=>{e(s.length)}));let u=e.appendWriter(s);return u+=e.appendWriter(a),u}function c(e,t){let r=[],i=[],s=e.subReader(0);return t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readIndex(),i=s.subReader(r);try{o=t.decode(i)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}if(null==o)throw new Error("investigate");r.push(o),i.push(t.localName||null)})),o.Result.fromItems(r,i)}t.pack=a,t.unpack=c;class u extends o.Coder{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),(0,n.defineProperties)(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){const r=i.Typed.dereference(t,"array");Array.isArray(r)||this._throwError("expected array value",r);let o=this.length;-1===o&&(o=r.length,e.writeValue(r.length)),(0,n.assertArgumentCount)(r.length,o,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let e=0;e<r.length;e++)s.push(this.coder);return a(e,s,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),(0,n.assert)(t*o.WordSize<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*o.WordSize,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new s.AnonymousCoder(this.coder));return c(e,r)}}t.ArrayCoder=u},3192:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeHmac=void 0;const n=r(7155),i=r(5347);let o=!1;const s=function(e,t,r){return(0,n.createHmac)(e,t).update(r).digest()};let a=s;function c(e,t,r){const n=(0,i.getBytes)(t,"key"),o=(0,i.getBytes)(r,"data");return(0,i.hexlify)(a(e,n,o))}t.computeHmac=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new Error("computeHmac is locked");a=e},Object.freeze(c)},3197:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(6808),i=r(8464),o=r(7812);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},3238:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const n=r(915),i=r(9175),o=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),s=Uint8Array.from({length:16},((e,t)=>t));let a=[s],c=[s.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let t of[a,c])t.push(t[e].map((e=>o[e])));const u=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=a.map(((e,t)=>e.map((e=>u[t][e])))),f=c.map(((e,t)=>e.map((e=>u[t][e])))),d=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),p=(e,t)=>e<<t|e>>>32-t;function g(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const y=new Uint32Array(16);class b extends n.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)y[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,s=0|this.h2,u=s,b=0|this.h3,m=b,v=0|this.h4,w=v;for(let e=0;e<5;e++){const t=4-e,A=d[e],E=h[e],P=a[e],O=c[e],S=l[e],_=f[e];for(let t=0;t<16;t++){const n=p(r+g(e,i,s,b)+y[P[t]]+A,S[t])+v|0;r=v,v=b,b=0|p(s,10),s=i,i=n}for(let e=0;e<16;e++){const r=p(n+g(t,o,u,m)+y[O[e]]+E,_[e])+w|0;n=w,w=m,m=0|p(u,10),u=o,o=r}}this.set(this.h1+s+m|0,this.h2+b+w|0,this.h3+v+n|0,this.h4+r+o|0,this.h0+i+u|0)}roundClean(){y.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=b,t.ripemd160=(0,i.wrapConstructor)((()=>new b))},3239:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=void 0;const n=r(2291),i=r(5347),o=r(3514),s=new Uint8Array(32);function a(e){return(0,i.assertArgument)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function c(e){const t=(0,i.toUtf8Bytes)(u(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(a(t.slice(n,e))),n=e+1);return(0,i.assertArgument)(n<t.length,"invalid ENS name; empty component","name",e),r.push(a(t.slice(n))),r}function u(e){try{if(0===e.length)throw new Error("empty label");return(0,o.ens_normalize)(e)}catch(t){(0,i.assertArgument)(!1,`invalid ENS name (${t.message})`,"name",e)}}s.fill(0),t.ensNormalize=u,t.isValidName=function(e){try{return 0!==c(e).length}catch(e){}return!1},t.namehash=function(e){(0,i.assertArgument)("string"==typeof e,"invalid ENS name; not a string","name",e),(0,i.assertArgument)(e.length,"invalid ENS name (empty label)","name",e);let t=s;const r=c(e);for(;r.length;)t=(0,n.keccak256)((0,i.concat)([t,(0,n.keccak256)(r.pop())]));return(0,i.hexlify)(t)},t.dnsEncode=function(e,t){const r=null!=t?t:63;return(0,i.assertArgument)(r<=255,"DNS encoded label cannot exceed 255","length",r),(0,i.hexlify)((0,i.concat)(c(e).map((t=>{(0,i.assertArgument)(t.length<=r,`label ${JSON.stringify(e)} exceeds ${r} bytes`,"name",e);const n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n}))))+"00"}},3271:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.createGetUrl=void 0;const n=r(1500);function i(e){return async function(t,r){(0,n.assert)(null==r||!r.cancelled,"request cancelled before sending","CANCELLED");const i=t.url.split(":")[0].toLowerCase();(0,n.assert)("http"===i||"https"===i,`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),(0,n.assert)("https"===i||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let o=null;const s=new AbortController,a=setTimeout((()=>{o=(0,n.makeError)("request timeout","TIMEOUT"),s.abort()}),t.timeout);r&&r.addListener((()=>{o=(0,n.makeError)("request cancelled","CANCELLED"),s.abort()}));const c=Object.assign({},e,{method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:s.signal});let u;try{u=await fetch(t.url,c)}catch(e){if(clearTimeout(a),o)throw o;throw e}clearTimeout(a);const l={};u.headers.forEach(((e,t)=>{l[t.toLowerCase()]=e}));const f=await u.arrayBuffer(),d=null==f?null:new Uint8Array(f);return{statusCode:u.status,statusMessage:u.statusText,headers:l,body:d}}}t.createGetUrl=i;const o=i({});t.getUrl=async function(e,t){return o(e,t)}},3275:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},3279:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=t.Mnemonic=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=t.decryptCrowdsaleJson=t.isCrowdsaleJson=t.HDNodeVoidWallet=t.HDNodeWallet=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.BaseWallet=void 0;var n=r(8394);Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return n.BaseWallet}});var i=r(22);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return i.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return i.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return i.getIndexedAccountPath}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return i.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return i.HDNodeVoidWallet}});var o=r(7570);Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return o.isCrowdsaleJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return o.decryptCrowdsaleJson}});var s=r(1650);Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return s.isKeystoreJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return s.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return s.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.encryptKeystoreJsonSync}});var a=r(5312);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return a.Mnemonic}});var c=r(6930);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.Wallet}})},3337:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(6872);t.mapTo=function(e){return n.map((function(){return e}))}},3352:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(5212),i=r(7214),o=r(7699),s=r(5825),a=r(9724);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,c=void 0===r?1/0:r,u=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return c<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<c){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=u){var d="number"==typeof u?s.timer(u):a.innerFrom(u(e,n)),h=i.createOperatorSubscriber(t,(function(){h.unsubscribe(),f()}),(function(){t.complete()}));d.subscribe(h)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},3358:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandler=t.ErrorType=void 0,t.createError=o,t.handleError=function(e,t={}){const{message:r=(e instanceof Error?e.message:String(e)),throwError:n=!1,logError:i=!0,callback:o}=t;if(i&&console.error(`[ERROR] ${r}`,e),"function"==typeof o)return o(e);if(n)throw e instanceof Error?e:new Error(r);return{success:!1,message:r,error:e}};const n=r(5628);var i;function o(e,t,r,n){return{type:e,code:t,message:r,originalError:n,timestamp:Date.now()}}!function(e){e.AUTHENTICATION="AuthenticationError",e.AUTHORIZATION="AuthorizationError",e.VALIDATION="ValidationError",e.NETWORK="NetworkError",e.DATABASE="DatabaseError",e.WALLET="WalletError",e.STORAGE="StorageError",e.ENCRYPTION="EncryptionError",e.SIGNATURE="SignatureError",e.ENVIRONMENT="EnvironmentError",e.SECURITY="SecurityError",e.GUN="GunError",e.STEALTH="StealthError",e.WEBAUTHN="WebAuthnError",e.PLUGIN="PluginError",e.UNKNOWN="UnknownError",e.CONNECTOR="CONNECTOR",e.GENERAL="GENERAL",e.CONTRACT="CONTRACT",e.BIP32="BIP32Error",e.ETHEREUM="EthereumError",e.BITCOIN="BitcoinError"}(i||(t.ErrorType=i={})),t.ErrorHandler=class{static errors=[];static maxErrors=100;static listeners=[];static handleError(e){(0,n.logError)(`[${e.type}] ${e.code}: ${e.message}`),this.errors.push(e),this.errors.length>this.maxErrors&&(this.errors=this.errors.slice(-this.maxErrors)),this.notifyListeners(e)}static handle(e,t,r,i,s="error"){const a=i?`${r} - ${this.formatError(i)}`:r;switch(s){case"debug":(0,n.log)(`[${e}.${t}] (DEBUG) ${a}`);break;case"warn":(0,n.log)(`[${e}.${t}] (WARN) ${a}`);break;case"info":(0,n.log)(`[${e}.${t}] (INFO) ${a}`);break;default:(0,n.log)(`[${e}.${t}] (ERROR) ${a}`),i&&i instanceof Error&&(0,n.log)(i.stack||"No stack trace available")}const c=o(e,t,a,i);return this.handleError(c),c}static getRecentErrors(e=10){return this.errors.slice(-Math.min(e,this.errors.length))}static addListener(e){this.listeners.push(e)}static removeListener(e){const t=this.listeners.indexOf(e);-1!==t&&this.listeners.splice(t,1)}static notifyListeners(e){for(const t of this.listeners)try{t(e)}catch(e){(0,n.logError)(`Error in error listener: ${e}`)}}static formatError(e){if(!e)return"Unknown error";if(e instanceof Error)return`${e.name}: ${e.message}`;if("string"==typeof e)return e;if("object"==typeof e)try{return JSON.stringify(e)}catch(t){return`Object: ${Object.prototype.toString.call(e)}`}return String(e)}static async withRetry(e,t,r,i=3,o=1e3){let s;for(let t=1;t<=i;t++)try{return await e()}catch(e){s=e;const r=o*t;t<i&&((0,n.log)(`Retrying operation after ${r}ms (attempt ${t}/${i})`),await new Promise((e=>setTimeout(e,r))))}throw this.handle(t,r,`Operation failed after ${i} attempts`,s)}}},3405:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9724),s=r(6808),a=r(2708),c=r(5212);function u(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(!0!==t){if(!1!==t){var c=new a.SafeSubscriber({next:function(){c.unsubscribe(),e()}});return o.innerFrom(t.apply(void 0,i([],n(r)))).subscribe(c)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,d=e.resetOnRefCountZero,h=void 0===d||d;return function(e){var t,n,s,l=0,d=!1,p=!1,g=function(){null==n||n.unsubscribe(),n=void 0},y=function(){g(),t=s=void 0,d=p=!1},b=function(){var e=t;y(),null==e||e.unsubscribe()};return c.operate((function(e,c){l++,p||d||g();var m=s=null!=s?s:r();c.add((function(){0!==--l||p||d||(n=u(b,h))})),m.subscribe(c),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){p=!0,g(),n=u(y,i,e),m.error(e)},complete:function(){d=!0,g(),n=u(y,f),m.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},3434:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(9724),i=r(5212),o=r(5717),s=r(7214);t.sample=function(e){return i.operate((function(t,r){var i=!1,a=null;t.subscribe(s.createOperatorSubscriber(r,(function(e){i=!0,a=e}))),n.innerFrom(e).subscribe(s.createOperatorSubscriber(r,(function(){if(i){i=!1;var e=a;a=null,r.next(e)}}),o.noop))}))}},3484:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(2070),i=r(5212),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},3506:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9619);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},3514:function(e,t){"use strict";const r=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function n(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e<n;e++)o.push(i+=r());let s=r(),a=t;t+=s;let c=0,u=0;function l(){return 0==c&&(u=u<<8|e[t++],c=8),u>>--c&1}const f=2**31,d=f>>>1,h=d>>1,p=f-1;let g=0;for(let e=0;e<31;e++)g=g<<1|l();let y=[],b=0,m=f;for(;;){let e=Math.floor(((g-b+1)*i-1)/m),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;y.push(t);let s=b+Math.floor(m*o[t]/i),a=b+Math.floor(m*o[t+1]/i)-1;for(;0==((s^a)&d);)g=g<<1&p|l(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&h;)g=g&d|g<<1&p>>>1|l(),s=s<<1^d,a=(a^d)<<1|d|1;b=s,m=1+a-s}let v=n-4;return y.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,a=0;i<r;i++)a=a<<6|t[e.charCodeAt(i)],s+=6,s>=8&&(n[o++]=a>>(s-=8));return n}(e)))}function i(e){return 1&e?~e>>1:e>>1}function o(e,t){let r=Array(e);for(let n=0,o=0;n<e;n++)r[n]=o+=i(t());return r}function s(e,t=0){let r=[];for(;;){let n=e(),i=e();if(!i)break;t+=n;for(let e=0;e<i;e++)r.push(t+e);t+=i+1}return r}function a(e){return u((()=>{let t=s(e);if(t.length)return t}))}function c(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(f(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(d(r,e))}return t.flat()}function u(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function l(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;i<t;i++)o(e,r).forEach(((e,t)=>n[t].push(e)));return n}function f(e,t){let r=1+t(),n=t(),i=u(t);return l(i.length,1+e,t).flatMap(((e,t)=>{let[o,...s]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))}))}function d(e,t){return l(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function h(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function p(e){let t=[];for(let r=0,n=e.length;r<n;){let n=e.codePointAt(r);r+=n<65536?1:2,t.push(n)}return t}function g(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n<t;)r.push(String.fromCodePoint(...e.slice(n,n+=4096)));return r.join("")}function y(e,t){let r=e.length,n=r-t.length;for(let i=0;0==n&&i<r;i++)n=e[i]-t[i];return n}const b=44032,m=4352,v=4449,w=4519;function A(e){return e>>24&255}function E(e){return 16777215&e}let P,O,S,_;function k(e){return e>=b&&e<55204}function T(e,t){if(e>=m&&e<4371&&t>=v&&t<4470)return b+588*(e-m)+28*(t-v);if(k(e)&&t>w&&t<4547&&(e-b)%28==0)return e+(t-w);{let r=_.get(e);return r&&(r=r.get(t),r)?r:-1}}function x(e){P||function(){let e=n("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");P=new Map(a(e).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),O=new Set(s(e)),S=new Map,_=new Map;for(let[t,r]of c(e)){if(!O.has(t)&&2==r.length){let[e,n]=r,i=_.get(e);i||(i=new Map,_.set(e,i)),i.set(n,t)}S.set(t,r.reverse())}}();let t=[],r=[],i=!1;function o(e){let r=P.get(e);r&&(i=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(k(n)){let e=n-b,t=e%588/28|0,r=e%28;o(m+(e/588|0)),o(v+t),r>0&&o(w+r)}else{let e=S.get(n);e?r.push(...e):o(n)}if(!r.length)break;n=r.pop()}if(i&&t.length>1){let e=A(t[0]);for(let r=1;r<t.length;r++){let n=A(t[r]);if(0==n||e<=n){e=n;continue}let i=r-1;for(;;){let r=t[i+1];if(t[i+1]=t[i],t[i]=r,!i)break;if(e=A(t[--i]),e<=n)break}e=A(t[r])}}return t}function I(e){return x(e).map(E)}function R(e){return function(e){let t=[],r=[],n=-1,i=0;for(let o of e){let e=A(o),s=E(o);if(-1==n)0==e?n=s:t.push(s);else if(i>0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=s):r.push(s),i=e;else{let o=T(n,s);o>=0?n=o:0==i&&0==e?(t.push(n),n=s):(r.push(s),i=e)}}return n>=0&&t.push(n,...r),t}(x(e))}const C=".",N=e=>Array.from(e);function j(e,t){return e.P.has(t)||e.Q.has(t)}class B extends Array{get is_emoji(){return!0}}let M,F,U,L,D,G,H,z,W,K,V,$;function J(){if(M)return;let e=n("AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI");const t=()=>s(e),r=()=>new Set(t()),i=(e,t)=>t.forEach((t=>e.add(t)));M=new Map(c(e)),F=r(),U=t(),L=new Set(t().map((e=>U[e]))),U=new Set(U),D=r(),G=r();let o=a(e),l=e();const f=()=>{let e=new Set;return t().forEach((t=>i(e,o[t]))),i(e,t()),e};H=u((t=>{let r=u(e).map((e=>e+96));if(r.length){let n=t>=l;return r[0]-=32,r=g(r),n&&(r=`Restricted[${r}]`),{N:r,P:f(),Q:f(),M:!e(),R:n}}})),z=r(),W=new Map;let d=t().concat(N(z)).sort(((e,t)=>e-t));d.forEach(((t,r)=>{let n=e(),i=d[r]=n?d[r-n]:{V:[],M:new Map};i.V.push(t),z.has(t)||W.set(t,i)}));for(let{V:e,M:t}of new Set(W.values())){let r=[];for(let t of e){let e=H.filter((e=>j(e,t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),i(n.G,e)}let n=r.flatMap((e=>N(e.G)));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}K=new Set;let h=new Set;const p=e=>K.has(e)?h.add(e):K.add(e);for(let e of H){for(let t of e.P)p(t);for(let t of e.Q)p(t)}for(let e of K)W.has(e)||h.has(e)||W.set(e,1);i(K,I(K)),V=function(e){let t=[],r=s(e);return function e({S:r,B:n},i,o){if(!(4&r&&o===i[i.length-1])){2&r&&(o=i[i.length-1]),1&r&&t.push(i);for(let t of n)for(let r of t.Q)e(t,[...i,r],o)}}(function t(n){return{S:e(),B:u((()=>{let n=s(e).map((e=>r[e]));if(n.length)return t(n)})),Q:n}}([]),[]),t}(e).map((e=>B.from(e))).sort(y),$=new Map;for(let e of V){let t=[$];for(let r of e){let e=t.map((e=>{let t=e.get(r);return t||(t=new Map,e.set(r,t)),t}));65039===r?t.push(...e):t=e}for(let r of t)r.V=e}}function q(e){return(X(e)?"":`${Q(Y([e]))} `)+h(e)}function Q(e){return`"${e}"`}function Y(e,t=1/0,r=h){let n=[];Z(e[0])&&n.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,o=e.length;for(let t=0;t<o;t++){let o=e[t];X(o)&&(n.push(g(e.slice(i,t))),n.push(r(o)),i=t+1)}return n.push(g(e.slice(i,o))),n.join("")}function Z(e){return J(),U.has(e)}function X(e){return J(),D.has(e)}function ee(e,t,r){let n=0;for(;;){let i=e.indexOf(t,n);if(i<0)break;e[i]=r,n=i+1}}function te(e,t,n){if(!e)return[];J();let i=0;return e.split(C).map((e=>{let o=p(e),s={input:o,offset:i};i+=o.length+1;try{let e,i=s.tokens=se(o,t,n),a=i.length;if(!a)throw new Error("empty label");let c=s.output=i.flat();if(function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(c),!(s.emoji=a>1||i[0].is_emoji)&&c.every((e=>e<128)))!function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error(`invalid label extension: "${g(e.slice(0,4))}"`)}(c),e="ASCII";else{let t=i.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(U.has(c[0]))throw oe("leading combining mark");for(let e=1;e<a;e++){let t=i[e];if(!t.is_emoji&&U.has(t[0]))throw oe(`emoji + combining mark: "${g(i[e-1])} + ${Y([t[0]])}"`)}!function(e){let t=e[0],n=r.get(t);if(n)throw oe(`leading ${n}`);let i=e.length,o=-1;for(let s=1;s<i;s++){t=e[s];let i=r.get(t);if(i){if(o==s)throw oe(`${n} + ${i}`);o=s+1,n=i}}if(o==i)throw oe(`trailing ${n}`)}(c);let n=N(new Set(t)),[o]=function(e){let t=H;for(let r of e){let e=t.filter((e=>j(e,r)));if(!e.length)throw H.some((e=>j(e,r)))?ie(t[0],r):ne(r);if(t=e,1==e.length)break}return t}(n);!function(e,t){for(let r of t)if(!j(e,r))throw ie(e,r);if(e.M){let e=I(t);for(let t=1,r=e.length;t<r;t++)if(L.has(e[t])){let n=t+1;for(let i;n<r&&L.has(i=e[n]);n++)for(let r=t;r<n;r++)if(e[r]==i)throw new Error(`duplicate non-spacing marks: ${q(i)}`);if(n-t>4)throw new Error(`excessive non-spacing marks: ${Q(Y(e.slice(t-1,n)))} (${n-t}/4)`);t=n}}}(o,t),function(e,t){let r,n=[];for(let e of t){let t=W.get(e);if(1===t)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):N(n),!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>j(t,e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(o,n),e=o.N}else e="Emoji"}s.type=e}catch(e){s.error=e}return s}))}function re(e){return e.map((({input:t,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==e.length?n:`Invalid label ${Q(Y(t,63))}: ${n}`)}return g(n)})).join(C)}function ne(e){return new Error(`disallowed character: ${q(e)}`)}function ie(e,t){let r=q(t),n=H.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function oe(e){return new Error(`illegal placement: ${e}`)}function se(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let o=ce(e);if(o)i.length&&(n.push(t(i)),i=[]),n.push(r(o));else{let t=e.pop();if(K.has(t))i.push(t);else{let e=M.get(t);if(e)i.push(...e);else if(!F.has(t))throw ne(t)}}}return i.length&&n.push(t(i)),n}function ae(e){return e.filter((e=>65039!=e))}function ce(e,t){let r,n=$,i=e.length;for(;i&&(n=n.get(e[--i]),n);){let{V:o}=n;o&&(r=o,t&&t.push(...e.slice(i).reverse()),e.length=i)}return r}const ue="valid",le="mapped",fe="ignored";function de(e){return e==ue||e==le}function he(e){return e.some((e=>G.has(e)))}function pe(e){for(let t=0;t<e.length;t++)if(e[t].type==ue){let r=t+1;for(;r<e.length&&e[r].type==ue;)r++;e.splice(t,r-t,{type:ue,cps:e.slice(t,r).flatMap((e=>e.cps))})}return e}t.ens_beautify=function(e){let t=te(e,R,(e=>e));for(let{type:e,output:r,error:n}of t){if(n)break;"Greek"!==e&&ee(r,958,926)}return re(t)},t.ens_emoji=function(){return J(),V.map((e=>e.slice()))},t.ens_normalize=function(e){return re(te(e,R,ae))},t.ens_normalize_fragment=function(e,t){J();let r=t?I:R;return e.split(C).map((e=>g(se(p(e),r,ae).flat()))).join(C)},t.ens_split=function(e,t){return te(e,R,t?e=>e.slice():ae)},t.ens_tokenize=function e(t,{nf:r=!0}={}){J();let n=p(t).reverse(),i=[],o=[];for(;n.length;){let e=ce(n,i);if(e)o.push({type:"emoji",emoji:e.slice(),input:i,cps:ae(e)}),i=[];else{let e=n.pop();if(46==e)o.push({type:"stop",cp:e});else if(K.has(e))o.push({type:ue,cps:[e]});else if(F.has(e))o.push({type:fe,cp:e});else{let t=M.get(e);t?o.push({type:le,cp:e,cps:t.slice()}):o.push({type:"disallowed",cp:e})}}}if(r)for(let t=0,r=-1;t<o.length;t++){let n=o[t];if(de(n.type))if(he(n.cps)){let n=t+1;for(let e=n;e<o.length;e++){let{type:t,cps:r}=o[e];if(de(t)){if(!he(r))break;n=e+1}else if(t!==fe)break}r<0&&(r=t);let i=o.slice(r,n),s=i.flatMap((e=>de(e.type)?e.cps:[])),a=R(s);y(a,s)?(o.splice(r,n-r,{type:"nfc",input:s,cps:a,tokens0:pe(i),tokens:e(g(a),{nf:!1})}),t=r):t=n-1,r=-1}else r=t;else n.type!==fe&&(r=-1)}return pe(o)},t.is_combining_mark=Z,t.nfc=R,t.nfd=I,t.safe_str_from_cps=Y,t.should_escape=X},3562:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(9615),i=r(9175),o=r(1705);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},3728:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},3807:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResponse=t.TransactionReceipt=t.Log=t.Block=t.copyRequest=t.FeeData=void 0;const n=r(5347),i=r(7778),o=BigInt(0);function s(e){return null==e?null:e}function a(e){return null==e?null:e.toString()}t.FeeData=class{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,r){(0,n.defineProperties)(this,{gasPrice:s(e),maxFeePerGas:s(t),maxPriorityFeePerGas:s(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:a(e),maxFeePerGas:a(t),maxPriorityFeePerGas:a(r)}}},t.copyRequest=function(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=(0,n.hexlify)(e.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)i in e&&null!=e[i]&&(t[i]=(0,n.getBigInt)(e[i],`request.${i}`));const o="type,nonce".split(/,/);for(const r of o)r in e&&null!=e[r]&&(t[r]=(0,n.getNumber)(e[r],`request.${r}`));return e.accessList&&(t.accessList=(0,i.accessListify)(e.accessList)),e.authorizationList&&(t.authorizationList=e.authorizationList.slice()),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>(0,n.isBytesLike)(e)?(0,n.hexlify)(e):Object.assign({},e)))),t};class c{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#$;constructor(e,t){this.#$=e.transactions.map((e=>"string"!=typeof e?new f(e,t):e)),(0,n.defineProperties)(this,{provider:t,hash:s(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:s(e.prevRandao),extraData:e.extraData,baseFeePerGas:s(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#$.map((e=>"string"==typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#$.slice();return 0===e.length?[]:((0,n.assert)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:r,gasLimit:n,gasUsed:i,hash:o,miner:s,prevRandao:c,nonce:u,number:l,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,timestamp:g,transactions:y}=this;return{_type:"Block",baseFeePerGas:a(e),difficulty:a(t),extraData:r,gasLimit:a(n),gasUsed:a(i),blobGasUsed:a(this.blobGasUsed),excessBlobGas:a(this.excessBlobGas),hash:o,miner:s,prevRandao:c,nonce:u,number:l,parentHash:f,timestamp:g,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:p,transactions:y}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#$.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(e){let t;if("number"==typeof e)t=this.#$[e];else{const r=e.toLowerCase();for(const e of this.#$){if("string"==typeof e){if(e!==r)continue;t=e;break}if(e.hash===r){t=e;break}}}if(null==t)throw new Error("no such tx");return"string"==typeof t?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){const t=this.prefetchedTransactions;if("number"==typeof e)return t[e];e=e.toLowerCase();for(const r of t)if(r.hash===e)return r;(0,n.assertArgument)(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return{orphan:"drop-block",hash:this.hash,number:this.number}}}t.Block=c;class u{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;const r=Object.freeze(e.topics.slice());(0,n.defineProperties)(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:r,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:c}=this;return{_type:"log",address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:c}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:(e=this).transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}};var e}}t.Log=u;class l{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#J;constructor(e,t){this.#J=Object.freeze(e.logs.map((e=>new u(e,t))));let r=o;null!=e.effectiveGasPrice?r=e.effectiveGasPrice:null!=e.gasPrice&&(r=e.gasPrice),(0,n.defineProperties)(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#J}toJSON(){const{to:e,from:t,contractAddress:r,hash:n,index:i,blockHash:o,blockNumber:s,logsBloom:c,logs:u,status:l,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:r,cumulativeGasUsed:a(this.cumulativeGasUsed),from:t,gasPrice:a(this.gasPrice),blobGasUsed:a(this.blobGasUsed),blobGasPrice:a(this.blobGasPrice),gasUsed:a(this.gasUsed),hash:n,index:i,logs:u,logsBloom:c,root:f,status:l,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(null==e)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(null==e)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return h(this)}reorderedEvent(e){return(0,n.assert)(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),d(this,e)}}t.TransactionReceipt=l;class f{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#q;constructor(e,t){this.provider=t,this.blockNumber=null!=e.blockNumber?e.blockNumber:null,this.blockHash=null!=e.blockHash?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=null!=e.maxPriorityFeePerGas?e.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=e.maxFeePerGas?e.maxFeePerGas:null,this.maxFeePerBlobGas=null!=e.maxFeePerBlobGas?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=null!=e.accessList?e.accessList:null,this.blobVersionedHashes=null!=e.blobVersionedHashes?e.blobVersionedHashes:null,this.authorizationList=null!=e.authorizationList?e.authorizationList:null,this.#q=-1}toJSON(){const{blockNumber:e,blockHash:t,index:r,hash:n,type:i,to:o,from:s,nonce:c,data:u,signature:l,accessList:f,blobVersionedHashes:d}=this;return{_type:"TransactionResponse",accessList:f,blockNumber:e,blockHash:t,blobVersionedHashes:d,chainId:a(this.chainId),data:u,from:s,gasLimit:a(this.gasLimit),gasPrice:a(this.gasPrice),hash:n,maxFeePerGas:a(this.maxFeePerGas),maxPriorityFeePerGas:a(this.maxPriorityFeePerGas),maxFeePerBlobGas:a(this.maxFeePerBlobGas),nonce:c,signature:l,to:o,index:r,type:i,value:a(this.value)}}async getBlock(){let e=this.blockNumber;if(null==e){const t=await this.getTransaction();t&&(e=t.blockNumber)}if(null==e)return null;const t=this.provider.getBlock(e);if(null==t)throw new Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){const{tx:e,blockNumber:t}=await(0,n.resolveProperties)({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==e||null==e.blockNumber?0:t-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){const r=null==e?1:e,i=null==t?0:t;let s=this.#q,a=-1,c=-1===s;const u=async()=>{if(c)return null;const{blockNumber:e,nonce:t}=await(0,n.resolveProperties)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t<this.nonce)return void(s=e);if(c)return null;const i=await this.getTransaction();if(!i||null==i.blockNumber)for(-1===a&&(a=s-3,a<this.#q&&(a=this.#q));a<=e;){if(c)return null;const t=await this.provider.getBlock(a,!0);if(null==t)return;for(const e of t)if(e===this.hash)return;for(let i=0;i<t.length;i++){const a=await t.getTransaction(i);if(a.from===this.from&&a.nonce===this.nonce){if(c)return null;const t=await this.provider.getTransactionReceipt(a.hash);if(null==t)return;if(e-t.blockNumber+1<r)return;let i="replaced";a.data===this.data&&a.to===this.to&&a.value===this.value?i="repriced":"0x"===a.data&&a.from===a.to&&a.value===o&&(i="cancelled"),(0,n.assert)(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:a.replaceableTransaction(s),hash:a.hash,receipt:t})}}a++}},l=e=>{if(null==e||0!==e.status)return e;(0,n.assert)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},f=await this.provider.getTransactionReceipt(this.hash);if(0===r)return l(f);if(f){if(1===r||await f.confirmations()>=r)return l(f)}else if(await u(),0===r)return null;const d=new Promise(((e,t)=>{const o=[],a=()=>{o.forEach((e=>e()))};if(o.push((()=>{c=!0})),i>0){const e=setTimeout((()=>{a(),t((0,n.makeError)("wait for transaction timeout","TIMEOUT"))}),i);o.push((()=>{clearTimeout(e)}))}const f=async n=>{if(await n.confirmations()>=r){a();try{e(l(n))}catch(e){t(e)}}};if(o.push((()=>{this.provider.off(this.hash,f)})),this.provider.on(this.hash,f),s>=0){const e=async()=>{try{await u()}catch(e){if((0,n.isError)(e,"TRANSACTION_REPLACED"))return a(),void t(e)}c||this.provider.once("block",e)};o.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await d}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),h(this)}reorderedEvent(e){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,n.assert)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),d(this,e)}replaceableTransaction(e){(0,n.assertArgument)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new f(this,this.provider);return t.#q=e,t}}function d(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function h(e){return{orphan:"drop-transaction",tx:e}}t.TransactionResponse=f},3866:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(3275),i=r(6872);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},3905:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const n=r(5336),i=r(5347);let o=!1;const s=function(e){return(0,n.keccak_256)(e)};let a=s;function c(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}t.keccak256=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new TypeError("keccak256 is locked");a=e},Object.freeze(c)},3913:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocket=void 0;const n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}().WebSocket;t.WebSocket=n},3916:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(6872),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},3929:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(5212),i=r(7214),o=r(9724);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var s={buffer:[],complete:!1},a={buffer:[],complete:!1},c=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?c(!1):e.buffer.push(n):!t(n,i.shift())&&c(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&c(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(s,a)),o.innerFrom(e).subscribe(u(a,s))}))}},3948:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8CodePoints=t.toUtf8String=t.toUtf8Bytes=t.Utf8ErrorFuncs=void 0;const n=r(7415),i=r(1500);function o(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}function s(e,r){null==r&&(r=t.Utf8ErrorFuncs.error);const i=(0,n.getBytes)(e,"bytes"),o=[];let s=0;for(;s<i.length;){const e=i[s++];if(!(e>>7)){o.push(e);continue}let t=null,n=null;if(192==(224&e))t=1,n=127;else if(224==(240&e))t=2,n=2047;else{if(240!=(248&e)){s+=r(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",s-1,i,o);continue}t=3,n=65535}if(s-1+t>=i.length){s+=r("OVERRUN",s-1,i,o);continue}let a=e&(1<<8-t-1)-1;for(let e=0;e<t;e++){let e=i[s];if(128!=(192&e)){s+=r("MISSING_CONTINUE",s,i,o),a=null;break}a=a<<6|63&e,s++}null!==a&&(a>1114111?s+=r("OUT_OF_RANGE",s-1-t,i,o,a):a>=55296&&a<=57343?s+=r("UTF16_SURROGATE",s-1-t,i,o,a):a<=n?s+=r("OVERLONG",s-1-t,i,o,a):o.push(a))}return o}function a(e,t){(0,i.assertArgument)("string"==typeof e,"invalid string value","str",e),null!=t&&((0,i.assertNormalize)(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);(0,i.assertArgument)(t<e.length&&56320==(64512&o),"invalid surrogate pair","str",e);const s=65536+((1023&n)<<10)+(1023&o);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}t.Utf8ErrorFuncs=Object.freeze({error:function(e,t,r,n,o){(0,i.assertArgument)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:o,replace:function(e,t,r,n,s){return"OVERLONG"===e?((0,i.assertArgument)("number"==typeof s,"invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),o(e,t,r))}}),t.toUtf8Bytes=a,t.toUtf8String=function(e,t){return s(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")},t.toUtf8CodePoints=function(e,t){return s(a(e,t))}},3952:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(9533).AsyncScheduler);t.AsapScheduler=o},3956:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9724),i=r(6808),o=r(5212),s=r(7214);t.retryWhen=function(e){return o.operate((function(t,r){var o,a,c=!1,u=function(){o=t.subscribe(s.createOperatorSubscriber(r,void 0,void 0,(function(t){a||(a=new i.Subject,n.innerFrom(e(a)).subscribe(s.createOperatorSubscriber(r,(function(){return o?u():c=!0})))),a&&a.next(t)}))),c&&(o.unsubscribe(),o=null,c=!1,u())};u()}))}},3996:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanPlugin=t.EtherscanProvider=t.ChainstackProvider=t.CloudflareProvider=t.AnkrProvider=t.BlockscoutProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.copyRequest=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=t.NonceManager=t.Network=t.MulticoinProviderPlugin=t.EnsResolver=t.getDefaultProvider=t.showThrottleMessage=t.VoidSigner=t.AbstractSigner=t.UnmanagedSubscriber=t.AbstractProvider=void 0;var n=r(8672);Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return n.AbstractProvider}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return n.UnmanagedSubscriber}});var i=r(3071);Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return i.AbstractSigner}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return i.VoidSigner}});var o=r(9973);Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return o.showThrottleMessage}});var s=r(2347);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return s.getDefaultProvider}});var a=r(1691);Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return a.EnsResolver}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return a.MulticoinProviderPlugin}});var c=r(5317);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return c.Network}});var u=r(9596);Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return u.NonceManager}});var l=r(4491);Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}});var f=r(3807);Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return f.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return f.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return f.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return f.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return f.TransactionResponse}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return f.copyRequest}});var d=r(9902);Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return d.FallbackProvider}});var h=r(2371);Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return h.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return h.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return h.JsonRpcSigner}});var p=r(254);Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return p.BrowserProvider}});var g=r(7841);Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return g.AlchemyProvider}});var y=r(9349);Object.defineProperty(t,"BlockscoutProvider",{enumerable:!0,get:function(){return y.BlockscoutProvider}});var b=r(6806);Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return b.AnkrProvider}});var m=r(2271);Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return m.CloudflareProvider}});var v=r(8907);Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return v.ChainstackProvider}});var w=r(5047);Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return w.EtherscanProvider}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return w.EtherscanPlugin}});var A=r(5855);Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return A.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return A.InfuraWebSocketProvider}});var E=r(2398);Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return E.PocketProvider}});var P=r(8817);Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return P.QuickNodeProvider}});const O=r(4584);Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return O.IpcSocketProvider}});var S=r(4945);Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return S.SocketProvider}});var _=r(873);Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return _.WebSocketProvider}});var k=r(4945);Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return k.SocketSubscriber}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return k.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return k.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return k.SocketEventSubscriber}})},4027:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyAuthorization=t.hashAuthorization=void 0;const n=r(646),i=r(2291),o=r(7778),s=r(5347);function a(e){return(0,s.assertArgument)("string"==typeof e.address,"invalid address for hashAuthorization","auth.address",e),(0,i.keccak256)((0,s.concat)(["0x05",(0,s.encodeRlp)([null!=e.chainId?(0,s.toBeArray)(e.chainId):"0x",(0,n.getAddress)(e.address),null!=e.nonce?(0,s.toBeArray)(e.nonce):"0x"])]))}t.hashAuthorization=a,t.verifyAuthorization=function(e,t){return(0,o.recoverAddress)(a(e),t)}},4101:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),s=0;s<r.length;s++)"default"!==r[s]&&i(t,e,r[s]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.GunDB=void 0;const a=r(5628),c=r(3358),u=r(2077),l=s(r(7120)),f=s(r(554)),d=s(r(170));r(8030),t.GunDB=class{gun;user=null;crypto;utils;node;onAuthCallbacks=[];_rxjs;constructor(e,t="shogun"){if((0,a.log)("Initializing GunDB"),!e)throw new Error("Gun instance is required but was not provided");if("object"!=typeof e)throw new Error("Gun instance must be an object, received: "+typeof e);if("function"!=typeof e.user)throw new Error("Gun instance is invalid: gun.user is not a function. Received gun.user type: "+typeof e.user);if("function"!=typeof e.get)throw new Error("Gun instance is invalid: gun.get is not a function. Received gun.get type: "+typeof e.get);if("function"!=typeof e.on)throw new Error("Gun instance is invalid: gun.on is not a function. Received gun.on type: "+typeof e.on);this.gun=e;try{this.user=this.gun.user().recall({sessionStorage:!0})}catch(e){throw(0,a.logError)("Error initializing Gun user:",e),new Error(`Failed to initialize Gun user: ${e}`)}this.subscribeToAuthEvents(),this.crypto=f,this.utils=d,this.node=this.gun.get(t)}subscribeToAuthEvents(){this.gun.on("auth",(e=>{(0,a.log)("Auth event received:",e),e.err?c.ErrorHandler.handle(c.ErrorType.GUN,"AUTH_EVENT_ERROR",e.err,new Error(e.err)):this.notifyAuthListeners(e.sea?.pub||"")}))}notifyAuthListeners(e){const t=this.gun.user();this.onAuthCallbacks.forEach((e=>e(t)))}addPeer(e){this.gun.opt({peers:[e]}),(0,a.log)(`Added new peer: ${e}`)}removePeer(e){try{const t=this.gun._.opt;if(t&&t.peers){delete t.peers[e];const r=t.peers[e];r&&"function"==typeof r.close&&r.close(),(0,a.log)(`Removed peer: ${e}`)}else(0,a.log)(`Peer not found in current connections: ${e}`)}catch(t){(0,a.logError)(`Error removing peer ${e}:`,t)}}getCurrentPeers(){try{const e=this.gun._.opt;return e&&e.peers?Object.keys(e.peers).filter((t=>{const r=e.peers[t];return r&&r.wire&&"bye"!==r.wire.hied})):[]}catch(e){return(0,a.logError)("Error getting current peers:",e),[]}}getAllConfiguredPeers(){try{const e=this.gun._.opt;return e&&e.peers?Object.keys(e.peers):[]}catch(e){return(0,a.logError)("Error getting configured peers:",e),[]}}getPeerInfo(){try{const e=this.gun._.opt,t={};return e&&e.peers&&Object.keys(e.peers).forEach((r=>{const n=e.peers[r],i=n&&n.wire&&"bye"!==n.wire.hied,o=i?"connected":n&&n.wire?"disconnected":"not_initialized";t[r]={connected:i,status:o}})),t}catch(e){return(0,a.logError)("Error getting peer info:",e),{}}}reconnectToPeer(e){try{this.removePeer(e),setTimeout((()=>{this.addPeer(e),(0,a.log)(`Reconnected to peer: ${e}`)}),1e3)}catch(t){(0,a.logError)(`Error reconnecting to peer ${e}:`,t)}}resetPeers(e){try{const t=this.gun._.opt;t&&t.peers&&(Object.keys(t.peers).forEach((e=>{this.removePeer(e)})),e&&e.length>0&&e.forEach((e=>{this.addPeer(e)})),(0,a.log)(`Reset peers. New peers: ${e?e.join(", "):"none"}`))}catch(e){(0,a.logError)("Error resetting peers:",e)}}onAuth(e){this.onAuthCallbacks.push(e);const t=this.gun.user();return t&&t.is&&e(t),()=>{const t=this.onAuthCallbacks.indexOf(e);-1!==t&&this.onAuthCallbacks.splice(t,1)}}getGun(){return this.gun}getUser(){return this.gun.user()}get(e){return this.gun.get(e)}async put(e,t){return new Promise((r=>{this.gun.get(e).put(t,(e=>{r(e.err?{success:!1,error:e.err}:{success:!0})}))}))}async set(e,t){return new Promise((r=>{this.gun.get(e).set(t,(e=>{r(e.err?{success:!1,error:e.err}:{success:!0})}))}))}async remove(e){return new Promise((t=>{this.gun.get(e).put(null,(e=>{t(e.err?{success:!1,error:e.err}:{success:!0})}))}))}async signUp(e,t){(0,a.log)("Attempting user registration:",e);try{if(t.length<8){const e="Passwords must be more than 8 characters long!";return(0,a.log)(e),{success:!1,error:e}}if(e.length<1){const e="Username must be more than 0 characters long!";return(0,a.log)(e),{success:!1,error:e}}const r=await new Promise((r=>{this.gun.user().create(e,t,(t=>{t.err?((0,a.logError)(`User creation error: ${t.err}`),r({success:!1,error:t.err})):((0,a.log)(`User created successfully: ${e}`),r({success:!0,pub:t.pub}))}))}));if(!r.success)return r;try{const t=this.gun.get(r.pub).put({username:e,pub:r.pub});this.gun.get("users").set(t)}catch(e){(0,a.logError)(`Warning: Could not store user metadata: ${e}`)}(0,a.log)(`Attempting login after registration for: ${e}`);try{const r=await this.login(e,t);return r.success?((0,a.log)(`Login after registration successful for: ${e}`),r):((0,a.logError)(`Login after registration failed: ${r.error}`),{success:!1,error:`Registration completed but login failed: ${r.error}`})}catch(e){return(0,a.logError)(`Exception during post-registration login: ${e}`),{success:!1,error:"Exception during post-registration login"}}}catch(e){return(0,a.logError)(`Unexpected error during registration flow: ${e}`),{success:!1,error:`Unexpected error during registration: ${e}`}}}async login(e,t,r){(0,a.log)(`Attempting login for user: ${e}`);try{const n=await new Promise((r=>{this.gun.user().auth(e,t,(t=>{t.err?((0,a.logError)(`Login error for ${e}: ${t.err}`),r({success:!1,error:t.err})):((0,a.log)(`Login successful for: ${e}`),r({success:!0,ack:t}))}))}));if(!n.success){const e={success:!1,error:n.error};return r&&r(e),e}const i=this.gun.user().is?.pub;try{let t=!1;if(await new Promise((e=>{this.gun.get("users").map().once(((e,r)=>{e&&e.pub===i&&(t=!0)})),setTimeout((()=>e()),100)})),!t&&i){const t=this.gun.get(i).put({username:e,pub:i});this.gun.get("users").set(t)}}catch(e){(0,a.logError)(`Warning: Could not update user collection: ${e}`)}(0,a.log)(`Login successful for: ${e} (${i})`),this._savePair();const o={success:!0,userPub:i,username:e};return r&&r(o),o}catch(t){(0,a.logError)(`Exception during login for ${e}: ${t}`);const n={success:!1,error:String(t)};return r&&r(n),n}}_savePair(){try{const e=this.gun.user()?._?.sea;e&&"undefined"!=typeof localStorage&&localStorage.setItem("pair",JSON.stringify(e))}catch(e){console.error("Error saving auth pair:",e)}}logout(){try{if(!this.isLoggedIn())return void(0,a.log)("No user logged in, skipping logout");this.gun.user().leave(),(0,a.log)("Logout completed")}catch(e){(0,a.logError)("Error during logout:",e)}}isLoggedIn(){return!!this.gun.user()?.is?.pub}getCurrentUser(){const e=this.gun.user()?.is?.pub;return e?{pub:e,user:this.gun.user()}:null}rx(){return this._rxjs||(this._rxjs=new u.GunRxJS(this.gun)),this._rxjs}async setPasswordHint(e,t,r,n,i){if((0,a.log)("Setting password hint for:",e),!(await this.login(e,t)).success)return{success:!1,error:"Authentication failed"};try{const e=await this.crypto.hashText(i.join("|")),t=await this.crypto.encrypt(r,e);return await this.saveUserData("security",{questions:n,hint:t}),{success:!0}}catch(e){return(0,a.logError)("Error setting password hint:",e),{success:!1,error:String(e)}}}async forgotPassword(e,t){(0,a.log)("Attempting password recovery for:",e);try{const e=this.gun.user().recall({sessionStorage:!0});if(!e||!e.is)return{success:!1,error:"User not found"};const r=await this.getUserData("security");if(!r||!r.hint)return{success:!1,error:"No password hint found"};const n=await this.crypto.decrypt(r.hint,await this.crypto.hashText(t.join("|")));return void 0===n?{success:!1,error:"Incorrect answers to security questions"}:{success:!0,hint:n}}catch(e){return(0,a.logError)("Error recovering password hint:",e),{success:!1,error:String(e)}}}async hashText(e){return this.crypto.hashText(e)}async encrypt(e,t){return this.crypto.encrypt(e,t)}async decrypt(e,t){return this.crypto.decrypt(e,t)}async saveUserData(e,t){return new Promise(((r,n)=>{const i=this.gun.user();i.is?i.get(e).put(t,(e=>{e.err?n(new Error(e.err)):r()})):n(new Error("User not authenticated"))}))}async getUserData(e){return new Promise((t=>{const r=this.gun.user();r.is?r.get(e).once((e=>{t(e)})):t(null)}))}static Errors=l}},4120:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},4134:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;const n=r(5628);t.EventEmitter=class{events;constructor(){this.events=new Map}on(e,t){this.events.has(e)||this.events.set(e,[]),this.events.get(e)?.push(t)}emit(e,t){return!!this.events.has(e)&&((this.events.get(e)||[]).forEach((r=>{try{r(t)}catch(t){(0,n.logError)(`Error in event listener for ${String(e)}:`,t)}})),!0)}off(e,t){if(!this.events.has(e))return;const r=this.events.get(e)||[],n=r.indexOf(t);-1!==n&&(r.splice(n,1),0===r.length?this.events.delete(e):this.events.set(e,r))}once(e,t){const r=n=>{t(n),this.off(e,r)};this.on(e,r)}removeAllListeners(e){e?this.events.delete(e):this.events.clear()}}},4143:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(2326),i=r(3434),o=r(2275);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},4164:function(e,t,r){"use strict";var n,i,o,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CTR=void 0;const c=r(6342);class u extends c.ModeOfOperation{constructor(e,t){super("CTR",e,u),n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),s(this,o,new Uint8Array(16),"f"),a(this,o,"f").fill(0),s(this,n,a(this,o,"f"),"f"),s(this,i,16,"f"),null==t&&(t=1),"number"==typeof t?this.setCounterValue(t):this.setCounterBytes(t)}get counter(){return new Uint8Array(a(this,o,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)a(this,o,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");a(this,o,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==a(this,o,"f")[e]){a(this,o,"f")[e]++;break}a(this,o,"f")[e]=0}}encrypt(e){var t,r;const c=new Uint8Array(e);for(let e=0;e<c.length;e++)16===a(this,i,"f")&&(s(this,n,this.aes.encrypt(a(this,o,"f")),"f"),s(this,i,0,"f"),this.increment()),c[e]^=a(this,n,"f")[(s(this,i,(r=a(this,i,"f"),t=r++,r),"f"),t)];return c}decrypt(e){return this.encrypt(e)}}t.CTR=u,n=new WeakMap,i=new WeakMap,o=new WeakMap},4193:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethers=void 0;const n=r(9990),i=n.__importStar(r(1752));t.ethers=i,n.__exportStar(r(1752),t)},4338:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingEventSubscriber=t.PollingTransactionSubscriber=t.PollingOrphanSubscriber=t.PollingBlockTagSubscriber=t.OnBlockSubscriber=t.PollingBlockSubscriber=t.getPollingSubscriber=void 0;const n=r(5347);function i(e){return JSON.parse(JSON.stringify(e))}t.getPollingSubscriber=function(e,t){return"block"===t?new o(e):(0,n.isHexString)(t,32)?new a(e,t):void(0,n.assert)(!1,"unsupported polling event","UNSUPPORTED_OPERATION",{operation:"getPollingSubscriber",info:{event:t}})};class o{#Q;#Y;#Z;#X;constructor(e){this.#Q=e,this.#Y=null,this.#Z=4e3,this.#X=-2}get pollingInterval(){return this.#Z}set pollingInterval(e){this.#Z=e}async#ee(){try{const e=await this.#Q.getBlockNumber();if(-2===this.#X)return void(this.#X=e);if(e!==this.#X){for(let t=this.#X+1;t<=e;t++){if(null==this.#Y)return;await this.#Q.emit("block",t)}this.#X=e}}catch(e){}null!=this.#Y&&(this.#Y=this.#Q._setTimeout(this.#ee.bind(this),this.#Z))}start(){this.#Y||(this.#Y=this.#Q._setTimeout(this.#ee.bind(this),this.#Z),this.#ee())}stop(){this.#Y&&(this.#Q._clearTimeout(this.#Y),this.#Y=null)}pause(e){this.stop(),e&&(this.#X=-2)}resume(){this.start()}}t.PollingBlockSubscriber=o;class s{#Q;#ee;#te;constructor(e){this.#Q=e,this.#te=!1,this.#ee=e=>{this._poll(e,this.#Q)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#te||(this.#te=!0,this.#ee(-2),this.#Q.on("block",this.#ee))}stop(){this.#te&&(this.#te=!1,this.#Q.off("block",this.#ee))}pause(e){this.stop()}resume(){this.start()}}t.OnBlockSubscriber=s,t.PollingBlockTagSubscriber=class extends s{#re;#ne;constructor(e,t){super(e),this.#re=t,this.#ne=-2}pause(e){e&&(this.#ne=-2),super.pause(e)}async _poll(e,t){const r=await t.getBlock(this.#re);null!=r&&(-2===this.#ne?this.#ne=r.number:r.number>this.#ne&&(t.emit(this.#re,r.number),this.#ne=r.number))}},t.PollingOrphanSubscriber=class extends s{#f;constructor(e,t){super(e),this.#f=i(t)}async _poll(e,t){throw new Error("@TODO")}};class a extends s{#ie;constructor(e,t){super(e),this.#ie=t}async _poll(e,t){const r=await t.getTransactionReceipt(this.#ie);r&&t.emit(this.#ie,r)}}t.PollingTransactionSubscriber=a,t.PollingEventSubscriber=class{#Q;#f;#Y;#te;#X;constructor(e,t){this.#Q=e,this.#f=i(t),this.#Y=this.#ee.bind(this),this.#te=!1,this.#X=-2}async#ee(e){if(-2===this.#X)return;const t=i(this.#f);t.fromBlock=this.#X+1,t.toBlock=e;const r=await this.#Q.getLogs(t);if(0!==r.length)for(const e of r)this.#Q.emit(this.#f,e),this.#X=e.blockNumber;else this.#X<e-60&&(this.#X=e-60)}start(){this.#te||(this.#te=!0,-2===this.#X&&this.#Q.getBlockNumber().then((e=>{this.#X=e})),this.#Q.on("block",this.#Y))}stop(){this.#te&&(this.#te=!1,this.#Q.off("block",this.#Y))}pause(e){this.stop(),e&&(this.#X=-2)}resume(){this.start()}}},4359:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(8051),s=r(9879),a=r(9224),c=r(7214),u=r(5212),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,u.hasLift(t)&&(n.lift=t.lift),n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(c.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},4383:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(4885),i=r(5212),o=r(7214);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4385:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(8051),i=r(4885);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},4465:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunEventEmitter=void 0;const n=r(4134);class i extends n.EventEmitter{emit(e,t){return super.emit(e,t)}on(e,t){super.on(e,t)}off(e,t){super.off(e,t)}}t.ShogunEventEmitter=i},4478:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(9533).AsyncScheduler);t.AnimationFrameScheduler=o},4491:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=void 0;const n=r(8166),i=r(5347);class o{name;constructor(e){(0,n.defineProperties)(this,{name:e})}clone(){return new o(this.name)}}t.NetworkPlugin=o;class s extends o{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const r={effectiveBlock:e};function o(e,n){let o=(t||{})[e];null==o&&(o=n),(0,i.assertArgument)("number"==typeof o,`invalud value for ${e}`,"costs",t),r[e]=o}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),(0,n.defineProperties)(this,r)}clone(){return new s(this.effectiveBlock,this)}}t.GasCostPlugin=s;class a extends o{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),(0,n.defineProperties)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new a(this.address,this.targetNetwork)}}t.EnsPlugin=a;class c extends o{#oe;get feeDataFunc(){return this.#oe}constructor(e){super("org.ethers.plugins.network.FeeData"),this.#oe=e}async getFeeData(e){return await this.#oe(e)}clone(){return new c(this.#oe)}}t.FeeDataNetworkPlugin=c,t.FetchUrlFeeDataNetworkPlugin=class extends o{#se;#ae;get url(){return this.#se}get processFunc(){return this.#ae}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#se=e,this.#ae=t}clone(){return this}}},4530:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9724),i=r(2071),o=r(5455);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4534:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0;const n=r(8510),i=r(5347),o=r(7005);class s{#ce;constructor(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid private key","privateKey","[REDACTED]"),this.#ce=(0,i.hexlify)(e)}get privateKey(){return this.#ce}get publicKey(){return s.computePublicKey(this.#ce)}get compressedPublicKey(){return s.computePublicKey(this.#ce,!0)}sign(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const t=n.secp256k1.sign((0,i.getBytesCopy)(e),(0,i.getBytesCopy)(this.#ce),{lowS:!0});return o.Signature.from({r:(0,i.toBeHex)(t.r,32),s:(0,i.toBeHex)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=s.computePublicKey(e);return(0,i.hexlify)(n.secp256k1.getSharedSecret((0,i.getBytesCopy)(this.#ce),(0,i.getBytes)(t),!1))}static computePublicKey(e,t){let r=(0,i.getBytes)(e,"key");if(32===r.length){const e=n.secp256k1.getPublicKey(r,!!t);return(0,i.hexlify)(e)}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}const o=n.secp256k1.ProjectivePoint.fromHex(r);return(0,i.hexlify)(o.toRawBytes(t))}static recoverPublicKey(e,t){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const r=o.Signature.from(t);let s=n.secp256k1.Signature.fromCompact((0,i.getBytesCopy)((0,i.concat)([r.r,r.s])));s=s.addRecoveryBit(r.yParity);const a=s.recoverPublicKey((0,i.getBytesCopy)(e));return(0,i.assertArgument)(null!=a,"invalid signature for digest","signature",t),"0x"+a.toHex(!1)}static addPoints(e,t,r){const i=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(e).substring(2)),o=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(t).substring(2));return"0x"+i.add(o).toHex(!!r)}}t.SigningKey=s},4584:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpcSocketProvider=void 0,t.IpcSocketProvider=void 0},4586:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePlugin=void 0;const n=r(4134);class i extends n.EventEmitter{description;_category;core=null;initialize(e){this.core=e}destroy(){this.core=null}assertInitialized(){if(!this.core)throw new Error(`Plugin ${this.name} not initialized`);return this.core}}t.BasePlugin=i},4613:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(7478);t.flatMap=n.mergeMap},4643:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunStorage=void 0,t.ShogunStorage=class{store;isTestMode;useLocalStorage;constructor(){if(this.store=new Map,this.isTestMode=!1,this.useLocalStorage=!1,"undefined"!=typeof localStorage&&!this.isTestMode)try{localStorage.setItem("_shogun_test","_shogun_test"),localStorage.removeItem("_shogun_test"),this.useLocalStorage=!0;const e=localStorage.getItem("shogun_keypair");e&&this.store.set("keypair",JSON.parse(e))}catch(e){this.useLocalStorage=!1,this.isTestMode||console.error("localStorage not available:",e)}}async getPair(){return this.getPairSync()}getPairSync(){return this.store.get("keypair")||null}async setPair(e){if(this.store.set("keypair",e),this.useLocalStorage)try{localStorage.setItem("shogun_keypair",JSON.stringify(e))}catch(e){this.isTestMode||console.error("Error saving data to localStorage:",e)}}clearAll(){if(this.store.clear(),this.useLocalStorage)try{localStorage.removeItem("shogun_keypair")}catch(e){this.isTestMode||console.error("Error removing data from localStorage:",e)}}getItem(e){const t=this.store.get(e);return void 0!==t?JSON.stringify(t):null}setItem(e,t){try{const r=JSON.parse(t);if(this.store.set(e,r),this.useLocalStorage)try{localStorage.setItem(e,t)}catch(t){this.isTestMode||console.error(`Error saving ${e} to localStorage:`,t)}}catch(r){if(this.store.set(e,t),this.useLocalStorage)try{localStorage.setItem(e,t)}catch(t){this.isTestMode||console.error(`Error saving ${e} to localStorage:`,t)}}}removeItem(e){if(this.store.delete(e),this.useLocalStorage)try{localStorage.removeItem(e)}catch(t){this.isTestMode||console.error(`Error removing ${e} from localStorage:`,t)}}}},4708:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9619);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},4772:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(1666),s=r(8284),a=r(4830),c=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=c},4808:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},4827:function(e,t,r){e=r.nmd(e),function(){function t(e,n){return n?r(5736)(e):e.slice?t[i(e)]:function(r,n){e(r={exports:{}}),t[i(n)]=r.exports};function i(e){return e.split("/").slice(-1).toString().replace(".js","")}}var n=e;t((function(e){String.random=function(e,t){var r="";for(e=e||24,t=t||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";e-- >0;)r+=t.charAt(Math.floor(Math.random()*t.length));return r},String.match=function(e,t){var r,n;return"string"==typeof e&&("string"==typeof t&&(t={"=":t}),e===(r=(t=t||{})["="]||t["*"]||t[">"]||t["<"])||n===t["="]&&(r=t["*"]||t[">"],e.slice(0,(r||"").length)===r||n===t["*"]&&(n!==t[">"]&&n!==t["<"]?e>=t[">"]&&e<=t["<"]:n!==t[">"]&&e>=t[">"]||n!==t["<"]&&e<=t["<"])))},String.hash=function(e,t){if("string"==typeof e){if(t=t||0,!e.length)return t;for(var r=0,n=e.length;r<n;++r)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}};var t,r,n,i,o,s,a=Object.prototype.hasOwnProperty;Object.plain=function(e){return!!e&&(e instanceof Object&&e.constructor===Object||"Object"===Object.prototype.toString.call(e).match(/^\[object (\w+)\]$/)[1])},Object.empty=function(e,t){for(var r in e)if(a.call(e,r)&&(!t||-1==t.indexOf(r)))return!1;return!0},Object.keys=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t},r=setTimeout,n=0,i=0,o=typeof setImmediate!=""+t&&setImmediate||function(e,n){return typeof MessageChannel==""+t?r:((e=new MessageChannel).port1.onmessage=function(e){""==e.data&&n()},function(t){n=t,e.port2.postMessage("")})}(),s=r.check=r.check||typeof performance!=""+t&&performance||{now:function(){return+new Date}},r.hold=r.hold||9,r.poll=r.poll||function(e){r.hold>=s.now()-n&&i++<3333?e():o((function(){n=s.now(),e()}),i=0)},function(){var e,t=setTimeout,r=t.turn=t.turn||function(e){1==n.push(e)&&i(s)},n=r.s=[],i=t.poll,o=0,s=function(){(e=n[o++])&&e(),o!=n.length&&99!=o||(n=r.s=n.slice(o),o=0),n.length&&i(s)}}(),function(){var e,t=setTimeout,r=t.turn;(t.each=t.each||function(t,n,i,o){o=o||9,function s(a,c,u){if(c=(a=(t||[]).splice(0,o)).length){for(var l=0;l<c&&e===(u=n(a[l]));l++);if(e===u)return void r(s)}i&&i(u)}()})()}()}))(t,"./shim"),t((function(e){e.exports=function e(t,r,n){if(!t)return{to:e};var i="function"==typeof r;if(t=(this.tag||(this.tag={}))[t]||i&&(this.tag[t]={tag:t,to:e._={next:function(e){var t;(t=this.to)&&t.next(e)}}}),i){var o={off:e.off||(e.off=function(){if(this.next===e._.next)return!0;this===this.the.last&&(this.the.last=this.back),this.to.back=this.back,this.next=e._.next,this.back.to=this.to,this.the.last===this.the&&delete this.on.tag[this.the.tag]}),to:e._,next:r,the:t,on:this,as:n};return(o.back=t.last||t).to=o,t.last=o}return(t=t.to)&&void 0!==r&&t.next(r),t}}))(t,"./onto"),t((function(e){e.exports=function(e){return null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e&&e!=1/0&&e!=-1/0&&e==e||!!e&&"string"==typeof e["#"]&&1===Object.keys(e).length&&e["#"]}}))(t,"./valid"),t((function(e){function r(){var e=+new Date;return a<e?(o=0,a=e+r.drift):a=e+(o+=1)/s+r.drift}t("./shim"),r.drift=0;var n,i=-1/0,o=0,s=999,a=i;r.is=function(e,t,r){var n=t&&e&&e._&&e._[">"]||r;if(n)return"number"==typeof(n=n[t])?n:i},r.ify=function(e,t,r,i,o){(e=e||{})._=e._||{},o&&(e._["#"]=o);var s=e._[">"]||(e._[">"]={});return n!==t&&"_"!==t&&("number"==typeof r&&(s[t]=r),n!==i&&(e[t]=i)),e},e.exports=r}))(t,"./state"),t((function(e){t("./shim"),e.exports=function(e){var t={s:{}},r=t.s;e=e||{max:999,age:9e3},t.check=function(e){return!!r[e]&&n(e)};var n=t.track=function(i){var o=r[i]||(r[i]={});return o.was=t.now=+new Date,t.to||(t.to=setTimeout(t.drop,e.age+9)),n.ed&&n.ed(i),o};return t.drop=function(n){t.to=null,t.now=+new Date;var i=Object.keys(r);console.STAT&&console.STAT(t.now,+new Date-t.now,"dup drop keys"),setTimeout.each(i,(function(i){var o=r[i];o&&(n||e.age)>t.now-o.was||delete r[i]}),0,99)},t}}))(t,"./dup"),t((function(e){t("./onto"),e.exports=function(e,t){if(this.on){var n=(this.opt||{}).lack||9e3;if("function"!=typeof e){if(!e)return;var i=e["#"]||e,o=(this.tag||"")[i];if(!o)return;return t&&(o=this.on(i,t),clearTimeout(o.err),o.err=setTimeout((function(){o.off()}),n)),!0}if(i=t&&t["#"]||r(9),!e)return i;var s=this.on(i,e,t);return s.err=s.err||setTimeout((function(){s.off(),s.next({err:"Error: No ACK yet.",lack:!0})}),n),i}};var r=String.random||function(){return Math.random().toString(36).slice(2)}}))(t,"./ask"),t((function(e){function r(e){return e instanceof r?(this._={$:this}).$:this instanceof r?r.create(this._={$:this,opt:e}):new r(e)}r.is=function(e){return e instanceof r||e&&e._&&e===e._.$||!1},r.version=.202,r.chain=r.prototype,r.chain.toJSON=function(){},t("./shim"),r.valid=t("./valid"),r.state=t("./state"),r.on=t("./onto"),r.dup=t("./dup"),r.ask=t("./ask"),function(){function e(n){if(n)if(n.out!==e){var i,o=this.as,c=o.at||o,u=c.$,l=c.dup,f=n.DBG;if((i=n["#"])||(i=n["#"]=a(9)),!l.check(i)){if(l.track(i),i=n._,n._="function"==typeof i?i:function(){},n.$&&n.$===(n.$._||"").$||(n.$=u),n["@"]&&!n.put&&function(e){var t,r=e["@"]||"";if(t=r._)t.acks=(t.acks||0)+1,(t.err=e.err)&&(e["@"]=t["#"],s(t)),t.ok=e.ok||t.ok,t.stop||t.crack||(t.crack=t.match&&t.match.push((function(){h(t)}))),h(t);else{var n=(n=e.$)&&(n=n._)&&(n=n.root)&&(n=n.dup);if(!(n=n.check(r)))return;e["@"]=n["#"]||e["@"]}}(n),!c.ask(n["@"],n)){if(f&&(f.u=+new Date),n.put)return void t(n);n.get&&r.on.get(n,u)}f&&(f.uc=+new Date),this.to.next(n),f&&(f.ua=+new Date),n.nts||n.NTS||(n.out=e,c.on("out",n),f&&(f.ue=+new Date))}}else this.to.next(n)}function t(t){if(t){var r=t._||"",o=r.root=((r.$=t.$||"")._||"").root;if(t["@"]&&r.faith&&!r.miss)return t.out=e,void o.on("out",t);r.latch=o.hatch,r.match=o.hatch=[];var a=t.put,l=r.DBG=t.DBG,f=+new Date;if(p=p||f,!a["#"]||!a["."]){l&&(l.p=f),r["#"]=t["#"],r.msg=t,r.all=0,r.stun=1;var d=Object.keys(a);console.STAT&&console.STAT(f,((l||r).pk=+new Date)-f,"put sort");var h,b,m,v,A,E,P,O=0;!function e(o){if(h!=O){if(h=O,!(m=d[O]))return console.STAT&&console.STAT(f,((l||r).pd=+new Date)-f,"put"),void s(r);(v=a[m])?(P=v._)?m!==P["#"]?E=g+y(m)+"soul not same.":(A=P[">"])||(E=g+y(m)+"no state."):E=g+y(m)+"no meta.":E=g+y(m)+"no node.",b=Object.keys(v||{})}if(E)return t.err=r.err=E,void s(r);var p,S=0;for(o=o||0;o++<9&&(p=b[S++]);)if("_"!==p){var _=v[p],k=A[p];if(i===k){E=g+y(p)+"on"+y(m)+"no state.";break}if(!u(_)){E=g+y(p)+"on"+y(m)+"bad "+typeof _+y(_);break}n(_,p,m,k,t),++w}(b=b.slice(S)).length?c(e):(++O,b=null,e(o))}()}}}function n(e,t,r,i,o){var s,a=o._||"",c=a.root,u=c.graph,f=u[r]||d,h=l(f,t,1),p=f[t],g=a.DBG;(s=console.STAT)&&(u[r]&&p||(s.has=(s.has||0)+1));var y=v();if(i>y)return setTimeout((function(){n(e,t,r,i,o)}),(s=i-y)>m?m:s),void(console.STAT&&console.STAT((g||a).Hf=+new Date,s,"future"));if(!(i<h)&&(a.faith||i!==h||!(e===p||b(e)<=b(p))||a.miss)){a.stun++;var w=o["#"]+a.all++,A={toString:function(){return w},_:a};A.toJSON=A.toString,c.dup.track(A)["#"]=o["#"],g&&(g.ph=g.ph||+new Date),c.on("put",{"#":A,"@":o["@"],put:{"#":r,".":t,":":e,">":i},ok:o.ok,_:a})}}function o(e){var t;(t=(e._||"").DBG)&&(t.pa=+new Date,t.pm=t.pm||+new Date);var r,n=this.as,i=n.graph,o=e._,a=e.put,c=a["#"],u=a["."],l=a[":"],d=a[">"];e["#"],(r=o.msg)&&(r=r.put)&&(r=r[c])&&f(r,u,d,l,c),i[c]=f(i[c],u,d,l,c),(r=(n.next||"")[c])&&r.on("in",e),s(o),this.to.next(e)}function s(t,r){var n;if(!t.stop&&(t.err||!(0<--t.stun))&&(t.stop=1,n=t.root)){var i=t.match;i.end=1,i===n.hatch&&(!(i=t.latch)||i.end?delete n.hatch:n.hatch=i),t.hatch&&t.hatch(),setTimeout.each(t.match,(function(e){e&&e()})),!(r=t.msg)||t.err||r.err||(r.out=e,t.root.on("out",r),A())}}function h(e){e&&e.root&&(e.stun||e.acks!==e.all||e.root.on("in",{"@":e["#"],err:e.err,ok:e.err?i:e.ok||{"":1}}))}r.create=function(t){t.root=t.root||t,t.graph=t.graph||{},t.on=t.on||r.on,t.ask=t.ask||r.ask,t.dup=t.dup||r.dup();var n=t.$.opt(t.opt);return t.once||(t.on("in",e,t),t.on("out",e,t),t.on("put",o,t),r.on("create",t),t.on("create",t)),t.once=1,n},r.on.put=t;var p,g="Error: Invalid graph!",y=function(e){return" '"+(""+e).slice(0,9)+"...' "},b=JSON.stringify,m=2147483647,v=r.state,w=0,A=function(){w>999&&w/-(p-(p=+new Date))>1&&(r.window&&console.log("Warning: You're syncing 1K+ records a second, faster than DOM can update - consider limiting query."),A=function(){w=0})}}(),function(){function e(e,t){var r=+new Date,n=e._||{},o=n.DBG=e.DBG,s=e["#"],c=a(9),u=Object.keys(t||"").sort(),d=((t||"")._||"")["#"],h=(u.length,e.$._.root),p=t===h.graph[d];console.STAT&&console.STAT(r,((o||n).gk=+new Date)-r,"got keys"),t&&function e(){r=+new Date;for(var n,g,y,b=0,m={};b<9&&(n=u[b++]);)f(m,n,l(t,n),t[n],d);u=u.slice(b),(g={})[d]=m,m=g,p&&((y=function(){}).ram=y.faith=!0),g=u.length,console.STAT&&console.STAT(r,-(r-(r=+new Date)),"got copied some"),o&&(o.ga=+new Date),h.on("in",{"@":s,"#":c,put:m,"%":g?c=a(9):i,$:h.$,_:y,DBG:o,FOO:1}),console.STAT&&console.STAT(r,+new Date-r,"got in"),g&&setTimeout.turn(e)}(),t||h.on("in",{"@":e["#"]})}r.on.get=function(t,r){var n=r._,o=t.get,s=o["#"],a=n.graph[s],c=o["."],u=(n.next||(n.next={}))[s],d=(t._||{}).DBG=t.DBG;if(d&&(d.g=+new Date),!a)return n.on("get",t);if(c){if(("string"!=typeof c||i===a[c])&&!((u||"").next||"")[c])return void n.on("get",t);a=f({},c,l(a,c),a[c],s)}a&&e(t,a),n.on("get",t)},r.on.get.ack=e}(),r.chain.opt=function(e){e=e||{};var t=this._,n=e.peers||e;return Object.plain(e)||(e={}),Object.plain(t.opt)||(t.opt=e),"string"==typeof n&&(n=[n]),Object.plain(t.opt.peers)||(t.opt.peers={}),n instanceof Array&&(e.peers={},n.forEach((function(r){var n={};n.id=n.url=r,e.peers[r]=t.opt.peers[r]=t.opt.peers[r]||n}))),s(e,(function e(t){var r=this[t];this&&this.hasOwnProperty(t)||"string"==typeof r||Object.empty(r)?this[t]=r:(!r||r.constructor===Object||r instanceof Array)&&s(r,e)})),t.opt.from=e,r.on("opt",t),t.opt.uuid=t.opt.uuid||function(e){return r.state().toString(36).replace(".","")+String.random(e||12)},this};var i,o,s=function(e,t){Object.keys(e).forEach(t,e)},a=String.random,c=setTimeout.turn,u=r.valid,l=r.state.is,f=r.state.ify,d={};r.log=function(){return!r.log.off&&o.log.apply(o,arguments),[].slice.call(arguments).join(" ")},r.log.once=function(e,t,n){return(n=r.log.once)[e]=n[e]||0,n[e]++||r.log(t)},"undefined"!=typeof window&&((window.GUN=window.Gun=r).window=window);try{void 0!==n&&(n.exports=r)}catch(e){}e.exports=r,(r.window||{}).console=(r.window||{}).console||{log:function(){}},(o=console).only=function(e,t){return o.only.i&&e===o.only.i&&o.only.i++&&(o.log.apply(o,arguments)||t)},r.log.once("welcome","Hello wonderful person! :) Thanks for using GUN, please ask for help on http://chat.gun.eco if anything takes you longer than 5min to figure out!")}))(t,"./root"),t((function(e){t("./root").chain.back=function(e,t){if(-1===(e=e||1)||1/0===e)return this._.root.$;if(1===e)return(this._.back||this._).$;var i=this._;if("string"==typeof e&&(e=e.split(".")),e instanceof Array){for(var o=0,s=e.length,a=i;o<s;o++)a=(a||n)[e[o]];return r!==a?t?this:a:(a=i.back)?a.$.back(e,t):void 0}if("function"==typeof e){var c;for(a={back:i};(a=a.back)&&r===(c=e(a,t)););return c}return"number"==typeof e?(i.back||i).$.back(e-1):this};var r,n={}}))(t,"./back"),t((function(e){var r=t("./root");function n(e,t){if(t=t||this.as||e.$._,(!e.$$||this===r.on)&&e.put&&!t.soul){var n=e.put||"",i=n["="]||n[":"],o=t.root,s=o.$.get(n["#"]).get(n["."])._;if("string"==typeof(i=u(i))){if(!(s.echo||(s.echo={}))[t.id]||(o.pass||"")[t.id]){if(a=o.pass){if(a[i+t.id])return;a[i+t.id]=1}(s.echo||(s.echo={}))[t.id]=t,t.has&&(t.link=i);var a,c=o.$.get(s.link=i)._;(c.echo||(c.echo={}))[s.id]=s,((a=t.ask||"")[""]||t.lex)&&c.on("out",{get:{"#":i}}),setTimeout.each(Object.keys(a),(function(e,t){e&&(t=a[e])&&t.on("out",{get:{"#":i,".":e}})}),0,99)}}else this===r.on&&((s.echo||(s.echo={}))[t.id]=t)}}function i(e,t){var r,n,o=e.put||"",a=s!==o["="]?o["="]:o[":"],c=t.root;if(s===a){if(t.soul&&s!==t.put)return;if(n=(e.$$||e.$||"")._||"",e["@"]&&(s!==n.put||s!==t.put))return;return(r=t.link||e.linked)&&delete(c.$.get(r)._.echo||"")[t.id],t.has&&(t.link=null),t.put=s,void setTimeout.each(Object.keys(t.next||""),(function(e,n){(n=t.next[e])&&(r&&delete(c.$.get(r).get(e)._.echo||"")[n.id],n.on("in",{get:e,put:s,$:n.$}))}),0,99)}t.soul||e.$$||(r=u(a),n=e.$._||"",(r!==n.link&&(!t.has||n.link)||(c.pass||"")[t.id]&&"string"!=typeof r)&&(delete(n.echo||"")[t.id],i({get:t.get,put:s,$:e.$,linked:e.linked=e.linked||n.link},t)))}function o(e,t){var n=this.as,i=n.$._,o=(i.root,n.get||""),a=(e.put||"")[o["#"]]||"";if(!e.put||"string"==typeof o["."]&&s===a[o["."]]){if(s!==i.put)return;if(!i.soul&&!i.has)return;return i.ack=(i.ack||0)+1,void i.on("in",{get:i.get,put:i.put=s,$:i.$,"@":e["@"]})}(e._||{}).miss=1,r.on.put(e)}r.chain.chain=function(e){var t,n=this,i=n._,o=new(e||n).constructor(n),s=o._;return s.root=t=i.root,s.id=++t.once,s.back=n._,s.on=r.on,s.on("in",r.on.in,s),s.on("out",r.on.out,s),o},r.on.out=function(e){var t,r,n=this.as,i=n.back,a=n.root;if(e.$||(e.$=n.$),this.to.next(e),!n.err){if(t=e.get){if(a.pass&&(a.pass[n.id]=n),n.lex&&Object.keys(n.lex).forEach((function(e){r[e]=n.lex[e]}),r=e.get=e.get||{}),t["#"]||n.soul){if(t["#"]=t["#"]||n.soul,e["#"]||(e["#"]=c(9)),i=a.$.get(t["#"])._,t=t["."]){if(l(i.put,t)&&(r=i.ask&&i.ask[t],(i.ask||(i.ask={}))[t]=i.$.get(t)._,i.on("in",{get:t,put:{"#":i.soul,".":t,":":i.put[t],">":d(a.graph[i.soul],t)}}),r))return}else{if(r=i.ask&&i.ask[""],(i.ask||(i.ask={}))[""]=i,s!==i.put&&(i.on("in",i),r))return;e.$=i.$}return a.ask(o,e),a.on("in",e)}if(t["."])return n.get?(e={get:{".":n.get},$:n.$},(i.ask||(i.ask={}))[n.get]=e.$._,i.on("out",e)):(e={get:n.lex?e.get:{},$:n.$},i.on("out",e));if((n.ask||(n.ask={}))[""]=n,n.get)return t["."]=n.get,(i.ask||(i.ask={}))[n.get]=e.$._,i.on("out",e)}return i.on("out",e)}n.on("in",{put:n.put=s,$:n.$})},r.on.in=function(e,t){var r,o=(t=t||this.as).root,c=e.$||(e.$=t.$),l=(c||"")._||a,f=e.put||"",p=f["#"],g=f["."],y=s!==f["="]?f["="]:f[":"],b=f[">"]||-1/0;if(s!==e.put&&(s===f["#"]||s===f["."]||s===f[":"]&&s===f["="]||s===f[">"]))return u(f)?void t.on("in",{$:l.back.$,put:{"#":p=l.back.soul,".":g=l.has||l.get,"=":f,">":d(l.back.put,g)},via:e}):(p=((f||"")._||"")["#"])?(c=t.root.$.get(p),setTimeout.each(Object.keys(f).sort(),(function(r){"_"!=r&&s!==(b=d(f,r))&&t.on("in",{$:c,put:{"#":p,".":r,"=":f[r],">":b},VIA:e})}))):void console.log("chain not yet supported for",f,"...",e,t);(e.seen||"")[t.id]||((e.seen||(e.seen=function(){}))[t.id]=t,t!==l&&(Object.keys(e).forEach((function(t){f[t]=e[t]}),f={}),f.get=t.get||f.get,t.soul||t.has?l.soul&&(f.$=t.$,f.$$=f.$$||l.$):f.$$$=f.$$$||t.$,e=f),i(e,t),(t.soul||e.$$)&&b>=d(o.graph[p],g)&&((f=o.$.get(p)._).put=h(f.put,g,b,y,p)),!l.soul&&b>=d(o.graph[p],g)&&(r=(o.$.get(p)._.next||"")[g])&&(r.put=y,"string"==typeof(f=u(y))&&(r.put=o.$.get(f)._.put||y)),this.to&&this.to.next(e),t.any&&setTimeout.each(Object.keys(t.any),(function(r){(r=t.any[r])&&r(e)}),0,99),t.echo&&setTimeout.each(Object.keys(t.echo),(function(r){(r=t.echo[r])&&r.on("in",e)}),0,99),((e.$$||"")._||l).soul&&(r=t.next)&&(r=r[g])&&(f={},Object.keys(e).forEach((function(t){f[t]=e[t]})),f.$=(e.$$||e.$).get(f.get=g),delete f.$$,delete f.$$$,r.on("in",f)),n(e,t))},r.on.link=n,r.on.unlink=i;var s,a={},c=String.random,u=r.valid,l=function(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)},f=r.state,d=f.is,h=f.ify}))(t,"./chain"),t((function(e){var r=t("./root");function n(e){var t=this.at||this.on;if(!e||t.soul||t.has)return this.off();if(e=(e=(e=e.$||e)._||e).id){var r;if(t.map,(r=this.seen||(this.seen={}))[e])return!0;r[e]=!0}}r.chain.get=function(e,t,a){var c,u;if("string"==typeof e){if(0==e.length)return(c=this.chain())._.err={err:r.log("0 length key!",e)},t&&t.call(c,c._.err),c;(c=((f=this._).next||o)[e])||(c=e&&function(e,t){var r=t._,n=r.next,i=t.chain()._;return n||(n=r.next={}),n[i.get=e]=i,t===r.root.$?i.soul=e:(r.soul||r.has)&&(i.has=e),i}(e,this)),c=c&&c.$}else{if("function"==typeof e){if(!0===t)return function(e,t,n,o){var s,a=e._,c=0;(s=a.soul||a.link)?t(s,o,a):a.jam?a.jam.push([t,o]):(a.jam=[[t,o]],e.get((function(e,t){if(!(i===e.put&&!a.root.opt.super&&(s=Object.keys(a.root.opt.peers).length)&&++c<=s)){t.rid(e);var n,o=(o=e.$)&&o._||{},u=0;for(s=a.jam,delete a.jam;n=s[u++];){var l=n[0];n=n[1],l&&l(o.link||o.soul||r.valid(e.put)||((e.put||{})._||{})["#"],n,e,t)}}}),{out:{get:{".":!0}}}))}(this,e,0,a),this;var l,f=(c=this)._,d=t||{},h=f.root;d.at=f,d.ok=e;var p={};function g(e,t,n){if(!g.stun&&(!(o=h.pass)||o[l])){var o,s=e.$._,a=(e.$$||"")._,c=(a||s).put,u=!s.has&&!s.soul,y={};if((u||i===c)&&(c=i===((o=e.put)||"")["="]?i===(o||"")[":"]?o:o[":"]:o["="]),"string"==typeof(o=r.valid(c))&&(c=i===(o=h.$.get(o)._.put)?d.not?i:c:o),!d.not||i!==c){if(i===d.stun){if((o=h.stun)&&o.on&&(f.$.back((function(e){if(o.on(""+e.id,y={}),(y.run||0)<g.id)return y})),!y.run&&o.on(""+s.id,y={}),!y.run&&a&&o.on(""+a.id,y={}),g.id>y.run&&(y.stun&&!y.stun.end||(y.stun=o.on("stun"),y.stun=y.stun&&y.stun.last),y.stun&&!y.stun.end)))return void((y.stun.add||(y.stun.add={}))[l]=function(){g(e,t,1)});if(i===c&&(n=0),(o=h.hatch)&&!o.end&&i===d.hatch&&!n){if(p[s.$._.id])return;return p[s.$._.id]=1,void o.push((function(){g(e,t,1)}))}p={}}if(h.pass){if(h.pass[l+s.id])return;h.pass[l+s.id]=1}d.on?d.ok.call(s.$,c,s.get,e,t||g):d.v2020?d.ok(e,t||g):(Object.keys(e).forEach((function(t){o[t]=e[t]}),o={}),(e=o).put=c,d.ok.call(d.as,e,t||g))}}}return g.at=f,(f.any||(f.any={}))[l=String.random(7)]=g,g.off=function(){g.stun=1,f.any&&delete f.any[l]},g.rid=n,g.id=d.run||++h.once,u=h.pass,(h.pass={})[l]=1,d.out=d.out||{get:{}},f.on("out",d.out),h.pass=u,c}if("number"==typeof e)return this.get(""+e,t,a);if("string"==typeof(u=s(e)))return this.get(u,t,a);(u=this.get.next)&&(c=u(this,e))}return c?(t&&"function"==typeof t&&c.get(t,a),c):((c=this.chain())._.err={err:r.log("Invalid get request!",e)},t&&t.call(c,c._.err),c)};var i,o={},s=r.valid}))(t,"./get"),t((function(e){var r=t("./root");function n(e,t){if(t){t=(t._||"").id||t;var n,i=e.root.stun||(e.root.stun={on:r.on}),o={};e.stun||(e.stun=i.on("stun",(function(){}))),(n=i.on(""+t))&&n.the.last.next(o),o.run>=e.run||i.on(""+t,(function(t){if(e.stun.end)return this.off(),void this.to.next(t);t.run=t.run||e.run,t.stun=t.stun||e.stun}))}}function i(e){if(e.err)i.end(e.stun,e.root);else if(!e.todo.length&&!e.end&&Object.empty(e.wait)){e.end=1;var t,n=e.$.back(-1)._,o=n.root,s=n.ask((function(t){o.on("ack",t),t.err&&!t.lack&&r.log(t),++a>(e.acks||0)&&this.off(),e.ack&&e.ack(t,this)}),e.opt),a=0,c=e.stun;(t=function(){c&&(i.end(c,o),setTimeout.each(Object.keys(c=c.add||""),(function(e){(e=c[e])&&e()})))}).hatch=t,e.ack&&!e.ok&&(e.ok=e.acks||9),e.via._.on("out",{put:e.out=e.graph,ok:e.ok&&{"@":e.ok+1},opt:e.opt,"#":s,_:t})}}r.chain.put=function(e,t,s){var l=this,f=l._,d=f.root;(s=s||{}).root=f.root,s.run||(s.run=d.once),n(s,f.id),s.ack=s.ack||t,s.via=s.via||l,s.data=s.data||e,s.soul||(s.soul=f.soul||"string"==typeof t&&t);var h=s.state=s.state||r.state();return"function"==typeof e?(e((function(e){s.data=e,l.put(o,o,s)})),l):s.soul?(s.$=d.$.get(s.soul),s.todo=[{it:s.data,ref:s.$}],s.turn=s.turn||a,s.ran=s.ran||i,function e(){var t,o,a,l,f,d=s.todo,p=d.pop(),g=p.it;if(p.ref&&p.ref._.id,n(s,p.ref),(l=p.todo)&&(g=g[o=l.pop()],l.length&&d.push(p)),o&&(d.path||(d.path=[])).push(o),!(t=c(g))&&!(f=r.is(g))){if(!Object.plain(g))return void i.err(s,"Invalid data: "+function(e,t){return e&&(t=e.constructor)&&t.name||typeof e}(g)+" at "+(s.via.back((function(e){e.get&&l.push(e.get)}),l=[])||l.join("."))+"."+(d.path||[]).join("."));for(var y=s.seen||(s.seen=[]),b=y.length;b--;)if(g===(l=y[b]).it){t=g=l.link;break}}if(o&&t)p.node=u(p.node,o,h,g);else{if(!s.seen)return void i.err(s,"Data at root of graph must be a node (an object).");s.seen.push(a={it:g,link:{},todo:f?[]:Object.keys(g).sort().reverse(),path:(d.path||[]).slice(),up:p}),p.node=u(p.node,o,h,a.link),!f&&a.todo.length&&d.push(a);var m=s.seen.length;function v(e,t){var r=a.link["#"];t&&(t.off(),t.rid(e));var i=r||e.soul||(l=(e.$$||e.$)._||"").soul||l.link||((l=l.put||"")._||"")["#"]||l["#"]||((l=e.put||"")&&e.$$?l["#"]:(l["="]||l[":"]||"")["#"]);!r&&n(s,e.$),i||p.link["#"]?(i||(i=[],(e.$$||e.$).back((function(e){if(l=e.soul||e.link)return i.push(l);i.push(e.get)})),i=i.reverse().join("/")),a.link["#"]=i,!f&&(((s.graph||(s.graph={}))[i]=a.node||(a.node={_:{}}))._["#"]=i),delete s.wait[m],a.wait&&setTimeout.each(a.wait,(function(e){e&&e()})),s.ran(s)):(p.wait||(p.wait=[])).push((function(){v(e,t)}))}(s.wait||(s.wait={}))[m]="",l=(a.ref=f?g:o?p.ref.get(o):p.ref)._,(l=g&&(g._||"")["#"]||l.soul||l.link)?v({soul:l}):a.ref.get(v,{run:s.run,v2020:1,out:{get:{".":" "}}})}if(!d.length)return s.ran(s);s.turn(e)}(),l):(function(e){var t,r=e.via._;e.via=e.via.back((function(r){if(r.soul||!r.get)return r.$;t=e.data,(e.data={})[r.get]=t})),e.via&&e.via._.soul||(e.via=r.root.$.get(((e.data||"")._||"")["#"]||r.$.back("opt.uuid")())),e.via.put(e.data,e.ack,e)}(s),l)},i.end=function(e,t){e.end=s,e.the.to===e&&e===e.the.last&&delete t.stun,e.off()},i.err=function(e,t){(e.ack||s).call(e,e.out={err:e.err=r.log(t)}),e.ran(e)};var o,s=function(){},a=setTimeout.turn,c=r.valid,u=r.state.ify}))(t,"./put"),t((function(e){var r=t("./root");t("./chain"),t("./back"),t("./put"),t("./get"),e.exports=r}))(t,"./index"),t((function(e){var r,n=t("./index");n.chain.on=function(e,t,r,n){var i,o=this,s=o._;if(s.root,"string"==typeof e)return t?(i=s.on(e,t,r||s,n),r&&r.$&&(r.subs||(r.subs=[])).push(i),o):s.on(e);var a=t;return(a=!0===a?{change:!0}:a||{}).not=1,a.on=1,o.get(e,a),o},n.chain.once=function(e,t){if(t=t||{},!e)return function(e,t,r){return n.log.once("valonce","Chainable val is experimental, its behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),(r=e.chain())._.nix=e.once((function(e,t){r._.on("in",this._)})),r._.lex=e._.lex,r}(this);var i,o=this,s=o._,a=s.root,c=(s.put,String.random(7));return o.get((function(o,u,l,f){var d=this,h=d._,p=h.one||(h.one={});function g(y){h.has||h.soul||(h={put:o,get:u}),r===(i=h.put)&&(i=((l.$$||"")._||"").put),"string"!=typeof n.valid(i)||(i=a.$.get(i)._.put)!==r||y?f.stun||""!==p[c]&&(p[c]="",(s.soul||s.has)&&f.off(),e.call(d,i,h.get),clearTimeout(p[c])):p[c]=setTimeout((function(){g(1)}),t.wait||99)}f.stun||""!==p[c]&&(!0!==(i=n.valid(o))?"string"!=typeof i&&(clearTimeout((s.one||"")[c]),clearTimeout(p[c]),p[c]=setTimeout(g,t.wait||99)):g())}),{on:1}),o},n.chain.off=function(){var e,t=this._,r=t.back;if(r)return t.ack=0,(e=r.next)&&e[t.get]&&delete e[t.get],(e=r.any)&&(delete r.any,r.any={}),(e=r.ask)&&delete e[t.get],(e=r.put)&&delete e[t.get],(e=t.soul)&&delete r.root.graph[e],(e=t.map)&&Object.keys(e).forEach((function(t,n){(n=e[t]).link&&r.root.$.get(n.link).off()})),(e=t.next)&&Object.keys(e).forEach((function(t,r){e[t].$.off()})),t.on("off",{}),this}}))(t,"./on"),t((function(e){var r=t("./index"),n=r.chain.get.next;function i(e){this.to.next(e);var t,n=this.as,i=e.$._,o=e.put;(i.soul||e.$$)&&((t=n.lex)&&!String.match(e.get||(o||"")["."],t["."]||t["#"]||t)||r.on.link(e,n))}r.chain.get.next=function(e,t){var r;return Object.plain(t)?(r=((r=t["#"])||"")["="]||r)?e.get(r):((r=e.chain()._).lex=t,e.on("in",(function(e){String.match(e.get||(e.put||"")["."],t["."]||t["#"]||t)&&r.on("in",e),this.to.next(e)})),r.$):(n||s)(e,t)},r.chain.map=function(e,t,n){var a,c,u=this,l=u._;return Object.plain(e)&&(a=e["."]?e:{".":e},e=o),e?(r.log.once("mapfn","Map functions are experimental, their behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),c=u.chain(),u.map().on((function(t,n,i,a){var u=(e||s).call(this,t,n,i,a);if(o!==u){if(t===u)return c._.on("in",i);if(r.is(u))return c._.on("in",u._);var l={};Object.keys(i.put).forEach((function(e){l[e]=i.put[e]}),l),l["="]=u,c._.on("in",{get:n,put:l})}})),c):((c=l.each)||((l.each=c=u.chain())._.lex=a||c._.lex||l.lex,c._.nix=u.back("nix"),u.on("in",i,c._)),c)};var o,s=function(){}}))(t,"./map"),t((function(e){var r=t("./index");r.chain.set=function(e,t,n){var i,o,s=this,a=s.back(-1);return t=t||function(){},(n=n||{}).item=n.item||e,(i=((e||"")._||"")["#"])&&((e={})["#"]=i),"string"==typeof(o=r.valid(e))?s.get(i=o).put(e,t,n):r.is(e)?(s.put((function(n){e.get((function(e,i,a){if(!e)return t.call(s,{err:r.log('Only a node can be linked! Not "'+a.put+'"!')});(o={})[e]={"#":e},n(o)}),!0)})),e):(Object.plain(e)&&(e=a.get(i=s.back("opt.uuid")()).put(e)),s.get(i||a.back("opt.uuid")(7)).put(e,t,n))}}))(t,"./set"),t((function(e){t("./shim");var r,n=function(){},i=JSON.parseAsync||function(e,t,r){var n=+new Date;try{t(void 0,JSON.parse(e,r),o.sucks(+new Date-n))}catch(e){t(e)}},o=JSON.stringifyAsync||function(e,t,r,n){var i=+new Date;try{t(void 0,JSON.stringify(e,r,n),o.sucks(+new Date-i))}catch(e){t(e)}};o.sucks=function(e){e>99&&(console.log("Warning: JSON blocking CPU detected. Add `gun/lib/yson.js` to fix."),o.sucks=n)};try{e.exports=function(e){var t=function(){},n=e.opt||{};n.log=n.log||console.log,n.gap=n.gap||n.wait||0,n.max=n.max||.3*(n.memory?999*n.memory*999:3e8),n.pack=n.pack||.01*n.max*.01,n.puff=n.puff||9;var s=setTimeout.turn||setTimeout,a=e.dup,c=a.check,u=a.track,l=(new Date,t.hear=function(e,r){if(e){if(n.max<=e.length)return t.say({dam:"!",err:"Message too big!"},r);t===this&&(l.d+=e.length||0,++l.c);var o,a=r.SH=+new Date,c=e[0];return"["===c?(i(e,(function(e,i){if(e||!i)return t.say({dam:"!",err:"DAM JSON parse error."},r);console.STAT&&console.STAT(+new Date,i.length,"# on hear batch");var o=n.puff;!function e(){for(var n,a=+new Date,c=0;c<o&&(n=i[c++]);)t.hear(n,r);i=i.slice(c),console.STAT&&console.STAT(a,+new Date-a,"hear loop"),f(r),i.length&&s(e,0)}()})),void(e="")):"{"===c||(e["#"]||Object.plain(e))&&(o=e)?o?l.one(o,r,a):void i(e,(function(e,n){if(e||!n)return t.say({dam:"!",err:"DAM JSON parse error."},r);l.one(n,r,a)})):void 0}});function f(e){var t=e.batch,r="string"==typeof t;if(r&&(t+="]"),e.batch=e.tail=null,t&&!(r?3>t.length:!t.length)){if(!r)try{t=1===t.length?t[0]:JSON.stringify(t)}catch(e){return n.log("DAM JSON stringify error",e)}t&&d(t,e)}}function d(e,r){try{var n=r.wire;r.say?r.say(e):n.send&&n.send(e),t.say.d+=e.length||0,++t.say.c}catch(t){(r.queue=r.queue||[]).push(e)}}l.one=function(r,n,i){var o,s,l,f,d;if(r.DBG&&(r.DBG=d={DBG:r.DBG}),d&&(d.h=i),d&&(d.hp=+new Date),(o=r["#"])||(o=r["#"]=String.random(9)),!((l=c(o))||(s=r["##"])&&(l=r["@"]||r.get&&o)&&a.check(f=l+s))){if((r._=function(){}).via=t.leap=n,(l=r["><"])&&"string"==typeof l&&l.slice(0,99).split(",").forEach((function(e){this[e]=1}),r._.yo={}),l=r.dam)return(l=t.hear[l])&&l(r,n,e),void u(o);(l=r.ok)&&(r._.near=l["/"]),i=+new Date,d&&(d.is=i),n.SI=o,u.ed=function(e){o===e&&(u.ed=0,(e=a.s[o])&&(e.via=n,r.get&&(e.it=r)))},e.on("in",t.last=r),d&&(d.hd=+new Date),console.STAT&&console.STAT(i,+new Date-i,r.get?"msg get":r.put?"msg put":"msg"),u(o),f&&u(f),t.leap=t.last=null}},l.c=l.d=0,function(){var e,i=0;function l(e,t){var r;return t instanceof Object?(Object.keys(t).sort().forEach(h,{to:r={},on:t}),r):t}function h(e){this.to[e]=this.on[e]}t.hash=function(e,r){var n,i,a,c=+new Date;o(e.put,(function o(u,l){var f=(i||(i=a=l||"")).slice(0,32768);n=String.hash(f,n),(i=i.slice(32768))?s(o,0):(console.STAT&&console.STAT(c,+new Date-c,"say json+hash"),e._.$put=a,e["##"]=n,t.say(e,r),delete e._.$put)}),l)},(t.say=function(o,c){var l;if((l=this)&&(l=l.to)&&l.next&&l.next(o),!o)return!1;var h,p,g,y=o["@"],b=o._||(o._=function(){}),m=o.DBG,v=+new Date;if(b.y=b.y||v,c||m&&(m.y=v),(h=o["#"])||(h=o["#"]=String.random(9)),!e&&u(h),(p=o["##"])||r===o.put||b.via||!y){if(!c&&y&&(c=(l=a.s[y])&&(l.via||(l=l.it)&&(l=l._)&&l.via)||(l=t.last)&&y===l["#"]&&t.leap),!c&&y){if(a.s[y])return;return console.STAT&&console.STAT(+new Date,++i,"total no peer to ack to"),!1}if(y&&!o.put&&!p&&((a.s[y]||"").it||"")["##"])return!1;if(!c&&t.way)return t.way(o);if(m&&(m.yh=+new Date),g=b.raw){if(m&&(m.yr=+new Date),!c||!c.id){if(!Object.plain(c||n.peers))return!1;v=+new Date,n.puff;var w=n.peers,A=Object.keys(c||n.peers||{});return console.STAT&&console.STAT(v,+new Date-v,"peer keys"),void function r(){var n=+new Date;e=1;var i=b.raw;b.raw=g;for(var a,l=0;l<9&&(a=(A||"")[l++]);)(a=w[a]||(c||"")[a])&&t.say(o,a);b.raw=i,e=0,A=A.slice(l),console.STAT&&console.STAT(n,+new Date-n,"say loop"),A.length&&(s(r,0),y&&u(y))}()}if(!c.wire&&t.wire&&t.wire(c),h!==c.last){if(c.last=h,c===b.via)return!1;if((l=b.yo)&&(l[c.url]||l[c.pid]||l[c.id]))return!1;if(console.STAT&&console.STAT(v,((m||b).yp=+new Date)-(b.y||v),"say prep"),!e&&y&&u(y),c.batch){if(c.tail=(l=c.tail||0)+g.length,c.tail<=n.pack)return void(c.batch+=(l?",":"")+g);f(c)}c.batch="[";var E=+new Date;setTimeout((function(){console.STAT&&console.STAT(E,+new Date-E,"0ms TO"),f(c)}),n.gap),d(g,c),console.STAT&&y===c.SI&&console.STAT(v,+new Date-c.SH,"say ack")}}else t.raw(o,c)}else t.hash(o,c)}).c=t.say.d=0,t.raw=function(e,i){if(!e)return"";var s,u,l=e._||{};if(u=l.raw)return u;if("string"==typeof e)return e;var f=e["##"],d=e["@"];if(f&&d){if(!l.via&&c(d+f))return!1;if(u=(a.s[d]||"").it){if(f===u["##"])return!1;u["##"]||(u["##"]=f)}}if(!e.dam&&!e["@"]){var h=0,p=[];for(var g in u=n.peers){var y=u[g];if(p.push(y.url||y.pid||y.id),++h>6)break}h>1&&(e["><"]=p.join())}if(e.put&&(u=e.ok)&&(e.ok={"@":(u["@"]||1)-1,"/":u["/"]==e._.near?t.near:u["/"]}),s=l.$put)return u={},Object.keys(e).forEach((function(t){u[t]=e[t]})),u.put=":])([:",void o(u,(function(e,t){if(!e){var n=+new Date;u=t.indexOf('"put":":])([:"'),b(r,t=t.slice(0,u+6)+s+t.slice(u+14)),console.STAT&&console.STAT(n,+new Date-n,"say slice")}}));function b(r,n){r||(l.raw=n,t.say(e,i))}o(e,b)}}(),t.near=0,t.hi=function(r){var i;r.wire?(r.id?n.peers[r.url||r.id]=r:(i=r.id=r.id||r.url||String.random(9),t.say({dam:"?",pid:e.opt.pid},n.peers[i]=r),delete a.s[r.last]),r.met||(t.near++,r.met=+new Date,e.on("hi",r)),i=r.queue,r.queue=[],setTimeout.each(i||[],(function(e){d(e,r)}),0,9)):t.wire(r.length&&{url:r,id:r}||r)},t.bye=function(r){r.met&&--t.near,delete r.met,e.on("bye",r);var n=+new Date;n-=r.met||n,t.bye.time=((t.bye.time||n)+n)/2},t.hear["!"]=function(e,t){n.log("Error:",e.err)},t.hear["?"]=function(e,r){e.pid&&(r.pid||(r.pid=e.pid),e["@"])||(t.say({dam:"?",pid:n.pid,"@":e["#"]},r),delete a.s[r.last])},t.hear.mob=function(e,r){if(e.peers){var n=Object.keys(e.peers),i=n[Math.random()*n.length|0];i&&(t.bye(r),t.hi(i))}},e.on("create",(function(e){e.opt.pid=e.opt.pid||String.random(9),this.to.next(e),e.on("out",t.say)})),e.on("bye",(function(e,t){e=n.peers[e.id||e]||e,this.to.next(e),e.bye?e.bye():(t=e.wire)&&t.close&&t.close(),delete n.peers[e.id],e.wire=null}));var h={};return e.on("bye",(function(e,r){this.to.next(e),(r=console.STAT)&&(r.peers=t.near),(r=e.url)&&(h[r]=!0,setTimeout((function(){delete h[r]}),n.lack||9e3))})),e.on("hi",(function(r,i){if(this.to.next(r),(i=console.STAT)&&(i.peers=t.near),!n.super){var o=Object.keys(e.next||"");o.length>9999&&!console.SUBS&&console.log(console.SUBS="Warning: You have more than 10K live GETs, which might use more bandwidth than your screen can show - consider `.off()`."),setTimeout.each(o,(function(i){var o=e.next[i];n.super||(o.ask||"")[""]?t.say({get:{"#":i}},r):setTimeout.each(Object.keys(o.ask||""),(function(n){n&&t.say({"##":String.hash((e.graph[i]||"")[n]),get:{"#":i,".":n}},r)}))}))}})),t}}catch(e){}}))(t,"./mesh"),t((function(e){var r=t("./index");r.Mesh=t("./mesh"),r.on("opt",(function(e){if(this.to.next(e),!e.once){var t=e.opt;if(!1!==t.WebSocket){var n=r.window||{},i=t.WebSocket||n.WebSocket||n.webkitWebSocket||n.mozWebSocket;if(i){t.WebSocket=i;var o=t.mesh=t.mesh||r.Mesh(e);o.wire||t.wire,o.wire=t.wire=c,setTimeout((function(){!t.super&&e.on("out",{dam:"hi"})}),1);var s=1998,a=""+void 0!=typeof document&&document}}}function c(e){try{if(!e||!e.url)return n&&n(e);var r=e.url.replace(/^http/,"ws"),n=e.wire=new t.WebSocket(r);return n.onclose=function(){u(e),t.mesh.bye(e)},n.onerror=function(t){u(e)},n.onopen=function(){t.mesh.hi(e)},n.onmessage=function(r){r&&t.mesh.hear(r.data||r,e)},n}catch(r){t.mesh.bye(e)}}function u(e){clearTimeout(e.defer),t.peers[e.url]&&(a&&e.retry<=0||(e.retry=(e.retry||t.retry+1||60)-(-e.tried+(e.tried=+new Date)<4*s?1:0),e.defer=setTimeout((function t(){if(a&&a.hidden)return setTimeout(t,s);c(e)}),s)))}}))}))(t,"./websocket"),t((function(e){if("undefined"!=typeof Gun){var t;try{t=(Gun.window||function(){}).localStorage}catch(e){}t||(Gun.log("Warning: No localStorage exists to persist data to!"),t={setItem:function(e,t){this[e]=t},removeItem:function(e){delete this[e]},getItem:function(e){return this[e]}}),JSON.parseAsync;var r=JSON.stringifyAsync||function(e,t,r,n){try{t(void 0,JSON.stringify(e,r,n))}catch(e){t(e)}};Gun.on("create",(function e(n){this.to.next(n);var i,o,s,a,c=n.opt,u=(n.graph,[]);if(!1!==c.localStorage){c.prefix=c.file||"gun/";try{i=e[c.prefix]=e[c.prefix]||JSON.parse(s=t.getItem(c.prefix))||{}}catch(t){i=e[c.prefix]={}}s=(s||"").length,n.on("get",(function(e){this.to.next(e);var t,r,n,o=e.get;o&&(t=o["#"])&&((r=i[t]||void 0)&&(n=o["."])&&!Object.plain(n)&&(r=Gun.state.ify({},n,Gun.state.is(r,n),r[n],t)),Gun.on.get.ack(e,r))})),n.on("put",(function(e){this.to.next(e);var t=e.put,r=t["#"],c=t["."],f=e["#"],d=e.ok||"";i[r]=Gun.state.ify(i[r],c,t[">"],t[":"],r),a&&s>4999880?n.on("in",{"@":f,err:"localStorage max!"}):(e["@"]||e._.via&&!(Math.random()<d["@"]/d["/"])||u.push(f),o||(o=setTimeout(l,9+s/333)))}))}function l(){if(u.length||!((setTimeout.turn||"").s||"").length){var e=u;clearTimeout(o),o=!1,u=[],r(i,(function(r,o){try{!r&&t.setItem(c.prefix,o)}catch(e){r=a=e||"localStorage failure"}r&&(Gun.log(r+" Consider using GUN's IndexedDB plugin for RAD for more storage space, https://gun.eco/docs/RAD#install"),n.on("localStorage:error",{err:r,get:c.prefix,put:i})),s=o.length,setTimeout.each(e,(function(e){n.on("in",{"@":e,err:r,ok:0})}),0,99)}))}else setTimeout(l,99)}}))}}))(t,"./localStorage")}(),function(){if(""+E!=typeof Gun){var e=function(e){console.warn("Warning! Deprecated internal utility will break in next version:",e)},t=Gun;t.fn=t.fn||{is:function(t){return e("fn"),!!t&&"function"==typeof t}},t.bi=t.bi||{is:function(t){return e("bi"),t instanceof Boolean||"boolean"==typeof t}},t.num=t.num||{is:function(t){return e("num"),!n(t)&&(t-parseFloat(t)+1>=0||1/0===t||-1/0===t)}},t.text=t.text||{is:function(t){return e("text"),"string"==typeof t}},t.text.ify=t.text.ify||function(r){return e("text.ify"),t.text.is(r)?r:"undefined"!=typeof JSON?JSON.stringify(r):r&&r.toString?r.toString():r},t.text.random=t.text.random||function(t,r){e("text.random");var n="";for(t=t||24,r=r||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";t>0;)n+=r.charAt(Math.floor(Math.random()*r.length)),t--;return n},t.text.match=t.text.match||function(t,r){var n,i;return e("text.match"),"string"==typeof t&&("string"==typeof r&&(r={"=":r}),t===(n=(r=r||{})["="]||r["*"]||r[">"]||r["<"])||i===r["="]&&(n=r["*"]||r[">"]||r["<"],t.slice(0,(n||"").length)===n||i===r["*"]&&(i!==r[">"]&&i!==r["<"]?t>=r[">"]&&t<=r["<"]:i!==r[">"]&&t>=r[">"]||i!==r["<"]&&t<=r["<"])))},t.text.hash=t.text.hash||function(t,r){if(e("text.hash"),"string"==typeof t){if(r=r||0,!t.length)return r;for(var n=0,i=t.length;n<i;++n)r=(r<<5)-r+t.charCodeAt(n),r|=0;return r}},t.list=t.list||{is:function(t){return e("list"),t instanceof Array}},t.list.slit=t.list.slit||Array.prototype.slice,t.list.sort=t.list.sort||function(t){return e("list.sort"),function(e,r){return e&&r?(e=e[t])<(r=r[t])?-1:e>r?1:0:0}},t.list.map=t.list.map||function(t,r,n){return e("list.map"),s(t,r,n)},t.list.index=1,t.obj=t.boj||{is:function(t){return e("obj"),!!t&&(t instanceof Object&&t.constructor===Object||"Object"===Object.prototype.toString.call(t).match(/^\[object (\w+)\]$/)[1])}},t.obj.put=t.obj.put||function(t,r,n){return e("obj.put"),(t||{})[r]=n,t},t.obj.has=t.obj.has||function(t,r){return e("obj.has"),t&&Object.prototype.hasOwnProperty.call(t,r)},t.obj.del=t.obj.del||function(t,r){if(e("obj.del"),t)return t[r]=null,delete t[r],t},t.obj.as=t.obj.as||function(t,r,n,i){return e("obj.as"),t[r]=t[r]||(i===n?{}:n)},t.obj.ify=t.obj.ify||function(t){if(e("obj.ify"),i(t))return t;try{t=JSON.parse(t)}catch(e){t={}}return t},function(){function r(e,t){o(this,t)&&void 0!==this[t]||(this[t]=e)}t.obj.to=t.obj.to||function(t,n){return e("obj.to"),s(t,r,n=n||{}),n}}(),t.obj.copy=t.obj.copy||function(t){return e("obj.copy"),t?JSON.parse(JSON.stringify(t)):t},function(){function r(e,t){var r=this.n;if(!r||!(t===r||i(r)&&o(r,t)))return void 0!==t||void 0}t.obj.empty=t.obj.empty||function(t,n){return e("obj.empty"),!t||!s(t,r,{n:n})}}(),function(){function r(e,t){if(2===arguments.length)return r.r=r.r||{},void(r.r[e]=t);r.r=r.r||[],r.r.push(e)}var s,a=Object.keys;Object.keys=Object.keys||function(e){return s(e,(function(e,t,r){r(t)}))},t.obj.map=s=t.obj.map||function(s,c,u){e("obj.map");var l,f,d,h,p,g=0,y="function"==typeof c;if(r.r=l,a&&i(s)&&(h=a(s),p=!0),u=u||{},n(s)||h)for(f=(h||s).length;g<f;g++){var b=g+t.list.index;if(y){if((d=p?c.call(u,s[h[g]],h[g],r):c.call(u,s[g],b,r))!==l)return d}else if(c===s[p?h[g]:g])return h?h[g]:b}else for(g in s)if(y){if(o(s,g)&&(d=u?c.call(u,s[g],g,r):c(s[g],g,r))!==l)return d}else if(c===s[g])return g;return y?r.r:t.list.index?0:-1}}(),t.time=t.time||{},t.time.is=t.time.is||function(t){return e("time"),t?t instanceof Date:+(new Date).getTime()};var r=t.fn.is,n=t.list.is,i=(A=t.obj).is,o=A.has,s=A.map,a={is:function(t){return e("val.is"),t!==E&&(null===t||t!==1/0&&(!!(f(t)||u(t)||l(t))||a.link.is(t)||!1))}};a.link=a.rel={_:"#"},function(){function t(e,t){var r=this;return r.id?r.id=!1:t==c&&f(e)?void(r.id=e):r.id=!1}a.link.is=function(r){if(e("val.link.is"),r&&r[c]&&!r._&&i(r)){var n={};if(s(r,t,n),n.id)return n.id}return!1}}(),a.link.ify=function(t){return e("val.link.ify"),d({},c,t)},t.obj.has._=".";var c=a.link._,u=t.bi.is,l=t.num.is,f=t.text.is,d=(i=(A=t.obj).is,A.put);s=A.map,t.val=t.val||a;var h={_:"_",soul:function(t,r){return e("node.soul"),t&&t._&&t._[r||y]}};h.soul.ify=function(t,r){return e("node.soul.ify"),r="string"==typeof r?{soul:r}:r||{},(t=t||{})._=t._||{},t._[y]=r.soul||t._[y]||g(),t},h.soul._=a.link._,function(){function t(e,t){if(t!==h._)return!a.is(e)||void(this.cb&&this.cb.call(this.as,e,t,this.n,this.s))}h.is=function(r,n,o){var a;return e("node.is"),!!i(r)&&!!(a=h.soul(r))&&!s(r,t,{as:o,cb:n,s:a,n:r})}}(),function(){function t(e,t){var r,n=this.o;n.map?void 0===(r=n.map.call(this.as,e,""+t,n.node))?p(n.node,t):n.node&&(n.node[t]=r):a.is(e)&&(n.node[t]=e)}h.ify=function(r,n,i){return e("node.ify"),n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n={map:n}):n={},n.map&&(n.node=n.map.call(i,r,E,n.node||{})),(n.node=h.soul.ify(n.node||{},n))&&s(r,t,{o:n,as:i}),n.node}}(),i=(A=t.obj).is;var p=A.del,g=(s=A.map,t.text.random),y=h.soul._;t.node=t.node||h;var b=t.state;b.lex=function(){return e("state.lex"),b().toString(36).replace(".","")},b.to=function(t,r,n){e("state.to");var o=(t||{})[r];return i(o)&&(o=m(o)),b.ify(n,r,b.is(t,r),o,h.soul(t))},function(){function t(e,t){v!==t&&b.ify(this.o,t,this.s)}b.map=function(n,a,c){var u;e("state.map");var f=i(f=n||a)?f:null;return n=r(n=n||a)?n:null,f&&!n?(a=l(a)?a:b(),f[v]=f[v]||{},s(f,t,{o:f,s:a}),f):(c=c||i(a)?a:u,a=l(a)?a:b(),function(e,r,i,s){if(!n)return t.call({o:i,s:a},e,r),e;n.call(c||this||{},e,r,i,s),o(i,r)&&u===i[r]||t.call({o:i,s:a},e,r)})}}(),(A=t.obj).as,o=A.has,i=A.is,s=A.map;var m=A.copy,v=(l=t.num.is,r=t.fn.is,h._),w={};!function(){function t(e,t){if(!e||t!==h.soul(e)||!h.is(e,this.fn,this.as))return!0;this.cb&&(r.n=e,r.as=this.as,this.cb.call(r.as,e,t,r))}function r(e){e&&h.is(r.n,e,r.as)}w.is=function(r,n,o,a){return e("graph.is"),!(!r||!i(r)||P(r)||s(r,t,{cb:n,fn:o,as:a}))}}(),function(){function r(e,t){var r;return(r=function(e,t){for(var r,n=e.seen,i=n.length;i--;)if(r=n[i],t.obj===r.obj)return r;n.push(t)}(e,t))?r:(t.env=e,t.soul=s,h.ify(t.obj,n,t)&&(t.link=t.link||a.link.ify(h.soul(t.node)),t.obj!==e.shell&&(e.graph[a.link.is(t.link)]=t.node)),t)}function n(e,t,n){var i,s,u=this,l=u.env;if(h._===t&&o(e,a.link._))return n._;if(i=c(e,t,n,u,l)){if(t||(u.node=u.node||n||{},o(e,h._)&&h.soul(e)&&(u.node._=m(e._)),u.node=h.soul.ify(u.node,a.link.is(u.link)),u.link=u.link||a.link.ify(h.soul(u.node))),(s=l.map)&&(s.call(l.as||{},e,t,n,u),o(n,t))){if(e=n[t],E===e)return void p(n,t);if(!(i=c(e,t,n,u,l)))return}if(!t)return u.node;if(!0===i)return e;if((s=r(l,{obj:e,path:u.path.concat(t)})).node)return s.link}}function s(e){var t=this,r=a.link.is(t.link),n=t.env.graph;t.link=t.link||a.link.ify(e),t.link[a.link._]=e,t.node&&t.node[h._]&&(t.node[h._][a.link._]=e),o(n,r)&&(n[e]=n[r],p(n,r))}function c(e,r,n,o,s){var u;return!!a.is(e)||(i(e)?1:(u=s.invalid)?c(e=u.call(s.as||{},e,r,n),r,n,o,s):(s.err="Invalid value at '"+o.path.concat(r).join(".")+"'!",void(t.list.is(e)&&(s.err+=" Use `.set(item)` instead of an Array."))))}w.ify=function(t,n,i){e("graph.ify");var o={path:[],obj:t};return n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n.map=n):n={},"string"==typeof i&&(n.soul=n.soul||i,i=E),n.soul&&(o.link=a.link.ify(n.soul)),n.shell=(i||{}).shell,n.graph=n.graph||{},n.seen=n.seen||[],n.as=n.as||i,r(n,o),n.root=o.node,n.graph}}(),w.node=function(t){e("graph.node");var r=h.soul(t);if(r)return d({},r,t)},function(){function t(e,t){var r,n;if(h._!==t)(r=a.link.is(e))?(n=this.opt.seen[r])?this.obj[t]=n:this.obj[t]=this.opt.seen[r]=w.to(this.graph,r,this.opt):this.obj[t]=e;else{if(P(e,a.link._))return;this.obj[t]=m(e)}}w.to=function(r,n,i){if(e("graph.to"),r){var o={};return i=i||{seen:{}},s(r[n],t,{obj:o,graph:r,opt:i}),o}}}(),r=t.fn.is,i=(A=t.obj).is,p=A.del,o=A.has;var A,E,P=A.empty;d=A.put,s=A.map,m=A.copy,t.graph=t.graph||w}}()},4830:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},4880:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0;var n=r(5212),i=r(7214),o=r(9724);t.throttle=function(e,t){return n.operate((function(r,n){var s=null!=t?t:{},a=s.leading,c=void 0===a||a,u=s.trailing,l=void 0!==u&&u,f=!1,d=null,h=null,p=!1,g=function(){null==h||h.unsubscribe(),h=null,l&&(m(),p&&n.complete())},y=function(){h=null,p&&n.complete()},b=function(t){return h=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,g,y))},m=function(){if(f){f=!1;var e=d;d=null,n.next(e),!p&&b(e)}};r.subscribe(i.createOperatorSubscriber(n,(function(e){f=!0,d=e,(!h||h.closed)&&(c?m():b(e))}),(function(){p=!0,(!(l&&f&&h)||h.closed)&&n.complete()})))}))}},4885:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(8051);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},4891:function(e,t){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},4933:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebauthnPlugin=void 0;const n=r(4586),i=r(7510),o=r(5628),s=r(4193),a=r(3358);class c extends n.BasePlugin{name="webauthn";version="1.0.0";description="Provides WebAuthn authentication functionality for ShogunCore";webauthn=null;initialize(e){super.initialize(e),this.webauthn=new i.Webauthn(e.gun),(0,o.log)("WebAuthn plugin initialized")}destroy(){this.webauthn=null,super.destroy(),(0,o.log)("WebAuthn plugin destroyed")}assertWebauthn(){if(this.assertInitialized(),!this.webauthn)throw new Error("WebAuthn module not initialized");return this.webauthn}isSupported(){return this.assertWebauthn().isSupported()}async generateCredentials(e,t,r=!1){return this.assertWebauthn().generateCredentials(e,t,r)}async createAccount(e,t,r=!1){return this.assertWebauthn().createAccount(e,t,r)}async authenticateUser(e,t,r){return this.assertWebauthn().authenticateUser(e,t,r)}abortAuthentication(){this.assertWebauthn().abortAuthentication()}async removeDevice(e,t,r){return this.assertWebauthn().removeDevice(e,t,r)}async login(e){(0,o.log)("Login with WebAuthn");try{const t=this.assertInitialized();if((0,o.log)(`Attempting WebAuthn login for user: ${e}`),!e)throw new Error("Username required for WebAuthn login");if(!this.isSupported())throw new Error("WebAuthn is not supported by this browser");const r=await this.generateCredentials(e,null,!0);if(!r?.success)throw new Error(r?.error||"WebAuthn verification failed");const n=s.ethers.keccak256(s.ethers.toUtf8Bytes(r.credentialId||""));t.setAuthMethod("webauthn");const i=await t.login(e,n);return i.success?((0,o.log)(`WebAuthn login completed successfully for user: ${e}`),{...i,username:e,credentialId:r.credentialId}):i}catch(e){return(0,o.logError)(`Error during WebAuthn login: ${e}`),a.ErrorHandler.handle(a.ErrorType.WEBAUTHN,"WEBAUTHN_LOGIN_ERROR",e.message||"Error during WebAuthn login",e),{success:!1,error:e.message||"Error during WebAuthn login"}}}async signUp(e){(0,o.log)("Sign up with WebAuthn");try{const t=this.assertInitialized();if((0,o.log)(`Attempting WebAuthn registration for user: ${e}`),!e)throw new Error("Username required for WebAuthn registration");if(!this.isSupported())throw new Error("WebAuthn is not supported by this browser");const r=await this.generateCredentials(e,null,!1);if(!r?.success)throw new Error(r?.error||"Unable to generate WebAuthn credentials");const n=s.ethers.keccak256(s.ethers.toUtf8Bytes(r.credentialId||""));t.setAuthMethod("webauthn");const i=await t.signUp(e,n);return i.success?((0,o.log)(`WebAuthn registration completed successfully for user: ${e}`),t.emit("webauthn:register",{username:e,credentialId:r.credentialId}),t.emit("auth:signup",{userPub:i.userPub,username:e,method:"webauthn"}),{...i,username:e,credentialId:r.credentialId}):i}catch(e){return(0,o.logError)(`Error during WebAuthn registration: ${e}`),a.ErrorHandler.handle(a.ErrorType.WEBAUTHN,"WEBAUTHN_SIGNUP_ERROR",e.message||"Error during WebAuthn registration",e),{success:!1,error:e.message||"Error during WebAuthn registration"}}}async loginWithWebAuthn(e){return this.login(e)}async signUpWithWebAuthn(e){return this.signUp(e)}}t.WebauthnPlugin=c},4945:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketProvider=t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=void 0;const n=r(8672),i=r(5347),o=r(2371);class s{#Q;#f;get filter(){return JSON.parse(this.#f)}#ue;#le;#fe;constructor(e,t){this.#Q=e,this.#f=JSON.stringify(t),this.#ue=null,this.#le=null,this.#fe=null}start(){this.#ue=this.#Q.send("eth_subscribe",this.filter).then((e=>(this.#Q._register(e,this),e)))}stop(){this.#ue.then((e=>{this.#Q.destroyed||this.#Q.send("eth_unsubscribe",[e])})),this.#ue=null}pause(e){(0,i.assert)(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#le=!!e}resume(){this.#le=null}_handleMessage(e){if(null!=this.#ue&&null===this.#le){let t=this.#fe;t=null==t?this._emit(this.#Q,e):t.then((async()=>{await this._emit(this.#Q,e)})),this.#fe=t.then((()=>{this.#fe===t&&(this.#fe=null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}t.SocketSubscriber=s;class a extends s{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}t.SocketBlockSubscriber=a;class c extends s{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}t.SocketPendingSubscriber=c;class u extends s{#de;get logFilter(){return JSON.parse(this.#de)}constructor(e,t){super(e,["logs",t]),this.#de=JSON.stringify(t)}async _emit(e,t){e.emit(this.logFilter,e._wrapLog(t,e._network))}}t.SocketEventSubscriber=u;class l extends o.JsonRpcApiProvider{#he;#pe;#ge;constructor(e,t){const r=Object.assign({},null!=t?t:{});(0,i.assertArgument)(null==r.batchMaxCount||1===r.batchMaxCount,"sockets-based providers do not support batches","options.batchMaxCount",t),r.batchMaxCount=1,null==r.staticNetwork&&(r.staticNetwork=!0),super(e,r),this.#he=new Map,this.#pe=new Map,this.#ge=new Map}_getSubscriber(e){switch(e.type){case"close":return new n.UnmanagedSubscriber("close");case"block":return new a(this);case"pending":return new c(this);case"event":return new u(this,e.filter);case"orphan":if("drop-log"===e.filter.orphan)return new n.UnmanagedSubscriber("drop-log")}return super._getSubscriber(e)}_register(e,t){this.#pe.set(e,t);const r=this.#ge.get(e);if(r){for(const e of r)t._handleMessage(e);this.#ge.delete(e)}}async _send(e){(0,i.assertArgument)(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const t=new Promise(((t,r)=>{this.#he.set(e.id,{payload:e,resolve:t,reject:r})}));return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await t]}async _processMessage(e){const t=JSON.parse(e);if(t&&"object"==typeof t&&"id"in t){const e=this.#he.get(t.id);if(null==e)return void this.emit("error",(0,i.makeError)("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:t}));this.#he.delete(t.id),e.resolve(t)}else{if(!t||"eth_subscription"!==t.method)return void this.emit("error",(0,i.makeError)("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:t}));{const e=t.params.subscription,r=this.#pe.get(e);if(r)r._handleMessage(t.params.result);else{let r=this.#ge.get(e);null==r&&(r=[],this.#ge.set(e,r)),r.push(t.params.result)}}}}async _write(e){throw new Error("sub-classes must override this")}}t.SocketProvider=l},4948:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(8246),s=r(5212),a=r(7652),c=r(3916),u=r(1898),l=r(6404);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?u.pipe(e.apply(void 0,i([],n(t))),c.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},4950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(8051);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},4967:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(1484),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function d(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function h(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=i,a=o,c=o,u=i;for(;r!==i;){const e=n/r,t=n%r,i=s-c*e,o=a-u*e;n=r,r=t,s=c,a=u,c=i,u=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&d(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const u=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,c=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,u),f=e.pow(i,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,o<<BigInt(s-t-1));c=e.sqr(r),l=e.mul(l,r),f=e.mul(f,c),s=t}return l}}function g(e){if(e%c===a){const t=(e+o)/c;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===u){const t=(e-u)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),c=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(c),r))throw new Error("Cannot find square root");return c}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=d,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=h,t.tonelliShanks=p,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function m(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function A(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=b,t.FpInvertBatch=m,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?h(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>b(l,e,t),div:(t,r)=>f(t*h(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:s.sqrt||(e=>u(l,e)),invertBatch:e=>m(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,c):(0,n.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=w,t.getMinHashLength=A,t.mapHashToField=function(e,t,r=!1){const i=e.length,s=w(t),a=A(t);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const c=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)}},4975:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},5019:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(1245),i=r(5212),o=r(7214);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},5047:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherscanProvider=t.EtherscanPlugin=void 0;const n=r(8456),i=r(9288),o=r(7778),s=r(5347),a=r(8672),c=r(5317),u=r(4491),l=r(9973),f="org.ethers.plugins.provider.Etherscan";class d extends u.NetworkPlugin{baseUrl;constructor(e){super(f),(0,s.defineProperties)(this,{baseUrl:e})}clone(){return new d(this.baseUrl)}}t.EtherscanPlugin=d;const h=["enableCcipRead"];let p=1;class g extends a.AbstractProvider{network;apiKey;#ye;constructor(e,t){const r=null!=t?t:null;super();const n=c.Network.from(e);this.#ye=n.getPlugin(f),(0,s.defineProperties)(this,{apiKey:r,network:n})}getBaseUrl(){if(this.#ye)return this.#ye.baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}(0,s.assertArgument)(!1,"unsupported network","network",this.network)}getUrl(e,t){let r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),"");return this.apiKey&&(r+=`&apikey=${this.apiKey}`),`https://api.etherscan.io/v2/api?chainid=${this.network.chainId}&module=${e}${r}`}getPostUrl(){return`https://api.etherscan.io/v2/api?chainid=${this.network.chainId}`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t.chainid=this.network.chainId,t}async detectNetwork(){return this.network}async fetch(e,t,r){const n=p++,i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null;this.emit("debug",{action:"sendRequest",id:n,url:i,payload:o});const a=new s.FetchRequest(i);a.setThrottleParams({slotInterval:1e3}),a.retryFunc=(e,t,r)=>(this.isCommunityResource()&&(0,l.showThrottleMessage)("Etherscan"),Promise.resolve(!0)),a.processFunc=async(t,r)=>{const i=r.hasBody()?JSON.parse((0,s.toUtf8String)(r.body)):{},o=("string"==typeof i.result?i.result:"").toLowerCase().indexOf("rate limit")>=0;return"proxy"===e?i&&0==i.status&&"NOTOK"==i.message&&o&&(this.emit("debug",{action:"receiveError",id:n,reason:"proxy-NOTOK",error:i}),r.throwThrottleError(i.result,2e3)):o&&(this.emit("debug",{action:"receiveError",id:n,reason:"null result",error:i.result}),r.throwThrottleError(i.result,2e3)),r},o&&(a.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),a.body=Object.keys(o).map((e=>`${e}=${o[e]}`)).join("&"));const c=await a.send();try{c.assertOk()}catch(e){this.emit("debug",{action:"receiveError",id:n,error:e,reason:"assertOk"}),(0,s.assert)(!1,"response error","SERVER_ERROR",{request:a,response:c})}c.hasBody()||(this.emit("debug",{action:"receiveError",id:n,error:"missing body",reason:"null body"}),(0,s.assert)(!1,"missing response","SERVER_ERROR",{request:a,response:c}));const u=JSON.parse((0,s.toUtf8String)(c.body));return"proxy"===e?("2.0"!=u.jsonrpc&&(this.emit("debug",{action:"receiveError",id:n,result:u,reason:"invalid JSON-RPC"}),(0,s.assert)(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:a,response:c,info:{result:u}})),u.error&&(this.emit("debug",{action:"receiveError",id:n,result:u,reason:"JSON-RPC error"}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:n,result:u}),u.result):0!=u.status||"No records found"!==u.message&&"No transactions found"!==u.message?((1!=u.status||"string"==typeof u.message&&!u.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:n,result:u}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:n,result:u}),u.result):(this.emit("debug",{action:"receiveRequest",id:n,result:u}),u.result)}_getTransactionPostData(e){const t={};for(let r in e){if(h.indexOf(r)>=0)continue;if(null==e[r])continue;let n=e[r];if(!("type"===r&&0===n||"blockTag"===r&&"latest"===n)){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r])n=(0,s.toQuantity)(n);else if("accessList"===r)n="["+(0,o.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]";else if("blobVersionedHashes"===r){if(0===n.length)continue;(0,s.assert)(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else n=(0,s.hexlify)(n);t[r]=n}}return t}_checkError(e,t,r){let i="";if((0,s.isError)(t,"SERVER_ERROR")){try{i=t.info.result.error.message}catch(e){}if(!i)try{i=t.info.message}catch(e){}}if("estimateGas"===e.method&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&(0,s.assert)(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),("call"===e.method||"estimateGas"===e.method)&&i.match(/execution reverted/i)){let r="";try{r=t.info.result.error.data}catch(t){}const i=n.AbiCoder.getBuiltinCallException(e.method,e.transaction,r);throw i.info={request:e,error:t},i}if(i&&"broadcastTransaction"===e.method){const t=o.Transaction.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&(0,s.assert)(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t}),i.match(/insufficient funds/)&&(0,s.assert)(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&(0,s.assert)(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:t})}throw t}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if("mainnet"===this.network.name)return"1000000000";if("optimism"===this.network.name)return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((t=>this._checkError(e,t,e.signedTransaction)));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});(0,s.assert)(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if("latest"!==e.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_call";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}case"estimateGas":{const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return"mainnet"!==this.network.name?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let t=this._getAddress(e);var r;(r=t)&&"function"==typeof r.then&&(t=await t);try{const e=await this.fetch("contract",{action:"getabi",address:t}),r=JSON.parse(e);return new i.Contract(t,r,this)}catch(e){return null}}isCommunityResource(){return null==this.apiKey}}t.EtherscanProvider=g},5059:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.sha256=void 0;const n=r(7155),i=r(5347),o=function(e){return(0,n.createHash)("sha256").update(e).digest()},s=function(e){return(0,n.createHash)("sha512").update(e).digest()};let a=o,c=s,u=!1,l=!1;function f(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}function d(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(c(t))}t.sha256=f,f._=o,f.lock=function(){u=!0},f.register=function(e){if(u)throw new Error("sha256 is locked");a=e},Object.freeze(f),t.sha512=d,d._=s,d.lock=function(){l=!0},d.register=function(e){if(l)throw new Error("sha512 is locked");c=e},Object.freeze(f)},5128:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(8051),i=r(9724),o=r(6808),s=r(5212),a=r(7214);t.groupBy=function(e,t,r,c){return s.operate((function(s,u){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,c=t.connector):l=t;var f=new Map,d=function(e){f.forEach(e),e(u)},h=function(e){return d((function(t){return t.error(e)}))},p=0,g=!1,y=new a.OperatorSubscriber(u,(function(t){try{var s=e(t),d=f.get(s);if(!d){f.set(s,d=c?c():new o.Subject);var b=(v=s,w=d,(A=new n.Observable((function(e){p++;var t=w.subscribe(e);return function(){t.unsubscribe(),0===--p&&g&&y.unsubscribe()}}))).key=v,A);if(u.next(b),r){var m=a.createOperatorSubscriber(d,(function(){d.complete(),null==m||m.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));y.add(i.innerFrom(r(b)).subscribe(m))}}d.next(l?l(t):t)}catch(e){h(e)}var v,w,A}),(function(){return d((function(e){return e.complete()}))}),h,(function(){return f.clear()}),(function(){return g=!0,0===p}));s.subscribe(y)}))}},5130:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(6808).Subject);t.AsyncSubject=o},5145:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},5156:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(6808),i=r(5212),o=r(7214),s=r(9724);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,c=function(e){i.error(e),r.error(e)},u=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void c(e)}t.subscribe(a=o.createOperatorSubscriber(r,u,u,c))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),c,(function(){null==a||a.unsubscribe(),i=null})))}))}},5191:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponse=t.FetchRequest=t.FetchCancelSignal=void 0;const n=r(1949),i=r(7415),o=r(1500),s=r(8166),a=r(3948),c=r(3271);let u=(0,c.createGetUrl)();const l=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),f=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let d=!1;async function h(e,t){try{const t=e.match(l);if(!t)throw new Error("invalid data");return new w(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?(0,n.decodeBase64)(t[3]):(r=t[3],(0,a.toUtf8Bytes)(r.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))))))}catch(t){return new w(599,"BAD REQUEST (invalid data: URI)",{},null,new v(e))}var r}function p(e){return async function(t,r){try{const r=t.match(f);if(!r)throw new Error("invalid link");return new v(`${e}${r[2]}`)}catch(e){return new w(599,"BAD REQUEST (invalid IPFS URI)",{},null,new v(t))}}}const g={data:h,ipfs:p("https://gateway.ipfs.io/ipfs/")},y=new WeakMap;class b{#be;#me;constructor(e){this.#be=[],this.#me=!1,y.set(e,(()=>{if(!this.#me){this.#me=!0;for(const e of this.#be)setTimeout((()=>{e()}),0);this.#be=[]}}))}addListener(e){(0,o.assert)(!this.#me,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#be.push(e)}get cancelled(){return this.#me}checkSignal(){(0,o.assert)(!this.cancelled,"cancelled","CANCELLED",{})}}function m(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}t.FetchCancelSignal=b;class v{#ve;#we;#Ae;#Ee;#Pe;#se;#Oe;#Se;#_e;#ke;#Te;#xe;#Ie;#Re;#Ce;get url(){return this.#se}set url(e){this.#se=String(e)}get body(){return null==this.#Oe?null:new Uint8Array(this.#Oe)}set body(e){if(null==e)this.#Oe=void 0,this.#Se=void 0;else if("string"==typeof e)this.#Oe=(0,a.toUtf8Bytes)(e),this.#Se="text/plain";else if(e instanceof Uint8Array)this.#Oe=e,this.#Se="application/octet-stream";else{if("object"!=typeof e)throw new Error("invalid body");this.#Oe=(0,a.toUtf8Bytes)(JSON.stringify(e)),this.#Se="application/json"}}hasBody(){return null!=this.#Oe}get method(){return this.#Ee?this.#Ee:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#Ee=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#Ae);return this.#_e&&(e.authorization=`Basic ${(0,n.encodeBase64)((0,a.toUtf8Bytes)(this.#_e))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#Se&&(e["content-type"]=this.#Se),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#Ae[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#Ae={}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r<t.length){const n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#_e||null}setCredentials(e,t){(0,o.assertArgument)(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#_e=`${e}:${t}`}get allowGzip(){return this.#we}set allowGzip(e){this.#we=!!e}get allowInsecureAuthentication(){return!!this.#ve}set allowInsecureAuthentication(e){this.#ve=!!e}get timeout(){return this.#Pe}set timeout(e){(0,o.assertArgument)(e>=0,"timeout must be non-zero","timeout",e),this.#Pe=e}get preflightFunc(){return this.#ke||null}set preflightFunc(e){this.#ke=e}get processFunc(){return this.#Te||null}set processFunc(e){this.#Te=e}get retryFunc(){return this.#xe||null}set retryFunc(e){this.#xe=e}get getUrlFunc(){return this.#Ce||u}set getUrlFunc(e){this.#Ce=e}constructor(e){this.#se=String(e),this.#ve=!1,this.#we=!0,this.#Ae={},this.#Ee="",this.#Pe=3e5,this.#Re={slotInterval:250,maxAttempts:12},this.#Ce=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#Oe?(0,i.hexlify)(this.#Oe):"null"}>`}setThrottleParams(e){null!=e.slotInterval&&(this.#Re.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#Re.maxAttempts=e.maxAttempts)}async#Ne(e,t,r,n,i){if(e>=this.#Re.maxAttempts)return i.makeServerError("exceeded maximum retry limit");(0,o.assert)(A()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await function(e){return new Promise((t=>setTimeout(t,e)))}(r);let s=this.clone();const a=(s.url.split(":")[0]||"").toLowerCase();if(a in g){const e=await g[a](s.url,m(n.#Ie));if(e instanceof w){let t=e;if(this.processFunc){m(n.#Ie);try{t=await this.processFunc(s,t)}catch(e){null!=e.throttle&&"number"==typeof e.stall||t.makeServerError("error in post-processing function",e).assertOk()}}return t}s=e}this.preflightFunc&&(s=await this.preflightFunc(s));const c=await this.getUrlFunc(s,m(n.#Ie));let u=new w(c.statusCode,c.statusMessage,c.headers,c.body,n);if(301===u.statusCode||302===u.statusCode){try{const r=u.headers.location||"";return s.redirect(r).#Ne(e+1,t,0,n,u)}catch(e){}return u}if(429===u.statusCode&&(null==this.retryFunc||await this.retryFunc(s,u,e))){const r=u.headers["retry-after"];let i=this.#Re.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof r&&r.match(/^[1-9][0-9]*$/)&&(i=parseInt(r)),s.clone().#Ne(e+1,t,i,n,u)}if(this.processFunc){m(n.#Ie);try{u=await this.processFunc(s,u)}catch(r){null!=r.throttle&&"number"==typeof r.stall||u.makeServerError("error in post-processing function",r).assertOk();let i=this.#Re.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return r.stall>=0&&(i=r.stall),s.clone().#Ne(e+1,t,i,n,u)}}return u}send(){return(0,o.assert)(null==this.#Ie,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#Ie=new b(this),this.#Ne(0,A()+this.timeout,0,this,new w(0,"",{},null,this))}cancel(){(0,o.assert)(null!=this.#Ie,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=y.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();(0,o.assert)("GET"===this.method&&("https"!==t||"http"!==r)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const n=new v(e);return n.method="GET",n.allowGzip=this.allowGzip,n.timeout=this.timeout,n.#Ae=Object.assign({},this.#Ae),this.#Oe&&(n.#Oe=new Uint8Array(this.#Oe)),n.#Se=this.#Se,n}clone(){const e=new v(this.url);return e.#Ee=this.#Ee,this.#Oe&&(e.#Oe=this.#Oe),e.#Se=this.#Se,e.#Ae=Object.assign({},this.#Ae),e.#_e=this.#_e,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#ke=this.#ke,e.#Te=this.#Te,e.#xe=this.#xe,e.#Re=Object.assign({},this.#Re),e.#Ce=this.#Ce,e}static lockConfig(){d=!0}static getGateway(e){return g[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(d)throw new Error("gateways locked");g[e]=t}static registerGetUrl(e){if(d)throw new Error("gateways locked");u=e}static createGetUrlFunc(e){return(0,c.createGetUrl)(e)}static createDataGateway(){return h}static createIpfsGatewayFunc(e){return p(e)}}t.FetchRequest=v;class w{#je;#Be;#Ae;#Oe;#s;#Me;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#Oe?(0,i.hexlify)(this.#Oe):"null"}>`}get statusCode(){return this.#je}get statusMessage(){return this.#Be}get headers(){return Object.assign({},this.#Ae)}get body(){return null==this.#Oe?null:new Uint8Array(this.#Oe)}get bodyText(){try{return null==this.#Oe?"":(0,a.toUtf8String)(this.#Oe)}catch(e){(0,o.assert)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,o.assert)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r<t.length){const n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,r,n,i){this.#je=e,this.#Be=t,this.#Ae=Object.keys(r).reduce(((e,t)=>(e[t.toLowerCase()]=String(r[t]),e)),{}),this.#Oe=null==n?null:new Uint8Array(n),this.#s=i||null,this.#Me={message:""}}makeServerError(e,t){let r;r=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const n=new w(599,r,this.headers,this.body,this.#s||void 0);return n.#Me={message:e,error:t},n}throwThrottleError(e,t){null==t?t=-1:(0,o.assertArgument)(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);const r=new Error(e||"throttling requests");throw(0,s.defineProperties)(r,{stall:t,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#Oe}get request(){return this.#s}ok(){return""===this.#Me.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#Me;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let n=null;try{this.#Oe&&(n=(0,a.toUtf8String)(this.#Oe))}catch(e){}(0,o.assert)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:r,responseBody:n,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function A(){return(new Date).getTime()}t.FetchResponse=w},5212:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(281);function i(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},5239:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroAddress=void 0,t.ZeroAddress="0x0000000000000000000000000000000000000000"},5255:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroHash=void 0,t.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},5266:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(8051),i=r(439),o=r(9724),s=r(6404),a=r(7214),c=r(3916),u=r(5810);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,d=l.keys,h=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(d?u.createObject(d,r):r),e.complete())})))},c=0;c<t;c++)s(c);else e.complete()}));return r?h.pipe(c.mapOneOrManyArgs(r)):h}},5279:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=r(4885),o=r(5212),s=r(7214);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},5307:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnectorPlugin=t.NostrConnector=t.Web3ConnectorPlugin=t.Web3Connector=t.WebauthnPlugin=t.Webauthn=t.BasePlugin=void 0;var n=r(4586);Object.defineProperty(t,"BasePlugin",{enumerable:!0,get:function(){return n.BasePlugin}});var i=r(7510);Object.defineProperty(t,"Webauthn",{enumerable:!0,get:function(){return i.Webauthn}});var o=r(4933);Object.defineProperty(t,"WebauthnPlugin",{enumerable:!0,get:function(){return o.WebauthnPlugin}});var s=r(8089);Object.defineProperty(t,"Web3Connector",{enumerable:!0,get:function(){return s.Web3Connector}});var a=r(8098);Object.defineProperty(t,"Web3ConnectorPlugin",{enumerable:!0,get:function(){return a.Web3ConnectorPlugin}});var c=r(7897);Object.defineProperty(t,"NostrConnector",{enumerable:!0,get:function(){return c.NostrConnector}});var u=r(8050);Object.defineProperty(t,"NostrConnectorPlugin",{enumerable:!0,get:function(){return u.NostrConnectorPlugin}})},5312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;const n=r(2291),i=r(5347),o=r(9943);function s(e){return(1<<e)-1<<8-e&255}function a(e,t){(0,i.assertNormalize)("NFKD"),null==t&&(t=o.LangEn.wordlist());const r=t.split(e);(0,i.assertArgument)(r.length%3==0&&r.length>=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const a=new Uint8Array(Math.ceil(11*r.length/8));let c=0;for(let e=0;e<r.length;e++){let n=t.getWordIndex(r[e].normalize("NFKD"));(0,i.assertArgument)(n>=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)n&1<<10-e&&(a[c>>3]|=1<<7-c%8),c++}const u=32*r.length/3,l=s(r.length/3),f=(0,i.getBytes)((0,n.sha256)(a.slice(0,u/8)))[0]&l;return(0,i.assertArgument)(f===(a[a.length-1]&l),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,i.hexlify)(a.slice(0,u/8))}function c(e,t){(0,i.assertArgument)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=o.LangEn.wordlist());const r=[0];let a=11;for(let t=0;t<e.length;t++)a>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],a-=8):(r[r.length-1]<<=a,r[r.length-1]|=e[t]>>8-a,r.push(e[t]&(1<<8-a)-1&255),a+=3);const c=e.length/4,u=parseInt((0,n.sha256)(e).substring(2,4),16)&s(c);return r[r.length-1]<<=c,r[r.length-1]|=u>>8-c,t.join(r.map((e=>t.getWord(e))))}const u={};class l{phrase;password;wordlist;entropy;constructor(e,t,r,n,s){null==n&&(n=""),null==s&&(s=o.LangEn.wordlist()),(0,i.assertPrivate)(e,u,"Mnemonic"),(0,i.defineProperties)(this,{phrase:r,password:n,wordlist:s,entropy:t})}computeSeed(){const e=(0,i.toUtf8Bytes)("mnemonic"+this.password,"NFKD");return(0,n.pbkdf2)((0,i.toUtf8Bytes)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){const n=a(e,r);return e=c((0,i.getBytes)(n),r),new l(u,n,e,t,r)}static fromEntropy(e,t,r){const n=(0,i.getBytes)(e,"entropy"),o=c(n,r);return new l(u,(0,i.hexlify)(n),o,t,r)}static entropyToPhrase(e,t){return c((0,i.getBytes)(e,"entropy"),t)}static phraseToEntropy(e,t){return a(e,t)}static isValidMnemonic(e,t){try{return a(e,t),!0}catch(e){}return!1}}t.Mnemonic=l},5317:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const n=r(7778),i=r(5347),o=r(4491),s=new Map;class a{#Fe;#A;#Ue;constructor(e,t){this.#Fe=e,this.#A=(0,i.getBigInt)(t),this.#Ue=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#Fe}set name(e){this.#Fe=e}get chainId(){return this.#A}set chainId(e){this.#A=(0,i.getBigInt)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,i.getBigInt)(e.chainId)}catch(e){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#Ue.values())}attachPlugin(e){if(this.#Ue.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Ue.set(e.name,e.clone()),this}getPlugin(e){return this.#Ue.get(e)||null}getPlugins(e){return this.plugins.filter((t=>t.name.split("#")[0]===e))}clone(){const e=new a(this.name,this.chainId);return this.plugins.forEach((t=>{e.attachPlugin(t.clone())})),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new o.GasCostPlugin;let r=t.txBase;if(null==e.to&&(r+=t.txCreate),e.data)for(let n=2;n<e.data.length;n+=2)"00"===e.data.substring(n,n+2)?r+=t.txDataZero:r+=t.txDataNonzero;if(e.accessList){const i=(0,n.accessListify)(e.accessList);for(const e in i)r+=t.txAccessListAddress+t.txAccessListStorageKey*i[e].storageKeys.length}return r}static from(e){if(function(){function e(e,t,r){const n=function(){const n=new a(e,t);return null!=r.ensNetwork&&n.attachPlugin(new o.EnsPlugin(null,r.ensNetwork)),n.attachPlugin(new o.GasCostPlugin),(r.plugins||[]).forEach((e=>{n.attachPlugin(e)})),n};a.register(e,n),a.register(t,n),r.altNames&&r.altNames.forEach((e=>{a.register(e,n)}))}l||(l=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[u("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[u("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1}))}(),null==e)return a.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){const t=s.get(e);if(t)return t();if("bigint"==typeof e)return new a("unknown",e);(0,i.assertArgument)(!1,"unknown network","network",e)}if("function"==typeof e.clone)return e.clone();if("object"==typeof e){(0,i.assertArgument)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);const t=new a(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new o.EnsPlugin(e.ensAddress,e.ensNetwork)),t}(0,i.assertArgument)(!1,"invalid network","network",e)}static register(e,t){"number"==typeof e&&(e=BigInt(e));const r=s.get(e);r&&(0,i.assertArgument)(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),s.set(e,t)}}function c(e,t){const r=String(e);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const n=r.split(".");if(1===n.length&&n.push(""),2!==n.length)throw new Error(`invalid gwei value: ${e}`);for(;n[1].length<t;)n[1]+="0";if(n[1].length>9){let e=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||e++,n[1]=e.toString()}return BigInt(n[0]+n[1])}function u(e){return new o.FetchUrlFeeDataNetworkPlugin(e,(async(e,t,r)=>{let n;r.setHeader("User-Agent","ethers");try{const[t,i]=await Promise.all([r.send(),e()]);n=t;const o=n.bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:c(o.maxFee,9),maxPriorityFeePerGas:c(o.maxPriorityFee,9)}}catch(e){(0,i.assert)(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:n,error:e})}}))}t.Network=a;let l=!1},5336:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7557),i=r(2318),o=r(9175),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)t=(t<<l^(t>>d)*p)%h,t&f&&(i^=l<<(l<<BigInt(e))-l);c.push(i)}const[g,y]=(0,i.split)(c,!0),b=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),m=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=b(o,s,1)^r[n],c=m(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],o=b(t,i,n),c=m(t,i,n),u=s[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=v;class w extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const A=(e,t,r)=>(0,o.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=A(6,144,28),t.sha3_256=A(6,136,32),t.sha3_384=A(6,104,48),t.sha3_512=A(6,72,64),t.keccak_224=A(1,144,28),t.keccak_256=A(1,136,32),t.keccak_384=A(1,104,48),t.keccak_512=A(1,72,64);const E=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},5345:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},5347:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.encodeRlp=t.decodeRlp=t.defineProperties=t.resolveProperties=t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.toBigInt=t.getUint=t.getNumber=t.getBigInt=t.mask=t.toTwos=t.fromTwos=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.makeError=t.assertNormalize=t.assertPrivate=t.assertArgumentCount=t.assertArgument=t.assert=t.isError=t.isCallException=t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=void 0,t.uuidV4=t.Utf8ErrorFuncs=void 0;var n=r(8567);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return n.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return n.encodeBase58}});var i=r(1949);Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return i.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return i.encodeBase64}});var o=r(7415);Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return o.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return o.getBytesCopy}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return o.isBytesLike}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return o.hexlify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return o.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return o.dataSlice}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return o.stripZerosLeft}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return o.zeroPadValue}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return o.zeroPadBytes}});var s=r(1500);Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return s.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return s.isError}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return s.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return s.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return s.assertArgumentCount}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return s.assertPrivate}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return s.assertNormalize}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return s.makeError}});var a=r(7698);Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return a.EventPayload}});var c=r(5191);Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return c.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return c.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return c.FetchCancelSignal}});var u=r(9412);Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return u.FixedNumber}});var l=r(6508);Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return l.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return l.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return l.mask}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return l.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return l.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return l.getUint}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return l.toBigInt}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return l.toNumber}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return l.toBeHex}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return l.toBeArray}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return l.toQuantity}});var f=r(8166);Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return f.resolveProperties}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return f.defineProperties}});var d=r(7780);Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return d.decodeRlp}});var h=r(2831);Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return h.encodeRlp}});var p=r(436);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return p.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return p.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return p.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return p.parseUnits}});var g=r(3948);Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return g.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return g.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return g.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return g.Utf8ErrorFuncs}});var y=r(7744);Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return y.uuidV4}})},5349:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=void 0;const n=r(4193),i=r(3358),o=r(8711);class s extends o.BaseContract{constructor(e){super(e.registryAddress,o.REGISTRY_ABI,e)}async isRegisteredRelay(e){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.isRegisteredRelay(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_IS_REGISTERED_FAILED",`Failed to check if relay at ${e} is registered`,t),!1}}async isRelayActive(e){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.isRelayActive(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_IS_ACTIVE_FAILED",`Failed to check if relay at ${e} is active`,t),!1}}async findRelayByUrl(e){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.findRelayByUrl(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_FIND_RELAY_FAILED",`Failed to find relay with URL ${e}`,t),n.ethers.ZeroAddress}}async getRelayInfo(e){try{if(!this.contract)throw new Error("Registry contract not initialized");const[t,r,n,i,o]=await this.contract.getRelayInfo(e);return{owner:t,url:r,metadata:n,registrationTime:i,active:o}}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_RELAY_INFO_FAILED",`Failed to get relay info for ${e}`,t),null}}async getRelayCountByOwner(e){try{if(!this.contract)throw new Error("Registry contract not initialized");const t=await this.contract.getRelayCountByOwner(e);return Number(t)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_RELAY_COUNT_FAILED",`Failed to get relay count for owner ${e}`,t),0}}async getRelaysByOwner(e,t=0,r=10){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.getRelaysByOwner(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_RELAYS_BY_OWNER_FAILED",`Failed to get relays for owner ${e}`,t),null}}async getAllRelays(e=!0,t=0,r=10){try{if(!this.contract)throw new Error("Registry contract not initialized");return await this.contract.getAllRelays(e,t,r)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_GET_ALL_RELAYS_FAILED","Failed to get all relays",e),null}}async registerRelay(e,t,r){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.registerRelay(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_REGISTER_RELAY_FAILED",`Failed to register relay at ${e}`,t),null}}async updateRelay(e,t="",r=""){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateRelay(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_UPDATE_RELAY_FAILED",`Failed to update relay at ${e}`,t),null}}async deactivateRelay(e){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.deactivateRelay(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_DEACTIVATE_RELAY_FAILED",`Failed to deactivate relay at ${e}`,t),null}}async reactivateRelay(e){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.reactivateRelay(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_REACTIVATE_RELAY_FAILED",`Failed to reactivate relay at ${e}`,t),null}}async setRegistrationOpen(e){try{if(!this.contract)throw new Error("Registry contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setRegistrationOpen(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"REGISTRY_SET_REGISTRATION_OPEN_FAILED",`Failed to set registration open to ${e}`,t),null}}}t.Registry=s},5362:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(1415),i=r(719);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},5440:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(9328),i=r(4708),o=r(3506),s=r(5212),a=r(7214);t.single=function(e){return s.operate((function(t,r){var s,c=!1,u=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){u=!0,e&&!e(n,l++,t)||(c&&r.error(new i.SequenceError("Too many matching values")),c=!0,s=n)}),(function(){c?(r.next(s),r.complete()):r.error(u?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},5455:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(5212);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},5456:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptSync=t.scrypt=void 0;const n=r(5663),i=r(5347);let o=!1,s=!1;const a=async function(e,t,r,i,o,s,a){return await(0,n.scryptAsync)(e,t,{N:r,r:i,p:o,dkLen:s,onProgress:a})},c=function(e,t,r,i,o,s){return(0,n.scrypt)(e,t,{N:r,r:i,p:o,dkLen:s})};let u=a,l=c;async function f(e,t,r,n,o,s,a){const c=(0,i.getBytes)(e,"passwd"),l=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(await u(c,l,r,n,o,s,a))}function d(e,t,r,n,o,s){const a=(0,i.getBytes)(e,"passwd"),c=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(l(a,c,r,n,o,s))}t.scrypt=f,f._=a,f.lock=function(){s=!0},f.register=function(e){if(s)throw new Error("scrypt is locked");u=e},Object.freeze(f),t.scryptSync=d,d._=c,d.lock=function(){o=!0},d.register=function(e){if(o)throw new Error("scryptSync is locked");l=e},Object.freeze(d)},5462:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(u,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function u(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),s.shift(),s.length&&c(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(281);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},5513:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=t.onErrorResumeNextWith=void 0;var o=r(7652),s=r(1903);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.argsOrArgArray(e);return function(e){return s.onErrorResumeNext.apply(void 0,i([e],n(r)))}}t.onErrorResumeNextWith=a,t.onErrorResumeNext=a},5544:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(5212),i=r(2574);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},5565:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(5212),i=r(8531);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},5601:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTransactionResponse=t.formatTransactionReceipt=t.formatReceiptLog=t.formatBlock=t.formatLog=t.formatUint256=t.formatHash=t.formatData=t.formatBoolean=t.object=t.arrayOf=t.allowNull=void 0;const n=r(646),i=r(2291),o=r(7778),s=r(5347),a=BigInt(0);function c(e,t){return function(r){return null==r?t:e(r)}}function u(e,t){return r=>{if(t&&null==r)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map((t=>e(t)))}}function l(e,t){return r=>{const n={};for(const i in e){let o=i;if(t&&i in t&&!(o in r))for(const e of t[i])if(e in r){o=e;break}try{const t=e[i](r[o]);void 0!==t&&(n[i]=t)}catch(e){const t=e instanceof Error?e.message:"not-an-error";(0,s.assert)(!1,`invalid value for value.${i} (${t})`,"BAD_DATA",{value:r})}}return n}}function f(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,s.assertArgument)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function d(e){return(0,s.assertArgument)((0,s.isHexString)(e,!0),"invalid data","value",e),e}function h(e){return(0,s.assertArgument)((0,s.isHexString)(e,32),"invalid hash","value",e),e}t.allowNull=c,t.arrayOf=u,t.object=l,t.formatBoolean=f,t.formatData=d,t.formatHash=h,t.formatUint256=function(e){if(!(0,s.isHexString)(e))throw new Error("invalid uint256");return(0,s.zeroPadValue)(e,32)};const p=l({address:n.getAddress,blockHash:h,blockNumber:s.getNumber,data:d,index:s.getNumber,removed:c(f,!1),topics:u(h),transactionHash:h,transactionIndex:s.getNumber},{index:["logIndex"]});t.formatLog=function(e){return p(e)};const g=l({hash:c(h),parentHash:h,parentBeaconBlockRoot:c(h,null),number:s.getNumber,timestamp:s.getNumber,nonce:c(d),difficulty:s.getBigInt,gasLimit:s.getBigInt,gasUsed:s.getBigInt,stateRoot:c(h,null),receiptsRoot:c(h,null),blobGasUsed:c(s.getBigInt,null),excessBlobGas:c(s.getBigInt,null),miner:c(n.getAddress),prevRandao:c(h,null),extraData:d,baseFeePerGas:c(s.getBigInt)},{prevRandao:["mixHash"]});t.formatBlock=function(e){const t=g(e);return t.transactions=e.transactions.map((e=>"string"==typeof e?e:v(e))),t};const y=l({transactionIndex:s.getNumber,blockNumber:s.getNumber,transactionHash:h,address:n.getAddress,topics:u(h),data:d,index:s.getNumber,blockHash:h},{index:["logIndex"]});function b(e){return y(e)}t.formatReceiptLog=b;const m=l({to:c(n.getAddress,null),from:c(n.getAddress,null),contractAddress:c(n.getAddress,null),index:s.getNumber,root:c(s.hexlify),gasUsed:s.getBigInt,blobGasUsed:c(s.getBigInt,null),logsBloom:c(d),blockHash:h,hash:h,logs:u(b),blockNumber:s.getNumber,cumulativeGasUsed:s.getBigInt,effectiveGasPrice:c(s.getBigInt),blobGasPrice:c(s.getBigInt,null),status:c(s.getNumber),type:c(s.getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function v(e){e.to&&(0,s.getBigInt)(e.to)===a&&(e.to="0x0000000000000000000000000000000000000000");const t=l({hash:h,index:c(s.getNumber,void 0),type:e=>"0x"===e||null==e?0:(0,s.getNumber)(e),accessList:c(o.accessListify,null),blobVersionedHashes:c(u(h,!0),null),authorizationList:c(u((e=>{let t;if(e.signature)t=e.signature;else{let r=e.yParity;"0x1b"===r?r=0:"0x1c"===r&&(r=1),t=Object.assign({},e,{yParity:r})}return{address:(0,n.getAddress)(e.address),chainId:(0,s.getBigInt)(e.chainId),nonce:(0,s.getBigInt)(e.nonce),signature:i.Signature.from(t)}}),!1),null),blockHash:c(h,null),blockNumber:c(s.getNumber,null),transactionIndex:c(s.getNumber,null),from:n.getAddress,gasPrice:c(s.getBigInt),maxPriorityFeePerGas:c(s.getBigInt),maxFeePerGas:c(s.getBigInt),maxFeePerBlobGas:c(s.getBigInt,null),gasLimit:s.getBigInt,to:c(n.getAddress,null),value:s.getBigInt,nonce:s.getNumber,data:d,creates:c(n.getAddress,null),chainId:c(s.getBigInt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=(0,n.getCreateAddress)(t)),1!==e.type&&2!==e.type||null!=e.accessList||(t.accessList=[]),e.signature?t.signature=i.Signature.from(e.signature):t.signature=i.Signature.from(e),null==t.chainId){const e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&(0,s.getBigInt)(t.blockHash)===a&&(t.blockHash=null),t}t.formatTransactionReceipt=function(e){return m(e)},t.formatTransactionResponse=v},5606:function(e){var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,c=[],u=!1,l=-1;function f(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(a=c,c=[];++l<t;)a&&a[l].run();l=-1,t=c.length}a=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new h(e,t)),1!==c.length||u||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},5628:function(e,t,r){"use strict";var n=r(5606);Object.defineProperty(t,"__esModule",{value:!0}),t.enableDebug=function(){o=!0,s("Debug mode enabled")},t.disableDebug=function(){o=!1},t.configureLogging=function(e){i={...i,...e}},t.log=s,t.logError=a,t.logWarn=c,t.logDebug=u,t.logWithLevel=function(e,t,...r){switch(e){case"error":a(t,...r);break;case"warn":c(t,...r);break;case"debug":u(t,...r);break;default:s(t,...r)}};let i={enabled:"true"===n.env.DEBUG,level:"info",prefix:"[ShogunSDK]"},o=!1;function s(e,...t){const r=`[${(new Date).toISOString()}] ${e}`;console.log(r,...t)}function a(e,...t){const r=(new Date).toISOString();console.error(`[${r}] ERROR: ${e}`,...t)}function c(e,...t){const r=(new Date).toISOString();console.warn(`[${r}] WARNING: ${e}`,...t)}function u(e,...t){if(!o)return;const r=(new Date).toISOString();console.debug(`[${r}] DEBUG: ${e}`,...t)}},5650:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9724),i=r(2071),o=r(5455);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},5663:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptAsync=t.scrypt=void 0;const n=r(7557),i=r(2623),o=r(8941),s=r(9175),a=(e,t)=>e<<t|e>>>32-t;function c(e,t,r,n,i,o){let s=e[t++]^r[n++],c=e[t++]^r[n++],u=e[t++]^r[n++],l=e[t++]^r[n++],f=e[t++]^r[n++],d=e[t++]^r[n++],h=e[t++]^r[n++],p=e[t++]^r[n++],g=e[t++]^r[n++],y=e[t++]^r[n++],b=e[t++]^r[n++],m=e[t++]^r[n++],v=e[t++]^r[n++],w=e[t++]^r[n++],A=e[t++]^r[n++],E=e[t++]^r[n++],P=s,O=c,S=u,_=l,k=f,T=d,x=h,I=p,R=g,C=y,N=b,j=m,B=v,M=w,F=A,U=E;for(let e=0;e<8;e+=2)k^=a(P+B|0,7),R^=a(k+P|0,9),B^=a(R+k|0,13),P^=a(B+R|0,18),C^=a(T+O|0,7),M^=a(C+T|0,9),O^=a(M+C|0,13),T^=a(O+M|0,18),F^=a(N+x|0,7),S^=a(F+N|0,9),x^=a(S+F|0,13),N^=a(x+S|0,18),_^=a(U+j|0,7),I^=a(_+U|0,9),j^=a(I+_|0,13),U^=a(j+I|0,18),O^=a(P+_|0,7),S^=a(O+P|0,9),_^=a(S+O|0,13),P^=a(_+S|0,18),x^=a(T+k|0,7),I^=a(x+T|0,9),k^=a(I+x|0,13),T^=a(k+I|0,18),j^=a(N+C|0,7),R^=a(j+N|0,9),C^=a(R+j|0,13),N^=a(C+R|0,18),B^=a(U+F|0,7),M^=a(B+U|0,9),F^=a(M+B|0,13),U^=a(F+M|0,18);i[o++]=s+P|0,i[o++]=c+O|0,i[o++]=u+S|0,i[o++]=l+_|0,i[o++]=f+k|0,i[o++]=d+T|0,i[o++]=h+x|0,i[o++]=p+I|0,i[o++]=g+R|0,i[o++]=y+C|0,i[o++]=b+N|0,i[o++]=m+j|0,i[o++]=v+B|0,i[o++]=w+M|0,i[o++]=A+F|0,i[o++]=E+U|0}function u(e,t,r,n,i){let o=n+0,s=n+16*i;for(let n=0;n<16;n++)r[s+n]=e[t+16*(2*i-1)+n];for(let n=0;n<i;n++,o+=16,t+=16)c(r,s,e,t,r,o),n>0&&(s+=16),c(r,o,e,t+=16,r,s)}function l(e,t,r){const a=(0,s.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:c,r:u,p:l,dkLen:f,asyncTick:d,maxmem:h,onProgress:p}=a;if((0,n.number)(c),(0,n.number)(u),(0,n.number)(l),(0,n.number)(f),(0,n.number)(d),(0,n.number)(h),void 0!==p&&"function"!=typeof p)throw new Error("progressCb should be function");const g=128*u,y=g/4;if(c<=1||c&c-1||c>=2**(g/8)||c>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(l<0||l>137438953440/g)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(f<0||f>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const b=g*(c+l);if(b>h)throw new Error(`Scrypt: parameters too large, ${b} (128 * r * (N + p)) > ${h} (maxmem)`);const m=(0,o.pbkdf2)(i.sha256,e,t,{c:1,dkLen:g*l}),v=(0,s.u32)(m),w=(0,s.u32)(new Uint8Array(g*c)),A=(0,s.u32)(new Uint8Array(g));let E=()=>{};if(p){const e=2*c*l,t=Math.max(Math.floor(e/1e4),1);let r=0;E=()=>{r++,!p||r%t&&r!==e||p(r/e)}}return{N:c,r:u,p:l,dkLen:f,blockSize32:y,V:w,B32:v,B:m,tmp:A,blockMixCb:E,asyncTick:d}}function f(e,t,r,n,s){const a=(0,o.pbkdf2)(i.sha256,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),s.fill(0),a}t.scrypt=function(e,t,r){const{N:n,r:i,p:o,dkLen:s,blockSize32:a,V:c,B32:d,B:h,tmp:p,blockMixCb:g}=l(e,t,r);for(let e=0;e<o;e++){const t=a*e;for(let e=0;e<a;e++)c[e]=d[t+e];for(let e=0,t=0;e<n-1;e++)u(c,t,c,t+=a,i),g();u(c,(n-1)*a,d,t,i),g();for(let e=0;e<n;e++){const e=d[t+a-16]%n;for(let r=0;r<a;r++)p[r]=d[t+r]^c[e*a+r];u(p,0,d,t,i),g()}}return f(e,s,h,c,p)},t.scryptAsync=async function(e,t,r){const{N:n,r:i,p:o,dkLen:a,blockSize32:c,V:d,B32:h,B:p,tmp:g,blockMixCb:y,asyncTick:b}=l(e,t,r);for(let e=0;e<o;e++){const t=c*e;for(let e=0;e<c;e++)d[e]=h[t+e];let r=0;await(0,s.asyncLoop)(n-1,b,(()=>{u(d,r,d,r+=c,i),y()})),u(d,(n-1)*c,h,t,i),y(),await(0,s.asyncLoop)(n,b,(()=>{const e=h[t+c-16]%n;for(let r=0;r<c;r++)g[r]=h[t+r]^d[e*c+r];u(g,0,h,t,i),y()}))}return f(e,a,p,d,g)}},5717:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},5726:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(9879);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},5736:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=5736,e.exports=t},5754:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;const n=r(8869);class i extends n.Coder{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}t.AnonymousCoder=i},5761:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(9328);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},5774:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(5212),i=r(7214);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},5797:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(2326),i=r(2885),o=r(5825);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},5810:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},5825:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(8051),i=r(2326),o=r(8596),s=r(5345);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},5855:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfuraProvider=t.InfuraWebSocketProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a=r(873),c="84842078b09946638c03157f83405213";class u extends a.WebSocketProvider{projectId;projectSecret;constructor(e,t){const r=new l(e,t),i=r._getConnection();(0,n.assert)(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"}),super(i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),r._network),(0,n.defineProperties)(this,{projectId:r.projectId,projectSecret:r.projectSecret})}isCommunityResource(){return this.projectId===c}}t.InfuraWebSocketProvider=u;class l extends s.JsonRpcProvider{projectId;projectSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=c),null==r&&(r=null),super(l.getRequest(i,t,r),i,{staticNetwork:i}),(0,n.defineProperties)(this,{projectId:t,projectSecret:r})}_getProvider(e){try{return new l(e,this.projectId,this.projectSecret)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.projectId===c}static getWebSocketProvider(e,t){return new u(e,t)}static getRequest(e,t,r){null==t&&(t=c),null==r&&(r=null);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":case"base-goerli":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bsc-mainnet.infura.io";case"bnbt":return"bsc-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v3/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===c&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("InfuraProvider"),!0)),o}}t.InfuraProvider=l},5863:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.Result=t.checkResultErrors=void 0;const n=r(2291),i=r(1181),o=r(5347),s=r(954),a=r(8869);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return a.Result}});const c=r(189),u=r(9976);class l{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,signature:i,topic:t,args:r})}}t.LogDescription=l;class f{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const i=e.name,s=e.format();(0,o.defineProperties)(this,{fragment:e,name:i,args:r,signature:s,selector:t,value:n})}}t.TransactionDescription=f;class d{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,args:r,signature:i,selector:t})}}t.ErrorDescription=d;class h{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){(0,o.defineProperties)(this,{hash:e,_isIndexed:!0})}}t.Indexed=h;const p={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"},g={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&p[e.toString()]&&(t=p[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class y{fragments;deploy;fallback;receive;#Le;#De;#Ge;#He;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#Ge=new Map,this.#Le=new Map,this.#De=new Map;const r=[];for(const e of t)try{r.push(c.Fragment.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}(0,o.defineProperties)(this,{fragments:Object.freeze(r)});let n=null,i=!1;this.#He=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let r;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void(0,o.defineProperties)(this,{deploy:e});case"fallback":return void(0===e.inputs.length?i=!0:((0,o.assertArgument)(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,i=n.payable));case"function":r=this.#Ge;break;case"event":r=this.#De;break;case"error":r=this.#Le;break;default:return}const s=e.format();r.has(s)||r.set(s,e)})),this.deploy||(0,o.defineProperties)(this,{deploy:c.ConstructorFragment.from("constructor()")}),(0,o.defineProperties)(this,{fallback:n,receive:i})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return s.AbiCoder.defaultAbiCoder()}#ze(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#Ge.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#Ge)t.split("(")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,i=!0;u.Typed.isTyped(e)&&"overrides"===e.type&&(i=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||i&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i<t.length;i++)if(u.Typed.isTyped(t[i])){if(i>=r.length){if("overrides"===t[i].type)continue;n.splice(e,1);break}if(t[i].type!==r[i].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#Ge.get(c.FunctionFragment.from(e).format())||null}getFunctionName(e){const t=this.#ze(e,null,!1);return(0,o.assertArgument)(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#ze(e,null,!1)}getFunction(e,t){return this.#ze(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#Ge.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#Ge.get(n),r)}}#We(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#De.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#De)t.split("(")[0]===e&&n.push(r);if(t){for(let e=n.length-1;e>=0;e--)n[e].inputs.length<t.length&&n.splice(e,1);for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i<t.length;i++)if(u.Typed.isTyped(t[i])&&t[i].type!==r[i].baseType){n.splice(e,1);break}}}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#De.get(c.EventFragment.from(e).format())||null}getEventName(e){const t=this.#We(e,null,!1);return(0,o.assertArgument)(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#We(e,null,!1)}getEvent(e,t){return this.#We(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#De.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#De.get(n),r)}}getError(e,t){if((0,o.isHexString)(e)){const t=e.toLowerCase();if(g[t])return c.ErrorFragment.from(g[t].signature);for(const e of this.#Le.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const t=[];for(const[r,n]of this.#Le)r.split("(")[0]===e&&t.push(n);if(0===t.length)return"Error"===e?c.ErrorFragment.from("error Error(string)"):"Panic"===e?c.ErrorFragment.from("error Panic(uint256)"):null;if(t.length>1){const r=t.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}if("Error(string)"===(e=c.ErrorFragment.from(e).format()))return c.ErrorFragment.from("error Error(string)");if("Panic(uint256)"===e)return c.ErrorFragment.from("error Panic(uint256)");return this.#Le.get(e)||null}forEachError(e){const t=Array.from(this.#Le.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#Le.get(n),r)}}_decodeParams(e,t){return this.#He.decode(e,t)}_encodeParams(e,t){return this.#He.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);(0,o.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,o.assertArgument)((0,o.dataSlice)(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,o.dataSlice)(t,4))}encodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);(0,o.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,o.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.assertArgument)((0,o.dataSlice)(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,o.dataSlice)(t,4))}encodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}let r="invalid length for result data";const n=(0,o.getBytesCopy)(t);if(n.length%32==0)try{return this.#He.decode(e.outputs,n)}catch(e){r="could not decode result data"}(0,o.assert)(!1,r,"BAD_DATA",{value:(0,o.hexlify)(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){const r=(0,o.getBytes)(e,"data"),n=s.AbiCoder.getBuiltinCallException("call",t,r);if(n.message.startsWith("execution reverted (unknown custom error)")){const e=(0,o.hexlify)(r.slice(0,4)),t=this.getError(e);if(t)try{const e=this.#He.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message="execution reverted (coult not decode custom error)"}}const i=this.parseTransaction(t);return i&&(n.invocation={method:i.name,signature:i.signature,args:i.args}),n}encodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.hexlify)(this.#He.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}(0,o.assert)(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});const r=[];e.anonymous||r.push(e.topicHash);const s=(e,t)=>"string"===e.type?(0,i.id)(t):"bytes"===e.type?(0,n.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=(0,o.toBeHex)(t):e.type.match(/^bytes/)?t=(0,o.zeroPadBytes)(t,32):"address"===e.type&&this.#He.encode(["address"],[t]),(0,o.zeroPadValue)((0,o.hexlify)(t),32));for(t.forEach(((t,n)=>{const i=e.inputs[n];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?(0,o.assertArgument)(!1,"filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>s(i,e)))):r.push(s(i,t)):(0,o.assertArgument)(null==t,"cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}const r=[],s=[],a=[];return e.anonymous||r.push(e.topicHash),(0,o.assertArgument)(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const c=t[o];if(e.indexed)if("string"===e.type)r.push((0,i.id)(c));else if("bytes"===e.type)r.push((0,n.keccak256)(c));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this.#He.encode([e.type],[c]))}else s.push(e),a.push(c)})),{data:this.#He.encode(s,a),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;(0,o.assertArgument)((0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const n=[],i=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(c.ParamType.from({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(i.push(e),s.push(!1))}));const u=null!=r?this.#He.decode(n,(0,o.concat)(r)):null,l=this.#He.decode(i,t,!0),f=[],d=[];let p=0,g=0;return e.inputs.forEach(((e,t)=>{let r=null;if(e.indexed)if(null==u)r=new h(null);else if(s[t])r=new h(u[g++]);else try{r=u[g++]}catch(e){r=e}else try{r=l[p++]}catch(e){r=e}f.push(r),d.push(e.name||null)})),a.Result.fromItems(f,d)}parseTransaction(e){const t=(0,o.getBytes)(e.data,"tx.data"),r=(0,o.getBigInt)(null!=e.value?e.value:0,"tx.value"),n=this.getFunction((0,o.hexlify)(t.slice(0,4)));if(!n)return null;const i=this.#He.decode(n.inputs,t.slice(4));return new f(n,n.selector,i,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new l(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=(0,o.hexlify)(e),r=this.getError((0,o.dataSlice)(t,0,4));if(!r)return null;const n=this.#He.decode(r.inputs,(0,o.dataSlice)(t,4));return new d(r,r.selector,n)}static from(e){return e instanceof y?e:"string"==typeof e?new y(JSON.parse(e)):"function"==typeof e.formatJson?new y(e.formatJson()):"function"==typeof e.format?new y(e.format("json")):new y(e)}}t.Interface=y},5881:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(3275),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},5884:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(8051),i=r(9724);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},5887:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(6757),i=r(4478);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},5904:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(8051),i=r(9724),o=r(4885);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},5934:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(5212),i=r(7214);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},5936:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(8087),i=r(9724),o=r(4885),s=r(6404),a=r(7058);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),c=s.popNumber(e,1/0),u=e;return u.length?1===u.length?i.innerFrom(u[0]):n.mergeAll(c)(a.from(u,r)):o.EMPTY}},6002:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2052),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},6013:function(e,t){"use strict";var r,n,i,o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.AES=void 0;const a={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],u=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],l=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],d=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],h=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],p=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],m=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],v=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],w=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],A=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],E=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function P(e){const t=[];for(let r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}class O{get key(){return o(this,r,"f").slice()}constructor(e){if(r.set(this,void 0),n.set(this,void 0),i.set(this,void 0),!(this instanceof O))throw Error("AES must be instanitated with `new`");s(this,r,new Uint8Array(e),"f");const t=a[this.key.length];if(null==t)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");s(this,i,[],"f"),s(this,n,[],"f");for(let e=0;e<=t;e++)o(this,i,"f").push([0,0,0,0]),o(this,n,"f").push([0,0,0,0]);const l=4*(t+1),f=this.key.length/4,d=P(this.key);let h;for(let e=0;e<f;e++)h=e>>2,o(this,i,"f")[h][e%4]=d[e],o(this,n,"f")[t-h][e%4]=d[e];let p,g=0,y=f;for(;y<l;){if(p=d[f-1],d[0]^=u[p>>16&255]<<24^u[p>>8&255]<<16^u[255&p]<<8^u[p>>24&255]^c[g]<<24,g+=1,8!=f)for(let e=1;e<f;e++)d[e]^=d[e-1];else{for(let e=1;e<f/2;e++)d[e]^=d[e-1];p=d[f/2-1],d[f/2]^=u[255&p]^u[p>>8&255]<<8^u[p>>16&255]<<16^u[p>>24&255]<<24;for(let e=f/2+1;e<f;e++)d[e]^=d[e-1]}let e,r,s=0;for(;s<f&&y<l;)e=y>>2,r=y%4,o(this,i,"f")[e][r]=d[s],o(this,n,"f")[t-e][r]=d[s++],y++}for(let e=1;e<t;e++)for(let t=0;t<4;t++)p=o(this,n,"f")[e][t],o(this,n,"f")[e][t]=v[p>>24&255]^w[p>>16&255]^A[p>>8&255]^E[255&p]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=o(this,i,"f").length-1,r=[0,0,0,0];let n=P(e);for(let e=0;e<4;e++)n[e]^=o(this,i,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=f[n[t]>>24&255]^d[n[(t+1)%4]>>16&255]^h[n[(t+2)%4]>>8&255]^p[255&n[(t+3)%4]]^o(this,i,"f")[e][t];n=r.slice()}const s=new Uint8Array(16);let a=0;for(let e=0;e<4;e++)a=o(this,i,"f")[t][e],s[4*e]=255&(u[n[e]>>24&255]^a>>24),s[4*e+1]=255&(u[n[(e+1)%4]>>16&255]^a>>16),s[4*e+2]=255&(u[n[(e+2)%4]>>8&255]^a>>8),s[4*e+3]=255&(u[255&n[(e+3)%4]]^a);return s}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=o(this,n,"f").length-1,r=[0,0,0,0];let i=P(e);for(let e=0;e<4;e++)i[e]^=o(this,n,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=g[i[t]>>24&255]^y[i[(t+3)%4]>>16&255]^b[i[(t+2)%4]>>8&255]^m[255&i[(t+1)%4]]^o(this,n,"f")[e][t];i=r.slice()}const s=new Uint8Array(16);let a=0;for(let e=0;e<4;e++)a=o(this,n,"f")[t][e],s[4*e]=255&(l[i[e]>>24&255]^a>>24),s[4*e+1]=255&(l[i[(e+3)%4]>>16&255]^a>>16),s[4*e+2]=255&(l[i[(e+2)%4]>>8&255]^a>>8),s[4*e+3]=255&(l[255&i[(e+1)%4]]^a);return s}}t.AES=O,r=new WeakMap,n=new WeakMap,i=new WeakMap},6035:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9663);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},6065:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=void 0;const n=r(646),i=r(2291),o=r(5347),s=new RegExp("^bytes([0-9]+)$"),a=new RegExp("^(u?int)([0-9]*)$"),c=new RegExp("^(.*)\\[([0-9]*)\\]$");function u(e,t,r){switch(e){case"address":return r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)((0,n.getAddress)(t));case"string":return(0,o.toUtf8Bytes)(t);case"bytes":return(0,o.getBytes)(t);case"bool":return t=t?"0x01":"0x00",r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)(t)}let i=e.match(a);if(i){let n="int"===i[1],s=parseInt(i[2]||"256");return(0,o.assertArgument)((!i[2]||i[2]===String(s))&&s%8==0&&0!==s&&s<=256,"invalid number type","type",e),r&&(s=256),n&&(t=(0,o.toTwos)(t,s)),(0,o.getBytes)((0,o.zeroPadValue)((0,o.toBeArray)(t),s/8))}if(i=e.match(s),i){const n=parseInt(i[1]);return(0,o.assertArgument)(String(n)===i[1]&&0!==n&&n<=32,"invalid bytes type","type",e),(0,o.assertArgument)((0,o.dataLength)(t)===n,`invalid value for ${e}`,"value",t),r?(0,o.getBytes)((0,o.zeroPadBytes)(t,32)):t}if(i=e.match(c),i&&Array.isArray(t)){const r=i[1],n=parseInt(i[2]||String(t.length));(0,o.assertArgument)(n===t.length,`invalid array length for ${e}`,"value",t);const s=[];return t.forEach((function(e){s.push(u(r,e,!0))})),(0,o.getBytes)((0,o.concat)(s))}(0,o.assertArgument)(!1,"invalid type","type",e)}function l(e,t){(0,o.assertArgument)(e.length===t.length,"wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(u(e,t[n]))})),(0,o.hexlify)((0,o.concat)(r))}t.solidityPacked=l,t.solidityPackedKeccak256=function(e,t){return(0,i.keccak256)(l(e,t))},t.solidityPackedSha256=function(e,t){return(0,i.sha256)(l(e,t))}},6075:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(7478),i=r(281);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},6081:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(7652),s=r(6677);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},6131:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(4885),i=r(5212),o=r(7214),s=r(9724),a=r(5825);t.repeat=function(e){var t,r,c=1/0;return null!=e&&("object"==typeof e?(t=e.count,c=void 0===t?1/0:t,r=e.delay):c=e),c<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,u=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),c=o.createOperatorSubscriber(t,(function(){c.unsubscribe(),l()}));e.subscribe(c)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<c?n?u():r=!0:t.complete()}))),r&&u()};l()}))}},6153:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6201:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(680),i=r(7699);t.switchAll=function(){return n.switchMap(i.identity)}},6245:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=void 0,t.EtherSymbol="Ξ",t.MessagePrefix="Ethereum Signed Message:\n"},6297:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},6328:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(5212),s=r(201),a=r(6404),c=r(7058);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(c.from(i([t],n(e)),r)).subscribe(o)}))}},6342:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeOfOperation=void 0;const n=r(6013);t.ModeOfOperation=class{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new n.AES(t)},name:{enumerable:!0,value:e}})}}},6355:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(6872);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},6404:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(281),i=r(8596);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},6508:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.getNumber=t.toBigInt=t.getUint=t.getBigInt=t.mask=t.toTwos=t.fromTwos=void 0;const n=r(7415),i=r(1500),o=BigInt(0),s=BigInt(1),a=9007199254740991;function c(e,t){switch(typeof e){case"bigint":return e;case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){(0,i.assertArgument)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid BigNumberish value",t||"value",e)}function u(e,t){const r=c(e,t);return(0,i.assert)(r>=o,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}t.fromTwos=function(e,t){const r=u(e,"value"),n=BigInt(d(t,"width"));return(0,i.assert)(r>>n===o,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-s?-((~r&(s<<n)-s)+s):r},t.toTwos=function(e,t){let r=c(e,"value");const n=BigInt(d(t,"width")),a=s<<n-s;return r<o?(r=-r,(0,i.assert)(r<=a,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),(~r&(s<<n)-s)+s):((0,i.assert)(r<a,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),r)},t.mask=function(e,t){const r=u(e,"value"),n=BigInt(d(t,"bits"));return r&(s<<n)-s},t.getBigInt=c,t.getUint=u;const l="0123456789abcdef";function f(e){if(e instanceof Uint8Array){let t="0x0";for(const r of e)t+=l[r>>4],t+=l[15&r];return BigInt(t)}return c(e)}function d(e,t){switch(typeof e){case"bigint":return(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),Number(e);case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return d(BigInt(e),t)}catch(r){(0,i.assertArgument)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid numeric value",t||"value",e)}function h(e){const t=u(e,"value");if(t===o)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}t.toBigInt=f,t.getNumber=d,t.toNumber=function(e){return d(f(e))},t.toBeHex=function(e,t){let r=u(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{const n=d(t,"width");for((0,i.assert)(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r},t.toBeArray=h,t.toQuantity=function(e){let t=(0,n.hexlify)((0,n.isBytesLike)(e)?e:h(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}},6526:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractEventPayload=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.UndecodedEventLog=t.EventLog=void 0;const n=r(3807),i=r(5347);class o extends n.Log{interface;fragment;args;constructor(e,t,r){super(e,e.provider);const n=t.decodeEventLog(r,e.data,e.topics);(0,i.defineProperties)(this,{args:n,fragment:r,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}t.EventLog=o;class s extends n.Log{error;constructor(e,t){super(e,e.provider),(0,i.defineProperties)(this,{error:t})}}t.UndecodedEventLog=s;class a extends n.TransactionReceipt{#Ke;constructor(e,t,r){super(r,t),this.#Ke=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#Ke.getEvent(e.topics[0]):null;if(t)try{return new o(e,this.#Ke,t)}catch(t){return new s(e,t)}return e}))}}t.ContractTransactionReceipt=a;class c extends n.TransactionResponse{#Ke;constructor(e,t,r){super(r,t),this.#Ke=e}async wait(e,t){const r=await super.wait(e,t);return null==r?null:new a(this.#Ke,this.provider,r)}}t.ContractTransactionResponse=c;class u extends i.EventPayload{log;constructor(e,t,r,n){super(e,t,r),(0,i.defineProperties)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}t.ContractUnknownEventPayload=u,t.ContractEventPayload=class extends u{constructor(e,t,r,n,s){super(e,t,r,new o(s,e.interface,n));const a=e.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,i.defineProperties)(this,{args:a,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}},6569:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(5130),i=r(4359);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},6591:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=void 0;var n=r(9011);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return n.Wordlist}});var i=r(9943);Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return i.LangEn}});var o=r(2684);Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return o.WordlistOwl}});var s=r(8725);Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return s.WordlistOwlA}});var a=r(2431);Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return a.wordlists}})},6606:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(5212),i=r(5717),o=r(7214),s=r(9724);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,c=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,c,i.noop))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},6632:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(6872),i=r(9724),o=r(5212),s=r(7214);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},6640:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryPoint=void 0;const n=r(4193),i=r(3358),o=r(8711);class s extends o.BaseContract{constructor(e){super(e.entryPointAddress,o.ENTRY_POINT_ABI,e)}async getRegistryAddress(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.registry()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_REGISTRY_FAILED","Failed to get registry address",e),null}}async getServiceFeePercentage(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const e=await this.contract.serviceFeePercentage();return Number(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_FEE_PERCENTAGE_FAILED","Failed to get service fee percentage",e),null}}async calculateFee(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.calculateFee(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_CALCULATE_FEE_FAILED","Failed to calculate fee",e),null}}async checkSubscription(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.checkSubscription(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_CHECK_SUBSCRIPTION_FAILED",`Failed to check subscription for user ${e} on relay ${t}`,r),!1}}async hasRegisteredPubKey(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.hasRegisteredPubKey(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_HAS_REGISTERED_PUBKEY_FAILED",`Failed to check if user ${e} has registered pubkey on relay ${t}`,r),!1}}async isPubKeySubscribed(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const r=t instanceof Uint8Array?n.ethers.hexlify(t):t;return await this.contract.isPubKeySubscribed(e,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_IS_PUBKEY_SUBSCRIBED_FAILED",`Failed to check if pubkey is subscribed on relay ${e}`,t),!1}}async batchCheckPubKeySubscription(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(e.length!==t.length)throw new Error("Array lengths must match");const r=t.map((e=>e instanceof Uint8Array?n.ethers.hexlify(e):e));return await this.contract.batchCheckPubKeySubscription(e,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_CHECK_PUBKEYS_FAILED","Failed to batch check public key subscriptions",t),Array(e.length).fill(!1)}}async getSubscriptionDetails(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const[r,i]=await this.contract.getSubscriptionDetails(e,t);return{expires:r,pubKey:n.ethers.hexlify(i)}}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_SUBSCRIPTION_DETAILS_FAILED",`Failed to get subscription details for user ${e} on relay ${t}`,r),null}}async batchCheckSubscriptions(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.batchCheckSubscriptions(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_CHECK_SUBSCRIPTIONS_FAILED",`Failed to batch check subscriptions for user ${e}`,r),Array(t.length).fill(!1)}}async batchCheckPubKeys(e,t){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return await this.contract.batchCheckPubKeys(e,t)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_CHECK_PUBKEYS_FAILED",`Failed to batch check pubkeys for user ${e}`,r),Array(t.length).fill(!1)}}async getStatistics(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");const[e,t,r,n,i,o,s]=await this.contract.getStatistics();return{userCount:e,totalSubscriptions:t,totalViaUrl:r,totalViaDirect:n,totalAmountProcessed:i,totalFeesCollected:o,currentBalance:s}}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_GET_STATISTICS_FAILED","Failed to get EntryPoint statistics",e),null}}async subscribeViaUrl(e,t,r,o){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const i=r instanceof Uint8Array?n.ethers.hexlify(r):r,s={value:o||n.ethers.parseEther("0.01")};return await this.contract.subscribeViaUrl(e,t,i,s)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_SUBSCRIBE_VIA_URL_FAILED",`Failed to subscribe via URL ${e} for ${t} months`,r),null}}async subscribeDirect(e,t,r,o){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const i=r instanceof Uint8Array?n.ethers.hexlify(r):r,s={value:o||n.ethers.parseEther("0.01")};return await this.contract.subscribeDirect(e,t,i,s)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_SUBSCRIBE_DIRECT_FAILED",`Failed to subscribe directly to relay ${e} for ${t} months`,r),null}}async batchSubscribe(e,t,r,o){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");if(e.length!==r.length)throw new Error("Array lengths must match");const i=r.map((e=>e instanceof Uint8Array?n.ethers.hexlify(e):e)),s={value:o||n.ethers.parseEther("0.01")*BigInt(e.length)};return await this.contract.batchSubscribe(e,t,i,s)}catch(r){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_BATCH_SUBSCRIBE_FAILED",`Failed to batch subscribe to ${e.length} relays for ${t} months`,r),null}}async updateRegistry(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateRegistry(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_UPDATE_REGISTRY_FAILED",`Failed to update registry to ${e}`,t),null}}async updateServiceFee(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateServiceFee(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_UPDATE_SERVICE_FEE_FAILED",`Failed to update service fee to ${e}`,t),null}}async withdrawFees(){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.withdrawFees()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_WITHDRAW_FEES_FAILED","Failed to withdraw fees",e),null}}async isRelayInProtocolMode(e){try{if(!this.contract)throw new Error("EntryPoint contract not initialized");return 1===await this.contract.isRelayInProtocolMode(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"ENTRY_POINT_IS_RELAY_IN_PROTOCOL_MODE_FAILED",`Failed to check if relay ${e} is in protocol mode`,t),!1}}}t.EntryPoint=s},6677:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(9795),s=r(5212),a=r(7699);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},6680:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(8051),i=r(281);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},6707:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(5212),i=r(2574);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},6744:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(5212),i=r(7214);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},6749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(1415),s=r(5212);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},6757:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(4772),s=r(5726),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&r===t._scheduled&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},6791:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(9546),s=r(1587);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},6805:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(8051),i=r(4891),o=r(281),s=r(8619);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},6806:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnkrProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a);const i={polling:!0,staticNetwork:r};super(c.getRequest(r,t),r,i),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("AnkrProvider"),!0)),r}getRpcError(e,t){return"eth_sendRawTransaction"===e.method&&t&&t.error&&"INTERNAL_ERROR: could not replace existing tx"===t.error.message&&(t.error.message="replacement transaction underpriced"),super.getRpcError(e,t)}isCommunityResource(){return this.apiKey===a}}t.AnkrProvider=c},6808:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var s=r(8051),a=r(9879),c=r(839),u=r(4830),l=r(2688),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new d(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new c.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,u.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new d(e,t)},t}(s.Observable);t.Subject=f;var d=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=d},6872:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(5212),i=r(7214);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},6911:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(5212),i=r(7214),o=r(9724),s=r(5717);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},6920:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(8051),i=r(281),o=r(3916);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},6930:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const n=r(2291),i=r(5347),o=r(8394),s=r(22),a=r(7570),c=r(1650),u=r(5312);function l(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class f extends o.BaseWallet{constructor(e,t){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new n.SigningKey(e):e,t)}connect(e){return new f(this.signingKey,e)}async encrypt(e,t){const r={address:this.address,privateKey:this.privateKey};return await(0,c.encryptKeystoreJson)(r,e,{progressCallback:t})}encryptSync(e){const t={address:this.address,privateKey:this.privateKey};return(0,c.encryptKeystoreJsonSync)(t,e)}static#Ve(e){if((0,i.assertArgument)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const t=u.Mnemonic.fromEntropy(e.mnemonic.entropy),r=s.HDNodeWallet.fromMnemonic(t,e.mnemonic.path);if(r.address===e.address&&r.privateKey===e.privateKey)return r;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new f(e.privateKey);return(0,i.assertArgument)(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t}static async fromEncryptedJson(e,t,r){let n=null;return(0,c.isKeystoreJson)(e)?n=await(0,c.decryptKeystoreJson)(e,t,r):(0,a.isCrowdsaleJson)(e)&&(r&&(r(0),await l(0)),n=(0,a.decryptCrowdsaleJson)(e,t),r&&(r(1),await l(0))),f.#Ve(n)}static fromEncryptedJsonSync(e,t){let r=null;return(0,c.isKeystoreJson)(e)?r=(0,c.decryptKeystoreJsonSync)(e,t):(0,a.isCrowdsaleJson)(e)?r=(0,a.decryptCrowdsaleJson)(e,t):(0,i.assertArgument)(!1,"invalid JSON wallet","json","[ REDACTED ]"),f.#Ve(r)}static createRandom(e){const t=s.HDNodeWallet.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const r=s.HDNodeWallet.fromPhrase(e);return t?r.connect(t):r}}t.Wallet=f},6975:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(5212),s=r(7214),a=r(9724),c=r(7699),u=r(5717),l=r(6404);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),d=e.map((function(){return!1})),h=!1,p=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,h||d[t]||(d[t]=!0,(h=d.every(c.identity))&&(d=null))}),u.noop))},g=0;g<l;g++)p(g);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(h){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},6977:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(6749);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},7005:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const n=r(1295),i=r(5347),o=BigInt(0),s=BigInt(1),a=BigInt(2),c=BigInt(27),u=BigInt(28),l=BigInt(35),f={};function d(e){return(0,i.zeroPadValue)((0,i.toBeArray)(e),32)}class h{#$e;#Je;#qe;#Qe;get r(){return this.#$e}set r(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid r","value",e),this.#$e=(0,i.hexlify)(e)}get s(){return this.#Je}set s(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid s","value",e);const t=(0,i.hexlify)(e);(0,i.assertArgument)(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#Je=t}get v(){return this.#qe}set v(e){const t=(0,i.getNumber)(e,"value");(0,i.assertArgument)(27===t||28===t,"invalid v","v",e),this.#qe=t}get networkV(){return this.#Qe}get legacyChainId(){const e=this.networkV;return null==e?null:h.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,i.getBytes)(this.s);return this.yParity&&(e[0]|=128),(0,i.hexlify)(e)}get compactSerialized(){return(0,i.concat)([this.r,this.yParityAndS])}get serialized(){return(0,i.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,i.assertPrivate)(e,f,"Signature"),this.#$e=t,this.#Je=r,this.#qe=n,this.#Qe=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new h(f,this.r,this.s,this.v);return this.networkV&&(e.#Qe=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=(0,i.getBigInt)(e,"v");return t==c||t==u?o:((0,i.assertArgument)(t>=l,"invalid EIP-155 v","v",e),(t-l)/a)}static getChainIdV(e,t){return(0,i.getBigInt)(e)*a+BigInt(35+t-27)}static getNormalizedV(e){const t=(0,i.getBigInt)(e);return t===o||t===c?27:t===s||t===u?28:((0,i.assertArgument)(t>=l,"invalid v","v",e),t&s?27:28)}static from(e){function t(t,r){(0,i.assertArgument)(t,r,"signature",e)}if(null==e)return new h(f,n.ZeroHash,n.ZeroHash,27);if("string"==typeof e){const r=(0,i.getBytes)(e,"signature");if(64===r.length){const e=(0,i.hexlify)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new h(f,e,(0,i.hexlify)(t),n)}if(65===r.length){const e=(0,i.hexlify)(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const o=h.getNormalizedV(r[64]);return new h(f,e,(0,i.hexlify)(n),o)}t(!1,"invalid raw signature length")}if(e instanceof h)return e.clone();const r=e.r;t(null!=r,"missing r");const o=d(r),s=function(e,r){if(null!=e)return d(e);if(null!=r){t((0,i.isHexString)(r,32),"invalid yParityAndS");const e=(0,i.getBytes)(r);return e[0]&=127,(0,i.hexlify)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&(0,i.getBytes)(s)[0]),"non-canonical s");const{networkV:a,v:c}=function(e,r,n){if(null!=e){const t=(0,i.getBigInt)(e);return{networkV:t>=l?t:void 0,v:h.getNormalizedV(t)}}if(null!=r)return t((0,i.isHexString)(r,32),"invalid yParityAndS"),{v:128&(0,i.getBytes)(r)[0]?28:27};if(null!=n){switch((0,i.getNumber)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),u=new h(f,o,s,c);return a&&(u.#Qe=a),t(null==e.yParity||(0,i.getNumber)(e.yParity,"sig.yParity")===u.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===u.yParityAndS,"yParityAndS mismatch"),u}}t.Signature=h},7007:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,o,s,u;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=p(c,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7024:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9619);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},7058:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(131),i=r(9724);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},7120:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkError=t.MultipleAuthError=t.TimeoutError=t.UserExists=t.InvalidCredentials=t.AuthError=t.GunError=void 0;class r extends Error{constructor(e){super(e),this.name="GunError"}}t.GunError=r;class n extends r{constructor(e){super(e),this.name="AuthError"}}t.AuthError=n,t.InvalidCredentials=class extends n{constructor(e="Credenziali non valide"){super(e),this.name="InvalidCredentials"}},t.UserExists=class extends n{constructor(e="Utente già esistente"){super(e),this.name="UserExists"}},t.TimeoutError=class extends r{constructor(e="Timeout durante l'operazione"){super(e),this.name="TimeoutError"}},t.MultipleAuthError=class extends n{constructor(e="Autenticazione multipla in corso"){super(e),this.name="MultipleAuthError"}},t.NetworkError=class extends r{}},7155:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.pbkdf2Sync=t.createHmac=t.createHash=void 0;const n=r(9615),i=r(8941),o=r(2623),s=r(102),a=r(5347),c=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}(),u=c.crypto||c.msCrypto;t.createHash=function(e){switch(e){case"sha256":return o.sha256.create();case"sha512":return s.sha512.create()}(0,a.assertArgument)(!1,"invalid hashing algorithm name","algorithm",e)},t.createHmac=function(e,t){const r={sha256:o.sha256,sha512:s.sha512}[e];return(0,a.assertArgument)(null!=r,"invalid hmac algorithm","algorithm",e),n.hmac.create(r,t)},t.pbkdf2Sync=function(e,t,r,n,c){const u={sha256:o.sha256,sha512:s.sha512}[c];return(0,a.assertArgument)(null!=u,"invalid pbkdf2 algorithm","algorithm",c),(0,i.pbkdf2)(u,e,t,{c:r,dkLen:n})},t.randomBytes=function(e){(0,a.assert)(null!=u,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,a.assertArgument)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return u.getRandomValues(t),t}},7214:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(2708);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},7215:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=void 0;const n=r(646),i=r(2291),o=r(7778),s=r(5347),a=r(1993),c=new Uint8Array(32);c.fill(0);const u=BigInt(-1),l=BigInt(0),f=BigInt(1),d=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),h=(0,s.toBeHex)(f,32),p=(0,s.toBeHex)(l,32),g={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},y=["name","version","chainId","verifyingContract","salt"];function b(e){return function(t){return(0,s.assertArgument)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const m={name:b("name"),version:b("version"),chainId:function(e){const t=(0,s.getBigInt)(e,"domain.chainId");return(0,s.assertArgument)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):(0,s.toQuantity)(t)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}(0,s.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=(0,s.getBytes)(e,"domain.salt");return(0,s.assertArgument)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,s.hexlify)(t)}};function v(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);(0,s.assertArgument)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const i=(0,s.mask)(d,r?n-1:n),o=r?(i+f)*u:l;return function(t){const n=(0,s.getBigInt)(t,"value");return(0,s.assertArgument)(n>=o&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,s.toBeHex)(r?(0,s.toTwos)(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0,s.assertArgument)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){const n=(0,s.getBytes)(t);return(0,s.assertArgument)(n.length===r,`invalid length for ${e}`,"value",t),function(e){const t=(0,s.getBytes)(e),r=t.length%32;return r?(0,s.concat)([t,c.slice(r)]):(0,s.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,s.zeroPadValue)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?h:p};case"bytes":return function(e){return(0,i.keccak256)(e)};case"string":return function(e){return(0,a.id)(e)}}return null}function w(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}function A(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class E{primaryType;#Ye;get types(){return JSON.parse(this.#Ye)}#Ze;#Xe;constructor(e){this.#Ze=new Map,this.#Xe=new Map;const t=new Map,r=new Map,n=new Map,i={};Object.keys(e).forEach((o=>{i[o]=e[o].map((({name:t,type:r})=>{let{base:n,index:i}=A(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(i||"")}})),t.set(o,new Set),r.set(o,[]),n.set(o,new Set)})),this.#Ye=JSON.stringify(i);for(const n in i){const o=new Set;for(const a of i[n]){(0,s.assertArgument)(!o.has(a.name),`duplicate variable name ${JSON.stringify(a.name)} in ${JSON.stringify(n)}`,"types",e),o.add(a.name);const i=A(a.type).base;(0,s.assertArgument)(i!==n,`circular type reference to ${JSON.stringify(i)}`,"types",e),v(i)||((0,s.assertArgument)(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(n),t.get(n).add(i))}}const o=Array.from(r.keys()).filter((e=>0===r.get(e).length));(0,s.assertArgument)(0!==o.length,"missing primary type","types",e),(0,s.assertArgument)(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,s.defineProperties)(this,{primaryType:o[0]}),function i(o,a){(0,s.assertArgument)(!a.has(o),`circular type reference to ${JSON.stringify(o)}`,"types",e),a.add(o);for(const e of t.get(o))if(r.has(e)){i(e,a);for(const t of a)n.get(t).add(e)}a.delete(o)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#Ze.set(e,w(e,i[e])+r.map((e=>w(e,i[e]))).join(""))}}getEncoder(e){let t=this.#Xe.get(e);return t||(t=this.#et(e),this.#Xe.set(e,t)),t}#et(e){{const t=v(e);if(t)return t}const t=A(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{(0,s.assertArgument)(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let o=n.map(r);return this.#Ze.has(e)&&(o=o.map(i.keccak256)),(0,i.keccak256)((0,s.concat)(o))}}const r=this.types[e];if(r){const t=(0,a.id)(this.#Ze.get(e));return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#Ze.has(r)?(0,i.keccak256)(n):n}));return n.unshift(t),(0,s.concat)(n)}}(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#Ze.get(e);return(0,s.assertArgument)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,i.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(v(e))return r(e,t);const n=A(e).array;if(n)return(0,s.assertArgument)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map((e=>this._visit(n.prefix,e,r)));const i=this.types[e];if(i)return i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{});(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new E(e)}static getPrimaryType(e){return E.from(e).primaryType}static hashStruct(e,t,r){return E.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=g[r];(0,s.assertArgument)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>y.indexOf(e.name)-y.indexOf(t.name))),E.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,s.concat)(["0x1901",E.hashDomain(e),E.from(t).hash(r)])}static hash(e,t,r){return(0,i.keccak256)(E.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const i={};e.verifyingContract&&!(0,s.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=E.from(t);o.visit(r,((e,t)=>("address"!==e||(0,s.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t))}}static getPayload(e,t,r){E.hashDomain(e);const n={},i=[];y.forEach((t=>{const r=e[t];null!=r&&(n[t]=m[t](r),i.push({name:t,type:g[t]}))}));const o=E.from(t);t=o.types;const a=Object.assign({},t);return(0,s.assertArgument)(null==a.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=i,o.encode(r),{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,s.hexlify)((0,s.getBytes)(t));if(e.match(/^u?int/))return(0,s.getBigInt)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,s.assertArgument)("string"==typeof t,"invalid string","value",t),t}(0,s.assertArgument)(!1,"unsupported type","type",e)}))}}}t.TypedDataEncoder=E,t.verifyTypedData=function(e,t,r,n){return(0,o.recoverAddress)(E.hash(e,t,r),n)}},7245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(2326),i=r(4880),o=r(5825);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},7262:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIcapAddress=t.getAddress=void 0;const n=r(2291),i=r(5347),o=BigInt(0),s=BigInt(36);function a(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const o=(0,i.getBytes)((0,n.keccak256)(r));for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&o[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);function u(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>c[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const l=function(){const e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function f(e){if((0,i.assertArgument)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=a(e);return(0,i.assertArgument)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,i.assertArgument)(e.substring(2,4)===u(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=o;for(let r=0;r<e.length;r++)t=t*s+l[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return a("0x"+t)}(0,i.assertArgument)(!1,"invalid address","address",e)}t.getAddress=f,t.getIcapAddress=function(e){let t=BigInt(f(e)).toString(36).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+u("XE00"+t)+t}},7281:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(7699),o=r(8596),s=r(5884),a=r(6805);t.generate=function(e,t,r,c,u){var l,f,d,h;function p(){var e;return n(this,(function(n){switch(n.label){case 0:e=h,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,d(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(h=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,d=void 0===f?i.identity:f,u=l.scheduler):(h=e,!c||o.isScheduler(c)?(d=i.identity,u=c):d=c),s.defer(u?function(){return a.scheduleIterable(p(),u)}:p)}},7307:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;const n=r(3238),i=r(5347);let o=!1;const s=function(e){return(0,n.ripemd160)(e)};let a=s;function c(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}t.ripemd160=c,c._=s,c.lock=function(){o=!0},c.register=function(e){if(o)throw new TypeError("ripemd160 is locked");a=e},Object.freeze(c)},7314:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(6808).Subject);t.BehaviorSubject=o},7398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;const n=r(5347),i=r(9976),o=r(8869),s=BigInt(0),a=BigInt(1),c=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class u extends o.Coder{size;signed;constructor(e,t,r){const i=(t?"int":"uint")+8*e;super(i,i,r,!1),(0,n.defineProperties)(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=(0,n.getBigInt)(i.Typed.dereference(t,this.type)),u=(0,n.mask)(c,8*o.WordSize);if(this.signed){let e=(0,n.mask)(u,8*this.size-1);(r>e||r<-(e+a))&&this._throwError("value out-of-bounds",t),r=(0,n.toTwos)(r,8*o.WordSize)}else(r<s||r>(0,n.mask)(u,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=(0,n.mask)(e.readValue(),8*this.size);return this.signed&&(t=(0,n.fromTwos)(t,8*this.size)),t}}t.NumberCoder=u},7400:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(281),i=r(5212),o=r(7214),s=r(7699);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},7405:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayVerifier=t.RelayEventType=void 0,t.getRelayUrls=l,t.getRegisteredPubKeys=async function(e,t,r,n=!0){try{const o=[],s=await l(e,n);if(r&&r.length>0){for(const e of r)for(const r of s)if(await t.hasRegisteredPubKey(e,r.address)){const n=await t.getSubscriptionDetails(e,r.address);n&&n.pubKey&&o.push({relayAddress:r.address,relayUrl:r.url,pubKey:n.pubKey,userAddress:e,expires:n.expires})}}else for(const t of s)try{new i.SimpleRelay({relayAddress:t.address,registryAddress:e.getAddress(),providerUrl:void e.getAddress()})}catch(e){console.error(`Error processing relay ${t.address}:`,e)}const a={};for(const e of o)a[e.pubKey]||(a[e.pubKey]={pubKey:e.pubKey,relays:[]}),a[e.pubKey].relays.push({relayAddress:e.relayAddress,relayUrl:e.relayUrl,userAddress:e.userAddress,expires:e.expires});return a}catch(e){return console.error("Failed to fetch registered public keys:",e),{}}},t.getSubscriptionHistory=async function(e,t="month"){try{const e=new Date,r=[];let n;switch(t){case"day":n=24;for(let t=0;t<n;t++){const n=new Date(e);n.setHours(n.getHours()-t),r.push({date:n.toISOString(),count:Math.floor(10*Math.random())+1})}break;case"week":n=7;for(let t=0;t<n;t++){const n=new Date(e);n.setDate(n.getDate()-t),r.push({date:n.toISOString().split("T")[0],count:Math.floor(25*Math.random())+5})}break;default:n=30;for(let t=0;t<n;t++){const n=new Date(e);n.setDate(n.getDate()-t),r.push({date:n.toISOString().split("T")[0],count:Math.floor(50*Math.random())+10})}}return r.sort(((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()))}catch(e){return console.error("Failed to fetch subscription history:",e),[]}},t.getRelayPerformance=async function(e,t){try{if(!await e.isRegisteredRelay(t))throw new Error(`Relay ${t} non è registrato`);const r=await e.getRelayInfo(t);if(!r)throw new Error(`Impossibile ottenere informazioni per il relay ${t}`);return{uptime:r.active?5*Math.random()+95:0,responseTime:Math.floor(500*Math.random())+50,successRate:r.active?10*Math.random()+90:0,lastChecked:(new Date).toISOString()}}catch(e){return console.error(`Failed to fetch performance for relay ${t}:`,e),{uptime:0,responseTime:0,successRate:0,lastChecked:(new Date).toISOString()}}},t.getNetworkSummary=async function(e,t){try{const r=await e.getAllRelays(!1,0,1e3);if(!r)throw new Error("Impossibile ottenere l'elenco dei relay");let i=0;for(const t of r.relays)await e.isRelayActive(t)&&i++;const o=await t.getStatistics();n.ethers.parseEther("0");const s=n.ethers.parseEther("0.01");return{totalRelays:Number(r.total),activeRelays:i,totalSubscriptions:o?Number(o.totalSubscriptions):0,activeSubscriptions:o?.7*Number(o.totalSubscriptions):0,averagePrice:n.ethers.formatEther(s),totalProcessedAmount:o?n.ethers.formatEther(o.totalAmountProcessed):"0",totalFeesCollected:o?n.ethers.formatEther(o.totalFeesCollected):"0"}}catch(e){return console.error("Failed to fetch network summary:",e),{totalRelays:0,activeRelays:0,totalSubscriptions:0,activeSubscriptions:0,averagePrice:"0",totalProcessedAmount:"0",totalFeesCollected:"0"}}},t.subscribeToRelayEvents=function(e,t){u.on("relayEvent",t);const r=setInterval((()=>{const e=Object.values(c),t=e[Math.floor(Math.random()*e.length)],r={type:t,timestamp:Date.now(),relayAddress:`0x${Math.random().toString(16).substring(2,42)}`,userAddress:t.includes("Subscription")?`0x${Math.random().toString(16).substring(2,42)}`:void 0,transactionHash:`0x${Math.random().toString(16).substring(2,66)}`};u.emit("relayEvent",r)}),1e4);return()=>{clearInterval(r),u.removeListener("relayEvent",t)}},t.getUsageDataForChart=async function(e,t,r){try{const e=new Date,n=[];let i=0,o="",s="";switch(r){case"daily":i=24;break;case"weekly":i=7;break;default:i=30}for(let o=0;o<i;o++){const i=new Date(e);if("daily"===r){i.setHours(i.getHours()-o);const e=`${i.getHours()}:00`;let r=0;switch(t){case"subscriptions":r=Math.floor(15*Math.random())+1;break;case"revenue":r=.5*Math.random()+.1;break;case"users":r=Math.floor(20*Math.random())+5}n.push({label:e,value:r})}else{i.setDate(i.getDate()-o);const e=i.toISOString().split("T")[0];let r=0;switch(t){case"subscriptions":r=Math.floor(50*Math.random())+10;break;case"revenue":r=2*Math.random()+.5;break;case"users":r=Math.floor(100*Math.random())+20}n.push({label:e,value:r})}}switch(t){case"subscriptions":o="Sottoscrizioni",s="Numero di sottoscrizioni "+("daily"===r?"giornaliere":"weekly"===r?"settimanali":"mensili");break;case"revenue":o="Ricavi",s=`Ricavi ${"daily"===r?"giornalieri":"weekly"===r?"settimanali":"mensili"} in ETH`;break;case"users":o="Utenti",s="Numero di utenti attivi "+("daily"===r?"giornalieri":"weekly"===r?"settimanali":"mensili")}return{dataPoints:n.sort(((e,t)=>"daily"===r?parseInt(e.label.split(":")[0])-parseInt(t.label.split(":")[0]):new Date(e.label).getTime()-new Date(t.label).getTime())),title:o,description:s}}catch(e){return console.error(`Failed to fetch chart data for ${t}:`,e),{dataPoints:[],title:"Errore",description:"Impossibile caricare i dati"}}};const n=r(4193),i=r(8777),o=r(7007),s=r(3358),a=r(5628);var c;!function(e){e.NEW_SUBSCRIPTION="newSubscription",e.SUBSCRIPTION_EXPIRED="subscriptionExpired",e.RELAY_REGISTERED="relayRegistered",e.RELAY_DEACTIVATED="relayDeactivated",e.RELAY_REACTIVATED="relayReactivated"}(c||(t.RelayEventType=c={}));const u=new o.EventEmitter;async function l(e,t=!0){try{const r=[];let n=0;const i=100;let o=!0;for(;o;){const s=await e.getAllRelays(t,n,i);if(s&&0!==s.relays.length){for(const t of s.relays){const n=await e.getRelayInfo(t);n&&n.url&&r.push({url:n.url,address:t})}n+=s.relays.length,o=n<Number(s.total)}else o=!1}return r}catch(e){return console.error("Failed to fetch relay URLs:",e),[]}}t.RelayVerifier=class{registry=null;entryPoint=null;simpleRelay=null;constructor(e,t,r){this.registry=e??null,this.entryPoint=t??null,this.simpleRelay=r??null}async isPublicKeyAuthorized(e,t){try{if(this.simpleRelay)try{if(await this.simpleRelay.isSubscribed(t))return!0}catch(e){(0,a.logError)("Error checking SimpleRelay subscription:",e)}if(this.entryPoint&&this.registry)try{const e=await this.registry.getAllRelays(!0,0,100);if(e&&e.relays&&e.relays.length>0)for(const r of e.relays)if(await this.entryPoint.isPubKeySubscribed(r,t))return!0}catch(e){(0,a.logError)("Error checking EntryPoint subscriptions:",e)}return!1}catch(e){return s.ErrorHandler.handle(s.ErrorType.CONTRACT,"RELAY_VERIFIER_ERROR","Error in isPublicKeyAuthorized check",e),!1}}async isUserSubscribedToRelay(e,t){try{return this.simpleRelay&&this.simpleRelay.getAddress()===e?await this.simpleRelay.isSubscribed(t):!!this.entryPoint&&await this.entryPoint.isPubKeySubscribed(e,t)}catch(t){return s.ErrorHandler.handle(s.ErrorType.CONTRACT,"RELAY_VERIFIER_ERROR",`Error checking subscription to relay ${e}`,t),!1}}async getAllRelays(e=!0,t=0,r=100){try{if(!this.registry)return[];const n=await this.registry.getAllRelays(e,t,r);return n?.relays||[]}catch(e){return s.ErrorHandler.handle(s.ErrorType.CONTRACT,"RELAY_VERIFIER_ERROR","Error getting all relays",e),[]}}setRegistry(e){this.registry=e}setEntryPoint(e){this.entryPoint=e}setSimpleRelay(e){this.simpleRelay=e}}},7406:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(4120),i=r(5934),o=r(9724);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7415:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=void 0;const n=r(1500);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}(0,n.assertArgument)(!1,"invalid BytesLike value",t||"value",e)}function o(e,t){return i(e,t,!1)}function s(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||"number"==typeof t&&e.length!==2+2*t||!0===t&&e.length%2!=0)}t.getBytes=o,t.getBytesCopy=function(e,t){return i(e,t,!0)},t.isHexString=s,t.isBytesLike=function(e){return s(e,!0)||e instanceof Uint8Array};const a="0123456789abcdef";function c(e){const t=o(e);let r="0x";for(let e=0;e<t.length;e++){const n=t[e];r+=a[(240&n)>>4]+a[15&n]}return r}function u(e,t,r){const i=o(e);(0,n.assert)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});const s=new Uint8Array(t);return s.fill(0),r?s.set(i,t-i.length):s.set(i,0),c(s)}t.hexlify=c,t.concat=function(e){return"0x"+e.map((e=>c(e).substring(2))).join("")},t.dataLength=function(e){return s(e,!0)?(e.length-2)/2:o(e).length},t.dataSlice=function(e,t,r){const i=o(e);return null!=r&&r>i.length&&(0,n.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),c(i.slice(null==t?0:t,null==r?i.length:r))},t.stripZerosLeft=function(e){let t=c(e).substring(2);for(;t.startsWith("00");)t=t.substring(2);return"0x"+t},t.zeroPadValue=function(e,t){return u(e,t,!0)},t.zeroPadBytes=function(e,t){return u(e,t,!1)}},7474:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(8596),s=r(8051),a=r(5455),c=r(3916),u=r(2071),l=r(5130);t.bindCallbackInternals=function e(t,r,f,d){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,d).apply(this,n).pipe(c.mapOneOrManyArgs(f))};d=f}return d?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(d),u.observeOn(d))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var c=new l.AsyncSubject,u=!0;return new s.Observable((function(s){var a=c.subscribe(s);if(u){u=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void c.error(n)}c.next(1<e.length?e:e[0]),f=!0,l&&c.complete()}])),f&&c.complete(),l=!0}return a}))}}},7478:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(6872),i=r(9724),o=r(5212),s=r(2574),a=r(281);t.mergeMap=function e(t,r,c){return void 0===c&&(c=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),c):("number"==typeof r&&(c=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,c)})))}},7510:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Webauthn=void 0;const n=r(4193),i=r(3358),o=r(4134),s=r(5628),a=r(1731),c={rpName:"Shogun Wallet",timeout:6e4,userVerification:"preferred",attestation:"none",authenticatorAttachment:"platform",requireResidentKey:!1};class u extends o.EventEmitter{config;gunInstance;credential;abortController=null;constructor(e,t){super(),this.gunInstance=e,this.credential=null,this.config={...c,...t,rpId:t?.rpId??window.location.hostname.split(":")[0]}}validateUsername(e){if(!e||"string"!=typeof e)throw new Error("Username must be a non-empty string");if(e.length<3||e.length>64)throw new Error("Username must be between 3 and 64 characters");if(!/^[a-zA-Z0-9_-]+$/.test(e))throw new Error("Username can only contain letters, numbers, underscores and hyphens")}async createAccount(e,t,r=!1){try{this.validateUsername(e);const n=3;let i=null;for(let o=1;o<=n;o++)try{const n=await this.generateCredentials(e,t,r);if(n.success)return this.emit(a.WebAuthnEventType.DEVICE_REGISTERED,{type:a.WebAuthnEventType.DEVICE_REGISTERED,data:{username:e,deviceInfo:n.deviceInfo},timestamp:Date.now()}),n;i=new Error(n.error??"Unknown error")}catch(e){if(i=e,o<n){await new Promise((e=>setTimeout(e,1e3*o)));continue}}throw i||new Error("Failed to create account after retries")}catch(e){throw this.emit(a.WebAuthnEventType.ERROR,{type:a.WebAuthnEventType.ERROR,data:{error:e.message},timestamp:Date.now()}),e}}async authenticateUser(e,t,r={}){try{if(this.validateUsername(e),!t){const e=new Error("No WebAuthn credentials found for this username");return i.ErrorHandler.handle(i.ErrorType.WEBAUTHN,"NO_CREDENTIALS",e.message,e),{success:!1,error:e.message}}this.abortAuthentication(),this.abortController=new AbortController;const n=r.timeout||this.config.timeout,o=setTimeout((()=>this.abortController?.abort()),n);try{const i={challenge:this.generateChallenge(e),allowCredentials:[],timeout:n,userVerification:r.userVerification||this.config.userVerification,rpId:this.config.rpId},o=await navigator.credentials.get({publicKey:i,signal:this.abortController.signal});if(!o)throw new Error("WebAuthn verification failed");const{password:s}=this.generateCredentialsFromSalt(e,t),c=this.getDeviceInfo(o.id),u={success:!0,username:e,password:s,credentialId:this.bufferToBase64(o.rawId),deviceInfo:c};return this.emit(a.WebAuthnEventType.AUTHENTICATION_SUCCESS,{type:a.WebAuthnEventType.AUTHENTICATION_SUCCESS,data:{username:e,deviceInfo:c},timestamp:Date.now()}),u}finally{clearTimeout(o),this.abortController=null}}catch(t){const r=t instanceof Error?t.message:"Unknown WebAuthn error";return this.emit(a.WebAuthnEventType.AUTHENTICATION_FAILED,{type:a.WebAuthnEventType.AUTHENTICATION_FAILED,data:{username:e,error:r},timestamp:Date.now()}),i.ErrorHandler.handle(i.ErrorType.WEBAUTHN,"AUTH_ERROR",r,t),{success:!1,error:r}}}abortAuthentication(){this.abortController&&(this.abortController.abort(),this.abortController=null)}getDeviceInfo(e){const t=this.getPlatformInfo();return{deviceId:e,timestamp:Date.now(),name:t.name,platform:t.platform,lastUsed:Date.now()}}getPlatformInfo(){if("undefined"==typeof navigator)return{name:"unknown",platform:"unknown"};const e=navigator.platform,t=navigator.userAgent;return/iPhone|iPad|iPod/.test(e)?{name:"iOS Device",platform:e}:/Android/.test(t)?{name:"Android Device",platform:e}:/Win/.test(e)?{name:"Windows Device",platform:e}:/Mac/.test(e)?{name:"Mac Device",platform:e}:/Linux/.test(e)?{name:"Linux Device",platform:e}:{name:"Unknown Device",platform:e}}generateChallenge(e){const t=Date.now().toString(),r=this.getRandomBytes(32),n=`${e}-${t}-${this.uint8ArrayToHex(r)}`;return(new TextEncoder).encode(n)}getRandomBytes(e){if("undefined"!=typeof window&&window.crypto)return window.crypto.getRandomValues(new Uint8Array(e));throw new Error("No cryptographic implementation available")}uint8ArrayToHex(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}bufferToBase64(e){const t=new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),"");return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}generateCredentialsFromSalt(e,t){const r=n.ethers.toUtf8Bytes(e+t);return{password:n.ethers.sha256(r)}}isSupported(){return"undefined"!=typeof window&&void 0!==window.PublicKeyCredential}async createCredential(e){try{const t=crypto.getRandomValues(new Uint8Array(32)),r=(new TextEncoder).encode(e),n={challenge:t,rp:{name:"Shogun Wallet",..."localhost"!==this.config.rpId&&{id:this.config.rpId}},user:{id:r,name:e,displayName:e},pubKeyCredParams:[{type:"public-key",alg:-7}],timeout:this.config.timeout,attestation:this.config.attestation,authenticatorSelection:{authenticatorAttachment:this.config.authenticatorAttachment,userVerification:this.config.userVerification,requireResidentKey:this.config.requireResidentKey}};(0,s.logDebug)("Attempting to create credentials with options:",n);const i=await navigator.credentials.create({publicKey:n});if(!i)throw new Error("Credential creation failed");(0,s.logDebug)("Credentials created successfully:",i);const o=i,a={id:o.id,rawId:o.rawId,type:o.type,response:{clientDataJSON:o.response.clientDataJSON},getClientExtensionResults:o.getClientExtensionResults};return"attestationObject"in o.response&&(a.response.attestationObject=o.response.attestationObject),this.credential=a,a}catch(e){(0,s.logError)("Detailed error in credential creation:",e);const t=e instanceof Error?e.message:"Unknown error";throw new Error(`Error creating credentials: ${t}`)}}async generateCredentials(e,t,r=!1){try{if(r){const t=await this.verifyCredential(e);return{success:t.success,error:t.error,credentialId:t.credentialId,username:t.username}}{const t=await this.createCredential(e),r=t.id;let n=null;return t?.response?.getPublicKey&&(n=t.response.getPublicKey()),{success:!0,credentialId:r,publicKey:n}}}catch(e){return(0,s.logError)("Error in generateCredentials:",e),{success:!1,error:e instanceof Error?e.message:"Unknown error during WebAuthn operation"}}}async verifyCredential(e){try{const t={challenge:crypto.getRandomValues(new Uint8Array(32)),timeout:this.config.timeout,userVerification:this.config.userVerification,..."localhost"!==this.config.rpId&&{rpId:this.config.rpId}};this.credential?.rawId&&(t.allowCredentials=[{id:this.credential.rawId,type:"public-key"}]);const r=await navigator.credentials.get({publicKey:t});return r?{success:!0,credentialId:r.id,username:e}:{success:!1,error:"Credential verification failed"}}catch(e){return(0,s.logError)("Error verifying credentials:",e),{success:!1,error:e instanceof Error?e.message:"Unknown error verifying credentials"}}}async saveToGun(e,t){if(this.gunInstance)try{await this.gunInstance.get(`webauthn_${e}`).put({credentialId:t.id,type:t.type,timestamp:Date.now()})}catch(e){(0,s.logError)("Error saving credentials to Gun:",e)}}async removeDevice(e,t,r){if(!r||!r.credentials||!r.credentials[t])return{success:!1};const n={...r};return n.credentials&&delete n.credentials[t],{success:!0,updatedCredentials:n}}async sign(e){return await navigator.credentials.get({publicKey:{challenge:new Uint8Array(16),rpId:this.config.rpId}})}}t.Webauthn=u,"undefined"!=typeof window?window.Webauthn=u:void 0!==r.g&&(r.g.Webauthn=u)},7526:function(e,t){"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],c=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,c)),l=0,f=c>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},7552:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(281);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},7557:function(e,t){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a;const c={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};t.default=c},7570:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptCrowdsaleJson=t.isCrowdsaleJson=void 0;const n=r(8165),i=r(646),o=r(2291),s=r(1181),a=r(5347),c=r(8634);t.isCrowdsaleJson=function(e){try{if(JSON.parse(e).encseed)return!0}catch(e){}return!1},t.decryptCrowdsaleJson=function(e,t){const r=JSON.parse(e),u=(0,c.getPassword)(t),l=(0,i.getAddress)((0,c.spelunk)(r,"ethaddr:string!")),f=(0,c.looseArrayify)((0,c.spelunk)(r,"encseed:string!"));(0,a.assertArgument)(f&&f.length%16==0,"invalid encseed","json",e);const d=(0,a.getBytes)((0,o.pbkdf2)(u,u,2e3,32,"sha256")).slice(0,16),h=f.slice(0,16),p=f.slice(16),g=new n.CBC(d,h),y=(0,n.pkcs7Strip)((0,a.getBytes)(g.decrypt(p)));let b="";for(let e=0;e<y.length;e++)b+=String.fromCharCode(y[e]);return{address:l,privateKey:(0,s.id)(b)}}},7609:function(e,t,r){"use strict";var n,i,o,s,a=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},c=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CFB=void 0;const u=r(6342);class l extends u.ModeOfOperation{constructor(e,t,r=8){if(super("CFB",e,l),n.add(this),i.set(this,void 0),o.set(this,void 0),!Number.isInteger(r)||r%8)throw new TypeError("invalid segmentSize");if(Object.defineProperties(this,{segmentSize:{enumerable:!0,value:r}}),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");a(this,i,new Uint8Array(t),"f")}else a(this,i,new Uint8Array(16),"f");a(this,o,this.iv,"f")}get iv(){return new Uint8Array(c(this,i,"f"))}encrypt(e){if(8*e.length%this.segmentSize)throw new TypeError("invalid plaintext size (must be multiple of segmentSize bytes)");const t=this.segmentSize/8,r=new Uint8Array(e);for(let e=0;e<r.length;e+=t){const i=this.aes.encrypt(c(this,o,"f"));for(let n=0;n<t;n++)r[e+n]^=i[n];c(this,n,"m",s).call(this,r.subarray(e))}return r}decrypt(e){if(8*e.length%this.segmentSize)throw new TypeError("invalid ciphertext size (must be multiple of segmentSize bytes)");const t=this.segmentSize/8,r=new Uint8Array(e);for(let i=0;i<r.length;i+=t){const a=this.aes.encrypt(c(this,o,"f"));for(let e=0;e<t;e++)r[i+e]^=a[e];c(this,n,"m",s).call(this,e.subarray(i))}return r}}t.CFB=l,i=new WeakMap,o=new WeakMap,n=new WeakSet,s=function(e){const t=this.segmentSize/8;c(this,o,"f").set(c(this,o,"f").subarray(t)),c(this,o,"f").set(e.subarray(0,t),16-t)}},7652:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},7698:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventPayload=void 0;const n=r(8166);t.EventPayload=class{filter;emitter;#tt;constructor(e,t,r){this.#tt=t,(0,n.defineProperties)(this,{emitter:e,filter:r})}async removeListener(){null!=this.#tt&&await this.emitter.off(this.filter,this.#tt)}}},7699:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},7703:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwlA=void 0;const n=r(5347),i=r(9610),o=r(2426);t.decodeOwlA=function(e,t){let r=(0,o.decodeOwl)(e).join(",");return t.split(/,/g).forEach((e=>{const o=e.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);(0,n.assertArgument)(null!==o,"internal error parsing accents","accents",t);let s=0;const a=(0,i.decodeBits)(parseInt(o[3]),o[4]),c=parseInt(o[2]),u=new RegExp(`([${o[1]}])`,"g");r=r.replace(u,((e,t)=>(0===--a[s]&&(t=String.fromCharCode(t.charCodeAt(0),c),s++),t)))})),r.split(",")}},7744:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidV4=void 0;const n=r(7415);t.uuidV4=function(e){const t=(0,n.getBytes)(e,"randomBytes");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},7778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.recoverAddress=t.computeAddress=t.authorizationify=t.accessListify=void 0;var n=r(7918);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return n.accessListify}});var i=r(2963);Object.defineProperty(t,"authorizationify",{enumerable:!0,get:function(){return i.authorizationify}});var o=r(778);Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return o.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return o.recoverAddress}});var s=r(1398);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return s.Transaction}})},7780:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeRlp=void 0;const n=r(7415),i=r(1500),o=r(7415);function s(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function a(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function c(e,t,r,n){const o=[];for(;r<t+1+n;){const s=u(e,r);o.push(s.result),r+=s.consumed,(0,i.assert)(r<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:o}}function u(e,t){(0,i.assert)(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});const r=t=>{(0,i.assert)(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const i=a(e,t+1,n);return r(t+1+n+i),c(e,t,t+1+n,n+i)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),c(e,t,t+1,n)}if(e[t]>=184){const i=e[t]-183;r(t+1+i);const o=a(e,t+1,i);return r(t+1+i+o),{consumed:1+i+o,result:(0,n.hexlify)(e.slice(t+1+i,t+1+i+o))}}if(e[t]>=128){const i=e[t]-128;return r(t+1+i),{consumed:1+i,result:(0,n.hexlify)(e.slice(t+1,t+1+i))}}return{consumed:1,result:s(e[t])}}t.decodeRlp=function(e){const t=(0,o.getBytes)(e,"data"),r=u(t,0);return(0,i.assertArgument)(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}},7782:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(381),i=r(3405);t.shareReplay=function(e,t,r){var o,s,a,c,u=!1;return e&&"object"==typeof e?(o=e.bufferSize,c=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,u=void 0!==(a=e.refCount)&&a,r=e.scheduler):c=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(c,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}},7783:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(5212),i=r(7214),o=r(9724),s=r(5717);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},7802:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(5212);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},7812:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(6808),i=r(9724),o=r(5212),s=r(1071),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},7841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlchemyProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}async _perform(e){if("getTransactionResult"===e.method){const{trace:t,tx:r}=await(0,n.resolveProperties)({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(null==t||null==r)return null;let i,o=!1;try{i=t[0].result.output,o="Reverted"===t[0].error}catch(e){}if(i)return(0,n.assert)(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:r,invocation:null,revert:null}),i;(0,n.assert)(!1,"could not parse trace result","BAD_DATA",{value:t})}return await super._perform(e)}isCommunityResource(){return this.apiKey===a}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v2/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("alchemy"),!0)),r}}t.AlchemyProvider=c},7873:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(8051),i=r(8619);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},7876:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(5212),i=r(7214),o=r(5717),s=r(9724);t.distinct=function(e,t){return n.operate((function(r,n){var a=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;a.has(r)||(a.add(r),n.next(t))}))),t&&s.innerFrom(t).subscribe(i.createOperatorSubscriber(n,(function(){return a.clear()}),o.noop))}))}},7897:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnector=void 0;const n=r(5628),i=r(3358),o=r(4134);class s extends o.EventEmitter{MESSAGE_TO_SIGN="I Love Shogun!";DEFAULT_CONFIG={cacheDuration:864e5,maxRetries:3,retryDelay:1e3,timeout:6e4,network:"mainnet",useApi:!1};config;signatureCache=new Map;connectedAddress=null;connectedType=null;manualKeyPair=null;constructor(e={}){super(),this.config={...this.DEFAULT_CONFIG,...e},this.setupEventListeners()}setupEventListeners(){}cleanup(){this.removeAllListeners(),this.connectedAddress=null,this.connectedType=null,this.manualKeyPair=null}getCachedSignature(e){const t=this.signatureCache.get(e);if(t){if(Date.now()-t.timestamp<=this.config.cacheDuration)return t.signature;this.signatureCache.delete(e)}try{const t=`shogun_bitcoin_sig_${e}`,r=localStorage.getItem(t);if(r){const n=JSON.parse(r);if(Date.now()-n.timestamp<=this.config.cacheDuration)return this.signatureCache.set(e,n),n.signature;localStorage.removeItem(t)}}catch(e){(0,n.logError)("Error reading signature cache from localStorage:",e)}return null}cacheSignature(e,t){const r={signature:t,timestamp:Date.now(),address:e};this.signatureCache.set(e,r);try{const t=`shogun_bitcoin_sig_${e}`;localStorage.setItem(t,JSON.stringify(r)),(0,n.log)(`Cached signature for address: ${e.substring(0,10)}...`)}catch(e){(0,n.logError)("Error saving signature cache to localStorage:",e)}}clearSignatureCache(e){if(e){this.signatureCache.delete(e);try{const t=`shogun_bitcoin_sig_${e}`;localStorage.removeItem(t),(0,n.log)(`Cleared signature cache for address: ${e.substring(0,10)}...`)}catch(e){(0,n.logError)("Error clearing signature cache from localStorage:",e)}}else{this.signatureCache.clear();try{const e=[];for(let t=0;t<localStorage.length;t++){const r=localStorage.key(t);r&&r.startsWith("shogun_bitcoin_sig_")&&e.push(r)}e.forEach((e=>localStorage.removeItem(e))),(0,n.log)(`Cleared all signature caches (${e.length} entries)`)}catch(e){(0,n.logError)("Error clearing all signature caches from localStorage:",e)}}}validateAddress(e){if(!e)throw new Error("Address not provided");try{const t=String(e).trim();if("nostr"===this.connectedType){if(!/^(npub1|[0-9a-f]{64})/.test(t))throw new Error("Invalid Nostr public key format")}else if(!/^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,59}$/.test(t))throw new Error("Invalid Bitcoin address format");return t}catch(e){throw i.ErrorHandler.handle(i.ErrorType.VALIDATION,"INVALID_ADDRESS","Invalid Bitcoin address provided",e),e}}isAlbyAvailable(){return(0,n.logWarn)("Alby support is deprecated, use Nostr instead"),!1}isNostrExtensionAvailable(){return"undefined"!=typeof window&&!!window.nostr}isAvailable(){return this.isNostrExtensionAvailable()||null!==this.manualKeyPair}async connectWallet(e="nostr"){(0,n.log)(`Connecting to Bitcoin wallet via ${e}...`);try{let t;switch(e){case"alby":(0,n.log)("Alby is deprecated, redirecting to Nostr"),t=await this.connectNostr();break;case"nostr":t=await this.connectNostr();break;case"manual":t=await this.connectManual();break;default:throw new Error(`Unsupported wallet type: ${e}`)}return t.success&&t.address&&(this.connectedAddress=t.address,this.connectedType=e,(0,n.log)(`Successfully connected to ${e} wallet: ${t.address}`),this.emit("wallet_connected",{address:t.address,type:this.connectedType})),t}catch(t){return(0,n.logError)(`Error connecting to ${e} wallet:`,t),{success:!1,error:t.message||"Failed to connect to wallet"}}}async connectNostr(){if(!this.isNostrExtensionAvailable())return{success:!1,error:"Nostr extension is not available. Please install a Nostr compatible extension."};try{const e=await window.nostr.getPublicKey();if(!e)throw new Error("Could not get public key from Nostr extension");this.connectedAddress=e,this.connectedType="nostr",this.emit("connected",{address:e,type:"nostr"});const t=`nostr_${e.substring(0,10)}`;return{success:!0,address:e,username:t,extensionType:"nostr"}}catch(e){throw new Error(`Nostr connection error: ${e.message}`)}}async connectManual(){if(!this.manualKeyPair)return{success:!1,error:"No manual key pair configured. Use setKeyPair() first."};this.connectedAddress=this.manualKeyPair.address,this.connectedType="manual",this.emit("connected",{address:this.manualKeyPair.address,type:"manual"});const e=`btc_${this.manualKeyPair.address.substring(0,10)}`;return{success:!0,address:this.manualKeyPair.address,username:e,extensionType:"manual"}}setKeyPair(e){this.manualKeyPair=e,e.address&&(this.connectedAddress=e.address,this.connectedType="manual")}async generateCredentials(e){(0,n.logDebug)(`Generating credentials for address: ${e}`);try{const t=this.validateAddress(e),r=this.getCachedSignature(t);if(r)return(0,n.logDebug)("Using cached signature"),await this.generateCredentialsFromSignature(t,r);const i=this.MESSAGE_TO_SIGN;let o;try{return o=await this.generateDeterministicSignature(t),(0,n.log)("Using deterministic signature for consistency"),this.cacheSignature(t,o),await this.generateCredentialsFromSignature(t,o)}catch(e){(0,n.logError)("Error generating deterministic signature:",e);try{o=await this.requestSignatureWithTimeout(t,i,this.config.timeout),this.cacheSignature(t,o),(0,n.log)("Using real Nostr signature as fallback")}catch(e){(0,n.logError)("Error requesting signature:",e),o=await this.generateDeterministicSignature(t),this.cacheSignature(t,o),(0,n.log)("Using deterministic signature as final fallback")}}return await this.generateCredentialsFromSignature(t,o)}catch(e){throw(0,n.logError)("Error generating credentials:",e),e}}async generateDeterministicSignature(e){const t=`${e}_${this.MESSAGE_TO_SIGN}_shogun_deterministic`;let r="",i=0;for(let e=0;e<t.length;e++)i=31*i+t.charCodeAt(e)&4294967295,e%4==3&&(r+=i.toString(16).padStart(8,"0"));for(;r.length<128;)i=31*i+r.length&4294967295,r+=i.toString(16).padStart(8,"0");let o=r.substring(0,128);return o=o.toLowerCase().replace(/[^0-9a-f]/g,"0"),o.length<128?o=o.padEnd(128,"0"):o.length>128&&(o=o.substring(0,128)),(0,n.log)(`Generated deterministic signature: ${o.substring(0,16)}... (${o.length} chars)`),o}async generateCredentialsFromSignature(e,t){return(0,n.log)("Generating credentials from signature"),{username:`${e.toLowerCase()}`,password:await this.generatePassword(t),message:this.MESSAGE_TO_SIGN,signature:t}}async generatePassword(e){if(!e)throw new Error("Invalid signature");try{const t=e.toLowerCase().replace(/[^a-f0-9]/g,"");let r="",n=0;for(let e=0;e<t.length;e++)n=31*n+t.charCodeAt(e)&4294967295,e%8==7&&(r+=n.toString(16).padStart(8,"0"));for(;r.length<64;)n=31*n+r.length&4294967295,r+=n.toString(16).padStart(8,"0");return r.substring(0,64)}catch(e){throw(0,n.logError)("Error generating password:",e),new Error("Failed to generate password from signature")}}async verifySignature(e,t,r){try{if((0,n.log)(`Verifying signature for address: ${r}`),!t||!e)return(0,n.logError)("Invalid message or signature for verification"),!1;if((0,n.log)(`Signature to verify: ${t.substring(0,20)}... (length: ${t.length})`),(0,n.log)(`Message to verify: ${e}`),"nostr"===this.connectedType||"alby"===this.connectedType){(0,n.log)("Using Nostr-specific verification");try{if(r.toLowerCase()!==this.connectedAddress?.toLowerCase())return(0,n.logError)("Address mismatch in signature verification"),(0,n.logError)(`Expected: ${this.connectedAddress}, Got: ${r}`),!1;const e=/^[0-9a-f]+$/i.test(t),i=t.length>=64;return(0,n.log)(`Signature format check: hex=${e}, length=${i} (${t.length} chars)`),e?i?((0,n.log)("Nostr signature appears valid"),!0):((0,n.logError)(`Invalid signature length: ${t.length} (minimum 64 required)`),!1):((0,n.logError)("Invalid signature format - not a valid hex string"),(0,n.logError)(`Signature contains invalid characters: ${t}`),!1)}catch(e){return(0,n.logError)("Error in signature verification:",e),!1}}else if("manual"===this.connectedType&&this.manualKeyPair){(0,n.log)("Using manual verification for keypair");try{const e=r.toLowerCase()===this.manualKeyPair.address.toLowerCase();return(0,n.log)(`Manual verification - address match: ${e}`),e}catch(e){return(0,n.logError)("Error in manual signature verification:",e),!1}}if(this.config.useApi&&this.config.apiUrl){(0,n.log)("Using API-based verification");try{return!0}catch(e){return(0,n.logError)("API verification error:",e),!1}}return(0,n.logWarn)("No specific verification method available, signature cannot be fully verified"),!1}catch(e){return(0,n.logError)("Error verifying signature:",e),!1}}getConnectedAddress(){return this.connectedAddress}getConnectedType(){return this.connectedType}requestSignatureWithTimeout(e,t,r=3e4){return new Promise(((n,i)=>{const o=setTimeout((()=>{i(new Error("Signature request timed out"))}),r);this.requestSignature(e,t).then((e=>{clearTimeout(o),n(e)})).catch((e=>{clearTimeout(o),i(e)}))}))}async requestSignature(e,t){if(!this.connectedType)throw new Error("No wallet connected");try{switch(this.connectedType){case"alby":if((0,n.logWarn)("Alby is deprecated, redirecting signature request to Nostr"),!window.nostr)throw new Error("Nostr extension not available");const r={kind:1,created_at:Math.floor(Date.now()/1e3),tags:[],content:t,pubkey:e};return(await window.nostr.signEvent(r)).sig;case"nostr":(0,n.log)("Requesting Nostr signature for message:",t);const i={kind:1,created_at:Math.floor(Date.now()/1e3),tags:[],content:t,pubkey:e},o=await window.nostr.signEvent(i);(0,n.log)("Received Nostr signature:",o.sig.substring(0,20)+"...");let s=o.sig;return s&&"string"==typeof s&&(s=s.replace(/[^a-f0-9]/gi,"").toLowerCase(),s.length>128?s=s.substring(0,128):s.length<128&&(s=s.padStart(128,"0")),(0,n.log)(`Normalized Nostr signature: ${s.substring(0,10)}...`)),s;case"manual":if((0,n.log)("Using manual key pair for signature"),!this.manualKeyPair)throw new Error("No manual key pair available");const a=`${this.manualKeyPair.privateKey.substring(0,32)}_${t}_${Date.now()}`;return(0,n.log)("Generated manual signature:",a.substring(0,20)+"..."),a;default:throw new Error(`Unsupported wallet type: ${this.connectedType}`)}}catch(e){throw(0,n.logError)("Error requesting signature:",e),new Error(`Failed to get signature: ${e.message}`)}}}t.NostrConnector=s},7918:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accessListify=void 0;const n=r(646),i=r(5347);function o(e,t){return{address:(0,n.getAddress)(e),storageKeys:t.map(((e,t)=>((0,i.assertArgument)((0,i.isHexString)(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}t.accessListify=function(e){if(Array.isArray(e))return e.map(((t,r)=>Array.isArray(t)?((0,i.assertArgument)(2===t.length,"invalid slot set",`value[${r}]`,t),o(t[0],t[1])):((0,i.assertArgument)(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),o(t.address,t.storageKeys))));(0,i.assertArgument)(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return o(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}},7933:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(8246),i=r(719);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7966:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIdPendingSubscriber=t.FilterIdEventSubscriber=t.FilterIdSubscriber=void 0;const n=r(5347),i=r(4338);class o{#Q;#rt;#Y;#te;#L;#nt;constructor(e){this.#Q=e,this.#rt=null,this.#Y=this.#ee.bind(this),this.#te=!1,this.#L=null,this.#nt=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#ee(e){try{null==this.#rt&&(this.#rt=this._subscribe(this.#Q));let e=null;try{e=await this.#rt}catch(e){if(!(0,n.isError)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e)return this.#rt=null,void this.#Q._recoverSubscriber(this,this._recover(this.#Q));const t=await this.#Q.getNetwork();if(this.#L||(this.#L=t),this.#L.chainId!==t.chainId)throw new Error("chaid changed");if(this.#nt)return;const r=await this.#Q.send("eth_getFilterChanges",[e]);await this._emitResults(this.#Q,r)}catch(e){console.log("@TODO",e)}this.#Q.once("block",this.#Y)}#it(){const e=this.#rt;e&&(this.#rt=null,e.then((e=>{this.#Q.destroyed||this.#Q.send("eth_uninstallFilter",[e])})))}start(){this.#te||(this.#te=!0,this.#ee(-2))}stop(){this.#te&&(this.#te=!1,this.#nt=!0,this.#it(),this.#Q.off("block",this.#Y))}pause(e){e&&this.#it(),this.#Q.off("block",this.#Y)}resume(){this.start()}}t.FilterIdSubscriber=o,t.FilterIdEventSubscriber=class extends o{#ot;constructor(e,t){var r;super(e),this.#ot=(r=t,JSON.parse(JSON.stringify(r)))}_recover(e){return new i.PollingEventSubscriber(e,this.#ot)}async _subscribe(e){return await e.send("eth_newFilter",[this.#ot])}async _emitResults(e,t){for(const r of t)e.emit(this.#ot,e._wrapLog(r,e._network))}},t.FilterIdPendingSubscriber=class extends o{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const r of t)e.emit("pending",r)}}},7977:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(6632),i=r(7699);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},8026:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;const n=r(8869),i=new Uint8Array([]);class o extends n.Coder{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(i)}decode(e){return e.readBytes(0),null}}t.NullCoder=o},8030:function(e,t,r){e=r.nmd(e);var n=r(8287).hp;!function(){function t(e,n){return n?r(5736)(e):e.slice?t[i(e)]:function(r,n){e(r={exports:{}}),t[i(n)]=r.exports};function i(e){return e.split("/").slice(-1).toString().replace(".js","")}}var i=e;t((function(e){"undefined"!=typeof self&&(e.window=self),"undefined"!=typeof window&&(e.window=window);var t=(e.window||e).SEA||{};(t.window=e.window)&&(t.window.SEA=t);try{void 0+""!=typeof i&&(i.exports=t)}catch(e){}e.exports=t}))(t,"./root"),t((function(e){var r=t("./root");try{r.window&&location.protocol.indexOf("s")<0&&location.host.indexOf("localhost")<0&&!/^127\.\d+\.\d+\.\d+$/.test(location.hostname)&&location.protocol.indexOf("file:")<0&&(console.warn("HTTPS needed for WebCrypto in SEA, redirecting..."),location.protocol="https:")}catch(e){}}))(t,"./https"),t((function(e){var i;if(i+""==typeof btoa){if(i+""==typeof n)try{r.g.Buffer=t("buffer",1).Buffer}catch(e){console.log("Please `npm install buffer` or add it to your package.json !")}r.g.btoa=function(e){return n.from(e,"binary").toString("base64")},r.g.atob=function(e){return n.from(e,"base64").toString("binary")}}}))(t,"./base64"),t((function(e){function r(){}t("./base64"),Object.assign(r,{from:Array.from}),r.prototype=Object.create(Array.prototype),r.prototype.toString=function(e,t,r){e=e||"utf8",t=t||0;const n=this.length;if("hex"===e){const e=new Uint8Array(this);return[...Array((r&&r+1||n)-t).keys()].map((r=>e[r+t].toString(16).padStart(2,"0"))).join("")}return"utf8"===e?Array.from({length:(r||n)-t},((e,r)=>String.fromCharCode(this[r+t]))).join(""):"base64"===e?btoa(this):void 0},e.exports=r}))(t,"./array"),t((function(e){t("./base64");var r=t("./array");function n(...e){return console.warn("new SafeBuffer() is depreciated, please use SafeBuffer.from()"),n.from(...e)}n.prototype=Object.create(Array.prototype),Object.assign(n,{from(){if(!Object.keys(arguments).length||null==arguments[0])throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");const e=arguments[0];let t;if("string"==typeof e){const n=arguments[1]||"utf8";if("hex"===n){const n=e.match(/([\da-fA-F]{2})/g).map((e=>parseInt(e,16)));if(!n||!n.length)throw new TypeError("Invalid first argument for type 'hex'.");t=r.from(n)}else if("utf8"===n||"binary"===n){const n=e.length,i=new Uint16Array(n);Array.from({length:n},((t,r)=>i[r]=e.charCodeAt(r))),t=r.from(i)}else if("base64"===n){const n=atob(e),i=n.length,o=new Uint8Array(i);Array.from({length:i},((e,t)=>o[t]=n.charCodeAt(t))),t=r.from(o)}else"binary"===n?t=r.from(e):console.info("SafeBuffer.from unknown encoding: "+n);return t}if(e.byteLength,e.byteLength?e.byteLength:e.length){let t;return e instanceof ArrayBuffer&&(t=new Uint8Array(e)),r.from(t||e)}},alloc(e,t=0){return r.from(new Uint8Array(Array.from({length:e},(()=>t))))},allocUnsafe(e){return r.from(new Uint8Array(Array.from({length:e})))},concat(e){if(!Array.isArray(e))throw new TypeError("First argument must be Array containing ArrayBuffer or Uint8Array instances.");return r.from(e.reduce(((e,t)=>e.concat(Array.from(t))),[]))}}),n.prototype.from=n.from,n.prototype.toString=r.prototype.toString,e.exports=n}))(t,"./buffer"),t((function(e){const r=t("./root"),n={Buffer:t("./buffer")};var o={};if(JSON.parseAsync=JSON.parseAsync||function(e,t,r){try{t(void 0,JSON.parse(e,r))}catch(e){t(e)}},JSON.stringifyAsync=JSON.stringifyAsync||function(e,t,r,n){try{t(void 0,JSON.stringify(e,r,n))}catch(e){t(e)}},n.parse=function(e,t){return new Promise((function(r,n){JSON.parseAsync(e,(function(e,t){e?n(e):r(t)}),t)}))},n.stringify=function(e,t,r){return new Promise((function(n,i){JSON.stringifyAsync(e,(function(e,t){e?i(e):n(t)}),t,r)}))},r.window&&(n.crypto=r.window.crypto||r.window.msCrypto,n.subtle=(n.crypto||o).subtle||(n.crypto||o).webkitSubtle,n.TextEncoder=r.window.TextEncoder,n.TextDecoder=r.window.TextDecoder,n.random=e=>n.Buffer.from(n.crypto.getRandomValues(new Uint8Array(n.Buffer.alloc(e))))),!n.TextDecoder){const{TextEncoder:e,TextDecoder:r}=t((void 0+""==typeof i?".":"")+"./lib/text-encoding",1);n.TextDecoder=r,n.TextEncoder=e}if(!n.crypto)try{var s=t("crypto",1);Object.assign(n,{crypto:s,random:e=>n.Buffer.from(s.randomBytes(e))});const{Crypto:e}=t("@peculiar/webcrypto",1);n.ossl=n.subtle=new e({directory:"ossl"}).subtle}catch(e){console.log("Please `npm install @peculiar/webcrypto` or add it to your package.json !")}e.exports=n}))(t,"./shim"),t((function(e){var r=t("./root"),n=t("./shim"),i={pbkdf2:{hash:{name:"SHA-256"},iter:1e5,ks:64},ecdsa:{pair:{name:"ECDSA",namedCurve:"P-256"},sign:{name:"ECDSA",hash:{name:"SHA-256"}}},ecdh:{name:"ECDH",namedCurve:"P-256"},jwk:function(e,t){var r={kty:"EC",crv:"P-256",x:(e=e.split("."))[0],y:e[1],ext:!0};return r.key_ops=t?["sign"]:["verify"],t&&(r.d=t),r},keyToJwk:function(e){return{kty:"oct",k:e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,""),ext:!1,alg:"A256GCM"}},recall:{validity:43200,hook:function(e){return e}},check:function(e){return"string"==typeof e&&"SEA{"===e.slice(0,4)},parse:async function(e){try{var t="string"==typeof e;return t&&"SEA{"===e.slice(0,4)&&(e=e.slice(3)),t?await n.parse(e):e}catch(e){}return e}};r.opt=i,e.exports=i}))(t,"./settings"),t((function(e){var r=t("./shim");e.exports=async function(e,t){var n="string"==typeof e?e:await r.stringify(e),i=await r.subtle.digest({name:t||"SHA-256"},(new r.TextEncoder).encode(n));return r.Buffer.from(i)}}))(t,"./sha256"),t((function(e){const r=t("./shim"),n=r.subtle,i=r.ossl?r.ossl:n;e.exports=e=>i.digest({name:"SHA-1"},new ArrayBuffer(e))}))(t,"./sha1"),t((function(e){var r=t("./root"),n=t("./shim"),i=t("./settings"),o=t("./sha256");r.work=r.work||(async(e,t,s,a)=>{try{var c=(t||{}).epub||t;if(a=a||{},c instanceof Function&&(s=c,c=void 0),e="string"==typeof e?e:await n.stringify(e),"sha"===(a.name||"").toLowerCase().slice(0,3)){var u=n.Buffer.from(await o(e,a.name),"binary").toString(a.encode||"base64");if(s)try{s(u)}catch(e){console.log(e)}return u}c=c||n.random(9);var l=await(n.ossl||n.subtle).importKey("raw",(new n.TextEncoder).encode(e),{name:a.name||"PBKDF2"},!1,["deriveBits"]),f=await(n.ossl||n.subtle).deriveBits({name:a.name||"PBKDF2",iterations:a.iterations||i.pbkdf2.iter,salt:(new n.TextEncoder).encode(a.salt||c),hash:a.hash||i.pbkdf2.hash},l,a.length||8*i.pbkdf2.ks);e=n.random(e.length);var d=n.Buffer.from(f,"binary").toString(a.encode||"base64");if(s)try{s(d)}catch(e){console.log(e)}return d}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(s&&s())}}),e.exports=r.work}))(t,"./work"),t((function(e){var r=t("./root"),n=t("./shim");t("./settings"),r.name=r.name||(async(e,t)=>{try{if(e)try{e()}catch(e){console.log(e)}return}catch(t){if(console.log(t),r.err=t,r.throw)throw t;return void(e&&e())}}),r.pair=r.pair||(async(e,t)=>{try{var i=n.ossl||n.subtle,o=await n.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]).then((async e=>{var t={};t.priv=(await n.subtle.exportKey("jwk",e.privateKey)).d;var r=await n.subtle.exportKey("jwk",e.publicKey);return t.pub=r.x+"."+r.y,t}));try{var s=await i.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"]).then((async e=>{var t={};t.epriv=(await i.exportKey("jwk",e.privateKey)).d;var r=await i.exportKey("jwk",e.publicKey);return t.epub=r.x+"."+r.y,t}))}catch(e){if(r.window)throw e;if("Error: ECDH is not a supported algorithm"!=e)throw e;console.log("Ignoring ECDH...")}s=s||{};var a={pub:o.pub,priv:o.priv,epub:s.epub,epriv:s.epriv};if(e)try{e(a)}catch(e){console.log(e)}return a}catch(t){if(console.log(t),r.err=t,r.throw)throw t;return void(e&&e())}}),e.exports=r.pair}))(t,"./pair"),t((function(e){var r,n=t("./root"),i=t("./shim"),o=t("./settings"),s=t("./sha256");n.sign=n.sign||(async(e,t,a,c)=>{try{if(c=c||{},!(t||c).priv){if(!n.I)throw"No signing key.";t=await n.I(null,{what:e,how:"sign",why:c.why})}if(r===e)throw"`undefined` not allowed.";var u=await o.parse(e),l=c.check=c.check||u;if(n.verify&&(n.opt.check(l)||l&&l.s&&l.m)&&r!==await n.verify(l,t)){var f=await o.parse(l);if(c.raw||(f="SEA"+await i.stringify(f)),a)try{a(f)}catch(e){console.log(e)}return f}var d=t.pub,h=t.priv,p=o.jwk(d,h),g=await s(u),y=await(i.ossl||i.subtle).importKey("jwk",p,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]).then((e=>(i.ossl||i.subtle).sign({name:"ECDSA",hash:{name:"SHA-256"}},e,new Uint8Array(g))));if(f={m:u,s:i.Buffer.from(y,"binary").toString(c.encode||"base64")},c.raw||(f="SEA"+await i.stringify(f)),a)try{a(f)}catch(e){console.log(e)}return f}catch(e){if(console.log(e),n.err=e,n.throw)throw e;return void(a&&a())}}),e.exports=n.sign}))(t,"./sign"),t((function(e){var r,n=t("./root"),i=t("./shim"),o=t("./settings"),s=t("./sha256");n.verify=n.verify||(async(e,t,a,c)=>{try{var u=await o.parse(e);if(!1===t){var l=await o.parse(u.m);if(a)try{a(l)}catch(e){console.log(e)}return l}c=c||{};var f,d,h,p=t.pub||t,g=n.opt.slow_leak?await n.opt.slow_leak(p):await(i.ossl||i.subtle).importKey("jwk",o.jwk(p),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]),y=await s(u.m);try{if(f=i.Buffer.from(u.s,c.encode||"base64"),d=new Uint8Array(f),!(h=await(i.ossl||i.subtle).verify({name:"ECDSA",hash:{name:"SHA-256"}},g,d,new Uint8Array(y))))throw"Signature did not match."}catch(r){if(n.opt.fallback)return await n.opt.fall_verify(e,t,a,c)}var b=h?await o.parse(u.m):r;if(a)try{a(b)}catch(e){console.log(e)}return b}catch(e){if(console.log(e),n.err=e,n.throw)throw e;return void(a&&a())}}),e.exports=n.verify;var a={},c=(n.opt.slow_leak=e=>{if(a[e])return a[e];var t=o.jwk(e);return a[e]=(i.ossl||i.subtle).importKey("jwk",t,{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]),a[e]},n.opt);n.opt.fall_verify=async function(e,t,a,u,l){if(l===n.opt.fallback)throw"Signature did not match";l=l||1;var f=e||"";e=n.opt.unpack(e)||e;var d,h,p,g=await o.parse(e),y=t.pub||t,b=await n.opt.slow_leak(y),m=l<=n.opt.fallback?i.Buffer.from(await i.subtle.digest({name:"SHA-256"},(new i.TextEncoder).encode(await o.parse(g.m)))):await s(g.m);try{if(d=i.Buffer.from(g.s,u.encode||"base64"),h=new Uint8Array(d),!(p=await(i.ossl||i.subtle).verify({name:"ECDSA",hash:{name:"SHA-256"}},b,h,new Uint8Array(m))))throw"Signature did not match."}catch(e){try{d=i.Buffer.from(g.s,"utf8"),h=new Uint8Array(d),p=await(i.ossl||i.subtle).verify({name:"ECDSA",hash:{name:"SHA-256"}},b,h,new Uint8Array(m))}catch(e){if(!p)throw"Signature did not match."}}var v=p?await o.parse(g.m):r;if(c.fall_soul=f["#"],c.fall_key=f["."],c.fall_val=e,c.fall_state=f[">"],a)try{a(v)}catch(e){console.log(e)}return v},n.opt.fallback=2}))(t,"./verify"),t((function(e){var r=t("./shim"),n=t("./settings"),i=t("./sha256");e.exports=async(e,t,o)=>{o=o||{};const s=e+(t||r.random(8)).toString("utf8"),a=r.Buffer.from(await i(s),"binary"),c=n.keyToJwk(a);return await r.subtle.importKey("jwk",c,{name:"AES-GCM"},!1,["encrypt","decrypt"])}}))(t,"./aeskey"),t((function(e){var r=t("./root"),n=t("./shim"),i=(t("./settings"),t("./aeskey"));r.encrypt=r.encrypt||(async(e,t,o,s)=>{try{s=s||{};var a=(t||s).epriv||t;if(void 0===e)throw"`undefined` not allowed.";if(!a){if(!r.I)throw"No encryption key.";a=(t=await r.I(null,{what:e,how:"encrypt",why:s.why})).epriv||t}var c="string"==typeof e?e:await n.stringify(e),u={s:n.random(9),iv:n.random(15)},l=await i(a,u.s,s).then((e=>n.subtle.encrypt({name:s.name||"AES-GCM",iv:new Uint8Array(u.iv)},e,(new n.TextEncoder).encode(c)))),f={ct:n.Buffer.from(l,"binary").toString(s.encode||"base64"),iv:u.iv.toString(s.encode||"base64"),s:u.s.toString(s.encode||"base64")};if(s.raw||(f="SEA"+await n.stringify(f)),o)try{o(f)}catch(e){console.log(e)}return f}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(o&&o())}}),e.exports=r.encrypt}))(t,"./encrypt"),t((function(e){var r=t("./root"),n=t("./shim"),i=t("./settings"),o=t("./aeskey");r.decrypt=r.decrypt||(async(e,t,s,a)=>{try{a=a||{};var c=(t||a).epriv||t;if(!c){if(!r.I)throw"No decryption key.";c=(t=await r.I(null,{what:e,how:"decrypt",why:a.why})).epriv||t}var u,l,f,d=await i.parse(e);try{u=n.Buffer.from(d.s,a.encode||"base64"),l=n.Buffer.from(d.iv,a.encode||"base64"),f=n.Buffer.from(d.ct,a.encode||"base64");var h=await o(c,u,a).then((e=>n.subtle.decrypt({name:a.name||"AES-GCM",iv:new Uint8Array(l),tagLength:128},e,new Uint8Array(f))))}catch(n){if("utf8"===a.encode)throw"Could not decrypt";if(r.opt.fallback)return a.encode="utf8",await r.decrypt(e,t,s,a)}var p=await i.parse(new n.TextDecoder("utf8").decode(h));if(s)try{s(p)}catch(e){console.log(e)}return p}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(s&&s())}}),e.exports=r.decrypt}))(t,"./decrypt"),t((function(e){var r=t("./root"),n=t("./shim");t("./settings"),r.secret=r.secret||(async(e,t,o,s)=>{try{if(s=s||{},!t||!t.epriv||!t.epub){if(!r.I)throw"No secret mix.";t=await r.I(null,{what:e,how:"secret",why:s.why})}var a=e.epub||e,c=t.epub,u=t.epriv,l=n.ossl||n.subtle,f=i(a),d=Object.assign({public:await l.importKey(...f,!0,[])},{name:"ECDH",namedCurve:"P-256"}),h=i(c,u),p=await l.importKey(...h,!1,["deriveBits"]).then((async e=>{var t=await l.deriveBits(d,e,256),r=new Uint8Array(t),n=await l.importKey("raw",r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]);return l.exportKey("jwk",n).then((({k:e})=>e))}));if(o)try{o(p)}catch(e){console.log(e)}return p}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(o&&o())}});var i=(e,t)=>{var[r,n]=e.split("."),i=t?{d:t}:{};return["jwk",Object.assign(i,{x:r,y:n,kty:"EC",crv:"P-256",ext:!0}),{name:"ECDH",namedCurve:"P-256"}]};e.exports=r.secret}))(t,"./secret"),t((function(e){var r=t("./root");r.certify=r.certify||(async(e,t={},n,i,o={})=>{try{if(console.log("SEA.certify() is an early experimental community supported method that may change API behavior without warning in any future version."),e=(()=>{var t=[];if(e){if(("string"==typeof e||Array.isArray(e))&&e.indexOf("*")>-1)return"*";if("string"==typeof e)return e;if(Array.isArray(e)){if(1===e.length&&e[0])return"object"==typeof e[0]&&e[0].pub?e[0].pub:"string"==typeof e[0]?e[0]:null;e.map((e=>{"string"==typeof e?t.push(e):"object"==typeof e&&e.pub&&t.push(e.pub)}))}return"object"==typeof e&&e.pub?e.pub:t.length>0?t:null}})(),!e)return console.log("No certificant found.");const a=!o.expiry||"number"!=typeof o.expiry&&"string"!=typeof o.expiry?null:parseFloat(o.expiry),c=(t||{}).read?t.read:null,u=(t||{}).write?t.write:"string"==typeof t||Array.isArray(t)||t["+"]||t["#"]||t["."]||t["="]||t["*"]||t[">"]||t["<"]?t:null,l=(o||{}).block||(o||{}).blacklist||(o||{}).ban||{},f=l.read&&("string"==typeof l.read||(l.read||{})["#"])?l.read:null,d="string"==typeof l?l:l.write&&("string"==typeof l.write||l.write["#"])?l.write:null;if(!c&&!u)return console.log("No policy found.");const h=JSON.stringify({c:e,...a?{e:a}:{},...c?{r:c}:{},...u?{w:u}:{},...f?{rb:f}:{},...d?{wb:d}:{}});var s=await r.sign(h,n,null,{raw:1});if(o.raw||(s="SEA"+JSON.stringify(s)),i)try{i(s)}catch(e){console.log(e)}return s}catch(e){if(r.err=e,r.throw)throw e;return void(i&&i())}}),e.exports=r.certify}))(t,"./certify"),t((function(e){var r=t("./shim"),n=t("./root");n.work=t("./work"),n.sign=t("./sign"),n.verify=t("./verify"),n.encrypt=t("./encrypt"),n.decrypt=t("./decrypt"),n.certify=t("./certify"),n.random=n.random||r.random,n.Buffer=n.Buffer||t("./buffer"),n.keyid=n.keyid||(async e=>{try{const t=r.Buffer.concat(e.replace(/-/g,"+").replace(/_/g,"/").split(".").map((e=>r.Buffer.from(e,"base64")))),n=r.Buffer.concat([r.Buffer.from([153,t.length/256,t.length%256]),t]),i=await sha1hash(n),o=r.Buffer.from(i,"binary");return o.toString("hex",o.length-8)}catch(e){throw console.log(e),e}}),((n.window||{}).GUN||{}).SEA=n,e.exports=n}))(t,"./sea"),t((function(e){var r,n=t("./sea");function o(e){this._={$:this}}function s(){return r.state().toString(36).replace(".","")}r=n.window?n.window.GUN||{chain:{}}:t((void 0+""==typeof i?".":"")+"./gun",1),n.GUN=r,o.prototype=function(){function e(){}return e.prototype=r.chain,new e}(),o.prototype.constructor=o,r.chain.user=function(e){var t,r=this.back(-1);if(e)return e=n.opt.pub((e._||"")["#"])||e,r.get("~"+e);if(t=r.back("user"))return t;var i=r=r._,a=i.opt.uuid||s;return(i=(t=i.user=this.chain(new o))._).opt={},i.opt.uuid=function(e){var t=a(),n=r.user;return n&&(n=n.is)&&(n=n.pub)?(t="~"+n+"/"+t,e&&e.call&&e(null,t),t):t},t},r.User=o,o.GUN=r,o.SEA=r.SEA=n,e.exports=o}))(t,"./user"),t((function(e){var r;(""+r!=typeof GUN?GUN||{chain:{}}:t((""+r==typeof i?".":"")+"./gun",1)).chain.then=function(e,t){var r=this,n=new Promise((function(e,n){r.once(e,t)}));return e?n.then(e):n}}))(t,"./then"),t((function(e){var r=t("./user"),n=r.SEA,i=r.GUN,o=function(){};r.prototype.create=function(...e){var t,r="object"==typeof e[0]&&(e[0].pub||e[0].epub)?e[0]:"object"==typeof e[1]&&(e[1].pub||e[1].epub)?e[1]:null,s=r&&(r.pub||r.epub)?r.pub:"string"==typeof e[0]?e[0]:null,a=r&&(r.pub||r.epub)?r:s&&"string"==typeof e[1]?e[1]:null,c=e.filter((e=>"function"==typeof e))[0]||null,u=e&&e.length>1&&"object"==typeof e[e.length-1]?e[e.length-1]:{},l=this,f=l._,d=l.back(-1);if(c=c||o,!1!==(u=u||{}).check&&(s||(t="No user."),(a||"").length<8&&(t="Password too short!"),t))return c({err:i.log(t)}),l;if(f.ing)return(c||o)({err:i.log("User is already being created or authenticated!"),wait:!0}),l;f.ing=!0;var h={a:function(e){if(h.pubs=e,e&&!u.already){var t={err:i.log("User already created!")};return f.ing=!1,(c||o)(t),void l.leave()}h.salt=String.random(64),n.work(a,h.salt,h.b)},b:function(e){h.proof=e,r?h.c(r):n.pair(h.c)},c:function(e){var t;h.pair=e||{},(t=f.root.user)&&(t._.sea=e,t.is={pub:e.pub,epub:e.epub,alias:s}),h.data={pub:e.pub},h.d()},d:function(){h.data.alias=s,h.e()},e:function(){h.data.epub=h.pair.epub,n.encrypt({priv:h.pair.priv,epriv:h.pair.epriv},h.proof,h.f,{raw:1})},f:function(e){h.data.auth=JSON.stringify({ek:e,s:h.salt}),h.g(h.data.auth)},g:function(e){var t;h.data.auth=h.data.auth||e,d.get(t="~"+h.pair.pub).put(h.data).on(h.h);var r={};r[t]={"#":t},d.get("~@"+s).put(r).get(t).on(h.i)},h:function(e,t,r,n){n.off(),h.h.ok=1,h.i()},i:function(e,t,n,i){i&&(h.i.ok=1,i.off()),h.h.ok&&h.i.ok&&(f.ing=!1,c({ok:0,pub:h.pair.pub}),o===c&&(r?l.auth(r):l.auth(s,a)))}};return d.get("~@"+s).once(h.a),l},r.prototype.leave=function(e,t){var r=this.back(-1)._.user;if(r&&(delete r.is,delete r._.is,delete r._.sea),n.window)try{var i={};delete(i=n.window.sessionStorage).recall,delete i.pair}catch(e){}return this}}))(t,"./create"),t((function(e){var r=t("./user"),n=r.SEA,i=r.GUN,o=function(){};function s(e){if("string"!=typeof e)return e;try{e=JSON.parse(e)}catch(t){e={}}return e}r.prototype.auth=function(...e){var t="object"==typeof e[0]&&(e[0].pub||e[0].epub)?e[0]:"object"==typeof e[1]&&(e[1].pub||e[1].epub)?e[1]:null,r=t||"string"!=typeof e[0]?null:e[0],a=!r&&(!t||t.priv&&t.epriv)||"string"!=typeof e[1]?null:e[1],c=e.filter((e=>"function"==typeof e))[0]||null,u=e&&e.length>1&&"object"==typeof e[e.length-1]?e[e.length-1]:{},l=this,f=l._,d=l.back(-1);if(f.ing)return(c||o)({err:i.log("User is already being created or authenticated!"),wait:!0}),l;f.ing=!0;var h,p={},g=9;return p.a=function(e){if(!e)return p.b();if(!e.pub){var t=[];return Object.keys(e).forEach((function(r){"_"!=r&&t.push(e[r])})),p.b(t)}if(p.name)return p.f(e);p.c((p.data=e).auth)},p.b=function(e){var t=(p.list=(p.list||[]).concat(e||[])).shift();if(h===t)return p.name?p.err("Your user account is not published for dApps to access, please consider syncing it online, or allowing local access by adding your device as a peer."):r&&g--?void d.get("~@"+r).once(p.a):p.err("Wrong user or password.");d.get(t).once(p.a)},p.c=function(e){return h===e?p.b():"string"==typeof e?p.c(s(e)):void n.work(a,(p.auth=e).s,p.d,p.enc)},p.d=function(e){n.decrypt(p.auth.ek,e,p.e,p.enc)},p.e=function(e){if(h===e)return p.enc?(p.enc=null,p.b()):(p.enc={encode:"utf8"},p.c(p.auth));p.half=e,p.f(p.data)},p.f=function(e){var t=p.half||{},r=p.data||{};p.g(p.lol={pub:e.pub||r.pub,epub:e.epub||r.epub,priv:e.priv||t.priv,epriv:e.epriv||t.epriv})},p.g=function(e){if(!e||!e.pub||!e.epub)return p.b();p.pair=e;var t=d._.user,g=t._,y=(g.tag,g.opt);(g=t._=d.get("~"+e.pub)._).opt=y,t.is={pub:e.pub,epub:e.epub,alias:r||e.pub},g.sea=p.pair,f.ing=!1;try{a&&h==(s(f.root.graph["~"+e.pub].auth)||"")[":"]&&(u.shuffle=u.change=a)}catch(e){}if(u.change?p.z():(c||o)(g),n.window&&(l.back("user")._.opt||u).remember)try{var b={};(b=n.window.sessionStorage).recall=!0,b.pair=JSON.stringify(e)}catch(e){}try{d._.tag.auth?d._.on("auth",g):setTimeout((function(){d._.on("auth",g)}),1)}catch(e){i.log("Your 'auth' callback crashed with:",e)}},p.h=function(e){return e?((r=e.alias)||(r=e.alias="~"+t.pub),e.auth?(t=null,void p.c((p.data=e).auth)):p.g(t)):p.b()},p.z=function(){p.salt=String.random(64),n.work(u.change,p.salt,p.y)},p.y=function(e){n.encrypt({priv:p.pair.priv,epriv:p.pair.epriv},e,p.x,{raw:1})},p.x=function(e){p.w(JSON.stringify({ek:e,s:p.salt}))},p.w=function(e){if(u.shuffle){console.log("migrate core account from UTF8 & shuffle");var t={};Object.keys(p.data).forEach((function(e){t[e]=p.data[e]})),delete t._,t.auth=e,d.get("~"+p.pair.pub).put(t)}d.get("~"+p.pair.pub).get("auth").put(e,c||o)},p.err=function(e){var t={err:i.log(e||"User cannot be found!")};f.ing=!1,(c||o)(t)},p.plugin=function(e){if(!(p.name=e))return p.err();var t=[e];"~"!==e[0]&&(t[1]="~"+e,t[2]="~@"+e),p.b(t)},t?t.priv&&t.epriv?p.g(t):d.get("~"+t.pub).once(p.h):r?d.get("~@"+r).once(p.a):r||a||n.name(p.plugin),l}}))(t,"./auth"),t((function(e){var r=t("./user"),n=r.SEA;r.GUN,r.prototype.recall=function(e,t){var r=this,i=r.back(-1);if((e=e||{})&&e.sessionStorage){if(n.window)try{var o;(o=n.window.sessionStorage)&&(i._.opt.remember=!0,(r.back("user")._.opt||e).remember=!0,(o.recall||o.pair)&&i.user().auth(JSON.parse(o.pair),t))}catch(e){}return r}return r}}))(t,"./recall"),t((function(e){var r=t("./user"),n=r.SEA,i=r.GUN,o=function(){};r.prototype.pair=function(){var e,t=this;try{e=new Proxy({DANGER:"☠"},{get:function(e,r,n){if(t.is&&(t._||"").sea)return t._.sea[r]}})}catch(e){}return e},r.prototype.delete=async function(e,t,r){console.log("user.delete() IS DEPRECATED AND WILL BE MOVED TO A MODULE!!!");var n=this,s=(n.back(-1),n.back("user"));try{s.auth(e,t,(function(e){(s.is||{}).pub,s.map().once((function(){this.put(null)})),s.leave(),(r||o)({ok:0})}))}catch(e){i.log("User.delete failed! Error:",e)}return n},r.prototype.alive=async function(){console.log("user.alive() IS DEPRECATED!!!");const e=this.back(-1);try{return await authRecall(e),e._.user._}catch(e){const t="No session!";throw i.log(t),{err:t}}},r.prototype.trust=async function(e){console.log("`.trust` API MAY BE DELETED OR CHANGED OR RENAMED, DO NOT USE!"),i.is(e)&&e.get("pub").get(((e,t)=>{console.log(e,t)})),e.get("trust").get(path).put(theirPubkey)},r.prototype.grant=function(e,t){console.log("`.grant` API MAY BE DELETED OR CHANGED OR RENAMED, DO NOT USE!");var r=this,i=r.back(-1).user(),o=i._.sea,s="";return r.back((function(e){e.is||(s+=e.get||"")})),async function(){var r,a=await i.get("grant").get(o.pub).get(s).then();(a=await n.decrypt(a,o))||(a=n.random(16).toString(),r=await n.encrypt(a,o),i.get("grant").get(o.pub).get(s).put(r));var c=e.get("pub").then(),u=e.get("epub").then();c=await c,u=await u;var l=await n.secret(u,o);r=await n.encrypt(a,l),i.get("grant").get(c).get(s).put(r,t)}(),r},r.prototype.secret=function(e,t){console.log("`.secret` API MAY BE DELETED OR CHANGED OR RENAMED, DO NOT USE!");var r=this,i=r.back(-1).user(),o=i.pair(),s="";return r.back((function(e){e.is||(s+=e.get||"")})),async function(){var a,c=await i.get("trust").get(o.pub).get(s).then();(c=await n.decrypt(c,o))||(c=n.random(16).toString(),a=await n.encrypt(c,o),i.get("trust").get(o.pub).get(s).put(a)),a=await n.encrypt(e,c),r.put(a,t)}(),r},e.exports=r}))(t,"./share"),t((function(e){var r,n=t("./sea"),o=t("./settings"),s=(n.window||"").GUN||t((""+r==typeof i?".":"")+"./gun",1);function a(e){var t,r=this,i=r.as,o=e.put,c=o["#"],u=o["."],l=o[":"],f=o[">"],d=e["#"];if(c&&u)if((e._||"").faith&&(i.opt||"").faith&&"function"==typeof e._)n.opt.pack(o,(function(t){n.verify(t,!1,(function(t){o["="]=n.opt.unpack(t),r.to.next(e)}))}));else{var h=function(t){i.on("in",{"@":d,err:e.err=t})};(e._||"").DBG&&((e._||"").DBG.c=+new Date),0<=c.indexOf("<?")&&(t=parseFloat(c.split("<?")[1]||""))&&f<s.state()-1e3*t?(t=e._)&&t.stun&&t.stun--:"~@"!==c?"~@"!==c.slice(0,2)?(t=n.opt.pub(c))?a.pub(r,e,l,u,c,i,h,i.user||"",t):0<=c.indexOf("#")?a.hash(r,e,l,u,c,i,h):a.any(r,e,l,u,c,i,h,i.user||""):a.pubs(r,e,l,u,c,i,h):a.alias(r,e,l,u,c,i,h)}}s.on("opt",(function(e){e.sea||(e.sea={own:{}},e.on("put",a,e)),this.to.next(e)})),a.hash=function(e,t,r,i,o,s,a){n.work(r,null,(function(r){return r&&r===i.split("#").slice(-1)[0]||r&&r===function(e){let t="";for(let r=0;r<e.length;r++)t+=r-1&1?"":String.fromCharCode(parseInt(e.substring(r-1,r+1),16));return btoa(t)}(i.split("#").slice(-1)[0])?e.to.next(t):void a("Data hash not same as hash!")}),{name:"SHA-256"})},a.alias=function(e,t,r,n,i,o,s){return r?"~@"+n===u(r)?e.to.next(t):void s("Alias not same!"):s("Data must exist!")},a.pubs=function(e,t,r,n,i,o,s){return r?n===u(r)?e.to.next(t):void s("Alias not same!"):s("Alias must exist!")},a.pub=async function(e,t,i,a,c,l,f,d,h){var p;const g=await o.parse(i)||{},y=(i,o,u)=>{if(i.m&&i.s&&o&&h)return n.verify(i,h,(n=>{if(r!==n&&r!==n.e&&t.put[">"]&&t.put[">"]>parseFloat(n.e))return f("Certificate expired.");if(r!==n&&n.c&&n.w&&(n.c===o||n.c.indexOf("*")>-1)){let t=c.indexOf("/")>-1?c.replace(c.substring(0,c.indexOf("/")+1),""):"";String.match=String.match||s.text.match;const r=Array.isArray(n.w)?n.w:"object"==typeof n.w||"string"==typeof n.w?[n.w]:[];for(const s of r)if(String.match(t,s["#"])&&String.match(a,s["."])||!s["."]&&String.match(t,s["#"])||!s["#"]&&String.match(a,s["."])||String.match(t?t+"/"+a:a,s["#"]||s)){if(s["+"]&&s["+"].indexOf("*")>-1&&t&&-1==t.indexOf(o)&&-1==a.indexOf(o))return f(`Path "${t}" or key "${a}" must contain string "${o}".`);if(n.wb&&("string"==typeof n.wb||(n.wb||{})["#"])){var i=e.as.root.$.back(-1);return"string"==typeof n.wb&&"~"!==n.wb.slice(0,1)&&(i=i.get("~"+h)),i.get(n.wb).get(o).once((e=>!e||1!==e&&!0!==e?u(n):f(`Certificant ${o} blocked.`)))}return u(n)}return f("Certificate verification fail.")}}))};if("pub"===a&&"~"+h===c)return i===h?e.to.next(t):f("Account not same!");(p=d.is)&&p.pub&&!g["*"]&&!g["+"]&&(h===p.pub||h!==p.pub&&((t._.msg||{}).opt||{}).cert)?n.opt.pack(t.put,(s=>{n.sign(s,d._.sea,(async function(s){if(r===s)return f(n.err||"Signature fail.");if(t.put[":"]={":":p=n.opt.unpack(s.m),"~":s.s},t.put["="]=p,h===d.is.pub)return(p=u(i))&&((l.sea.own[p]=l.sea.own[p]||{})[h]=1),void JSON.stringifyAsync(t.put[":"],(function(r,n){return r?f(r||"Stringify error."):(t.put[":"]=n,e.to.next(t))}));if(h!==d.is.pub&&((t._.msg||{}).opt||{}).cert){const r=await o.parse(t._.msg.opt.cert);r&&r.m&&r.s&&y(r,d.is.pub,(n=>{t.put[":"]["+"]=r,t.put[":"]["*"]=d.is.pub,JSON.stringifyAsync(t.put[":"],(function(r,n){return r?f(r||"Stringify error."):(t.put[":"]=n,e.to.next(t))}))}))}}),{raw:1})})):n.opt.pack(t.put,(i=>{n.verify(i,g["*"]||h,(function(i){var o;return i=n.opt.unpack(i),r===i?f("Unverified data."):((o=u(i))&&h===n.opt.pub(o)&&((l.sea.own[o]=l.sea.own[o]||{})[h]=1),g["+"]&&g["+"].m&&g["+"].s&&g["*"]?void y(g["+"],g["*"],(r=>(t.put["="]=i,e.to.next(t)))):(t.put["="]=i,e.to.next(t)))}))}))},a.any=function(e,t,r,n,i,o,s,a){if(o.opt.secure)return s("Soul missing public key at '"+n+"'.");o.on("secure",(function(t){if(this.off(),!o.opt.secure)return e.to.next(t);s("Data cannot be changed.")})).on.on("secure",t)};var c=s.valid,u=function(e,t){return"string"==typeof(t=c(e))&&t},l=((s.state||"").ify,/[^\w_-]/);n.opt.pub=function(e){if(e&&(e=e.split("~"))&&(e=e[1])&&(e=e.split(l).slice(0,2))&&2==e.length&&"@"!==(e[0]||"")[0])return e.slice(0,2).join(".")},n.opt.stringy=function(e){},n.opt.pack=function(e,t,i,o,a){var c,u;if(n.opt.check(e))return t(e);e&&e["#"]&&e["."]&&e[">"]&&(c=e[":"],u=1),JSON.parseAsync(u?c:e,(function(n,c){var u=r!==(c||"")[":"]&&(c||"")["~"];t(u?{m:{"#":a||e["#"],".":i||e["."],":":(c||"")[":"],">":e[">"]||s.state.is(o,i)},s:u}:e)}))};var f=n.opt;n.opt.unpack=function(e,t,i){var o;if(r!==e){if(e&&r!==(o=e[":"]))return o;if(t=t||f.fall_key,!i&&f.fall_val&&((i={})[t]=f.fall_val),t&&i){if(e===i[t])return e;if(!n.opt.check(i[t]))return e;var a=i&&i._&&i._["#"]||f.fall_soul,c=s.state.is(i,t)||f.fall_state;return e&&4===e.length&&a===e[0]&&t===e[1]&&d(c)===d(e[3])?e[2]:c<n.opt.shuffle_attack?e:void 0}}},n.opt.shuffle_attack=15463296e5;var d=Math.floor}))(t,"./index")}()},8032:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(6328);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},8050:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnectorPlugin=void 0;const n=r(4586),i=r(7897),o=r(5628),s=r(3358);class a extends n.BasePlugin{name="nostr";version="1.0.0";description="Provides Bitcoin wallet connection and authentication for ShogunCore";bitcoinConnector=null;initialize(e){super.initialize(e),this.bitcoinConnector=new i.NostrConnector,(0,o.log)("Bitcoin wallet plugin initialized")}destroy(){this.bitcoinConnector&&this.bitcoinConnector.cleanup(),this.bitcoinConnector=null,super.destroy(),(0,o.log)("Bitcoin wallet plugin destroyed")}assertBitcoinConnector(){if(this.assertInitialized(),!this.bitcoinConnector)throw new Error("Bitcoin wallet module not initialized");return this.bitcoinConnector}isAvailable(){return this.assertBitcoinConnector().isAvailable()}isAlbyAvailable(){return(0,o.log)("Alby is deprecated, using Nostr instead"),this.isNostrExtensionAvailable()}isNostrExtensionAvailable(){return this.assertBitcoinConnector().isNostrExtensionAvailable()}async connectBitcoinWallet(e="nostr"){return"alby"===e&&((0,o.log)("Alby is deprecated, using Nostr instead"),e="nostr"),this.assertBitcoinConnector().connectWallet(e)}async generateCredentials(e){return(0,o.log)("Calling credential generation for Bitcoin wallet"),this.assertBitcoinConnector().generateCredentials(e)}cleanup(){this.assertBitcoinConnector().cleanup()}clearSignatureCache(e){this.assertBitcoinConnector().clearSignatureCache(e)}async verifySignature(e,t,r){return this.assertBitcoinConnector().verifySignature(e,t,r)}async generatePassword(e){return this.assertBitcoinConnector().generatePassword(e)}async login(e){(0,o.log)("Login with Bitcoin wallet");try{const t=this.assertInitialized();if((0,o.log)(`Bitcoin wallet login attempt for address: ${e}`),!e)throw(0,s.createError)(s.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Bitcoin address required for login");if(!this.isAvailable())throw(0,s.createError)(s.ErrorType.ENVIRONMENT,"BITCOIN_WALLET_UNAVAILABLE","No Bitcoin wallet available in the browser");(0,o.log)("Generating credentials for Bitcoin wallet login...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Bitcoin wallet credentials not generated correctly or signature missing");if((0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying Bitcoin wallet signature..."),!await this.verifySignature(r.message,r.signature,e))throw(0,o.logError)(`Signature verification failed for address: ${e}`),(0,s.createError)(s.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","Bitcoin wallet signature verification failed");(0,o.log)("Bitcoin wallet signature verified successfully."),t.setAuthMethod("nostr"),(0,o.log)("Logging in using core login method...");const n=await t.login(r.username,r.password);if(!n.success)throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"BITCOIN_LOGIN_FAILED",n.error||"Failed to log in with Bitcoin credentials");return t.emit("auth:login",{userPub:n.userPub,username:r.username,method:"bitcoin"}),n}catch(e){const t=e?.type||s.ErrorType.AUTHENTICATION,r=e?.code||"BITCOIN_LOGIN_ERROR",n=e?.message||"Unknown error during Bitcoin wallet login";return{success:!1,error:s.ErrorHandler.handle(t,r,n,e).message}}}async signUp(e){(0,o.log)("Sign up with Bitcoin wallet");try{const t=this.assertInitialized();if((0,o.log)(`Bitcoin wallet signup attempt for address: ${e}`),!e)throw(0,s.createError)(s.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Bitcoin address required for signup");if(!this.isAvailable())throw(0,s.createError)(s.ErrorType.ENVIRONMENT,"BITCOIN_WALLET_UNAVAILABLE","No Bitcoin wallet available in the browser");(0,o.log)("Generating credentials for Bitcoin wallet signup...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Bitcoin wallet credentials not generated correctly or signature missing");if((0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying Bitcoin wallet signature..."),!await this.verifySignature(r.message,r.signature,e))throw(0,o.logError)(`Signature verification failed for address: ${e}`),(0,s.createError)(s.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","Bitcoin wallet signature verification failed");(0,o.log)("Bitcoin wallet signature verified successfully."),t.setAuthMethod("nostr"),(0,o.log)("Signing up using core signUp method...");const n=await t.signUp(r.username,r.password);if(!n.success){if(n.error&&(n.error.includes("User already created")||n.error.includes("already created")||n.error.includes("già creato")))return{success:!1,error:"User already exists. Please try logging in instead. If login fails, try clearing the signature cache and registering again."};throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"BITCOIN_SIGNUP_FAILED",n.error||"Failed to sign up with Bitcoin credentials")}return t.emit("auth:signup",{userPub:n.userPub,username:r.username,method:"bitcoin"}),n}catch(e){const t=e?.type||s.ErrorType.AUTHENTICATION,r=e?.code||"BITCOIN_SIGNUP_ERROR",n=e?.message||"Unknown error during Bitcoin wallet signup";return{success:!1,error:s.ErrorHandler.handle(t,r,n,e).message}}}async loginWithBitcoinWallet(e){return this.login(e)}async signUpWithBitcoinWallet(e){return this.signUp(e)}}t.NostrConnectorPlugin=a},8051:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(2708),i=r(9879),o=r(2884),s=r(1898),a=r(3728),c=r(281),u=r(2688),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&c.isFunction(e.next)&&c.isFunction(e.error)&&c.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return u.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},8072:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(6808),i=r(5212),o=r(7214),s=r(5717),a=r(9724);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var c=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),c)),a.innerFrom(e).subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,c)),function(){null==i||i.unsubscribe(),i=null}}))}},8087:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(7478),i=r(7699);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},8089:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Connector=void 0;const n=r(4193),i=r(5628),o=r(3358),s=r(4134);class a extends s.EventEmitter{MESSAGE_TO_SIGN="I Love Shogun!";DEFAULT_CONFIG={cacheDuration:18e5,maxRetries:3,retryDelay:1e3,timeout:6e4};config;signatureCache=new Map;provider=null;customProvider=null;customWallet=null;constructor(e={}){super(),this.config={...this.DEFAULT_CONFIG,...e},this.initProvider(),this.setupEventListeners()}initProvider(){if("undefined"!=typeof window&&window.ethereum)try{this.provider=new n.ethers.BrowserProvider(window.ethereum),(0,i.logDebug)("BrowserProvider initialized successfully")}catch(e){(0,i.logError)("Failed to initialize BrowserProvider",e)}else(0,i.logWarn)("Window.ethereum is not available")}async setupProvider(){try{"undefined"!=typeof window&&window.ethereum?(this.provider=new n.ethers.BrowserProvider(window.ethereum),(0,i.logDebug)("BrowserProvider initialized successfully")):(0,i.logWarn)("Window.ethereum is not available")}catch(e){(0,i.logError)("Failed to initialize BrowserProvider",e)}}setupEventListeners(){this.provider&&(this.provider.on("network",((e,t)=>{this.emit("chainChanged",e)})),window.ethereum?.on&&window.ethereum.on("accountsChanged",(e=>{this.emit("accountsChanged",e)})))}cleanup(){this.provider&&this.provider.removeAllListeners(),this.removeAllListeners()}getCachedSignature(e){const t=this.signatureCache.get(e);return t?Date.now()-t.timestamp>this.config.cacheDuration?(this.signatureCache.delete(e),null):t.signature:null}cacheSignature(e,t){this.signatureCache.set(e,{signature:t,timestamp:Date.now(),address:e})}validateAddress(e){if(!e)throw new Error("Address not provided");try{const t=String(e).trim().toLowerCase();if(!n.ethers.isAddress(t))throw new Error("Invalid address format");return n.ethers.getAddress(t)}catch(e){throw o.ErrorHandler.handle(o.ErrorType.VALIDATION,"INVALID_ADDRESS","Invalid Ethereum address provided",e),e}}async connectMetaMask(){try{if((0,i.logDebug)("Attempting to connect to MetaMask..."),!this.provider&&((0,i.logDebug)("Provider not initialized, setting up..."),this.initProvider(),!this.provider))throw new Error("MetaMask is not available. Please install MetaMask extension.");(0,i.logDebug)("Requesting account access...");let e=[];if(window.ethereum)try{e=await window.ethereum.request({method:"eth_requestAccounts"}),(0,i.logDebug)(`Accounts requested successfully: ${e.length} accounts returned`)}catch(e){throw(0,i.logError)("Error requesting MetaMask accounts:",e),new Error("User denied account access")}e&&0!==e.length||(0,i.logDebug)("No accounts found, trying to get signer...");for(let e=1;e<=this.config.maxRetries;e++)try{(0,i.logDebug)(`Attempt ${e} to get signer...`);const t=await this.provider.getSigner(),r=await t.getAddress();if(!r)throw(0,i.logError)("No address returned from signer"),new Error("No accounts found in MetaMask");(0,i.logDebug)(`Signer address obtained: ${r}`);const n=`${r.toLowerCase()}`;return this.emit("connected",{address:r}),(0,i.logDebug)(`MetaMask connected successfully with address: ${r}`),{success:!0,address:r,username:n}}catch(t){if((0,i.logError)(`Error in connection attempt ${e}:`,t),e===this.config.maxRetries)throw t;(0,i.logDebug)(`Retrying in ${this.config.retryDelay}ms...`),await new Promise((e=>setTimeout(e,this.config.retryDelay)))}throw new Error("Failed to connect after retries")}catch(e){return(0,i.logError)("Failed to connect to MetaMask:",e),o.ErrorHandler.handle(o.ErrorType.NETWORK,"METAMASK_CONNECTION_ERROR",e.message??"Unknown error while connecting to MetaMask",e),{success:!1,error:e.message}}}async generateCredentials(e){(0,i.log)("Generating credentials for address:",e);try{const t=this.validateAddress(e);(0,i.log)("Valid Address:",t);const r=this.getCachedSignature(t);if(r)return(0,i.log)("Using cached signature for address:",t),this.generateCredentialsFromSignature(t,r);try{(0,i.log)("Request signature with timeout");const e=await this.requestSignatureWithTimeout(t,this.MESSAGE_TO_SIGN,this.config.timeout);return this.cacheSignature(t,e),this.generateCredentialsFromSignature(t,e)}catch(e){return(0,i.logWarn)(`Failed to get signature: ${e}. Using fallback method.`),this.generateFallbackCredentials(t)}}catch(e){throw o.ErrorHandler.handle(o.ErrorType.AUTHENTICATION,"CREDENTIALS_GENERATION_ERROR",e.message??"Error generating MetaMask credentials",e),e}}generateCredentialsFromSignature(e,t){return(0,i.log)("Generating credentials from signature"),{username:`${e.toLowerCase()}`,password:n.ethers.keccak256(n.ethers.toUtf8Bytes(`${t}:${e.toLowerCase()}`)),message:this.MESSAGE_TO_SIGN,signature:t}}generateFallbackCredentials(e){(0,i.logWarn)("Using fallback credentials generation for address:",e);const t=`mm_${e.toLowerCase()}`,r=`SHOGUN_FALLBACK:${e.toLowerCase()}`;return{username:t,password:n.ethers.keccak256(n.ethers.toUtf8Bytes(r)),message:r,signature:n.ethers.keccak256(n.ethers.toUtf8Bytes(r))}}static isMetaMaskAvailable(){const e=window.ethereum;return"undefined"!=typeof window&&void 0!==e&&!0===e?.isMetaMask}requestSignatureWithTimeout(e,t,r=3e4){return new Promise(((n,o)=>{let s=setTimeout((()=>{s=null,o(new Error("Timeout requesting signature"))}),r);const a=()=>{s&&(clearTimeout(s),s=null),window.ethereum?.removeListener&&window.ethereum.removeListener("accountsChanged",c)},c=e=>{a(),o(e)};return window.ethereum?.on&&window.ethereum.on("accountsChanged",c),(0,i.log)("Initialize and Sign"),(async()=>{try{if(!this.provider&&(this.initProvider(),!this.provider))throw new Error("Provider not initialized");const r=await this.provider.getSigner(),o=await r.getAddress();if((0,i.log)("Signer:",r),(0,i.log)("Signer Address:",o),o.toLowerCase()!==e.toLowerCase())throw new Error(`Signer address (${o}) does not match expected address (${e})`);(0,i.log)(`Requesting signature for message: ${t}`);const s=await r.signMessage(t);(0,i.log)("Signature obtained successfully"),a(),n(s)}catch(e){(0,i.logError)("Failed to request signature:",e),a(),o(e)}})()}))}isAvailable(){return"undefined"!=typeof window&&!!window.ethereum}setCustomProvider(e,t){if(!e||"string"!=typeof e)throw new Error("Invalid RPC URL");if(!t||"string"!=typeof t)throw new Error("Invalid private key");try{this.customProvider=new n.ethers.JsonRpcProvider(e),this.customWallet=new n.ethers.Wallet(t,this.customProvider),(0,i.logDebug)("Custom provider configured successfully")}catch(e){throw new Error(`Error configuring provider: ${e.message??"Unknown error"}`)}}async getSigner(){try{if(this.customWallet)return this.customWallet;if(this.provider||this.initProvider(),!this.provider)throw new Error("Provider not initialized");return await this.provider.getSigner()}catch(e){throw new Error(`Unable to get Ethereum signer: ${e.message||"Unknown error"}`)}}async getProvider(){return this.customProvider?this.customProvider:(this.provider||this.initProvider(),this.provider)}async generatePassword(e){if(!e)throw new Error("Invalid signature");return n.ethers.keccak256(n.ethers.toUtf8Bytes(e)).slice(2,66)}async verifySignature(e,t){if(!e||!t)throw new Error("Invalid message or signature");try{return n.ethers.verifyMessage(e,t)}catch(e){throw new Error("Invalid message or signature")}}async getEthereumSigner(){if(!a.isMetaMaskAvailable())throw new Error("MetaMask not found. Please install MetaMask to continue.");try{const e=window.ethereum;return await e.request({method:"eth_requestAccounts"}),new n.ethers.BrowserProvider(e).getSigner()}catch(e){throw new Error(`Error accessing MetaMask: ${e.message??"Unknown error"}`)}}}t.Web3Connector=a,"undefined"!=typeof window?window.Web3Connector=a:void 0!==r.g&&(r.g.Web3Connector=a)},8098:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3ConnectorPlugin=void 0;const n=r(4586),i=r(8089),o=r(5628),s=r(4193),a=r(3358);class c extends n.BasePlugin{name="web3";version="1.0.0";description="Provides Ethereum wallet connection and authentication for ShogunCore";metamask=null;initialize(e){super.initialize(e),this.metamask=new i.Web3Connector,(0,o.log)("MetaMask plugin initialized")}destroy(){this.metamask&&this.metamask.cleanup(),this.metamask=null,super.destroy(),(0,o.log)("MetaMask plugin destroyed")}assertMetaMask(){if(this.assertInitialized(),!this.metamask)throw new Error("MetaMask module not initialized");return this.metamask}isAvailable(){return this.assertMetaMask().isAvailable()}async connectMetaMask(){return this.assertMetaMask().connectMetaMask()}async generateCredentials(e){return(0,o.log)("Calling credential generation"),this.assertMetaMask().generateCredentials(e)}cleanup(){this.assertMetaMask().cleanup()}setCustomProvider(e,t){this.assertMetaMask().setCustomProvider(e,t)}async getSigner(){return this.assertMetaMask().getSigner()}async getProvider(){return this.assertMetaMask().getProvider()}async generatePassword(e){return this.assertMetaMask().generatePassword(e)}async verifySignature(e,t){return this.assertMetaMask().verifySignature(e,t)}async login(e){(0,o.log)("Login with MetaMask");try{const t=this.assertInitialized();if((0,o.log)(`MetaMask login attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Ethereum address required for MetaMask login");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"METAMASK_UNAVAILABLE","MetaMask is not available in the browser");(0,o.log)("Generating credentials for MetaMask login...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","MetaMask credentials not generated correctly or signature missing");(0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying MetaMask signature...");const n=s.ethers.verifyMessage(r.message,r.signature);if(n.toLowerCase()!==e.toLowerCase())throw(0,o.logError)(`Signature verification failed. Expected: ${e}, Got: ${n}`),(0,a.createError)(a.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","MetaMask signature verification failed. Address mismatch.");(0,o.log)("MetaMask signature verified successfully."),t.setAuthMethod("web3"),(0,o.log)("Logging in using core login method...");const i=await t.login(r.username,r.password);if(!i.success)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"METAMASK_LOGIN_FAILED",i.error||"Failed to log in with MetaMask credentials");return t.emit("auth:login",{userPub:i.userPub,username:r.username,method:"metamask"}),i}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"METAMASK_LOGIN_ERROR",n=e?.message||"Unknown error during MetaMask login";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}async signUp(e){(0,o.log)("Sign up with MetaMask");try{const t=this.assertInitialized();if((0,o.log)(`MetaMask registration attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Ethereum address required for MetaMask registration");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"METAMASK_UNAVAILABLE","MetaMask is not available in the browser");(0,o.log)("Generating credentials for MetaMask registration...");const r=await this.generateCredentials(e);if(!(r?.username&&r?.password&&r.signature&&r.message))throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","MetaMask credentials not generated correctly or signature missing");(0,o.log)(`Credentials generated successfully. Username: ${r.username}`),(0,o.log)("Verifying MetaMask signature...");const n=s.ethers.verifyMessage(r.message,r.signature);if(n.toLowerCase()!==e.toLowerCase())throw(0,o.logError)(`Signature verification failed. Expected: ${e}, Got: ${n}`),(0,a.createError)(a.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","MetaMask signature verification failed. Address mismatch.");(0,o.log)("MetaMask signature verified successfully."),t.setAuthMethod("web3"),(0,o.log)("Signing up using core signUp method...");const i=await t.signUp(r.username,r.password);if(!i.success)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"METAMASK_SIGNUP_FAILED",i.error||"Failed to sign up with MetaMask credentials");return t.emit("auth:signup",{userPub:i.userPub,username:r.username,method:"metamask"}),i}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"METAMASK_SIGNUP_ERROR",n=e?.message||"Unknown error during MetaMask registration";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}async loginWithMetaMask(e){return this.login(e)}async signUpWithMetaMask(e){return this.signUp(e)}}t.Web3ConnectorPlugin=c},8156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(197),t),i(r(5307),t)},8165:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=t.OFB=t.ECB=t.CTR=t.CFB=t.CBC=t.ModeOfOperation=t.AES=void 0;var n=r(6013);Object.defineProperty(t,"AES",{enumerable:!0,get:function(){return n.AES}});var i=r(6342);Object.defineProperty(t,"ModeOfOperation",{enumerable:!0,get:function(){return i.ModeOfOperation}});var o=r(2977);Object.defineProperty(t,"CBC",{enumerable:!0,get:function(){return o.CBC}});var s=r(7609);Object.defineProperty(t,"CFB",{enumerable:!0,get:function(){return s.CFB}});var a=r(4164);Object.defineProperty(t,"CTR",{enumerable:!0,get:function(){return a.CTR}});var c=r(1485);Object.defineProperty(t,"ECB",{enumerable:!0,get:function(){return c.ECB}});var u=r(226);Object.defineProperty(t,"OFB",{enumerable:!0,get:function(){return u.OFB}});var l=r(8420);Object.defineProperty(t,"pkcs7Pad",{enumerable:!0,get:function(){return l.pkcs7Pad}}),Object.defineProperty(t,"pkcs7Strip",{enumerable:!0,get:function(){return l.pkcs7Strip}})},8166:function(e,t){"use strict";function r(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=e,i}Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=t.resolveProperties=void 0,t.resolveProperties=async function(e){const t=Object.keys(e);return(await Promise.all(t.map((t=>Promise.resolve(e[t]))))).reduce(((e,r,n)=>(e[t[n]]=r,e)),{})},t.defineProperties=function(e,t,n){for(let i in t){let o=t[i];const s=n?n[i]:null;s&&r(o,s,i),Object.defineProperty(e,i,{enumerable:!0,value:o,writable:!1})}}},8183:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(5212),i=r(7214);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},8246:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(8051),i=r(439),o=r(7058),s=r(7699),a=r(3916),c=r(6404),u=r(5810),l=r(7214),f=r(8619);function d(e,t,r){return void 0===r&&(r=s.identity),function(n){h(t,(function(){for(var i=e.length,s=new Array(i),a=i,c=i,u=function(i){h(t,(function(){var u=o.from(e[i],t),f=!1;u.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,c--),c||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)u(f)}),n)}}function h(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=c.popScheduler(e),l=c.popResultSelector(e),f=i.argsArgArrayOrObject(e),h=f.args,p=f.keys;if(0===h.length)return o.from([],r);var g=new n.Observable(d(h,r,p?function(e){return u.createObject(p,e)}:s.identity));return l?g.pipe(a.mapOneOrManyArgs(l)):g},t.combineLatestInit=d},8263:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(281);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},8269:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(7058);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},8284:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},8287:function(e,t,r){"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(e,o+n)!==u(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Q(n))return s;e[r+s]=n}return s}function A(e,t,r,n){return J(V(t,e.length-r),e,r,n)}function E(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function P(e,t,r,n){return J($(t),e,r,n)}function O(e,t,r,n){return J(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},c.allocUnsafe=function(e){return f(e)},c.allocUnsafeSlow=function(e){return f(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(q(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(u[e]!==l[e]){o=u[e],s=l[e];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return P(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function R(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function B(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Z((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Z((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const L={};function D(e,t,r){L[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function H(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new L.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,i,o)}function z(e,t){if("number"!=typeof e)throw new L.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw z(e,r),new L.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new L.ERR_BUFFER_OUT_OF_BOUNDS;throw new L.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=G(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function $(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},8394:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWallet=void 0;const n=r(646),i=r(1181),o=r(3996),s=r(7778),a=r(5347);class c extends o.AbstractSigner{address;#st;constructor(e,t){super(t),(0,a.assertArgument)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#st=e;const r=(0,s.computeAddress)(this.signingKey.publicKey);(0,a.defineProperties)(this,{address:r})}get signingKey(){return this.#st}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new c(this.#st,e)}async signTransaction(e){e=(0,o.copyRequest)(e);const{to:t,from:r}=await(0,a.resolveProperties)({to:e.to?(0,n.resolveAddress)(e.to,this):void 0,from:e.from?(0,n.resolveAddress)(e.from,this):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&((0,a.assertArgument)((0,n.getAddress)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const i=s.Transaction.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign((0,i.hashMessage)(e)).serialized}authorizeSync(e){(0,a.assertArgument)("string"==typeof e.address,"invalid address for authorizeSync","auth.address",e);const t=this.signingKey.sign((0,i.hashAuthorization)(e));return Object.assign({},{address:(0,n.getAddress)(e.address),nonce:(0,a.getBigInt)(e.nonce||0),chainId:(0,a.getBigInt)(e.chainId||0)},{signature:t})}async authorize(e){return e=Object.assign({},e,{address:await(0,n.resolveAddress)(e.address,this)}),this.authorizeSync(await this.populateAuthorization(e))}async signTypedData(e,t,r){const n=await i.TypedDataEncoder.resolveNames(e,t,r,(async e=>{(0,a.assert)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const t=await this.provider.resolveName(e);return(0,a.assert)(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t}));return this.signingKey.sign(i.TypedDataEncoder.hash(n.domain,t,n.value)).serialized}}t.BaseWallet=c},8420:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=void 0,t.pkcs7Pad=function(e){const t=16-e.length%16,r=new Uint8Array(e.length+t);r.set(e);for(let n=e.length;n<r.length;n++)r[n]=t;return r},t.pkcs7Strip=function(e){if(e.length<16)throw new TypeError("PKCS#7 invalid length");const t=e[e.length-1];if(t>16)throw new TypeError("PKCS#7 padding byte out of range");const r=e.length-t;for(let n=0;n<t;n++)if(e[r+n]!==t)throw new TypeError("PKCS#7 invalid padding byte");return new Uint8Array(e.subarray(0,r))}},8456:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=t.Result=t.TransactionDescription=t.LogDescription=t.ErrorDescription=t.Interface=t.Indexed=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.Fragment=t.FallbackFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.encodeBytes32String=t.decodeBytes32String=t.AbiCoder=void 0;var n=r(954);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return n.AbiCoder}});var i=r(9414);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}});var o=r(189);Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return o.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return o.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return o.EventFragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return o.FallbackFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return o.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return o.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return o.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return o.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return o.StructFragment}});var s=r(5863);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return s.ErrorDescription}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return s.Result}});var a=r(9976);Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return a.Typed}})},8461:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(680),i=r(5212);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},8464:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(4359),i=r(281),o=r(7812);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},8510:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(2623),i=r(9175),o=r(4967),s=r(1705),a=r(1484),c=r(1761),u=r(3562),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),h=BigInt(2),p=(e,t)=>(e+t/h)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),f=e*e*e%t,d=f*f*e%t,p=(0,o.pow2)(d,r,t)*d%t,g=(0,o.pow2)(p,r,t)*d%t,b=(0,o.pow2)(g,h,t)*f%t,m=(0,o.pow2)(b,i,t)*b%t,v=(0,o.pow2)(m,s,t)*m%t,w=(0,o.pow2)(v,c,t)*v%t,A=(0,o.pow2)(w,u,t)*w%t,E=(0,o.pow2)(A,c,t)*v%t,P=(0,o.pow2)(E,r,t)*d%t,O=(0,o.pow2)(P,a,t)*m%t,S=(0,o.pow2)(O,n,t)*f%t,_=(0,o.pow2)(S,h,t);if(!y.eql(y.sqr(_),e))throw new Error("Cannot find square root");return _}const y=(0,o.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),c=p(s*e,t),u=p(-n*e,t);let l=(0,o.mod)(e-c*r-u*i,t),h=(0,o.mod)(-c*n-u*s,t);const g=l>a,y=h>a;if(g&&(l=t-l),y&&(h=t-h),l>a||h>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:y,k2:h}}}},n.sha256);const b=BigInt(0),m=e=>"bigint"==typeof e&&b<e&&e<l,v={};function w(e,...t){let r=v[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,a.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,a.concatBytes)(r,...t))}const A=e=>e.toRawBytes(!0).slice(1),E=e=>(0,a.numberToBytesBE)(e,32),P=e=>(0,o.mod)(e,l),O=e=>(0,o.mod)(e,f),S=t.secp256k1.ProjectivePoint;function _(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=S.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:O(-r),bytes:A(n)}}function k(e){if(!m(e))throw new Error("bad x: need 0 < x < p");const t=P(e*e);let r=g(P(t*e+BigInt(7)));r%h!==b&&(r=P(-r));const n=new S(e,r,d);return n.assertValidity(),n}function T(...e){return O((0,a.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function x(e,t,r){const n=(0,a.ensureBytes)("signature",e,64),i=(0,a.ensureBytes)("message",t),o=(0,a.ensureBytes)("publicKey",r,32);try{const e=k((0,a.bytesToNumberBE)(o)),t=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!m(t))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&b<l&&l<f))return!1;const d=T(E(t),A(e),i),h=(s=e,c=r,u=O(-d),S.BASE.multiplyAndAddUnsafe(s,c,u));return!(!h||!h.hasEvenY()||h.toAffine().x!==t)}catch(e){return!1}var s,c,u,l}t.schnorr={getPublicKey:function(e){return _(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,a.ensureBytes)("message",e),{bytes:o,scalar:s}=_(t),c=(0,a.ensureBytes)("auxRand",r,32),u=E(s^(0,a.bytesToNumberBE)(w("BIP0340/aux",c))),l=w("BIP0340/nonce",u,o,n),f=O((0,a.bytesToNumberBE)(l));if(f===b)throw new Error("sign failed: k is zero");const{bytes:d,scalar:h}=_(f),p=T(d,o,n),g=new Uint8Array(64);if(g.set(d,0),g.set(E(O(h+p*s)),32),!x(g,n,o))throw new Error("sign: Invalid signature produced");return g},verify:x,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:k,pointToBytes:A,numberToBytesBE:a.numberToBytesBE,bytesToNumberBE:a.bytesToNumberBE,taggedHash:w,mod:o.mod}};const I=(()=>(0,c.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),R=(()=>(0,s.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),C=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=R(y.create(e[0]));return I(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=C.hashToCurve,t.encodeToCurve=C.encodeToCurve},8531:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(7214);t.scanInternals=function(e,t,r,i,o){return function(s,a){var c=r,u=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;u=c?e(u,t,r):(c=!0,t),i&&a.next(u)}),o&&function(){c&&a.next(u),a.complete()}))}}},8567:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase58=t.encodeBase58=void 0;const n=r(7415),i=r(1500),o=r(6508),s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let a=null;function c(e){if(null==a){a={};for(let e=0;e<58;e++)a[s[e]]=BigInt(e)}const t=a[e];return(0,i.assertArgument)(null!=t,"invalid base58 value","letter",e),t}const u=BigInt(0),l=BigInt(58);t.encodeBase58=function(e){const t=(0,n.getBytes)(e);let r=(0,o.toBigInt)(t),i="";for(;r;)i=s[Number(r%l)]+i,r/=l;for(let e=0;e<t.length&&!t[e];e++)i=s[0]+i;return i},t.decodeBase58=function(e){let t=u;for(let r=0;r<e.length;r++)t*=l,t+=c(e[r]);return t}},8589:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(2070);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},8590:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(6808),i=r(8051),o=r(5884),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,c=void 0===a||a,u=n(),l=new i.Observable((function(e){return u.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(u),c&&r.add((function(){return u=n()}))),r},l}},8596:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(281);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},8616:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9724),o=r(8051),s=r(7478),a=r(4975),c=r(281),u=r(3916),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],d=["on","off"];function h(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,p,g){if(c.isFunction(p)&&(g=p,p=void 0),g)return e(t,r,p).pipe(u.mapOneOrManyArgs(g));var y=n(function(e){return c.isFunction(e.addEventListener)&&c.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,p)}})):function(e){return c.isFunction(e.addListener)&&c.isFunction(e.removeListener)}(t)?l.map(h(t,r)):function(e){return c.isFunction(e.on)&&c.isFunction(e.off)}(t)?d.map(h(t,r)):[],2),b=y[0],m=y[1];if(!b&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,p)}))(i.innerFrom(t));if(!b)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return b(t),function(){return m(t)}}))}},8619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},8634:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spelunk=t.getPassword=t.zpad=t.looseArrayify=void 0;const n=r(5347);function i(e){return"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),(0,n.getBytesCopy)(e)}t.looseArrayify=i,t.zpad=function(e,t){for(e=String(e);e.length<t;)e="0"+e;return e},t.getPassword=function(e){return"string"==typeof e?(0,n.toUtf8Bytes)(e,"NFKC"):(0,n.getBytesCopy)(e)},t.spelunk=function(e,t){const r=t.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);(0,n.assertArgument)(null!=r,"invalid path","path",t);const o=r[1],s=r[3],a="!"===r[4];let c=e;for(const e of o.toLowerCase().split(".")){if(Array.isArray(c)){if(!e.match(/^[0-9]+$/))break;c=c[parseInt(e)]}else if("object"==typeof c){let t=null;for(const r in c)if(r.toLowerCase()===e){t=c[r];break}c=t}else c=null;if(null==c)break}if((0,n.assertArgument)(!a||null!=c,"missing required value","path",o),s&&null!=c){if("int"===s){if("string"==typeof c&&c.match(/^-?[0-9]+$/))return parseInt(c);if(Number.isSafeInteger(c))return c}if("number"===s&&"string"==typeof c&&c.match(/^-?[0-9.]*$/))return parseFloat(c);if("data"===s&&"string"==typeof c)return i(c);if("array"===s&&Array.isArray(c))return c;if(s===typeof c)return c;(0,n.assertArgument)(!1,`wrong type found for ${s} `,"path",o)}return c}},8672:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractProvider=t.UnmanagedSubscriber=void 0;const n=r(646),i=r(1295),o=r(9288),s=r(1181),a=r(7778),c=r(5347),u=r(1691),l=r(5601),f=r(5317),d=r(3807),h=r(4338),p=BigInt(2);function g(e){return e&&"function"==typeof e.then}function y(e,t){return e+":"+JSON.stringify(t,((e,t)=>{if(null==t)return"null";if("bigint"==typeof t)return`bigint:${t.toString()}`;if("string"==typeof t)return t.toLowerCase();if("object"==typeof t&&!Array.isArray(t)){const e=Object.keys(t);return e.sort(),e.reduce(((e,r)=>(e[r]=t[r],e)),{})}return t}))}class b{name;constructor(e){(0,c.defineProperties)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function m(e){return(e=Array.from(new Set(e).values())).sort(),e}async function v(e,t){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,c.isHexString)(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:y("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:y("orphan",t),filter:(r=t,JSON.parse(JSON.stringify(r)))}}var r;if(e.address||e.topics){const r=e,i={topics:(r.topics||[]).map((e=>null==e?null:Array.isArray(e)?m(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(r.address){const e=[],o=[],s=r=>{(0,c.isHexString)(r)?e.push(r):o.push((async()=>{e.push(await(0,n.resolveAddress)(r,t))})())};Array.isArray(r.address)?r.address.forEach(s):s(r.address),o.length&&await Promise.all(o),i.address=m(e.map((e=>e.toLowerCase())))}return{filter:i,tag:y("event",i),type:"event"}}(0,c.assertArgument)(!1,"unknown ProviderEvent","event",e)}function w(){return(new Date).getTime()}t.UnmanagedSubscriber=b;const A={cacheTimeout:250,pollingInterval:4e3};function E(e,t){try{const r=P(e,t);if(r)return(0,c.toUtf8String)(r)}catch(e){}return null}function P(e,t){if("0x"===e)return null;try{const r=(0,c.getNumber)((0,c.dataSlice)(e,t,t+32)),n=(0,c.getNumber)((0,c.dataSlice)(e,r,r+32));return(0,c.dataSlice)(e,r+32,r+32+n)}catch(e){}return null}function O(e){const t=(0,c.toBeArray)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function S(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}t.AbstractProvider=class{#pe;#Ue;#at;#ct;#ut;#lt;#ft;#dt;#ht;#pt;#gt;#j;constructor(e,t){if(this.#j=Object.assign({},A,t||{}),"any"===e)this.#lt=!0,this.#ut=null;else if(e){const t=f.Network.from(e);this.#lt=!1,this.#ut=Promise.resolve(t),setTimeout((()=>{this.emit("network",t,null)}),0)}else this.#lt=!1,this.#ut=null;this.#dt=-1,this.#ft=new Map,this.#pe=new Map,this.#Ue=new Map,this.#at=null,this.#ct=!1,this.#ht=1,this.#pt=new Map,this.#gt=!1}get pollingInterval(){return this.#j.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#Ue.values())}attachPlugin(e){if(this.#Ue.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#Ue.set(e.name,e.connect(this)),this}getPlugin(e){return this.#Ue.get(e)||null}get disableCcipRead(){return this.#gt}set disableCcipRead(e){this.#gt=!!e}async#yt(e){const t=this.#j.cacheTimeout;if(t<0)return await this._perform(e);const r=y(e.method,e);let n=this.#ft.get(r);return n||(n=this._perform(e),this.#ft.set(r,n),setTimeout((()=>{this.#ft.get(r)===n&&this.#ft.delete(r)}),t)),await n}async ccipReadFetch(e,t,r){if(this.disableCcipRead||0===r.length||null==e.to)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let t=0;t<r.length;t++){const s=r[t],a=s.replace("{sender}",n).replace("{data}",i),u=new c.FetchRequest(a);-1===s.indexOf("{data}")&&(u.body={data:i,sender:n}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:u,index:t,urls:r});let l,f="unknown error";try{l=await u.send()}catch(e){o.push(e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:{error:e}});continue}try{const e=l.bodyJson;if(e.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:u,result:e}),e.data;e.message&&(f=e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:e})}catch(e){}(0,c.assert)(l.statusCode<400||l.statusCode>=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:s,errorMessage:f}}),o.push(f)}(0,c.assert)(!1,`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,t){return new d.Block((0,l.formatBlock)(e),this)}_wrapLog(e,t){return new d.Log((0,l.formatLog)(e),this)}_wrapTransactionReceipt(e,t){return new d.TransactionReceipt((0,l.formatTransactionReceipt)(e),this)}_wrapTransactionResponse(e,t){return new d.TransactionResponse((0,l.formatTransactionResponse)(e),this)}_detectNetwork(){(0,c.assert)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,c.assert)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=(0,c.getNumber)(await this.#yt({method:"getBlockNumber"}),"%response");return this.#dt>=0&&(this.#dt=e),e}_getAddress(e){return(0,n.resolveAddress)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,c.isHexString)(e)?(0,c.isHexString)(e,32)?e:(0,c.toQuantity)(e):("bigint"==typeof e&&(e=(0,c.getNumber)(e,"blockTag")),"number"==typeof e?e>=0?(0,c.toQuantity)(e):this.#dt>=0?(0,c.toQuantity)(this.#dt+e):this.getBlockNumber().then((t=>(0,c.toQuantity)(t+e))):void(0,c.assertArgument)(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const t=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?m(e.map((e=>e.toLowerCase()))):e.toLowerCase())),r="blockHash"in e?e.blockHash:void 0,n=(e,n,i)=>{let o;switch(e.length){case 0:break;case 1:o=e[0];break;default:e.sort(),o=e}if(r&&(null!=n||null!=i))throw new Error("invalid filter");const s={};return o&&(s.address=o),t.length&&(s.topics=t),n&&(s.fromBlock=n),i&&(s.toBlock=i),r&&(s.blockHash=r),s};let i,o,s=[];if(e.address)if(Array.isArray(e.address))for(const t of e.address)s.push(this._getAddress(t));else s.push(this._getAddress(e.address));return"fromBlock"in e&&(i=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),s.filter((e=>"string"!=typeof e)).length||null!=i&&"string"!=typeof i||null!=o&&"string"!=typeof o?Promise.all([Promise.all(s),i,o]).then((e=>n(e[0],e[1],e[2]))):n(s,i,o)}_getTransactionRequest(e){const t=(0,d.copyRequest)(e),r=[];if(["to","from"].forEach((e=>{if(null==t[e])return;const i=(0,n.resolveAddress)(t[e],this);g(i)?r.push(async function(){t[e]=await i}()):t[e]=i})),null!=t.blockTag){const e=this._getBlockTag(t.blockTag);g(e)?r.push(async function(){t.blockTag=await e}()):t.blockTag=e}return r.length?async function(){return await Promise.all(r),t}():t}async getNetwork(){if(null==this.#ut){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#ut===e&&(this.#ut=null),t}})();return this.#ut=e,(await e).clone()}const e=this.#ut,[t,r]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==r.chainId&&(this.#lt?(this.emit("network",r,t),this.#ut===e&&(this.#ut=Promise.resolve(r))):(0,c.assert)(!1,`network changed: ${t.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:t,gasPrice:r,priorityFee:n}=await(0,c.resolveProperties)({_block:this.#bt("latest",!1),gasPrice:(async()=>{try{const e=await this.#yt({method:"getGasPrice"});return(0,c.getBigInt)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{const e=await this.#yt({method:"getPriorityFee"});return(0,c.getBigInt)(e,"%response")}catch(e){}return null})()});let i=null,o=null;const s=this._wrapBlock(t,e);return s&&s.baseFeePerGas&&(o=null!=n?n:BigInt("1000000000"),i=s.baseFeePerGas*p+o),new d.FeeData(r,i,o)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const e=new c.FetchRequest(r.url),n=await r.processFunc(t,this,e);return new d.FeeData(n.gasPrice,n.maxFeePerGas,n.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return g(t)&&(t=await t),(0,c.getBigInt)(await this.#yt({method:"estimateGas",transaction:t}),"%response")}async#mt(e,t,r){(0,c.assert)(r<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});const i=(0,d.copyRequest)(e);try{return(0,c.hexlify)(await this._perform({method:"call",transaction:i,blockTag:t}))}catch(e){if(!this.disableCcipRead&&(0,c.isCallException)(e)&&e.data&&r>=0&&"latest"===t&&null!=i.to&&"0x556f1830"===(0,c.dataSlice)(e.data,0,4)){const o=e.data,s=await(0,n.resolveAddress)(i.to,this);let a;try{a=function(e){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,c.assert)((0,c.dataLength)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=(0,c.dataSlice)(e,0,32);(0,c.assert)((0,c.dataSlice)(r,0,12)===(0,c.dataSlice)(T,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=(0,c.dataSlice)(r,12);try{const r=[],n=(0,c.getNumber)((0,c.dataSlice)(e,32,64)),i=(0,c.getNumber)((0,c.dataSlice)(e,n,n+32)),o=(0,c.dataSlice)(e,n+32);for(let e=0;e<i;e++){const t=E(o,32*e);if(null==t)throw new Error("abort");r.push(t)}t.urls=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=P(e,64);if(null==r)throw new Error("abort");t.calldata=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}(0,c.assert)((0,c.dataSlice)(e,100,128)===(0,c.dataSlice)(T,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=(0,c.dataSlice)(e,96,100);try{const r=P(e,128);if(null==r)throw new Error("abort");t.extraData=r}catch(e){(0,c.assert)(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map((e=>t[e])),t}((0,c.dataSlice)(e.data,4))}catch(e){(0,c.assert)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}(0,c.assert)(a.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:a.errorArgs}});const u=await this.ccipReadFetch(i,a.calldata,a.urls);(0,c.assert)(null!=u,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:e.data,errorArgs:a.errorArgs}});const l={to:s,data:(0,c.concat)([a.selector,k([u,a.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const e=await this.#mt(l,t,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:e}),e}}throw e}}async#vt(e){const{value:t}=await(0,c.resolveProperties)({network:this.getNetwork(),value:e});return t}async call(e){const{tx:t,blockTag:r}=await(0,c.resolveProperties)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#vt(this.#mt(t,r,e.enableCcipRead?0:-1))}async#wt(e,t,r){let n=this._getAddress(t),i=this._getBlockTag(r);return"string"==typeof n&&"string"==typeof i||([n,i]=await Promise.all([n,i])),await this.#vt(this.#yt(Object.assign(e,{address:n,blockTag:i})))}async getBalance(e,t){return(0,c.getBigInt)(await this.#wt({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return(0,c.getNumber)(await this.#wt({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return(0,c.hexlify)(await this.#wt({method:"getCode"},e,t))}async getStorage(e,t,r){const n=(0,c.getBigInt)(t,"position");return(0,c.hexlify)(await this.#wt({method:"getStorage",position:n},e,r))}async broadcastTransaction(e){const{blockNumber:t,hash:r,network:n}=await(0,c.resolveProperties)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=a.Transaction.from(e);if(i.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,n).replaceableTransaction(t)}async#bt(e,t){if((0,c.isHexString)(e,32))return await this.#yt({method:"getBlock",blockHash:e,includeTransactions:t});let r=this._getBlockTag(e);return"string"!=typeof r&&(r=await r),await this.#yt({method:"getBlock",blockTag:r,includeTransactions:t})}async getBlock(e,t){const{network:r,params:n}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#bt(e,!!t)});return null==n?null:this._wrapBlock(n,r)}async getTransaction(e){const{network:t,params:r}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#yt({method:"getTransaction",hash:e})});return null==r?null:this._wrapTransactionResponse(r,t)}async getTransactionReceipt(e){const{network:t,params:r}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#yt({method:"getTransactionReceipt",hash:e})});if(null==r)return null;if(null==r.gasPrice&&null==r.effectiveGasPrice){const t=await this.#yt({method:"getTransaction",hash:e});if(null==t)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(r,t)}async getTransactionResult(e){const{result:t}=await(0,c.resolveProperties)({network:this.getNetwork(),result:this.#yt({method:"getTransactionResult",hash:e})});return null==t?null:(0,c.hexlify)(t)}async getLogs(e){let t=this._getFilter(e);g(t)&&(t=await t);const{network:r,params:n}=await(0,c.resolveProperties)({network:this.getNetwork(),params:this.#yt({method:"getLogs",filter:t})});return n.map((e=>this._wrapLog(e,r)))}_getProvider(e){(0,c.assert)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await u.EnsResolver.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=(0,n.getAddress)(e);const t=(0,s.namehash)(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await u.EnsResolver.getEnsAddress(this),n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],this),s=await n.resolver(t);if(null==s||s===i.ZeroAddress)return null;const a=new o.Contract(s,["function name(bytes32) view returns (string)"],this),c=await a.name(t);return await this.resolveName(c)!==e?null:c}catch(e){if((0,c.isError)(e,"BAD_DATA")&&"0x"===e.value)return null;if((0,c.isError)(e,"CALL_EXCEPTION"))return null;throw e}}async waitForTransaction(e,t,r){const n=null!=t?t:1;return 0===n?this.getTransactionReceipt(e):new Promise((async(t,i)=>{let o=null;const s=async r=>{try{const i=await this.getTransactionReceipt(e);if(null!=i&&r-i.blockNumber+1>=n)return t(i),void(o&&(clearTimeout(o),o=null))}catch(e){console.log("EEE",e)}this.once("block",s)};null!=r&&(o=setTimeout((()=>{null!=o&&(o=null,this.off("block",s),i((0,c.makeError)("timeout","TIMEOUT",{reason:"timeout"})))}),r)),s(await this.getBlockNumber())}))}async waitForBlock(e){(0,c.assert)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=this.#pt.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#pt.delete(e))}_setTimeout(e,t){null==t&&(t=0);const r=this.#ht++,n=()=>{this.#pt.delete(r),e()};if(this.paused)this.#pt.set(r,{timer:null,func:n,time:t});else{const e=setTimeout(n,t);this.#pt.set(r,{timer:e,func:n,time:w()})}return r}_forEachSubscriber(e){for(const t of this.#pe.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new b(e.type);case"block":{const e=new h.PollingBlockSubscriber(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new h.PollingBlockTagSubscriber(this,e.type);case"event":return new h.PollingEventSubscriber(this,e.filter);case"transaction":return new h.PollingTransactionSubscriber(this,e.hash);case"orphan":return new h.PollingOrphanSubscriber(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const r of this.#pe.values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=t,r.started&&t.start(),null!=this.#at&&t.pause(this.#at);break}}async#At(e,t){let r=await v(e,this);return"event"===r.type&&t&&t.length>0&&!0===t[0].removed&&(r=await v({orphan:"drop-log",log:t[0]},this)),this.#pe.get(r.tag)||null}async#Et(e){const t=await v(e,this),r=t.tag;let n=this.#pe.get(r);return n||(n={subscriber:this._getSubscriber(t),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#pe.set(r,n)),n}async on(e,t){const r=await this.#Et(e);return r.listeners.push({listener:t,once:!1}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#at&&r.subscriber.pause(this.#at)),this}async once(e,t){const r=await this.#Et(e);return r.listeners.push({listener:t,once:!0}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#at&&r.subscriber.pause(this.#at)),this}async emit(e,...t){const r=await this.#At(e,t);if(!r||0===r.listeners.length)return!1;const n=r.listeners.length;return r.listeners=r.listeners.filter((({listener:r,once:n})=>{const i=new c.EventPayload(this,n?null:r,e);try{r.call(this,...t,i)}catch(e){}return!n})),0===r.listeners.length&&(r.started&&r.subscriber.stop(),this.#pe.delete(r.tag)),n>0}async listenerCount(e){if(e){const t=await this.#At(e);return t?t.listeners.length:0}let t=0;for(const{listeners:e}of this.#pe.values())t+=e.length;return t}async listeners(e){if(e){const t=await this.#At(e);return t?t.listeners.map((({listener:e})=>e)):[]}let t=[];for(const{listeners:e}of this.#pe.values())t=t.concat(e.map((({listener:e})=>e)));return t}async off(e,t){const r=await this.#At(e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return t&&0!==r.listeners.length||(r.started&&r.subscriber.stop(),this.#pe.delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:r,subscriber:n}=await this.#Et(e);r&&n.stop(),this.#pe.delete(t)}else for(const[e,{started:t,subscriber:r}]of this.#pe)t&&r.stop(),this.#pe.delete(e);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#ct}destroy(){this.removeAllListeners();for(const e of this.#pt.keys())this._clearTimeout(e);this.#ct=!0}get paused(){return null!=this.#at}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#dt=-1,null!=this.#at){if(this.#at==!!e)return;(0,c.assert)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((t=>t.pause(e))),this.#at=!!e;for(const e of this.#pt.values())e.timer&&clearTimeout(e.timer),e.time=w()-e.time}resume(){if(null!=this.#at){this._forEachSubscriber((e=>e.resume())),this.#at=null;for(const e of this.#pt.values()){let t=e.time;t<0&&(t=0),e.time=w(),setTimeout(e.func,t)}}}};const _=new Uint8Array([]);function k(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(_),r+=32;for(let n=0;n<e.length;n++){const i=(0,c.getBytes)(e[n]);t[n]=O(r),t.push(O(i.length)),t.push(S(i)),r+=32+32*Math.ceil(i.length/32)}return(0,c.concat)(t)}const T="0x0000000000000000000000000000000000000000000000000000000000000000"},8710:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(381),i=r(8464),o=r(281);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},8711:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseContract=t.ENTRY_POINT_ABI=t.SIMPLE_RELAY_ABI=t.REGISTRY_ABI=t.RelayOperatingMode=void 0;const n=r(4193),i=r(3358),o=r(5628);var s;t.REGISTRY_ABI=["function isRegisteredRelay(address _relayAddress) external view returns (bool)","function isRelayActive(address _relayAddress) external view returns (bool)","function findRelayByUrl(string calldata _url) external view returns (address)","function getRelayInfo(address _relayAddress) external view returns (address owner, string memory url, string memory metadata, uint256 registrationTime, bool active)","function getRelayCountByOwner(address _owner) external view returns (uint256)","function getRelaysByOwner(address _owner, uint256 _offset, uint256 _limit) external view returns (tuple(address[] relays, uint256 total, uint256 offset, uint256 limit))","function getAllRelays(bool _onlyActive, uint256 _offset, uint256 _limit) external view returns (tuple(address[] relays, uint256 total, uint256 offset, uint256 limit))","function registerRelay(address _relayAddress, string calldata _url, string calldata _metadata) external","function updateRelay(address _relayAddress, string calldata _newUrl, string calldata _newMetadata) external","function deactivateRelay(address _relayAddress) external","function reactivateRelay(address _relayAddress) external","function setRegistrationOpen(bool _isOpen) external"],t.SIMPLE_RELAY_ABI=["function isSubscriptionActive(address _user) external view returns (bool)","function getUserSubscriptionInfo(address _user) external view returns (uint256 expires, bytes memory pubKey)","function isAuthorizedByPubKey(bytes calldata _pubKey) external view returns (bool)","function isSubscribed(bytes calldata _pubKey) external view returns (bool)","function pricePerMonth() external view returns (uint256)","function daysPerMonth() external view returns (uint256)","function relayUrl() external view returns (string)","function getRelayOperationalConfig() external view returns (string memory _url, uint256 _price, uint256 _daysInMonth)","function mode() external view returns (uint8)","function registryAddress() external view returns (address)","function entryPointAddress() external view returns (address)","function isRegisteredInRegistry() external view returns (bool)","function getRelayMode() external view returns (uint8 _mode, address _registry, address _entryPoint, bool _isRegistered)","function setRegistry(address _registryAddress, bool _autoRegister, string calldata _metadata) external","function setEntryPoint(address _entryPointAddress, bool _enableProtocolMode) external","function setOperatingMode(uint8 _newMode) external","function registerInRegistry(string calldata _metadata) external","function subscribe(uint256 _months, bytes calldata _pubKey) external payable","function setPrice(uint256 _newPrice) external","function setDaysPerMonth(uint256 _days) external","function updateRelayUrl(string calldata _newUrl) external","function withdrawFunds() external","function decommissionAndWithdrawAllFunds() external","function execute(address _to, uint256 _value, bytes calldata _data) external returns (bool success, bytes memory result)"],t.ENTRY_POINT_ABI=["function registry() external view returns (address)","function serviceFeePercentage() external view returns (uint256)","function calculateFee(uint256 _amount) external view returns (uint256)","function checkSubscription(address _user, address _relayAddress) external view returns (bool)","function hasRegisteredPubKey(address _user, address _relayAddress) external view returns (bool)","function isPubKeySubscribed(address _relayAddress, bytes calldata _pubKey) external view returns (bool)","function batchCheckPubKeySubscription(address[] calldata _relayAddresses, bytes[] calldata _pubKeys) external view returns (bool[] memory)","function getSubscriptionDetails(address _user, address _relayAddress) external view returns (uint256 expires, bytes memory pubKey)","function batchCheckSubscriptions(address _user, address[] calldata _relayAddresses) external view returns (bool[] memory)","function batchCheckPubKeys(address _user, address[] calldata _relayAddresses) external view returns (bool[] memory)","function getStatistics() external view returns (uint256 _userCount, uint256 _totalSubscriptions, uint256 _totalViaUrl, uint256 _totalViaDirect, uint256 _totalAmountProcessed, uint256 _totalFeesCollected, uint256 _currentBalance)","function subscribeViaUrl(string calldata _relayUrl, uint256 _months, bytes calldata _pubKey) external payable","function subscribeDirect(address _relayAddress, uint256 _months, bytes calldata _pubKey) external payable","function batchSubscribe(address[] calldata _relayAddresses, uint256 _months, bytes[] calldata _pubKeys) external payable","function updateRegistry(address _newRegistry) external","function updateServiceFee(uint256 _newFeePercentage) external","function withdrawFees() external"],function(e){e[e.SINGLE=0]="SINGLE",e[e.PROTOCOL=1]="PROTOCOL"}(s||(t.RelayOperatingMode=s={})),t.BaseContract=class{provider=null;signer=null;contract=null;contractAddress;constructor(e,t,r){if(this.contractAddress=e,r.provider?this.provider=r.provider:r.providerUrl&&(this.provider=new n.ethers.JsonRpcProvider(r.providerUrl)),this.signer=r.signer||null,this.provider)try{this.signer?this.contract=new n.ethers.Contract(e,t,this.signer):this.contract=new n.ethers.Contract(e,t,this.provider)}catch(t){i.ErrorHandler.handle(i.ErrorType.CONTRACT,"CONTRACT_INIT_FAILED",`Failed to initialize contract at ${e}`,t)}else(0,o.logError)("No provider available for contract initialization")}setProvider(e){this.provider=e,this.contract&&(this.contract=this.contract.connect(e))}setSigner(e){this.signer=e,this.contract&&this.signer&&(this.contract=this.contract.connect(e))}getAddress(){return this.contractAddress}}},8717:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=t.hashMessage=void 0;const n=r(2291),i=r(1295),o=r(7778),s=r(5347);function a(e){return"string"==typeof e&&(e=(0,s.toUtf8Bytes)(e)),(0,n.keccak256)((0,s.concat)([(0,s.toUtf8Bytes)(i.MessagePrefix),(0,s.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=a,t.verifyMessage=function(e,t){const r=a(e);return(0,o.recoverAddress)(r,t)}},8719:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;const n=r(9976),i=r(8869);class o extends i.Coder{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const r=n.Typed.dereference(t,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}t.BooleanCoder=o},8725:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwlA=void 0;const n=r(2684),i=r(7703);class o extends n.WordlistOwl{#Pt;constructor(e,t,r,n){super(e,t,n),this.#Pt=r}get _accent(){return this.#Pt}_decodeWords(){return(0,i.decodeOwlA)(this._data,this._accent)}}t.WordlistOwlA=o},8766:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;const n=r(3948),i=r(9976),o=r(2348);class s extends o.DynamicBytesCoder{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,n.toUtf8Bytes)(i.Typed.dereference(t,"string")))}decode(e){return(0,n.toUtf8String)(super.decode(e))}}t.StringCoder=s},8777:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleRelay=void 0;const n=r(4193),i=r(3358),o=r(8711);class s extends o.BaseContract{constructor(e){super(e.relayAddress,o.SIMPLE_RELAY_ABI,e)}async isSubscriptionActive(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.isSubscriptionActive(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_SUBSCRIPTION_ACTIVE_FAILED",`Failed to check if subscription is active for user ${e}`,t),!1}}async getUserSubscriptionInfo(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const[t,r]=await this.contract.getUserSubscriptionInfo(e),i=await this.contract.isSubscriptionActive(e);return{expires:t,pubKey:n.ethers.hexlify(r),isActive:i}}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_SUBSCRIPTION_INFO_FAILED",`Failed to get subscription info for user ${e}`,t),null}}async isAuthorizedByPubKey(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const t=e instanceof Uint8Array?n.ethers.hexlify(e):e;return await this.contract.isAuthorizedByPubKey(t)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_AUTHORIZED_FAILED","Failed to check if public key is authorized",e),!1}}async isSubscribed(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const t=e instanceof Uint8Array?n.ethers.hexlify(e):e;return await this.contract.isSubscribed(t)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_SUBSCRIBED_FAILED","Failed to check if public key is subscribed",e),!1}}async getPricePerMonth(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.pricePerMonth()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_PRICE_FAILED","Failed to get price per month",e),null}}async getDaysPerMonth(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const e=await this.contract.daysPerMonth();return Number(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_DAYS_PER_MONTH_FAILED","Failed to get days per month",e),null}}async getRelayUrl(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.relayUrl()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_URL_FAILED","Failed to get relay URL",e),null}}async getRelayOperationalConfig(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const[e,t,r]=await this.contract.getRelayOperationalConfig();return{url:e,price:t,daysInMonth:r}}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_CONFIG_FAILED","Failed to get relay operational config",e),null}}async subscribe(e,t){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const r=t instanceof Uint8Array?n.ethers.hexlify(t):t,i=await this.contract.pricePerMonth()*BigInt(e);return await this.contract.subscribe(e,r,{value:i})}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SUBSCRIBE_FAILED",`Failed to subscribe for ${e} months`,t),null}}async setPrice(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setPrice(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_PRICE_FAILED","Failed to set new price",e),null}}async setDaysPerMonth(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");if(e<1||e>31)throw new Error("Days must be between 1 and 31");return await this.contract.setDaysPerMonth(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_DAYS_PER_MONTH_FAILED",`Failed to set days per month to ${e}`,t),null}}async updateRelayUrl(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.updateRelayUrl(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_UPDATE_URL_FAILED",`Failed to update URL to ${e}`,t),null}}async withdrawFunds(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.withdrawFunds()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_WITHDRAW_FUNDS_FAILED","Failed to withdraw funds",e),null}}async decommissionAndWithdrawAllFunds(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.decommissionAndWithdrawAllFunds()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_DECOMMISSION_FAILED","Failed to decommission relay",e),null}}async execute(e,t,r){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");const[i,o]=await this.contract.execute(e,t,r);return{success:i,result:n.ethers.hexlify(o)}}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_EXECUTE_FAILED",`Failed to execute transaction to ${e}`,t),null}}async getOperatingMode(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.mode()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_MODE_FAILED","Failed to get relay operating mode",e),null}}async getRegistryAddress(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.registryAddress()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_REGISTRY_ADDRESS_FAILED","Failed to get registry address",e),null}}async getEntryPointAddress(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.entryPointAddress()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_ENTRY_POINT_ADDRESS_FAILED","Failed to get entry point address",e),null}}async isRegisteredInRegistry(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");return await this.contract.isRegisteredInRegistry()}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_IS_REGISTERED_FAILED","Failed to check if relay is registered in registry",e),!1}}async getRelayMode(){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");const[e,t,r,n]=await this.contract.getRelayMode();return{mode:e,registryAddress:t,entryPointAddress:r,isRegistered:n}}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_GET_MODE_INFO_FAILED","Failed to get relay mode information",e),null}}async setRegistry(e,t=!1,r=""){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setRegistry(e,t,r)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_REGISTRY_FAILED",`Failed to set registry to ${e}`,t),null}}async setEntryPoint(e,t=!1){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setEntryPoint(e,t)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_ENTRY_POINT_FAILED",`Failed to set entry point to ${e}`,t),null}}async setOperatingMode(e){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.setOperatingMode(e)}catch(t){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_SET_MODE_FAILED",`Failed to set operating mode to ${e}`,t),null}}async registerInRegistry(e=""){try{if(!this.contract)throw new Error("SimpleRelay contract not initialized");if(!this.signer)throw new Error("Signer required for this operation");return await this.contract.registerInRegistry(e)}catch(e){return i.ErrorHandler.handle(i.ErrorType.CONTRACT,"RELAY_REGISTER_IN_REGISTRY_FAILED","Failed to register relay in registry",e),null}}}t.SimpleRelay=s},8799:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(5212),i=r(7214);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},8817:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickNodeProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371),a="919b412a057b5e9c9b6dce193c5a60242d6efadb";class c extends s.JsonRpcProvider{token;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{token:t})}_getProvider(e){try{return new c(e,this.token)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.token===a}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("QuickNodeProvider"),!0)),r}}t.QuickNodeProvider=c},8869:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=t.Writer=t.Coder=t.checkResultErrors=t.Result=t.WordSize=void 0;const n=r(5347);t.WordSize=32;const i=new Uint8Array(t.WordSize),o=["then"],s={},a=new WeakMap;function c(e){return a.get(e)}function u(e,t){a.set(e,t)}function l(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function f(e,t,r){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof d?f(c(e),e,r):e)):e.reduce(((e,n,i)=>{let o=t.getValue(n);return n in e||(r&&o instanceof d&&(o=f(c(o),o,r)),e[n]=o),e}),{})}class d extends Array{#Ot;constructor(...e){const t=e[0];let r=e[1],i=(e[2]||[]).slice(),a=!0;t!==s&&(r=e,i=[],a=!1),super(r.length),r.forEach(((e,t)=>{this[t]=e}));const f=i.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(u(this,Object.freeze(r.map(((e,t)=>{const r=i[t];return null!=r&&1===f.get(r)?r:null})))),this.#Ot=[],null==this.#Ot&&this.#Ot,!a)return;Object.freeze(this);const d=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const r=(0,n.getNumber)(t,"%index");if(r<0||r>=this.length)throw new RangeError("out of result range");const i=e[r];return i instanceof Error&&l(`index ${r}`,i),i}if(o.indexOf(t)>=0)return Reflect.get(e,t,r);const i=e[t];if(i instanceof Function)return function(...t){return i.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return u(d,c(this)),d}toArray(e){const t=[];return this.forEach(((r,n)=>{r instanceof Error&&l(`index ${n}`,r),e&&r instanceof d&&(r=r.toArray(e)),t.push(r)})),t}toObject(e){const t=c(this);return t.reduce(((r,i,o)=>((0,n.assert)(null!=i,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),f(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=c(this),n=[],i=[];for(let o=e;o<t;o++)n.push(this[o]),i.push(r[o]);return new d(s,n,i)}filter(e,t){const r=c(this),n=[],i=[];for(let o=0;o<this.length;o++){const s=this[o];s instanceof Error&&l(`index ${o}`,s),e.call(t,s,o,this)&&(n.push(s),i.push(r[o]))}return new d(s,n,i)}map(e,t){const r=[];for(let n=0;n<this.length;n++){const i=this[n];i instanceof Error&&l(`index ${n}`,i),r.push(e.call(t,i,n,this))}return r}getValue(e){const t=c(this).indexOf(e);if(-1===t)return;const r=this[t];return r instanceof Error&&l(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new d(s,e,t)}}function h(e){let r=(0,n.toBeArray)(e);return(0,n.assert)(r.length<=t.WordSize,"value out-of-bounds","BUFFER_OVERRUN",{buffer:r,length:t.WordSize,offset:r.length}),r.length!==t.WordSize&&(r=(0,n.getBytesCopy)((0,n.concat)([i.slice(r.length%t.WordSize),r]))),r}t.Result=d,t.checkResultErrors=function(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t},t.Coder=class{name;type;localName;dynamic;constructor(e,t,r,i){(0,n.defineProperties)(this,{name:e,type:t,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){(0,n.assertArgument)(!1,e,this.localName,t)}},t.Writer=class{#p;#St;constructor(){this.#p=[],this.#St=0}get data(){return(0,n.concat)(this.#p)}get length(){return this.#St}#_t(e){return this.#p.push(e),this.#St+=e.length,e.length}appendWriter(e){return this.#_t((0,n.getBytesCopy)(e.data))}writeBytes(e){let r=(0,n.getBytesCopy)(e);const o=r.length%t.WordSize;return o&&(r=(0,n.getBytesCopy)((0,n.concat)([r,i.slice(o)]))),this.#_t(r)}writeValue(e){return this.#_t(h(e))}writeUpdatableValue(){const e=this.#p.length;return this.#p.push(i),this.#St+=t.WordSize,t=>{this.#p[e]=h(t)}}};class p{allowLoose;#p;#r;#kt;#Tt;#xt;constructor(e,t,r){(0,n.defineProperties)(this,{allowLoose:!!t}),this.#p=(0,n.getBytesCopy)(e),this.#kt=0,this.#Tt=null,this.#xt=null!=r?r:1024,this.#r=0}get data(){return(0,n.hexlify)(this.#p)}get dataLength(){return this.#p.length}get consumed(){return this.#r}get bytes(){return new Uint8Array(this.#p)}#It(e){if(this.#Tt)return this.#Tt.#It(e);this.#kt+=e,(0,n.assert)(this.#xt<1||this.#kt<=this.#xt*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#xt} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#p),offset:this.#r,length:e,info:{bytesRead:this.#kt,dataLength:this.dataLength}})}#Rt(e,r,i){let o=Math.ceil(r/t.WordSize)*t.WordSize;return this.#r+o>this.#p.length&&(this.allowLoose&&i&&this.#r+r<=this.#p.length?o=r:(0,n.assert)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#p),length:this.#p.length,offset:this.#r+o})),this.#p.slice(this.#r,this.#r+o)}subReader(e){const t=new p(this.#p.slice(this.#r+e),this.allowLoose,this.#xt);return t.#Tt=this,t}readBytes(e,t){let r=this.#Rt(0,e,!!t);return this.#It(e),this.#r+=r.length,r.slice(0,e)}readValue(){return(0,n.toBigInt)(this.readBytes(t.WordSize))}readIndex(){return(0,n.toNumber)(this.readBytes(t.WordSize))}}t.Reader=p},8877:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(5212),i=r(9724),o=r(7214);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,c=!1,u=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}c&&r.complete()},l=function(){a=null,c&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,u,l))}),(function(){c=!0,(!n||!a||a.closed)&&r.complete()})))}))}},8907:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainstackProvider=void 0;const n=r(5347),i=r(9973),o=r(5317),s=r(2371);function a(e){switch(e){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}(0,n.assertArgument)(!1,"unsupported network","network",e)}class c extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a(r.name)),super(c.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new c(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.apiKey===a(this._network.name)}static getRequest(e,t){null==t&&(t=a(e.name));const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a(e.name)&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("ChainstackProvider"),!0)),r}}t.ChainstackProvider=c},8941:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;const n=r(7557),i=r(9615),o=r(9175);function s(e,t,r,s){(0,n.hash)(e);const a=(0,o.checkOpts)({dkLen:32,asyncTick:10},s),{c:c,dkLen:u,asyncTick:l}=a;if((0,n.number)(c),(0,n.number)(u),(0,n.number)(l),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const f=(0,o.toBytes)(t),d=(0,o.toBytes)(r),h=new Uint8Array(u),p=i.hmac.create(e,f),g=p._cloneInto().update(d);return{c:c,dkLen:u,asyncTick:l,DK:h,PRF:p,PRFSalt:g}}function a(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}t.pbkdf2=function(e,t,r,n){const{c:i,dkLen:c,DK:u,PRF:l,PRFSalt:f}=s(e,t,r,n);let d;const h=new Uint8Array(4),p=(0,o.createView)(h),g=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const r=u.subarray(t,t+l.outputLen);p.setInt32(0,e,!1),(d=f._cloneInto(d)).update(h).digestInto(g),r.set(g.subarray(0,r.length));for(let e=1;e<i;e++){l._cloneInto(d).update(g).digestInto(g);for(let e=0;e<r.length;e++)r[e]^=g[e]}}return a(l,f,u,d,g)},t.pbkdf2Async=async function(e,t,r,n){const{c:i,dkLen:c,asyncTick:u,DK:l,PRF:f,PRFSalt:d}=s(e,t,r,n);let h;const p=new Uint8Array(4),g=(0,o.createView)(p),y=new Uint8Array(f.outputLen);for(let e=1,t=0;t<c;e++,t+=f.outputLen){const r=l.subarray(t,t+f.outputLen);g.setInt32(0,e,!1),(h=d._cloneInto(h)).update(p).digestInto(y),r.set(y.subarray(0,r.length)),await(0,o.asyncLoop)(i-1,u,(()=>{f._cloneInto(h).update(y).digestInto(y);for(let e=0;e<r.length;e++)r[e]^=y[e]}))}return a(f,d,l,h,y)}},8964:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=void 0;const n=r(7155);let i=!1;const o=function(e){return new Uint8Array((0,n.randomBytes)(e))};let s=o;function a(e){return s(e)}t.randomBytes=a,a._=o,a.lock=function(){i=!0},a.register=function(e){if(i)throw new Error("randomBytes is locked");s=e},Object.freeze(a)},8996:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=r(6808),o=r(9879),s=r(5212),a=r(9724),c=r(7214),u=r(5717),l=r(4830);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],d=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(c.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,h=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void d(e)}s.next(r.asObservable()),h.add(n.subscribe(c.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),h.unsubscribe()}),u.noop,d)))}),u.noop)),r.subscribe(c.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),d,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},9011:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wordlist=void 0;const n=r(5347);t.Wordlist=class{locale;constructor(e){(0,n.defineProperties)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}},9035:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(5212),i=r(8183);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},9054:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(9546),i=r(6404),o=r(5212);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},9095:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;const n=r(5347),i=r(9976),o=r(8869);class s extends o.Coder{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),(0,n.defineProperties)(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.getBytesCopy)(i.Typed.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return(0,n.hexlify)(e.readBytes(this.size))}}t.FixedBytesCoder=s},9148:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),s=0;s<r.length;s++)"default"!==r[s]&&i(t,e,r[s]);return o(t,e),t}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunCore=t.modules=void 0,t.initShogunBrowser=d;const c=r(8156);Object.defineProperty(t,"ShogunCore",{enumerable:!0,get:function(){return c.ShogunCore}});const u={webauthn:{webauthn:()=>Promise.resolve().then((()=>s(r(7510))))},web3:{web3Connector:()=>Promise.resolve().then((()=>s(r(8098))))},nostr:{nostrConnector:()=>Promise.resolve().then((()=>s(r(8050))))}};let l=null,f=null;function d(e){const t={...e};return l=new c.ShogunCore(t),f=l?.gun,"undefined"!=typeof window&&(window.shogun=l,window.gun=f),l}t.modules={webauthn:{loadWebAuthn:u.webauthn.webauthn},web3:{loadMetaMask:u.web3.web3Connector},nostr:{loadNostrConnector:u.nostr.nostrConnector}},a(r(74),t),"undefined"!=typeof window&&(window.initShogunBrowser=d)},9175:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(5145),i=e=>e instanceof Uint8Array;if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=s(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=s,t.toBytes=a,t.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t},t.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},9197:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=void 0,t.N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t.WeiPerEther=BigInt("1000000000000000000"),t.MaxUint256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MinInt256=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),t.MaxInt256=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},9224:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(5212),i=r(7214);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},9229:function(e,t,r){e.exports=r(4827)},9244:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(7933);t.combineAll=n.combineLatestAll},9245:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(1983),i=r(2036);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},9287:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=r(5212),o=r(7214),s=r(4830);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],c=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,u,l,f,d=null;c++%t===0&&a.push([]);try{for(var h=n(a),p=h.next();!p.done;p=h.next())(b=p.value).push(r),e<=b.length&&(d=null!=d?d:[]).push(b)}catch(e){o={error:e}}finally{try{p&&!p.done&&(u=h.return)&&u.call(h)}finally{if(o)throw o.error}}if(d)try{for(var g=n(d),y=g.next();!y.done;y=g.next()){var b=y.value;s.arrRemove(a,b),i.next(b)}}catch(e){l={error:e}}finally{try{y&&!y.done&&(f=g.return)&&f.call(g)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},9288:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndecodedEventLog=t.EventLog=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractUnknownEventPayload=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=void 0;var n=r(1008);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return n.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return n.Contract}});var i=r(406);Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return i.ContractFactory}});var o=r(6526);Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return o.ContractEventPayload}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return o.ContractUnknownEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return o.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return o.ContractTransactionResponse}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return o.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return o.UndecodedEventLog}})},9328:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9619);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},9330:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(5212),s=r(8087),a=r(6404),c=r(7058);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e),u=a.popNumber(e,1/0);return o.operate((function(t,o){s.mergeAll(u)(c.from(i([t],n(e)),r)).subscribe(o)}))}},9349:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockscoutProvider=void 0;const n=r(5347),i=r(5317),o=r(2371);class s extends o.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=i.Network.from(e);null==t&&(t=null),super(s.getRequest(r),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new s(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return null===this.apiKey}getRpcRequest(e){const t=super.getRpcRequest(e);return t&&"eth_estimateGas"===t.method&&1==t.args.length&&(t.args=t.args.slice(),t.args.push("latest")),t}getRpcError(e,t){const r=t?t.error:null;if(r&&-32015===r.code&&!(0,n.isHexString)(r.data||"",!0)){const e={"assert(false)":"01","arithmetic underflow or overflow":"11","division or modulo by zero":"12","out-of-bounds array access; popping on an empty array":"31","out-of-bounds access of an array or bytesN":"32"};let t="";"VM execution error."===r.message?t=e[r.data]||"":e[r.message||""]&&(t=e[r.message||""]),t&&(r.message+=` (reverted: ${r.data})`,r.data="0x4e487b7100000000000000000000000000000000000000000000000000000000000000"+t)}else r&&-32e3===r.code&&"wrong transaction nonce"===r.message&&(r.message+=" (nonce too low)");return super.getRpcError(e,t)}static getRequest(e){const t=new n.FetchRequest(function(e){switch(e){case"mainnet":return"https://eth.blockscout.com/api/eth-rpc";case"sepolia":return"https://eth-sepolia.blockscout.com/api/eth-rpc";case"holesky":return"https://eth-holesky.blockscout.com/api/eth-rpc";case"classic":return"https://etc.blockscout.com/api/eth-rpc";case"arbitrum":return"https://arbitrum.blockscout.com/api/eth-rpc";case"base":return"https://base.blockscout.com/api/eth-rpc";case"base-sepolia":return"https://base-sepolia.blockscout.com/api/eth-rpc";case"matic":return"https://polygon.blockscout.com/api/eth-rpc";case"optimism":return"https://optimism.blockscout.com/api/eth-rpc";case"optimism-sepolia":return"https://optimism-sepolia.blockscout.com/api/eth-rpc";case"xdai":return"https://gnosis.blockscout.com/api/eth-rpc"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name));return t.allowGzip=!0,t}}t.BlockscoutProvider=s},9364:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.onErrorResumeNextWith=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=void 0;var o=r(8051);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(4359);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2884);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var c=r(1875);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return c.animationFrames}});var u=r(6808);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return u.Subject}});var l=r(7314);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(381);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var d=r(5130);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return d.AsyncSubject}});var h=r(2105);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return h.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return h.asapScheduler}});var p=r(2326);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var g=r(9245);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return g.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return g.queueScheduler}});var y=r(5887);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return y.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return y.animationFrameScheduler}});var b=r(875);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return b.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return b.VirtualAction}});var m=r(5881);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return m.Scheduler}});var v=r(9879);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return v.Subscription}});var w=r(2708);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return w.Subscriber}});var A=r(1245);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return A.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return A.NotificationKind}});var E=r(1898);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return E.pipe}});var P=r(5717);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return P.noop}});var O=r(7699);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return O.identity}});var S=r(2560);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return S.isObservable}});var _=r(5761);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return _.lastValueFrom}});var k=r(841);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return k.firstValueFrom}});var T=r(7024);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return T.ArgumentOutOfRangeError}});var x=r(9328);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var I=r(3506);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return I.NotFoundError}});var R=r(839);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return R.ObjectUnsubscribedError}});var C=r(4708);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return C.SequenceError}});var N=r(1713);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return N.TimeoutError}});var j=r(9517);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return j.UnsubscriptionError}});var B=r(9750);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return B.bindCallback}});var M=r(1946);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return M.bindNodeCallback}});var F=r(8246);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return F.combineLatest}});var U=r(9546);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return U.concat}});var L=r(8590);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return L.connectable}});var D=r(5884);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return D.defer}});var G=r(4885);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return G.empty}});var H=r(5266);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return H.forkJoin}});var z=r(7058);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return z.from}});var W=r(8616);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return W.fromEvent}});var K=r(6920);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return K.fromEventPattern}});var V=r(7281);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return V.generate}});var $=r(9380);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return $.iif}});var J=r(2275);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return J.interval}});var q=r(5936);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return q.merge}});var Q=r(1934);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return Q.never}});var Y=r(1587);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return Y.of}});var Z=r(1903);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(8269);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(7406);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(9795);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(4385);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(6680);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5825);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(5904);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(1415);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(131);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ce=r(4885);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ce.EMPTY}});var ue=r(1934);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ue.NEVER}}),i(r(6153),t);var le=r(3728);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(8877);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var de=r(1608);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return de.auditTime}});var he=r(706);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return he.buffer}});var pe=r(9287);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return pe.bufferCount}});var ge=r(1719);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ge.bufferTime}});var ye=r(1778);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ye.bufferToggle}});var be=r(6606);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return be.bufferWhen}});var me=r(2719);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return me.catchError}});var ve=r(9244);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ve.combineAll}});var we=r(7933);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return we.combineLatestAll}});var Ae=r(2044);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return Ae.combineLatestWith}});var Ee=r(201);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Ee.concatAll}});var Pe=r(9512);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Pe.concatMap}});var Oe=r(9913);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Oe.concatMapTo}});var Se=r(8032);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Se.concatWith}});var _e=r(7812);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _e.connect}});var ke=r(8589);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return ke.count}});var Te=r(3143);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Te.debounce}});var xe=r(1762);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Ie=r(8799);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ie.defaultIfEmpty}});var Re=r(5797);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Re.delay}});var Ce=r(2885);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Ce.delayWhen}});var Ne=r(9818);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ne.dematerialize}});var je=r(7876);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return je.distinct}});var Be=r(9663);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Be.distinctUntilChanged}});var Me=r(6035);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Me.distinctUntilKeyChanged}});var Fe=r(1279);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Fe.elementAt}});var Ue=r(6791);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Ue.endWith}});var Le=r(1361);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return Le.every}});var De=r(1464);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return De.exhaust}});var Ge=r(7977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Ge.exhaustAll}});var He=r(6632);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return He.exhaustMap}});var ze=r(5544);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return ze.expand}});var We=r(5934);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return We.filter}});var Ke=r(7802);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Ke.finalize}});var Ve=r(8183);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ve.find}});var $e=r(9035);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return $e.findIndex}});var Je=r(9980);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return Je.first}});var qe=r(5128);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return qe.groupBy}});var Qe=r(2959);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Qe.ignoreElements}});var Ye=r(9915);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Ye.isEmpty}});var Ze=r(2568);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(6872);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(3337);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(5019);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(96);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(8087);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(4613);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(7478);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(6075);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(6707);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ct=r(9694);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ct.mergeWith}});var ut=r(142);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ut.min}});var lt=r(8464);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(2071);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var dt=r(5513);Object.defineProperty(t,"onErrorResumeNextWith",{enumerable:!0,get:function(){return dt.onErrorResumeNextWith}});var ht=r(6744);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ht.pairwise}});var pt=r(6355);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pt.pluck}});var gt=r(3197);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return gt.publish}});var yt=r(2955);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var bt=r(6569);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return bt.publishLast}});var mt=r(8710);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var vt=r(6677);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return vt.raceWith}});var wt=r(2070);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return wt.reduce}});var At=r(6131);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return At.repeat}});var Et=r(2139);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return Et.repeatWhen}});var Pt=r(3352);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Pt.retry}});var Ot=r(3956);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Ot.retryWhen}});var St=r(9224);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return St.refCount}});var _t=r(3434);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return _t.sample}});var kt=r(4143);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return kt.sampleTime}});var Tt=r(5565);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Tt.scan}});var xt=r(3929);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return xt.sequenceEqual}});var It=r(3405);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return It.share}});var Rt=r(7782);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Rt.shareReplay}});var Ct=r(5440);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Ct.single}});var Nt=r(3079);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Nt.skip}});var jt=r(2359);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return jt.skipLast}});var Bt=r(7783);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Bt.skipUntil}});var Mt=r(5774);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Mt.skipWhile}});var Ft=r(9054);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ft.startWith}});var Ut=r(5455);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ut.subscribeOn}});var Lt=r(6201);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Lt.switchAll}});var Dt=r(680);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Dt.switchMap}});var Gt=r(761);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Gt.switchMapTo}});var Ht=r(8461);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Ht.switchScan}});var zt=r(4383);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return zt.take}});var Wt=r(5279);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Wt.takeLast}});var Kt=r(6911);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Kt.takeUntil}});var Vt=r(598);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Vt.takeWhile}});var $t=r(7400);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return $t.tap}});var Jt=r(4880);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Jt.throttle}});var qt=r(7245);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return qt.throttleTime}});var Qt=r(632);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Qt.throwIfEmpty}});var Yt=r(2508);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Yt.timeInterval}});var Zt=r(1713);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Zt.timeout}});var Xt=r(597);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Xt.timeoutWith}});var er=r(3866);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return er.timestamp}});var tr=r(3484);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return tr.toArray}});var rr=r(8072);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return rr.window}});var nr=r(2893);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return nr.windowCount}});var ir=r(37);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return ir.windowTime}});var or=r(8996);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return or.windowToggle}});var sr=r(5156);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return sr.windowWhen}});var ar=r(6975);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ar.withLatestFrom}});var cr=r(5362);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return cr.zipAll}});var ur=r(6977);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},9380:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5884);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9412:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=void 0;const n=r(7415),i=r(1500),o=r(6508),s=r(8166),a=BigInt(-1),c=BigInt(0),u=BigInt(1),l=BigInt(5),f={};let d="0000";for(;d.length<80;)d+=d;function h(e){let t=d;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function p(e,t,r){const n=BigInt(t.width);if(t.signed){const t=u<<n-u;(0,i.assert)(null==r||e>=-t&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=e>c?(0,o.fromTwos)((0,o.mask)(e,n),n):-(0,o.fromTwos)((0,o.mask)(-e,n),n)}else{const t=u<<n;(0,i.assert)(null==r||e>=0&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=(e%t+t)%t&t-u}return e}function g(e){"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const o=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);(0,i.assertArgument)(o,"invalid fixed format","format",e),t="u"!==o[1],r=parseInt(o[2]),n=parseInt(o[3])}else if(e){const o=e,s=(e,t,r)=>null==o[e]?r:((0,i.assertArgument)(typeof o[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,o[e]),o[e]);t=s("signed","boolean",t),r=s("width","number",r),n=s("decimals","number",n)}return(0,i.assertArgument)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,i.assertArgument)(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n),{signed:t,width:r,decimals:n,name:(t?"":"u")+"fixed"+String(r)+"x"+String(n)}}class y{format;#Ct;#Nt;#jt;_value;constructor(e,t,r){(0,i.assertPrivate)(e,f,"FixedNumber"),this.#Nt=t,this.#Ct=r;const n=function(e,t){let r="";e<c&&(r="-",e*=a);let n=e.toString();if(0===t)return r+n;for(;n.length<=t;)n=d+n;const i=n.length-t;for(n=n.substring(0,i)+"."+n.substring(i);"0"===n[0]&&"."!==n[1];)n=n.substring(1);for(;"0"===n[n.length-1]&&"."!==n[n.length-2];)n=n.substring(0,n.length-1);return r+n}(t,r.decimals);(0,s.defineProperties)(this,{format:r.name,_value:n}),this.#jt=h(r.decimals)}get signed(){return this.#Ct.signed}get width(){return this.#Ct.width}get decimals(){return this.#Ct.decimals}get value(){return this.#Nt}#Bt(e){(0,i.assertArgument)(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#Mt(e,t){return e=p(e,this.#Ct,t),new y(f,e,this.#Ct)}#Ft(e,t){return this.#Bt(e),this.#Mt(this.#Nt+e.#Nt,t)}addUnsafe(e){return this.#Ft(e)}add(e){return this.#Ft(e,"add")}#Ut(e,t){return this.#Bt(e),this.#Mt(this.#Nt-e.#Nt,t)}subUnsafe(e){return this.#Ut(e)}sub(e){return this.#Ut(e,"sub")}#Lt(e,t){return this.#Bt(e),this.#Mt(this.#Nt*e.#Nt/this.#jt,t)}mulUnsafe(e){return this.#Lt(e)}mul(e){return this.#Lt(e,"mul")}mulSignal(e){this.#Bt(e);const t=this.#Nt*e.#Nt;return(0,i.assert)(t%this.#jt===c,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#Mt(t/this.#jt,"mulSignal")}#Dt(e,t){return(0,i.assert)(e.#Nt!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#Bt(e),this.#Mt(this.#Nt*this.#jt/e.#Nt,t)}divUnsafe(e){return this.#Dt(e)}div(e){return this.#Dt(e,"div")}divSignal(e){(0,i.assert)(e.#Nt!==c,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#Bt(e);const t=this.#Nt*this.#jt;return(0,i.assert)(t%e.#Nt===c,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#Mt(t/e.#Nt,"divSignal")}cmp(e){let t=this.value,r=e.value;const n=this.decimals-e.decimals;return n>0?r*=h(n):n<0&&(t*=h(-n)),t<r?-1:t>r?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#Nt;return this.#Nt<c&&(e-=this.#jt-u),e=this.#Nt/this.#jt*this.#jt,this.#Mt(e,"floor")}ceiling(){let e=this.#Nt;return this.#Nt>c&&(e+=this.#jt-u),e=this.#Nt/this.#jt*this.#jt,this.#Mt(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,r=l*h(t-1);let n=this.value+r;const i=h(t);return n=n/i*i,p(n,this.#Ct,"round"),new y(f,n,this.#Ct)}isZero(){return this.#Nt===c}isNegative(){return this.#Nt<c}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return y.fromString(this.toString(),e)}static fromValue(e,t,r){const n=null==t?0:(0,o.getNumber)(t),s=g(r);let a=(0,o.getBigInt)(e,"value");const u=n-s.decimals;if(u>0){const t=h(u);(0,i.assert)(a%t===c,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),a/=t}else u<0&&(a*=h(-u));return p(a,s,"fromValue"),new y(f,a,s)}static fromString(e,t){const r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,i.assertArgument)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);const n=g(t);let o=r[2]||"0",s=r[3]||"";for(;s.length<n.decimals;)s+=d;(0,i.assert)(s.substring(n.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),s=s.substring(0,n.decimals);const a=BigInt(r[1]+o+s);return p(a,n,"fromString"),new y(f,a,n)}static fromBytes(e,t){let r=(0,o.toBigInt)((0,n.getBytes)(e,"value"));const i=g(t);return i.signed&&(r=(0,o.fromTwos)(r,i.width)),p(r,i,"fromBytes"),new y(f,r,i)}}t.FixedNumber=y},9414:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBytes32String=t.encodeBytes32String=void 0;const n=r(5347);t.encodeBytes32String=function(e){const t=(0,n.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,n.zeroPadBytes)(t,32)},t.decodeBytes32String=function(e){const t=(0,n.getBytes)(e,"bytes");if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,n.toUtf8String)(t.slice(0,r))}},9512:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(7478),i=r(281);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},9516:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(4120),i=r(5934);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},9517:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9619);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},9533:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(5881),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},9546:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(201),i=r(6404),o=r(7058);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},9596:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonceManager=void 0;const n=r(5347),i=r(3071);class o extends i.AbstractSigner{signer;#Gt;#Ht;constructor(e){super(e.provider),(0,n.defineProperties)(this,{signer:e}),this.#Gt=null,this.#Ht=0}async getAddress(){return this.signer.getAddress()}connect(e){return new o(this.signer.connect(e))}async getNonce(e){if("pending"===e){null==this.#Gt&&(this.#Gt=super.getNonce("pending"));const e=this.#Ht;return await this.#Gt+e}return super.getNonce(e)}increment(){this.#Ht++}reset(){this.#Ht=0,this.#Gt=null}async sendTransaction(e){const t=this.getNonce("pending");return this.increment(),(e=await this.signer.populateTransaction(e)).nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,r){return this.signer.signTypedData(e,t,r)}}t.NonceManager=o},9610:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBits=void 0,t.decodeBits=function(e,t){const r=(1<<e)-1,n=[];let i=0,o=0,s=0;for(let a=0;a<t.length;a++)for(i=i<<6|")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(t[a]),o+=6;o>=e;){const t=i>>o-e;i&=(1<<o-e)-1,o-=e,0===t?s+=r:(n.push(t+s),s=0)}return n}},9615:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7557),i=r(9175);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},9619:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},9663:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(7699),i=r(5212),o=r(7214);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},9694:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(9330);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},9724:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var a=r(4975),c=r(7552),u=r(8051),l=r(629),f=r(8263),d=r(6297),h=r(2187),p=r(5462),g=r(281),y=r(2980),b=r(2884);function m(e){return new u.Observable((function(t){var r=e[b.observable]();if(g.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function v(e){return new u.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function w(e){return new u.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,y.reportUnhandledError)}))}function A(e){return new u.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function E(e){return new u.Observable((function(t){(function(e,t){var r,s,a,c;return n(this,void 0,void 0,(function(){var n,u;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=i.sent(),a={error:u},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(c=r.return)?[4,c.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function P(e){return E(p.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof u.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return m(e);if(a.isArrayLike(e))return v(e);if(c.isPromise(e))return w(e);if(f.isAsyncIterable(e))return E(e);if(h.isIterable(e))return A(e);if(p.isReadableStreamLike(e))return P(e)}throw d.createInvalidObservableTypeError(e)},t.fromInteropObservable=m,t.fromArrayLike=v,t.fromPromise=w,t.fromIterable=A,t.fromAsyncIterable=E,t.fromReadableStreamLike=P},9750:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(7474);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},9795:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(8051),i=r(9724),o=r(7652),s=r(7214);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},9818:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(1245),i=r(5212),o=r(7214);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},9879:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(281),a=r(9517),c=r(4830),u=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,c,u;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var d=n(f),h=d.next();!h.done;h=d.next())h.value.remove(this)}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}else f.remove(this);var p=this.initialTeardown;if(s.isFunction(p))try{p()}catch(e){u=e instanceof a.UnsubscriptionError?e.errors:[e]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var y=n(g),b=y.next();!b.done;b=y.next()){var m=b.value;try{l(m)}catch(e){u=null!=u?u:[],e instanceof a.UnsubscriptionError?u=o(o([],i(u)),i(e.errors)):u.push(e)}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(c=y.return)&&c.call(y)}finally{if(r)throw r.error}}}if(u)throw new a.UnsubscriptionError(u)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&c.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&c.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.isFunction(e)?e():e.unsubscribe()}t.Subscription=u,t.EMPTY_SUBSCRIPTION=u.EMPTY,t.isSubscription=function(e){return e instanceof u||e&&"closed"in e&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},9902:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackProvider=void 0;const n=r(5347),i=r(8672),o=r(5317),s=BigInt("1"),a=BigInt("2");function c(){return(new Date).getTime()}function u(e){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?{type:"bigint",value:t.toString()}:t))}const l={stallTimeout:400,priority:1,weight:1},f={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};function d(e){if(null==e)return"null";if(Array.isArray(e))return"["+e.map(d).join(",")+"]";if("object"==typeof e&&"function"==typeof e.toJSON)return d(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":case"number":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{"+t.map((t=>`${JSON.stringify(t)}:${d(e[t])}`)).join(",")+"}"}}throw console.log("Could not serialize",e),new Error("Hmm...")}function h(e,t){if("error"in t){const e=t.error;let r;return r=(0,n.isError)(e,"CALL_EXCEPTION")?d(Object.assign({},e,{shortMessage:void 0,reason:void 0,info:void 0})):d(e),{tag:r,value:e}}const r=t.result;return{tag:d(r),value:r}}function p(e,t){const r=new Map;for(const{value:e,tag:n,weight:i}of t){const t=r.get(n)||{value:e,weight:0};t.weight+=i,r.set(n,t)}let n=null;for(const t of r.values())t.weight>=e&&(!n||t.weight>n.weight)&&(n=t);if(n)return n.value}function g(e,t){let r=0;const n=new Map;let i=null;const o=[];for(const{value:e,tag:s,weight:a}of t)if(e instanceof Error){const t=n.get(s)||{value:e,weight:0};t.weight+=a,n.set(s,t),(null==i||t.weight>i.weight)&&(i=t)}else o.push(BigInt(e)),r+=a;if(r<e)return i&&i.weight>=e?i.value:void 0;o.sort(((e,t)=>e<t?-1:t>e?1:0));const c=Math.floor(o.length/2);return o.length%2?o[c]:(o[c-1]+o[c]+s)/a}function y(e,t){const r=p(e,t);if(void 0!==r)return r;for(const e of t)if(e.value)return e.value}class b extends i.AbstractProvider{quorum;eventQuorum;eventWorkers;#zt;#Wt;#Kt;constructor(e,t,r){super(t,r),this.#zt=e.map((e=>e instanceof i.AbstractProvider?Object.assign({provider:e},l,f):Object.assign({},l,e,f))),this.#Wt=-2,this.#Kt=null,r&&null!=r.quorum?this.quorum=r.quorum:this.quorum=Math.ceil(this.#zt.reduce(((e,t)=>e+t.weight),0)/2),this.eventQuorum=1,this.eventWorkers=1,(0,n.assertArgument)(this.quorum<=this.#zt.reduce(((e,t)=>e+t.weight),0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return this.#zt.map((e=>{const t=Object.assign({},e);for(const e in t)"_"===e[0]&&delete t[e];return t}))}async _detectNetwork(){return o.Network.from((0,n.getBigInt)(await this._perform({method:"chainId"})))}async _translatePerform(e,t){switch(t.method){case"broadcastTransaction":return await e.broadcastTransaction(t.signedTransaction);case"call":return await e.call(Object.assign({},t.transaction,{blockTag:t.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(t.transaction);case"getBalance":return await e.getBalance(t.address,t.blockTag);case"getBlock":{const r="blockHash"in t?t.blockHash:t.blockTag;return await e.getBlock(r,t.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(t.address,t.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(t.filter);case"getStorage":return await e.getStorage(t.address,t.position,t.blockTag);case"getTransaction":return await e.getTransaction(t.hash);case"getTransactionCount":return await e.getTransactionCount(t.address,t.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(t.hash);case"getTransactionResult":return await e.getTransactionResult(t.hash)}}#Vt(e){const t=Array.from(e).map((e=>e.config)),r=this.#zt.slice();!function(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}}(r),r.sort(((e,t)=>e.priority-t.priority));for(const e of r)if(!e._lastFatalError&&-1===t.indexOf(e))return e;return null}#$t(e,t){const r=this.#Vt(e);if(null==r)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},i=c();return n.perform=(async()=>{try{r.requests++;const e=await this._translatePerform(r.provider,t);n.result={result:e}}catch(e){r.errorResponses++,n.result={error:e}}const e=c()-i;r._totalTime+=e,r.rollingDuration=.95*r.rollingDuration+.05*e,n.perform=null})(),n.staller=(async()=>{var e;await(e=r.stallTimeout,new Promise((t=>{setTimeout(t,e)}))),n.staller=null})(),e.add(n),n}async#Jt(){let e=this.#Kt;if(!e){const t=[];this.#zt.forEach((e=>{t.push((async()=>{await async function(e){for(;(e.blockNumber<0||e.blockNumber<0)&&(e._updateNumber||(e._updateNumber=(async()=>{try{const t=await e.provider.getBlockNumber();t>e.blockNumber&&(e.blockNumber=t)}catch(t){e.blockNumber=-2,e._lastFatalError=t,e._lastFatalErrorTimestamp=c()}e._updateNumber=null})()),await e._updateNumber,e.outOfSync++,!e._lastFatalError););}(e),e._lastFatalError||(e._network=await e.provider.getNetwork())})())})),this.#Kt=e=(async()=>{await Promise.all(t);let e=null;for(const t of this.#zt){if(t._lastFatalError)continue;const r=t._network;null==e?e=r.chainId:r.chainId!==e&&(0,n.assert)(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})()}await e}async#qt(e,t){const r=[];for(const n of e)if(null!=n.result){const{tag:e,value:i}=h(t.method,n.result);r.push({tag:e,value:i,weight:n.config.weight})}if(!(r.reduce(((e,t)=>e+t.weight),0)<this.quorum)){switch(t.method){case"getBlockNumber":{-2===this.#Wt&&(this.#Wt=Math.ceil((0,n.getNumber)(g(this.quorum,this.#zt.filter((e=>!e._lastFatalError)).map((e=>({value:e.blockNumber,tag:(0,n.getNumber)(e.blockNumber).toString(),weight:e.weight})))))));const e=function(e,t){if(1===e)return(0,n.getNumber)(g(e,t),"%internal");const r=new Map,i=(e,t)=>{const n=r.get(e)||{result:e,weight:0};n.weight+=t,r.set(e,n)};for(const{weight:e,value:r}of t){const t=(0,n.getNumber)(r);i(t-1,e),i(t,e),i(t+1,e)}let o,s=0;for(const{weight:t,result:n}of r.values())t>=e&&(t>s||null!=o&&t===s&&n>o)&&(s=t,o=n);return o}(this.quorum,r);if(void 0===e)return;return e>this.#Wt&&(this.#Wt=e),this.#Wt}case"getGasPrice":case"getPriorityFee":case"estimateGas":return g(this.quorum,r);case"getBlock":return"blockTag"in t&&"pending"===t.blockTag?y(this.quorum,r):p(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return p(this.quorum,r);case"broadcastTransaction":return y(this.quorum,r)}(0,n.assert)(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${u(t.method)})`})}}async#Qt(e,t){if(0===e.size)throw new Error("no runners?!");const r=[];let i=0;for(const t of e)t.perform&&r.push(t.perform),t.staller?r.push(t.staller):t.didBump||(t.didBump=!0,i++);const o=await this.#qt(e,t);if(void 0!==o){if(o instanceof Error)throw o;return o}for(let r=0;r<i;r++)this.#$t(e,t);return(0,n.assert)(r.length>0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:Array.from(e).map((e=>u(e.result)))}}),await Promise.race(r),await this.#Qt(e,t)}async _perform(e){if("broadcastTransaction"===e.method){const t=this.#zt.map((e=>null)),r=this.#zt.map((async({provider:r,weight:n},i)=>{try{const o=await r._perform(e);t[i]=Object.assign(h(e.method,{result:o}),{weight:n})}catch(r){t[i]=Object.assign(h(e.method,{error:r}),{weight:n})}}));for(;;){const e=t.filter((e=>null!=e));for(const{value:t}of e)if(!(t instanceof Error))return t;const i=p(this.quorum,t.filter((e=>null!=e)));if((0,n.isError)(i,"INSUFFICIENT_FUNDS"))throw i;const o=r.filter(((e,r)=>null==t[r]));if(0===o.length)break;await Promise.race(o)}const i=y(this.quorum,t);if((0,n.assert)(void 0!==i,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:t.map(u)}}),i instanceof Error)throw i;return i}await this.#Jt();const t=new Set;let r=0;for(;;){const n=this.#$t(t,e);if(null==n)break;if(r+=n.config.weight,r>=this.quorum)break}const i=await this.#Qt(t,e);for(const e of t)e.perform&&null==e.result&&e.config.lateResponses++;return i}async destroy(){for(const{provider:e}of this.#zt)e.destroy();super.destroy()}}t.FallbackProvider=b},9913:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(9512),i=r(281);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},9915:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(5212),i=r(7214);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},9943:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LangEn=void 0;const n=r(2684);let i=null;class o extends n.WordlistOwl{constructor(){super("en","0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==i&&(i=new o),i}}t.LangEn=o},9973:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showThrottleMessage=void 0;const r=new Set;t.showThrottleMessage=function(e){r.has(e)||(r.add(e),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${e} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}},9976:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=void 0;const n=r(5347),i={};function o(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new c(i,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function s(e,t){return new c(i,`bytes${t||""}`,e,{size:t})}const a=Symbol.for("_ethers_typed");class c{type;value;#j;_typedSymbol;constructor(e,t,r,o){null==o&&(o=null),(0,n.assertPrivate)(i,e,"Typed"),(0,n.defineProperties)(this,{_typedSymbol:a,type:t,value:r}),this.#j=o,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.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"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#j}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#j?-1:!1===this.#j?this.value.length:null}static from(e,t){return new c(i,e,t)}static uint8(e){return o(e,8)}static uint16(e){return o(e,16)}static uint24(e){return o(e,24)}static uint32(e){return o(e,32)}static uint40(e){return o(e,40)}static uint48(e){return o(e,48)}static uint56(e){return o(e,56)}static uint64(e){return o(e,64)}static uint72(e){return o(e,72)}static uint80(e){return o(e,80)}static uint88(e){return o(e,88)}static uint96(e){return o(e,96)}static uint104(e){return o(e,104)}static uint112(e){return o(e,112)}static uint120(e){return o(e,120)}static uint128(e){return o(e,128)}static uint136(e){return o(e,136)}static uint144(e){return o(e,144)}static uint152(e){return o(e,152)}static uint160(e){return o(e,160)}static uint168(e){return o(e,168)}static uint176(e){return o(e,176)}static uint184(e){return o(e,184)}static uint192(e){return o(e,192)}static uint200(e){return o(e,200)}static uint208(e){return o(e,208)}static uint216(e){return o(e,216)}static uint224(e){return o(e,224)}static uint232(e){return o(e,232)}static uint240(e){return o(e,240)}static uint248(e){return o(e,248)}static uint256(e){return o(e,256)}static uint(e){return o(e,256)}static int8(e){return o(e,-8)}static int16(e){return o(e,-16)}static int24(e){return o(e,-24)}static int32(e){return o(e,-32)}static int40(e){return o(e,-40)}static int48(e){return o(e,-48)}static int56(e){return o(e,-56)}static int64(e){return o(e,-64)}static int72(e){return o(e,-72)}static int80(e){return o(e,-80)}static int88(e){return o(e,-88)}static int96(e){return o(e,-96)}static int104(e){return o(e,-104)}static int112(e){return o(e,-112)}static int120(e){return o(e,-120)}static int128(e){return o(e,-128)}static int136(e){return o(e,-136)}static int144(e){return o(e,-144)}static int152(e){return o(e,-152)}static int160(e){return o(e,-160)}static int168(e){return o(e,-168)}static int176(e){return o(e,-176)}static int184(e){return o(e,-184)}static int192(e){return o(e,-192)}static int200(e){return o(e,-200)}static int208(e){return o(e,-208)}static int216(e){return o(e,-216)}static int224(e){return o(e,-224)}static int232(e){return o(e,-232)}static int240(e){return o(e,-240)}static int248(e){return o(e,-248)}static int256(e){return o(e,-256)}static int(e){return o(e,-256)}static bytes1(e){return s(e,1)}static bytes2(e){return s(e,2)}static bytes3(e){return s(e,3)}static bytes4(e){return s(e,4)}static bytes5(e){return s(e,5)}static bytes6(e){return s(e,6)}static bytes7(e){return s(e,7)}static bytes8(e){return s(e,8)}static bytes9(e){return s(e,9)}static bytes10(e){return s(e,10)}static bytes11(e){return s(e,11)}static bytes12(e){return s(e,12)}static bytes13(e){return s(e,13)}static bytes14(e){return s(e,14)}static bytes15(e){return s(e,15)}static bytes16(e){return s(e,16)}static bytes17(e){return s(e,17)}static bytes18(e){return s(e,18)}static bytes19(e){return s(e,19)}static bytes20(e){return s(e,20)}static bytes21(e){return s(e,21)}static bytes22(e){return s(e,22)}static bytes23(e){return s(e,23)}static bytes24(e){return s(e,24)}static bytes25(e){return s(e,25)}static bytes26(e){return s(e,26)}static bytes27(e){return s(e,27)}static bytes28(e){return s(e,28)}static bytes29(e){return s(e,29)}static bytes30(e){return s(e,30)}static bytes31(e){return s(e,31)}static bytes32(e){return s(e,32)}static address(e){return new c(i,"address",e)}static bool(e){return new c(i,"bool",!!e)}static bytes(e){return new c(i,"bytes",e)}static string(e){return new c(i,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new c(i,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===a}static dereference(e,t){if(c.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}t.Typed=c},9980:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(9328),i=r(5934),o=r(4383),s=r(8799),a=r(632),c=r(7699);t.first=function(e,t){var r=arguments.length>=2;return function(u){return u.pipe(e?i.filter((function(t,r){return e(t,r,u)})):c.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},9990:function(e,t,r){"use strict";r.r(t),r.d(t,{__addDisposableResource:function(){return j},__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return O},__asyncValues:function(){return _},__await:function(){return P},__awaiter:function(){return p},__classPrivateFieldGet:function(){return R},__classPrivateFieldIn:function(){return N},__classPrivateFieldSet:function(){return C},__createBinding:function(){return y},__decorate:function(){return a},__disposeResources:function(){return M},__esDecorate:function(){return u},__exportStar:function(){return b},__extends:function(){return i},__generator:function(){return g},__importDefault:function(){return I},__importStar:function(){return x},__makeTemplateObject:function(){return k},__metadata:function(){return h},__param:function(){return c},__propKey:function(){return f},__read:function(){return v},__rest:function(){return s},__runInitializers:function(){return l},__setFunctionName:function(){return d},__spread:function(){return w},__spreadArray:function(){return E},__spreadArrays:function(){return A},__values:function(){return m}});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,h=r.length-1;h>=0;h--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var y=(0,r[h])("accessor"===c?{get:f.get,set:f.set}:f[u],p);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=s(y.get))&&(f.get=a),(a=s(y.set))&&(f.set=a),(a=s(y.init))&&i.unshift(a)}else(a=s(y))&&("field"===c?i.unshift(a):f[u]=a)}l&&Object.defineProperty(l,n.name,f),d=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function g(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var y=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function b(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||y(t,e,r)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function A(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function E(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function P(e){return this instanceof P?(this.v=e,this):new P(e)}function O(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,u)}})),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=i[e](t)).value instanceof P?Promise.resolve(r.value.v).then(c,u):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return T(t,e),t}function I(e){return e&&e.__esModule?e:{default:e}}function R(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function j(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var B="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function M(e){function t(t){e.error=e.hasError?new B(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,(function(e){return t(e),i()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}t.default={__extends:i,__assign:o,__rest:s,__decorate:a,__param:c,__metadata:h,__awaiter:p,__generator:g,__createBinding:y,__exportStar:b,__values:m,__read:v,__spread:w,__spreadArrays:A,__spreadArray:E,__await:P,__asyncGenerator:O,__asyncDelegator:S,__asyncValues:_,__makeTemplateObject:k,__importStar:x,__importDefault:I,__classPrivateFieldGet:R,__classPrivateFieldSet:C,__classPrivateFieldIn:N,__addDisposableResource:j,__disposeResources:M}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var n=r(9148);return n.default}()}));
|