PageSourceSearch

https://www.melega.finance/_next/static/chunks/8091-bb17b190637e088b.js

js melega.finance collected 2026-09-26 20:16:02 UTC 223,369 bytes, 17 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8091],{65575:function(e,t,r){r.r(t),r.d(t,{AbiCoder:function(){return i.R},ConstructorFragment:function(){return n.Xg},ErrorFragment:function(){return n.IC},EventFragment:function(){return n.QV},FormatTypes:function(){return n.pc},Fragment:function(){return n.HY},FunctionFragment:function(){return n.YW},Indexed:function(){return o.Hk},Interface:function(){return o.vU},LogDescription:function(){return o.CC},ParamType:function(){return n._R},TransactionDescription:function(){return o.vk},checkResultErrors:function(){return s.BR},defaultAbiCoder:function(){return i.$}});var n=r(79155),i=r(64973),o=r(68342),s=r(54848)},71414:function(e,t,r){r.r(t),r.d(t,{_TypedDataEncoder:function(){return s.E},dnsEncode:function(){return i.Kn},hashMessage:function(){return o.r},id:function(){return n.id},isValidName:function(){return i.r1},messagePrefix:function(){return o.B},namehash:function(){return i.VM}});var n=r(32235),i=r(66154),o=r(3686),s=r(30788)},3686:function(e,t,r){r.d(t,{B:function(){return s},r:function(){return a}});var n=r(55969),i=r(90712),o=r(71320);let s="\x19Ethereum Signed Message:\n";function a(e){return"string"==typeof e&&(e=(0,o.Y0)(e)),(0,i.w)((0,n.zo)([(0,o.Y0)(s),(0,o.Y0)(String(e.length)),e]))}},92672:function(e,t,r){r.r(t),r.d(t,{HDNode:function(){return H},defaultPath:function(){return q},entropyToMnemonic:function(){return Z},getAccountPath:function(){return X},isValidMnemonic:function(){return J},mnemonicToEntropy:function(){return Q},mnemonicToSeed:function(){return V}});var n,i,o,s,a=r(16741);let u=!1,l=!1,c={debug:1,default:2,info:2,warning:3,error:4,off:5},h=c.default,f=null,d=function(){try{let e=[];
1if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(n=o||(o={})).DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF",(i=s||(s={})).UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED";let p="0123456789abcdef";class g{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",e),h>c[r]||console.log.apply(console,t)}debug(...e){this._log(g.levels.DEBUG,e)}info(...e){this._log(g.levels.INFO,e)}warn(...e){this._log(g.levels.WARNING,e)}makeError(e,t,r){if(l)return this.makeError("censored error",t,{});t||(t=g.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let i="";for(let o=0;o<t.length;o++)i+=p[t[o]>>4]+p[15&t[o]];n.push(e+"=Uint8Array(0x"+i+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let i=e,o="";switch(t){case s.NUMERIC_FAULT:{o="NUMERIC_FAULT";let a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":o+="-"+a;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case s.CALL_EXCEPTION:case s.INSUFFICIENT_FUNDS:case s.MISSING_NEW:case s.NONCE_EXPIRED:case s.REPLACEMENT_UNDERPRICED:case s.TRANSACTION_REPLACED:case s.UNPREDICTABLE_GAS_LIMIT:o=t}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let u=Error(e);return u.reason=i,u.code=t,Object.keys(r).forEach(function(e){u[e]=r[e]}),u}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,g.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),d&&this.throwError("platform missing String.prototype.normalize",g.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:d})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,g.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,g.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,g.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,g.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",g.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",g.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",g.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return f||(f=new g("logger/5.6.0")),f}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",g.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),u){if(!e)return;this.globalLogger().throwError("error censorship permanent",g.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!e,u=!!t}static setLogLevel(e){let t=c[e.toLowerCase()];if(null==t){g.globalLogger().warn("invalid log level - "+e);return}h=t}static from(e){return new g(e)}}g.errors=s,g.levels=o;let m=new g("bytes/5.6.1");function y(e){return!!e.toHexString}function v(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return v(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function E(e){return"number"==typeof e&&e==e&&e%1==0}function b(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;
1if("string"==typeof e||!E(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!E(r)||r<0||r>=256)return!1}return!0}function S(e,t){if(t||(t={}),"number"==typeof e){m.checkSafeUint53(e,"invalid arrayify value");let r=[];for(;e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),v(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),y(e)&&(e=e.toHexString()),R(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":m.throwArgumentError("hex data is odd-length","value",e));let i=[];for(let o=0;o<n.length;o+=2)i.push(parseInt(n.substring(o,o+2),16));return v(new Uint8Array(i))}return b(e)?v(new Uint8Array(e)):m.throwArgumentError("invalid arrayify value","value",e)}function w(e){let t=e.map(e=>S(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,t)=>(n.set(t,e),e+t.length),0),v(n)}function R(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let N="0123456789abcdef";function C(e,t){if(t||(t={}),"number"==typeof e){m.checkSafeUint53(e,"invalid hexlify value");let r="";for(;e;)r=N[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),y(e))return e.toHexString();if(R(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":m.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(b(e)){let n="0x";for(let i=0;i<e.length;i++){let o=e[i];n+=N[(240&o)>>4]+N[15&o]}return n}return m.throwArgumentError("invalid hexlify value","value",e)}function A(e,t,r){return("string"!=typeof e?e=C(e):(!R(e)||e.length%2)&&m.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r)?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function I(e,t){for("string"!=typeof e?e=C(e):R(e)||m.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&m.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}var P=r(10528),O=r(71320),T=r(58225);function U(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}new g("properties/5.6.0");var _=r(55127),D=r(25931),M=r(21723),x=r(97578),F=r(56279);let k=new g("hdnode/5.6.2"),L=P.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),G=(0,O.Y0)("Bitcoin seed");function j(e){return(1<<e)-1<<8-e}function K(e){return I(C(e),32)}function B(e){return a.Base58.encode(w([e,A((0,D.JQ)((0,D.JQ)(e)),0,4)]))}function W(e){if(null==e)return F.E.en;if("string"==typeof e){let t=F.E[e];return null==t&&k.throwArgumentError("unknown locale","wordlist",e),t}return e}let z={},q="m/44'/60'/0'/0/0";class H{constructor(e,t,r,n,i,o,s,a){if(e!==z)throw Error("HDNode constructor cannot be called directly");if(t){let u=new _.SigningKey(t);U(this,"privateKey",u.privateKey),U(this,"publicKey",u.compressedPublicKey)}else U(this,"privateKey",null),U(this,"publicKey",C(r));U(this,"parentFingerprint",n),U(this,"fingerprint",A((0,D.bP)((0,D.JQ)(this.publicKey)),0,4)),U(this,"address",(0,x.computeAddress)(this.publicKey)),U(this,"chainCode",i),U(this,"index",o),U(this,"depth",s),null==a?(U(this,"mnemonic",null),U(this,"path",null)):"string"==typeof a?(U(this,"mnemonic",null),U(this,"path",a)):(U(this,"mnemonic",a),U(this,"path",a.path))}get extendedKey(){if(this.depth>=256)throw Error("Depth too large!");return B(w([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",C(this.depth),this.parentFingerprint,I(C(this.index),4),this.chainCode,null!=this.privateKey?w(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new H(z,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(2147483647&e));let r=new Uint8Array(37);if(2147483648&e){if(!this.privateKey)throw Error("cannot derive child of neutered node");r.set(S(this.privateKey),1),t&&(t+="'")}else r.set(S(this.publicKey));for(let n=24;n>=0;n-=8)r[33+(n>>3)]=e>>
124-n&255;let i=S((0,D.Gy)(M.p.sha512,this.chainCode,r)),o=i.slice(0,32),s=i.slice(32),a=null,u=null;if(this.privateKey)a=K(P.O$.from(o).add(this.privateKey).mod(L));else{let l=new _.SigningKey(C(o));u=l._addPoint(this.publicKey)}let c=t,h=this.mnemonic;return h&&(c=Object.freeze({phrase:h.phrase,path:t,locale:h.locale||"en"})),new H(z,a,u,this.fingerprint,K(s),e,this.depth+1,c)}derivePath(e){let t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let n=0;n<t.length;n++){let i=t[n];if(i.match(/^[0-9]+'$/)){let o=parseInt(i.substring(0,i.length-1));if(o>=2147483648)throw Error("invalid path index - "+i);r=r._derive(2147483648+o)}else if(i.match(/^[0-9]+$/)){let s=parseInt(i);if(s>=2147483648)throw Error("invalid path index - "+i);r=r._derive(s)}else throw Error("invalid path component - "+i)}return r}static _fromSeed(e,t){let r=S(e);if(r.length<16||r.length>64)throw Error("invalid seed");let n=S((0,D.Gy)(M.p.sha512,G,r));return new H(z,K(n.slice(0,32)),null,"0x00000000",K(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=Z(Q(e,r=W(r)),r),H._fromSeed(V(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return H._fromSeed(e,null)}static fromExtendedKey(e){let t=a.Base58.decode(e);(82!==t.length||B(t.slice(0,78))!==e)&&k.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let r=t[4],n=C(t.slice(5,9)),i=parseInt(C(t.slice(9,13)).substring(2),16),o=C(t.slice(13,45)),s=t.slice(45,78);switch(C(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new H(z,null,C(s),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new H(z,C(s.slice(1)),null,n,o,i,r,null)}return k.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function V(e,t){t||(t="");let r=(0,O.Y0)("mnemonic"+t,O.Uj.NFKD);return(0,T.n)((0,O.Y0)(e,O.Uj.NFKD),r,2048,64,"sha512")}function Q(e,t){t=W(t),k.checkNormalize();let r=t.split(e);if(r.length%3!=0)throw Error("invalid mnemonic");let n=S(new Uint8Array(Math.ceil(11*r.length/8))),i=0;for(let o=0;o<r.length;o++){let s=t.getWordIndex(r[o].normalize("NFKD"));if(-1===s)throw Error("invalid mnemonic");for(let a=0;a<11;a++)s&1<<10-a&&(n[i>>3]|=1<<7-i%8),i++}let u=32*r.length/3,l=r.length/3,c=j(l),h=S((0,D.JQ)(n.slice(0,u/8)))[0]&c;if(h!==(n[n.length-1]&c))throw Error("invalid checksum");return C(n.slice(0,u/8))}function Z(e,t){if(t=W(t),(e=S(e)).length%4!=0||e.length<16||e.length>32)throw Error("invalid entropy");let r=[0],n=11;for(let i=0;i<e.length;i++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);let o=e.length/4,s=S((0,D.JQ)(e))[0]&j(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map(e=>t.getWord(e)))}function J(e,t){try{return Q(e,t),!0}catch(r){}return!1}function X(e){return("number"!=typeof e||e<0||e>=2147483648||e%1)&&k.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}},9050:function(e,t,r){r.d(t,{i:function(){return n}});let n="json-wallets/5.6.1"},82783:function(e,t,r){r.r(t),r.d(t,{decryptCrowdsale:function(){return m},decryptJsonWallet:function(){return E},decryptJsonWalletSync:function(){return b},decryptKeystore:function(){return v.pe},decryptKeystoreSync:function(){return v.hb},encryptKeystore:function(){return v.HI},getJsonWalletAddress:function(){return y.Rb},isCrowdsaleWallet:function(){return y.LW},isKeystoreWallet:function(){return y.aO}});var n=r(8202),i=r.n(n),o=r(84489),s=r(81755),a=r(20750),u=r(58225),l=r(71320),c=r(68431),h=r(82318),f=r(9050),d=r(46143);let p=new h.Yd(f.i);class g extends c.dk{isCrowdsaleAccount(e){return!!(e&&e._isCrowdsaleAccount)}}function m(e,t){let r=JSON.parse(e);t=(0,d.Ij)(t);let n=(0,o.getAddress)((0,d.gx)(r,"ethaddr")),c=(0,d.p3)((0,d.gx)(r,"encseed"));c&&c.length%16==0||p.throwArgumentError("invalid encseed","json",e);let h=(0,s.lE)((0,u.n)(t,t,2e3,32,"sha256")).slice(0,16),f=c.slice(0,16),m=c.slice(16),y=new(i()).ModeOfOperation.cbc(h,f),v=i().padding.pkcs7.strip((0,s.lE)(y.decrypt(m))),E="";for(let b=0;b<v.length;b++)E+=String.fromCharCode(v[b]);let S=(0,l.Y0)(E),w=(0,a.w)(S);return new g({_isCrowdsaleAccount:!0,address:n,privateKey:w})}var y=r(61609),v=r(92338);function E(e,t,r){if((0,y.LW)(e)){r&&r(0);let n=m(e,t);return r&&r(1),Promise.resolve(n)}return(0,y.aO)(e)?(0,v.pe)(e,t,r):Promise.reject(Error("invalid JSON wallet"))}function b(e,t){if((0,y.LW)(e))return m(e,t);if((0,y.aO)(e))return(0,v.hb)(e,t);throw Error("invalid JSON wallet")}},61609:function(e,t,r){r.d(t,{LW:function(){return i},Rb:function(){return s},aO:function(){return o}});var n=r(84489);function i(e){let t=null;try{t=JSON.parse(e)}catch(r){return!1}return t.encseed&&t.ethaddr}function o(e){let t=null;try{t=JSON.parse(e)}catch(r){return!1}
1return!!t.version&&parseInt(t.version)===t.version&&3===parseInt(t.version)}function s(e){if(i(e))try{return(0,n.getAddress)(JSON.parse(e).ethaddr)}catch(t){return null}if(o(e))try{return(0,n.getAddress)(JSON.parse(e).address)}catch(r){}return null}},92338:function(e,t,r){r.d(t,{HI:function(){return I},hb:function(){return C},pe:function(){return A}});var n=r(8202),i=r.n(n),o=r(14689),s=r.n(o),a=r(84489),u=r(81755),l=r(92672),c=r(20750),h=r(58225),f=r(82936),d=r(68431),p=r(97578),g=r(46143),m=r(82318),y=r(9050);let v=new m.Yd(y.i);function E(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class b extends d.dk{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function S(e,t){let r=(0,g.p3)((0,g.gx)(e,"crypto/ciphertext")),n=(0,u.Dv)((0,c.w)((0,u.zo)([t.slice(16,32),r]))).substring(2);if(n!==(0,g.gx)(e,"crypto/mac").toLowerCase())throw Error("invalid password");let o=function(e,t,r){let n=(0,g.gx)(e,"crypto/cipher");if("aes-128-ctr"===n){let o=(0,g.p3)((0,g.gx)(e,"crypto/cipherparams/iv")),s=new(i()).Counter(o),a=new(i()).ModeOfOperation.ctr(t,s);return(0,u.lE)(a.decrypt(r))}return null}(e,t.slice(0,16),r);o||v.throwError("unsupported cipher",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});let s=t.slice(32,64),h=(0,p.computeAddress)(o);if(e.address){let f=e.address.toLowerCase();if("0x"!==f.substring(0,2)&&(f="0x"+f),(0,a.getAddress)(f)!==h)throw Error("address mismatch")}let d={_isKeystoreAccount:!0,address:h,privateKey:(0,u.Dv)(o)};if("0.1"===(0,g.gx)(e,"x-ethers/version")){let y=(0,g.p3)((0,g.gx)(e,"x-ethers/mnemonicCiphertext")),E=(0,g.p3)((0,g.gx)(e,"x-ethers/mnemonicCounter")),S=new(i()).Counter(E),w=new(i()).ModeOfOperation.ctr(s,S),R=(0,g.gx)(e,"x-ethers/path")||l.defaultPath,N=(0,g.gx)(e,"x-ethers/locale")||"en",C=(0,u.lE)(w.decrypt(y));try{let A=(0,l.entropyToMnemonic)(C,N),I=l.HDNode.fromMnemonic(A,null,N).derivePath(R);if(I.privateKey!=d.privateKey)throw Error("mnemonic mismatch");d.mnemonic=I.mnemonic}catch(P){if(P.code!==m.Yd.errors.INVALID_ARGUMENT||"wordlist"!==P.argument)throw P}}return new b(d)}function w(e,t,r,n,i){return(0,u.lE)((0,h.n)(e,t,r,n,i))}function R(e,t,r,n,i){return Promise.resolve(w(e,t,r,n,i))}function N(e,t,r,n,i){let o=(0,g.Ij)(t),s=(0,g.gx)(e,"crypto/kdf");if(s&&"string"==typeof s){let a=function(e,t){return v.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===s.toLowerCase()){let u=(0,g.p3)((0,g.gx)(e,"crypto/kdfparams/salt")),l=parseInt((0,g.gx)(e,"crypto/kdfparams/n")),c=parseInt((0,g.gx)(e,"crypto/kdfparams/r")),h=parseInt((0,g.gx)(e,"crypto/kdfparams/p"));l&&c&&h||a("kdf",s),(l&l-1)!=0&&a("N",l);let f=parseInt((0,g.gx)(e,"crypto/kdfparams/dklen"));return 32!==f&&a("dklen",f),n(o,u,l,c,h,64,i)}if("pbkdf2"===s.toLowerCase()){let d=(0,g.p3)((0,g.gx)(e,"crypto/kdfparams/salt")),p=null,m=(0,g.gx)(e,"crypto/kdfparams/prf");"hmac-sha256"===m?p="sha256":"hmac-sha512"===m?p="sha512":a("prf",m);let y=parseInt((0,g.gx)(e,"crypto/kdfparams/c")),E=parseInt((0,g.gx)(e,"crypto/kdfparams/dklen"));return 32!==E&&a("dklen",E),r(o,d,y,E,p)}}return v.throwArgumentError("unsupported key-derivation function","kdf",s)}function C(e,t){let r=JSON.parse(e),n=N(r,t,w,s().syncScrypt);return S(r,n)}function A(e,t,r){var n,i,o,a;return n=this,i=void 0,o=void 0,a=function*(){let n=JSON.parse(e),i=yield N(n,t,R,s().scrypt,r);return S(n,i)},new(o||(o=Promise))(function(e,t){function r(e){try{u(a.next(e))}catch(r){t(r)}}function s(e){try{u(a.throw(e))}catch(r){t(r)}}function u(t){var n;t.done?e(t.value):((n=t.value)instanceof o?n:new o(function(e){e(n)})).then(r,s)}u((a=a.apply(n,i||[])).next())})}function I(e,t,r,n){try{if((0,a.getAddress)(e.address)!==(0,p.computeAddress)(e.privateKey))throw Error("address/privateKey mismatch");if(E(e)){let o=e.mnemonic,h=l.HDNode.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path||l.defaultPath);if(h.privateKey!=e.privateKey)throw Error("mnemonic mismatch")}}catch(d){return Promise.reject(d)}"function"!=typeof r||n||(n=r,r={}),r||(r={});let m=(0,u.lE)(e.privateKey),y=(0,g.Ij)(t),v=null,b=null,S=null;if(E(e)){let w=e.mnemonic;v=(0,u.lE)((0,l.mnemonicToEntropy)(w.phrase,w.locale||"en")),b=w.path||l.defaultPath,S=w.locale||"en"}let R=r.client;R||(R="ethers.js");let N=null;N=r.salt?(0,u.lE)(r.salt):(0,f.O)(32);let C=null;if(r.iv){if(16!==(C=(0,u.lE)(r.iv)).length)throw Error("invalid iv")}else C=(0,f.O)(16);let A=null;if(r.uuid){if(16!==(A=(0,u.lE)(r.uuid)).length)throw Error("invalid uuid")}else A=(0,f.O)(16);let I=131072,P=8,O=1;return r.scrypt&&(r.scrypt.N&&(I=r.scrypt.N),r.scrypt.r&&(P=r.scrypt.r),r.scrypt.p&&(O=r.scrypt.p)),s().scrypt
1(y,N,I,P,O,64,n).then(t=>{t=(0,u.lE)(t);let r=t.slice(0,16),n=t.slice(16,32),o=t.slice(32,64),s=new(i()).Counter(C),a=new(i()).ModeOfOperation.ctr(r,s),l=(0,u.lE)(a.encrypt(m)),h=(0,c.w)((0,u.zo)([n,l])),d={address:e.address.substring(2).toLowerCase(),id:(0,g.EH)(A),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.Dv)(C).substring(2)},ciphertext:(0,u.Dv)(l).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.Dv)(N).substring(2),n:I,dklen:32,p:O,r:P},mac:h.substring(2)}};if(v){let p=(0,f.O)(16),y=new(i()).Counter(p),E=new(i()).ModeOfOperation.ctr(o,y),w=(0,u.lE)(E.encrypt(v)),T=new Date,U=T.getUTCFullYear()+"-"+(0,g.VP)(T.getUTCMonth()+1,2)+"-"+(0,g.VP)(T.getUTCDate(),2)+"T"+(0,g.VP)(T.getUTCHours(),2)+"-"+(0,g.VP)(T.getUTCMinutes(),2)+"-"+(0,g.VP)(T.getUTCSeconds(),2)+".0Z";d["x-ethers"]={client:R,gethFilename:"UTC--"+U+"--"+d.address,mnemonicCounter:(0,u.Dv)(p).substring(2),mnemonicCiphertext:(0,u.Dv)(w).substring(2),path:b,locale:S,version:"0.1"}}return JSON.stringify(d)})}},46143:function(e,t,r){r.d(t,{EH:function(){return l},Ij:function(){return a},VP:function(){return s},gx:function(){return u},p3:function(){return o}});var n=r(81755),i=r(71320);function o(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,n.lE)(e)}function s(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function a(e){return"string"==typeof e?(0,i.Y0)(e,i.Uj.NFKC):(0,n.lE)(e)}function u(e,t){let r=e,n=t.toLowerCase().split("/");for(let i=0;i<n.length;i++){let o=null;for(let s in r)if(s.toLowerCase()===n[i]){o=r[s];break}if(null===o)return null;r=o}return r}function l(e){let t=(0,n.lE)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=(0,n.Dv)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},81755:function(e,t,r){r.d(t,{lE:function(){return l},zo:function(){return c},Dv:function(){return d}});var n=r(82318);let i=new n.Yd("bytes/5.6.1");function o(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return"number"==typeof e&&e==e&&e%1==0}function u(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!a(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!a(r)||r<0||r>=256)return!1}return!0}function l(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid arrayify value");let r=[];for(;e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),h(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":i.throwArgumentError("hex data is odd-length","value",e));let a=[];for(let l=0;l<n.length;l+=2)a.push(parseInt(n.substring(l,l+2),16));return s(new Uint8Array(a))}return u(e)?s(new Uint8Array(e)):i.throwArgumentError("invalid arrayify value","value",e)}function c(e){let t=e.map(e=>l(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,t)=>(n.set(t,e),e+t.length),0),s(n)}function h(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let f="0123456789abcdef";function d(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid hexlify value");let r="";for(;e;)r=f[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(u(e)){let n="0x";for(let s=0;s<e.length;s++){let a=e[s];n+=f[(240&a)>>4]+f[15&a]}return n}return i.throwArgumentError("invalid hexlify value","value",e)}},20750:function(e,t,r){r.d(t,{w:function(){return s}});var n=r(83669),i=r.n(n),o=r(81755);function s(e){return"0x"+i().keccak_256((0,o.lE)(e))}},82318:function(e,t,r){var n,i,o,s;r.d(t,{Yd:function(){return p}});let a=!1,u=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},c=l.default,h=null,f=function(){try{let e=[];
1if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(o=n||(n={})).DEBUG="DEBUG",o.INFO="INFO",o.WARNING="WARNING",o.ERROR="ERROR",o.OFF="OFF",(s=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",s.NOT_IMPLEMENTED="NOT_IMPLEMENTED",s.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",s.NETWORK_ERROR="NETWORK_ERROR",s.SERVER_ERROR="SERVER_ERROR",s.TIMEOUT="TIMEOUT",s.BUFFER_OVERRUN="BUFFER_OVERRUN",s.NUMERIC_FAULT="NUMERIC_FAULT",s.MISSING_NEW="MISSING_NEW",s.INVALID_ARGUMENT="INVALID_ARGUMENT",s.MISSING_ARGUMENT="MISSING_ARGUMENT",s.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",s.CALL_EXCEPTION="CALL_EXCEPTION",s.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",s.NONCE_EXPIRED="NONCE_EXPIRED",s.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",s.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",s.TRANSACTION_REPLACED="TRANSACTION_REPLACED";let d="0123456789abcdef";class p{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==l[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>l[r]||console.log.apply(console,t)}debug(...e){this._log(p.levels.DEBUG,e)}info(...e){this._log(p.levels.INFO,e)}warn(...e){this._log(p.levels.WARNING,e)}makeError(e,t,r){if(u)return this.makeError("censored error",t,{});t||(t=p.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let i="";for(let o=0;o<t.length;o++)i+=d[t[o]>>4]+d[15&t[o]];n.push(e+"=Uint8Array(0x"+i+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let o=e,s="";switch(t){case i.NUMERIC_FAULT:{s="NUMERIC_FAULT";let a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":s+="-"+a;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let l=Error(e);return l.reason=o,l.code=t,Object.keys(r).forEach(function(e){l[e]=r[e]}),l}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,p.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,p.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return h||(h=new p("logger/5.6.0")),h}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!e)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!e,a=!!t}static setLogLevel(e){let t=l[e.toLowerCase()];if(null==t){p.globalLogger().warn("invalid log level - "+e);return}c=t}static from(e){return new p(e)}}p.errors=i,p.levels=n},68431:function(e,t,r){r.d(t,{dk:function(){return s}});var n=r(82318);let i=new n.Yd("properties/5.6.0"),o={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};class s{constructor(e){for(let t in e)this[t]=function e(t){return function(t){if(function e(t){if(null==t||o[typeof t])return!0;
1if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;let r=Object.keys(t);for(let n=0;n<r.length;n++){let s=null;try{s=t[r[n]]}catch(a){continue}if(!e(s))return!1}return!0}return i.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}(t))return t;if(Array.isArray(t))return Object.freeze(t.map(t=>e(t)));if("object"==typeof t){let r={};for(let n in t){let s=t[n];void 0!==s&&Object.defineProperty(r,n,{enumerable:!0,value:e(s),writable:!1})}return r}return i.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}(t)}(e[t])}}},58225:function(e,t,r){r.d(t,{n:function(){return N}});let n=!1,i=!1,o={debug:1,default:2,info:2,warning:3,error:4,off:5},s=o.default,a=null,u=function(){try{let e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(E=S||(S={})).DEBUG="DEBUG",E.INFO="INFO",E.WARNING="WARNING",E.ERROR="ERROR",E.OFF="OFF",(b=w||(w={})).UNKNOWN_ERROR="UNKNOWN_ERROR",b.NOT_IMPLEMENTED="NOT_IMPLEMENTED",b.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",b.NETWORK_ERROR="NETWORK_ERROR",b.SERVER_ERROR="SERVER_ERROR",b.TIMEOUT="TIMEOUT",b.BUFFER_OVERRUN="BUFFER_OVERRUN",b.NUMERIC_FAULT="NUMERIC_FAULT",b.MISSING_NEW="MISSING_NEW",b.INVALID_ARGUMENT="INVALID_ARGUMENT",b.MISSING_ARGUMENT="MISSING_ARGUMENT",b.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",b.CALL_EXCEPTION="CALL_EXCEPTION",b.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",b.NONCE_EXPIRED="NONCE_EXPIRED",b.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",b.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",b.TRANSACTION_REPLACED="TRANSACTION_REPLACED";let l="0123456789abcdef";class c{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),s>o[r]||console.log.apply(console,t)}debug(...e){this._log(c.levels.DEBUG,e)}info(...e){this._log(c.levels.INFO,e)}warn(...e){this._log(c.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=c.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let i="";for(let o=0;o<t.length;o++)i+=l[t[o]>>4]+l[15&t[o]];n.push(e+"=Uint8Array(0x"+i+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let o=e,s="";switch(t){case w.NUMERIC_FAULT:{s="NUMERIC_FAULT";let a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":s+="-"+a;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case w.CALL_EXCEPTION:case w.INSUFFICIENT_FUNDS:case w.MISSING_NEW:case w.NONCE_EXPIRED:case w.REPLACEMENT_UNDERPRICED:case w.TRANSACTION_REPLACED:case w.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let u=Error(e);return u.reason=o,u.code=t,Object.keys(r).forEach(function(e){u[e]=r[e]}),u}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,c.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),u&&this.throwError("platform missing String.prototype.normalize",c.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,c.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,c.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,c.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,c.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",c.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",c.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",c.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new c("logger/5.6.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",c.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",c.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){let t=o[e.toLowerCase()];if(null==t){c.globalLogger().warn("invalid log level - "+e);return}s=t}static from(e){return new c(e)}}c.errors=w,c.levels=S;let h=new c("bytes/5.6.1");function f(e){return!!e.toHexString}function d(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return d(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function p(e){return"number"==typeof e&&e==e&&e%1==0}function g(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;
1if("string"==typeof e||!p(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!p(r)||r<0||r>=256)return!1}return!0}function m(e,t){if(t||(t={}),"number"==typeof e){h.checkSafeUint53(e,"invalid arrayify value");let r=[];for(;e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),d(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),f(e)&&(e=e.toHexString()),y(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":h.throwArgumentError("hex data is odd-length","value",e));let i=[];for(let o=0;o<n.length;o+=2)i.push(parseInt(n.substring(o,o+2),16));return d(new Uint8Array(i))}return g(e)?d(new Uint8Array(e)):h.throwArgumentError("invalid arrayify value","value",e)}function y(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let v="0123456789abcdef";var E,b,S,w,R=r(25931);function N(e,t,r,n,i){let o,s,a;e=m(e),t=m(t);let u=1,l=new Uint8Array(n),c=new Uint8Array(t.length+4);c.set(t);for(let d=1;d<=u;d++){c[t.length]=d>>24&255,c[t.length+1]=d>>16&255,c[t.length+2]=d>>8&255,c[t.length+3]=255&d;let p=m((0,R.Gy)(i,e,c));o||(o=p.length,a=new Uint8Array(o),u=Math.ceil(n/o),s=n-(u-1)*o),a.set(p);for(let E=1;E<r;E++){p=m((0,R.Gy)(i,e,p));for(let b=0;b<o;b++)a[b]^=p[b]}let S=(d-1)*o,w=d===u?s:o;l.set(m(a).slice(0,w),S)}return function(e,t){if(t||(t={}),"number"==typeof e){h.checkSafeUint53(e,"invalid hexlify value");let r="";for(;e;)r=v[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),f(e))return e.toHexString();if(y(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":h.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(g(e)){let n="0x";for(let i=0;i<e.length;i++){let o=e[i];n+=v[(240&o)>>4]+v[15&o]}return n}return h.throwArgumentError("invalid hexlify value","value",e)}(l)}},91178:function(e,t,r){r.r(t),r.d(t,{randomBytes:function(){return n.O},shuffled:function(){return i.y}});var n=r(82936),i=r(56938)},82936:function(e,t,r){var n,i,o,s;r.d(t,{O:function(){return S}});let a=!1,u=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},c=l.default,h=null,f=function(){try{let e=[];
1if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(o=n||(n={})).DEBUG="DEBUG",o.INFO="INFO",o.WARNING="WARNING",o.ERROR="ERROR",o.OFF="OFF",(s=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",s.NOT_IMPLEMENTED="NOT_IMPLEMENTED",s.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",s.NETWORK_ERROR="NETWORK_ERROR",s.SERVER_ERROR="SERVER_ERROR",s.TIMEOUT="TIMEOUT",s.BUFFER_OVERRUN="BUFFER_OVERRUN",s.NUMERIC_FAULT="NUMERIC_FAULT",s.MISSING_NEW="MISSING_NEW",s.INVALID_ARGUMENT="INVALID_ARGUMENT",s.MISSING_ARGUMENT="MISSING_ARGUMENT",s.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",s.CALL_EXCEPTION="CALL_EXCEPTION",s.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",s.NONCE_EXPIRED="NONCE_EXPIRED",s.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",s.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",s.TRANSACTION_REPLACED="TRANSACTION_REPLACED";let d="0123456789abcdef";class p{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==l[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>l[r]||console.log.apply(console,t)}debug(...e){this._log(p.levels.DEBUG,e)}info(...e){this._log(p.levels.INFO,e)}warn(...e){this._log(p.levels.WARNING,e)}makeError(e,t,r){if(u)return this.makeError("censored error",t,{});t||(t=p.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let i="";for(let o=0;o<t.length;o++)i+=d[t[o]>>4]+d[15&t[o]];n.push(e+"=Uint8Array(0x"+i+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let o=e,s="";switch(t){case i.NUMERIC_FAULT:{s="NUMERIC_FAULT";let a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":s+="-"+a;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let l=Error(e);return l.reason=o,l.code=t,Object.keys(r).forEach(function(e){l[e]=r[e]}),l}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,p.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,p.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return h||(h=new p("logger/5.6.0")),h}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!e)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!e,a=!!t}static setLogLevel(e){let t=l[e.toLowerCase()];if(null==t){p.globalLogger().warn("invalid log level - "+e);return}c=t}static from(e){return new p(e)}}p.errors=i,p.levels=n;let g=new p("bytes/5.6.1");function m(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);
1return m(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function y(e){return"number"==typeof e&&e==e&&e%1==0}let v=new p("random/5.6.1"),E=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("unable to locate global object")}(),b=E.crypto||E.msCrypto;function S(e){(e<=0||e>1024||e%1||e!=e)&&v.throwArgumentError("invalid length","length",e);let t=new Uint8Array(e);return b.getRandomValues(t),function(e,t){var r,n;if(t||(t={}),"number"==typeof e){g.checkSafeUint53(e,"invalid arrayify value");let i=[];for(;e;)i.unshift(255&e),e=parseInt(String(e/256));return 0===i.length&&i.push(0),m(new Uint8Array(i))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),e.toHexString&&(e=e.toHexString()),"string"==typeof(r=e)&&r.match(/^0x[0-9A-Fa-f]*$/)&&(!n||r.length===2+2*n)){let o=e.substring(2);o.length%2&&("left"===t.hexPad?o="0"+o:"right"===t.hexPad?o+="0":g.throwArgumentError("hex data is odd-length","value",e));let s=[];for(let a=0;a<o.length;a+=2)s.push(parseInt(o.substring(a,a+2),16));return m(new Uint8Array(s))}return!function(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!y(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!y(r)||r<0||r>=256)return!1}return!0}(e)?g.throwArgumentError("invalid arrayify value","value",e):m(new Uint8Array(e))}(t)}b&&b.getRandomValues||(v.warn("WARNING: Missing strong random number source"),b={getRandomValues:function(e){return v.throwError("no secure random source avaialble",p.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},48343:function(e,t,r){r.r(t),r.d(t,{SupportedAlgorithm:function(){return i.p},computeHmac:function(){return n.Gy},ripemd160:function(){return n.bP},sha256:function(){return n.JQ},sha512:function(){return n.o}});var n=r(25931),i=r(21723)},7987:function(e,t,r){r.d(t,{F:function(){return a},s:function(){return s}});var n=r(88210),i=r(13279),o=r(71320);function s(e){let t=(0,o.Y0)(e);if(t.length>31)throw Error("bytes32 string must be less than 32 bytes");return(0,i.Dv)((0,i.zo)([t,n.R]).slice(0,32))}function a(e){let t=(0,i.lE)(e);if(32!==t.length)throw Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,o.ZN)(t.slice(0,r))}},47969:function(e,t,r){r.r(t),r.d(t,{UnicodeNormalizationForm:function(){return o.Uj},Utf8ErrorFuncs:function(){return o.te},Utf8ErrorReason:function(){return o.Uw},_toEscapedUtf8String:function(){return o.U$},formatBytes32String:function(){return n.s},nameprep:function(){return i.Ll},parseBytes32String:function(){return n.F},toUtf8Bytes:function(){return o.Y0},toUtf8CodePoints:function(){return o.XL},toUtf8String:function(){return o.ZN}});var n=r(7987),i=r(68953),o=r(71320)},36007:function(e,t,r){r.r(t),r.d(t,{Wallet:function(){return z},verifyMessage:function(){return q},verifyTypedData:function(){return H}});var n,i,o,s,a=r(84489),u=r(24954),l=r(55659);let c=!1,h=!1,f={debug:1,default:2,info:2,warning:3,error:4,off:5},d=f.default,p=null,g=function(){try{let e=[];
1if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(n=o||(o={})).DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF",(i=s||(s={})).UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED";let m="0123456789abcdef";class y{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==f[r]&&this.throwArgumentError("invalid log level name","logLevel",e),d>f[r]||console.log.apply(console,t)}debug(...e){this._log(y.levels.DEBUG,e)}info(...e){this._log(y.levels.INFO,e)}warn(...e){this._log(y.levels.WARNING,e)}makeError(e,t,r){if(h)return this.makeError("censored error",t,{});t||(t=y.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let i="";for(let o=0;o<t.length;o++)i+=m[t[o]>>4]+m[15&t[o]];n.push(e+"=Uint8Array(0x"+i+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let i=e,o="";switch(t){case s.NUMERIC_FAULT:{o="NUMERIC_FAULT";let a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":o+="-"+a;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case s.CALL_EXCEPTION:case s.INSUFFICIENT_FUNDS:case s.MISSING_NEW:case s.NONCE_EXPIRED:case s.REPLACEMENT_UNDERPRICED:case s.TRANSACTION_REPLACED:case s.UNPREDICTABLE_GAS_LIMIT:o=t}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let u=Error(e);return u.reason=i,u.code=t,Object.keys(r).forEach(function(e){u[e]=r[e]}),u}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,y.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),g&&this.throwError("platform missing String.prototype.normalize",y.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:g})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,y.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,y.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,y.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,y.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",y.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",y.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",y.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return p||(p=new y("logger/5.6.0")),p}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",y.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),c){if(!e)return;this.globalLogger().throwError("error censorship permanent",y.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}h=!!e,c=!!t}static setLogLevel(e){let t=f[e.toLowerCase()];if(null==t){y.globalLogger().warn("invalid log level - "+e);return}d=t}static from(e){return new y(e)}}y.errors=s,y.levels=o;let v=new y("bytes/5.6.1");function E(e){return!!e.toHexString}function b(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return b(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function S(e){return"number"==typeof e&&e==e&&e%1==0}function w(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;
1if("string"==typeof e||!S(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!S(r)||r<0||r>=256)return!1}return!0}function R(e,t){if(t||(t={}),"number"==typeof e){v.checkSafeUint53(e,"invalid arrayify value");let r=[];for(;e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),b(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),E(e)&&(e=e.toHexString()),C(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":v.throwArgumentError("hex data is odd-length","value",e));let i=[];for(let o=0;o<n.length;o+=2)i.push(parseInt(n.substring(o,o+2),16));return b(new Uint8Array(i))}return w(e)?b(new Uint8Array(e)):v.throwArgumentError("invalid arrayify value","value",e)}function N(e){let t=e.map(e=>R(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,t)=>(n.set(t,e),e+t.length),0),b(n)}function C(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let A="0123456789abcdef";function I(e,t){if(t||(t={}),"number"==typeof e){v.checkSafeUint53(e,"invalid hexlify value");let r="";for(;e;)r=A[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),E(e))return e.toHexString();if(C(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":v.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(w(e)){let n="0x";for(let i=0;i<e.length;i++){let o=e[i];n+=A[(240&o)>>4]+A[15&o]}return n}return v.throwArgumentError("invalid hexlify value","value",e)}function P(e,t){for("string"!=typeof e?e=I(e):C(e)||v.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&v.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function O(e){return e=function(e){let t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(C(e)&&!(e.length%2)||w(e)){let r=R(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=I(r.slice(0,32)),t.s=I(r.slice(32,64))):65===r.length?(t.r=I(r.slice(0,32)),t.s=I(r.slice(32,64)),t.v=r[64]):v.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:v.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=I(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){let n=function(e,t){(e=R(e)).length>t&&v.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(t);return r.set(e,t-e.length),b(r)}(R(t._vs),32);t._vs=I(n);let i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&v.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;let o=I(n);null==t.s?t.s=o:t.s!==o&&v.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?v.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{let s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&v.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&C(t.r)?t.r=P(t.r,32):v.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&C(t.s)?t.s=P(t.s,32):v.throwArgumentError("signature missing or invalid s","signature",e);let a=R(t.s);a[0]>=128&&v.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(a[0]|=128);let u=I(a);t._vs&&(C(t._vs)||v.throwArgumentError("signature invalid _vs","signature",e),t._vs=P(t._vs,32)),null==t._vs?t._vs=u:t._vs!==u&&v.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}(e),I(N([e.r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}var T=r(3686),U=r(30788),_=r(92672),D=r(83669),M=r.n(D);function x(e){return"0x"+M().keccak_256(R(e))}function F(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}new y("properties/5.6.0");var k=r(82936),L=r(55127),G=r(92338),j=r(82783),K=r(97578),B=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(t){o(t)}}function a(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let W=new y("wallet/5.6.2");class z extends l.E{constructor(e,t){var r;if(super(),null!=(r=e)&&C(r.privateKey,32)&&null!=r.address){let n=new L.SigningKey(e.privateKey);if(F(this,"_signingKey",()=>n),F(this,"address",(0,K.computeAddress)(this.publicKey)),this.address!==(0,a.getAddress)(e.address)&&W.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){let t=e.mnemonic;return t&&t.phrase}(e)){let i=e.mnemonic;F(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||_.defaultPath,locale:i.locale||"en"}));let o=this.mnemonic,s=_.HDNode.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);(0,K.computeAddress)(s.privateKey)!==this.address&&W.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else F(this,"_mnemonic",()=>null)}else{if(L.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&W.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),F(this,"_signingKey",()=>e);else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);let l=new L.SigningKey(e);F(this,"_signingKey",()=>l)}F(this,"_mnemonic",()=>null),F(this,"address",(0,K.computeAddress)(this.publicKey))}t&&!u.zt.isProvider(t)&&W.throwArgumentError("invalid provider","provider",t),F(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new z(this,e)}signTransaction(e){return(function(e){var t,r,n,i;return t=this,r=void 0,n=void 0,i=function*(){let t=Object.keys(e).map(t=>{let r=e[t];return Promise.resolve(r).then(e=>({key:t,value:e}))}),r=yield Promise.all(t);return r.reduce((e,t)=>
1(e[t.key]=t.value,e),{})},new(n||(n=Promise))(function(e,o){function s(e){try{u(i.next(e))}catch(t){o(t)}}function a(e){try{u(i.throw(e))}catch(t){o(t)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(s,a)}u((i=i.apply(t,r||[])).next())})})(e).then(t=>{null!=t.from&&((0,a.getAddress)(t.from)!==this.address&&W.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let r=this._signingKey().signDigest(x((0,K.serialize)(t)));return(0,K.serialize)(t,r)})}signMessage(e){return B(this,void 0,void 0,function*(){return O(this._signingKey().signDigest((0,T.r)(e)))})}_signTypedData(e,t,r){return B(this,void 0,void 0,function*(){let n=yield U.E.resolveNames(e,t,r,e=>(null==this.provider&&W.throwError("cannot resolve ENS names without a provider",y.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e)));return O(this._signingKey().signDigest(U.E.hash(n.domain,t,n.value)))})}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw Error("invalid callback");return t||(t={}),(0,G.HI)(this,e,t,r)}static createRandom(e){let t=(0,k.O)(16);if(e||(e={}),e.extraEntropy){var r,n;t=R((r=x(N([t,e.extraEntropy])),n=0,"string"!=typeof r?r=I(r):(!C(r)||r.length%2)&&v.throwArgumentError("invalid hexData","value",r),n=2+2*n,"0x"+r.substring(n,34)))}let i=(0,_.entropyToMnemonic)(t,e.locale);return z.fromMnemonic(i,e.path,e.locale)}static fromEncryptedJson(e,t,r){return(0,j.decryptJsonWallet)(e,t,r).then(e=>new z(e))}static fromEncryptedJsonSync(e,t){return new z((0,j.decryptJsonWalletSync)(e,t))}static fromMnemonic(e,t,r){return t||(t=_.defaultPath),new z(_.HDNode.fromMnemonic(e,null,r).derivePath(t))}}function q(e,t){return(0,K.recoverAddress)((0,T.r)(e),t)}function H(e,t,r,n){return(0,K.recoverAddress)(U.E.hash(e,t,r),n)}},16933:function(e,t,r){r.d(t,{D:function(){return y}});var n,i,o,s,a=r(32235);let u=!1,l=!1,c={debug:1,default:2,info:2,warning:3,error:4,off:5},h=c.default,f=null,d=function(){try{let e=[];
1if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(n=o||(o={})).DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF",(i=s||(s={})).UNKNOWN_ERROR="UNKNOWN_ERROR",i.NOT_IMPLEMENTED="NOT_IMPLEMENTED",i.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",i.NETWORK_ERROR="NETWORK_ERROR",i.SERVER_ERROR="SERVER_ERROR",i.TIMEOUT="TIMEOUT",i.BUFFER_OVERRUN="BUFFER_OVERRUN",i.NUMERIC_FAULT="NUMERIC_FAULT",i.MISSING_NEW="MISSING_NEW",i.INVALID_ARGUMENT="INVALID_ARGUMENT",i.MISSING_ARGUMENT="MISSING_ARGUMENT",i.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",i.CALL_EXCEPTION="CALL_EXCEPTION",i.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",i.NONCE_EXPIRED="NONCE_EXPIRED",i.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",i.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",i.TRANSACTION_REPLACED="TRANSACTION_REPLACED";let p="0123456789abcdef";class g{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",e),h>c[r]||console.log.apply(console,t)}debug(...e){this._log(g.levels.DEBUG,e)}info(...e){this._log(g.levels.INFO,e)}warn(...e){this._log(g.levels.WARNING,e)}makeError(e,t,r){if(l)return this.makeError("censored error",t,{});t||(t=g.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let i="";for(let o=0;o<t.length;o++)i+=p[t[o]>>4]+p[15&t[o]];n.push(e+"=Uint8Array(0x"+i+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let i=e,o="";switch(t){case s.NUMERIC_FAULT:{o="NUMERIC_FAULT";let a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":o+="-"+a;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result"}break}case s.CALL_EXCEPTION:case s.INSUFFICIENT_FUNDS:case s.MISSING_NEW:case s.NONCE_EXPIRED:case s.REPLACEMENT_UNDERPRICED:case s.TRANSACTION_REPLACED:case s.UNPREDICTABLE_GAS_LIMIT:o=t}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let u=Error(e);return u.reason=i,u.code=t,Object.keys(r).forEach(function(e){u[e]=r[e]}),u}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,g.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),d&&this.throwError("platform missing String.prototype.normalize",g.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:d})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,g.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,g.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,g.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,g.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",g.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",g.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",g.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return f||(f=new g("logger/5.6.0")),f}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",g.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),u){if(!e)return;this.globalLogger().throwError("error censorship permanent",g.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!e,u=!!t}static setLogLevel(e){let t=c[e.toLowerCase()];if(null==t){g.globalLogger().warn("invalid log level - "+e);return}h=t}static from(e){return new g(e)}}g.errors=s,g.levels=o,new g("properties/5.6.0");let m=new g("wordlists/5.6.1");class y{constructor(e){m.checkAbstract(new.target,y),Object.defineProperty(this,"locale",{enumerable:!0,value:e,writable:!1})}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){let t=[];for(let r=0;r<2048;r++){let n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,a.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}},56279:function(e,t,r){r.d(t,{E:function(){return u}});var n=r(16933);let i=null;function o(e){if(null==i&&(i="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCat
1chCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobster
1LocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThe
1nTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==n.D.check(e)))throw i=null,Error("BIP39 Wordlist for en (English) FAILED")}class s extends n.D{constructor(){super("en")}getWord(e){return o(this),i[e]}getWordIndex(e){return o(this),i.indexOf(e)}}let a=new s;n.D.register(a);let u={en:a}},8202:function(e){!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t<e.length;t++)if(!r(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function s(e,t,r,n,i){(null!=n||null!=i)&&(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var a,u=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},fromBytes:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(a[(240&n)>>4]+a[15&n])}return t.join("")}}),l={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],h=[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],f=[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,
1111,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],d=[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,16733
113503,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],p=[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],g=[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,389
1623319,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],m=[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],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,
1632953703,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],v=[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],E=[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,12974
103050,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],b=[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,60
17398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],S=[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,12
101765386,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],R=[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],N=[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,4002861
1748,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 C(e){for(var t=[],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}var A=function(e){if(!(this instanceof A))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};A.prototype._prepare=function(){var e=l[this.key.length];if(null==e)throw Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var r=(e+1)*4,n=this.key.length/4,i=C(this.key),t=0;t<n;t++)o=t>>2,this._Ke[o][t%4]=i[t],this._Kd[e-o][t%4]=i[t];for(var o,s,a=0,u=n;u<r;){if(s=i[n-1],i[0]^=h[s>>16&255]<<24^h[s>>8&255]<<16^h[255&s]<<8^h[s>>24&255]^c[a]<<24,a+=1,8!=n)for(var t=1;t<n;t++)i[t]^=i[t-1];else{for(var t=1;t<n/2;t++)i[t]^=i[t-1];s=i[n/2-1],i[n/2]^=h[255&s]^h[s>>8&255]<<8^h[s>>16&255]<<16^h[s>>24&255]<<24;for(var t=n/2+1;t<n;t++)i[t]^=i[t-1]}for(var f,d,t=0;t<n&&u<r;)f=u>>2,d=u%4,this._Ke[f][d]=i[t],this._Kd[e-f][d]=i[t++],u++}for(var f=1;f<e;f++)for(var d=0;d<4;d++)s=this._Kd[f][d],this._Kd[f][d]=S[s>>24&255]^w[s>>16&255]^R[s>>8&255]^N[255&s]},A.prototype.encrypt=function(e){if(16!=e.length)throw Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=C(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var s=1;s<t;s++){for(var i=0;i<4;i++)r[i]=d[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^m[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}for(var a,u=o(16),i=0;i<4;i++)a=this._Ke[t][i],u[4*i]=(h[n[i]>>24&255]^a>>24)&255,u[4*i+1]=(h[n[(i+1)%4]>>16&255]^a>>16)&255,u[4*i+2]=(h[n[(i+2)%4]>>8&255]^a>>8)&255,u[4*i+3]=(h[255&n[(i+3)%4]]^a)&255;return u},A.prototype.decrypt=function(e){if(16!=e.length)throw Error("invalid ciphertext size (must be 16 bytes)");
1for(var t=this._Kd.length-1,r=[0,0,0,0],n=C(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var s=1;s<t;s++){for(var i=0;i<4;i++)r[i]=y[n[i]>>24&255]^v[n[(i+3)%4]>>16&255]^E[n[(i+2)%4]>>8&255]^b[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}for(var a,u=o(16),i=0;i<4;i++)a=this._Kd[t][i],u[4*i]=(f[n[i]>>24&255]^a>>24)&255,u[4*i+1]=(f[n[(i+3)%4]>>16&255]^a>>16)&255,u[4*i+2]=(f[n[(i+2)%4]>>8&255]^a>>8)&255,u[4*i+3]=(f[255&n[(i+1)%4]]^a)&255;return u};var I=function(e){if(!(this instanceof I))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new A(e)};I.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.encrypt(r),t,n);return t},I.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.decrypt(r),t,n);return t};var P=function(e,t){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastCipherblock=i(t,!0),this._aes=new A(e)};P.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16);for(var a=0;a<16;a++)r[a]^=this._lastCipherblock[a];this._lastCipherblock=this._aes.encrypt(r),s(this._lastCipherblock,t,n)}return t},P.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16),r=this._aes.decrypt(r);for(var a=0;a<16;a++)t[n+a]=r[a]^this._lastCipherblock[a];s(e,this._lastCipherblock,0,n,n+16)}return t};var O=function(e,t,r){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw Error("invalid initialation vector size (must be 16 size)")}else t=o(16);r||(r=1),this.segmentSize=r,this._shiftRegister=i(t,!0),this._aes=new A(e)};O.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw Error("invalid plaintext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},O.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var T=function(e,t){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new A(e)};T.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},T.prototype.decrypt=T.prototype.encrypt;var U=function(e){if(!(this instanceof U))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=o(16),this.setValue(e)):this.setBytes(e)};U.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw Error("invalid counter value (must be an integer)");for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},U.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},U.prototype.increment=function(){for(var e=15;e>=0;e--)if(255===this._counter[e])this._counter[e]=0;else{this._counter[e]++;break}};var _=function(e,t){if(!(this instanceof _))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof U||(t=new U(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new A(e)};_.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt
1(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[r]^=this._remainingCounter[this._remainingCounterIndex++];return t},_.prototype.decrypt=_.prototype.encrypt,e.exports={AES:A,Counter:U,ModeOfOperation:{ecb:I,cbc:P,cfb:O,ofb:T,ctr:_},utils:{hex:u,utf8:{toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r<e.length;){var n=e.charCodeAt(r++);37===n?(t.push(parseInt(e.substr(r,2),16)),r+=2):t.push(n)}return i(t)},fromBytes:function(e){for(var t=[],r=0;r<e.length;){var n=e[r];n<128?(t.push(String.fromCharCode(n)),r++):n>191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}}},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,r=o(e.length+t);s(e,r);for(var n=e.length;n<r.length;n++)r[n]=t;return r},strip:function(e){if((e=i(e,!0)).length<16)throw Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n<t;n++)if(e[r+n]!==t)throw Error("PKCS#7 invalid padding byte");var a=o(r);return s(e,a,0,0,r),a}}},_arrayTest:{coerceArray:i,createArray:o,copyArray:s}}}(0)},58105:function(e,t,r){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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(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)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var s=r(65575);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),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,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var a=r(84489);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var u=o(r(40210));t.base64=u;var l=r(16741);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return l.Base58}});var c=r(4212);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return c.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return c.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return c.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return c.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return c.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return c.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return c.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return c.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return c.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return c.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return c.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return c.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return c.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return c.stripZeros}});var h=r(71414);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return h._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return h.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return h.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return h.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return h.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return h.namehash}});var f=r(92672);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return f.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return f.entro
1pyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return f.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return f.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return f.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return f.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return f.mnemonicToSeed}});var d=r(82783);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return d.getJsonWalletAddress}});var p=r(23989);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var g=r(71531);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return g.Logger}});var m=r(48343);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return m.sha512}});var y=r(89563);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return y.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return y.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return y.sha256}});var v=r(91178);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return v.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return v.shuffled}});var E=r(58772);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return E.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return E.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return E.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return E.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return E.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return E.shallowCopy}});var b=o(r(58939));t.RLP=b;var S=r(55127);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return S.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return S.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return S.SigningKey}});var w=r(47969);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return w.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return w.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return w.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return w._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return w.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return w.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return w.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return w.Utf8ErrorFuncs}});var R=r(97578);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return R.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return R.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return R.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return R.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return R.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return R.TransactionTypes}});var N=r(33555);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return N.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return N.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return N.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return N.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return N.parseUnits}});var C=r(36007);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return C.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return C.verifyTypedData}
1});var A=r(81590);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return A._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return A.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return A.poll}});var I=r(48343);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return I.SupportedAlgorithm}});var P=r(47969);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return P.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return P.Utf8ErrorReason}})},40210:function(e,t,r){r.r(t),r.d(t,{decode:function(){return i},encode:function(){return o}});var n=r(4212);function i(e){e=atob(e);let t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return(0,n.arrayify)(t)}function o(e){e=(0,n.arrayify)(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}},4212:function(e,t,r){r.r(t),r.d(t,{arrayify:function(){return c},concat:function(){return h},hexConcat:function(){return E},hexDataLength:function(){return y},hexDataSlice:function(){return v},hexStripZeros:function(){return S},hexValue:function(){return b},hexZeroPad:function(){return w},hexlify:function(){return m},isBytes:function(){return l},isBytesLike:function(){return a},isHexString:function(){return p},joinSignature:function(){return N},splitSignature:function(){return R},stripZeros:function(){return f},zeroPad:function(){return d}});var n=r(71531);let i=new n.Logger("bytes/5.6.1");function o(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return p(e)&&!(e.length%2)||l(e)}function u(e){return"number"==typeof e&&e==e&&e%1==0}function l(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!u(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!u(r)||r<0||r>=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid arrayify value");let r=[];for(;e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),p(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":i.throwArgumentError("hex data is odd-length","value",e));let a=[];for(let u=0;u<n.length;u+=2)a.push(parseInt(n.substring(u,u+2),16));return s(new Uint8Array(a))}return l(e)?s(new Uint8Array(e)):i.throwArgumentError("invalid arrayify value","value",e)}function h(e){let t=e.map(e=>c(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,t)=>(n.set(t,e),e+t.length),0),s(n)}function f(e){let t=c(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function d(e,t){(e=c(e)).length>t&&i.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let g="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid hexlify value");let r="";for(;e;)r=g[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){let n="0x";for(let s=0;s<e.length;s++){let a=e[s];n+=g[(240&a)>>4]+g[15&a]}return n}return i.throwArgumentError("invalid hexlify value","value",e)}function y(e){if("string"!=typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2}function v(e,t,r){return("string"!=typeof e?e=m(e):(!p(e)||e.length%2)&&i.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r)?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function E(e){let t="0x";
1return e.forEach(e=>{t+=m(e).substring(2)}),t}function b(e){let t=S(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function S(e){"string"!=typeof e&&(e=m(e)),p(e)||i.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function w(e,t){for("string"!=typeof e?e=m(e):p(e)||i.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&i.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function R(e){let t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){let r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):i.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:i.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){let n=d(c(t._vs),32);t._vs=m(n);let o=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;let s=m(n);null==t.s?t.s=s:t.s!==s&&i.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?i.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{let u=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==u&&i.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=w(t.r,32):i.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=w(t.s,32):i.throwArgumentError("signature missing or invalid s","signature",e);let l=c(t.s);l[0]>=128&&i.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(l[0]|=128);let h=m(l);t._vs&&(p(t._vs)||i.throwArgumentError("signature invalid _vs","signature",e),t._vs=w(t._vs,32)),null==t._vs?t._vs=h:t._vs!==h&&i.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function N(e){return m(h([(e=R(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},23989:function(e,t,r){r.r(t),r.d(t,{keccak256:function(){return s}});var n=r(83669),i=r.n(n),o=r(4212);function s(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},71531:function(e,t,r){var n,i,o,s;r.r(t),r.d(t,{ErrorCode:function(){return i},LogLevel:function(){return n},Logger:function(){return p}});let a=!1,u=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},c=l.default,h=null,f=function(){try{let e=[];
1if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(o=n||(n={})).DEBUG="DEBUG",o.INFO="INFO",o.WARNING="WARNING",o.ERROR="ERROR",o.OFF="OFF",(s=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",s.NOT_IMPLEMENTED="NOT_IMPLEMENTED",s.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",s.NETWORK_ERROR="NETWORK_ERROR",s.SERVER_ERROR="SERVER_ERROR",s.TIMEOUT="TIMEOUT",s.BUFFER_OVERRUN="BUFFER_OVERRUN",s.NUMERIC_FAULT="NUMERIC_FAULT",s.MISSING_NEW="MISSING_NEW",s.INVALID_ARGUMENT="INVALID_ARGUMENT",s.MISSING_ARGUMENT="MISSING_ARGUMENT",s.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",s.CALL_EXCEPTION="CALL_EXCEPTION",s.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",s.NONCE_EXPIRED="NONCE_EXPIRED",s.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",s.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",s.TRANSACTION_REPLACED="TRANSACTION_REPLACED";let d="0123456789abcdef";class p{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==l[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>l[r]||console.log.apply(console,t)}debug(...e){this._log(p.levels.DEBUG,e)}info(...e){this._log(p.levels.INFO,e)}warn(...e){this._log(p.levels.WARNING,e)}makeError(e,t,r){if(u)return this.makeError("censored error",t,{});t||(t=p.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let i="";for(let o=0;o<t.length;o++)i+=d[t[o]>>4]+d[15&t[o]];n.push(e+"=Uint8Array(0x"+i+")")}else n.push(e+"="+JSON.stringify(t))}catch(s){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push(`code=${t}`),n.push(`version=${this.version}`);let o=e,s="";switch(t){case i.NUMERIC_FAULT:{s="NUMERIC_FAULT";let a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":s+="-"+a;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let l=Error(e);return l.reason=o,l.code=t,Object.keys(r).forEach(function(e){l[e]=r[e]}),l}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,p.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,p.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return h||(h=new p("logger/5.6.0")),h}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!e)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!e,a=!!t}static setLogLevel(e){let t=l[e.toLowerCase()];if(null==t){p.globalLogger().warn("invalid log level - "+e);return}c=t}static from(e){return new p(e)}}p.errors=i,p.levels=n},58772:function(e,t,r){r.r(t),r.d(t,{Description:function(){return f},checkProperties:function(){return u},deepCopy:function(){return h},defineReadOnly:function(){return o},getStatic:function(){return s},resolveProperties:function(){return a},shallowCopy:function(){return l}});var n=r(71531);let i=new n.Logger("properties/5.6.0");function o(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function s(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function a(e){var t,r,n,i;return t=this,r=void 0,n=void 0,i=function*(){let t=Object.keys(e).map(t=>{let r=e[t];return Promise.resolve(r).then(e=>({key:t,value:e}))}),r=yield Promise.all(t);return r.reduce((e,t)=>
1(e[t.key]=t.value,e),{})},new(n||(n=Promise))(function(e,o){function s(e){try{u(i.next(e))}catch(t){o(t)}}function a(e){try{u(i.throw(e))}catch(t){o(t)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(s,a)}u((i=i.apply(t,r||[])).next())})}function u(e,t){e&&"object"==typeof e||i.throwArgumentError("invalid object","object",e),Object.keys(e).forEach(r=>{t[r]||i.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)})}function l(e){let t={};for(let r in e)t[r]=e[r];return t}let c={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h(e){return function(e){if(function e(t){if(null==t||c[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;let r=Object.keys(t);for(let n=0;n<r.length;n++){let o=null;try{o=t[r[n]]}catch(s){continue}if(!e(o))return!1}return!0}return i.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}(e))return e;if(Array.isArray(e))return Object.freeze(e.map(e=>h(e)));if("object"==typeof e){let t={};for(let r in e){let n=e[r];void 0!==n&&o(t,r,h(n))}return t}return i.throwArgumentError(`Cannot deepCopy ${typeof e}`,"object",e)}(e)}class f{constructor(e){for(let t in e)this[t]=h(e[t])}}},10161:function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new i(n,o||e,s),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var u,l,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,s),!0}for(l=1,u=Array(h-1);l<h;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,d=c.length;for(l=0;l<d;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,i);break;default:if(!u)for(f=1,u=Array(h-1);f<h;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var u=0,l=[],c=a.length;u<c;u++)(a[u].fn!==t||i&&!a[u].once||n&&a[u].context!==n)&&l.push(a[u]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},14689:function(e){!function(t){function r(e){let t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
1734187,3204031479,3329325298]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,s=1359893119,a=2600822924,u=528734635,l=1541459225,c=new Uint32Array(64);function h(e){let h=0,f=e.length;for(;f>=64;){let d=r,p=n,g=i,m=o,y=s,v=a,E=u,b=l,S,w,R,N,C;for(w=0;w<16;w++)R=h+4*w,c[w]=(255&e[R])<<24|(255&e[R+1])<<16|(255&e[R+2])<<8|255&e[R+3];for(w=16;w<64;w++)N=((S=c[w-2])>>>17|S<<15)^(S>>>19|S<<13)^S>>>10,C=((S=c[w-15])>>>7|S<<25)^(S>>>18|S<<14)^S>>>3,c[w]=(N+c[w-7]|0)+(C+c[w-16]|0)|0;for(w=0;w<64;w++)N=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&v^~y&E)|0)+(b+(t[w]+c[w]|0)|0)|0,C=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&p^d&g^p&g)|0,b=E,E=v,v=y,y=m+N|0,m=g,g=p,p=d,d=N+C|0;r=r+d|0,n=n+p|0,i=i+g|0,o=o+m|0,s=s+y|0,a=a+v|0,u=u+E|0,l=l+b|0,h+=64,f-=64}}h(e);let f,d=e.length%64,p=e.length/536870912|0,g=e.length<<3,m=d<56?56:120,y=e.slice(e.length-d,e.length);for(y.push(128),f=d+1;f<m;f++)y.push(0);return y.push(p>>>24&255),y.push(p>>>16&255),y.push(p>>>8&255),y.push(p>>>0&255),y.push(g>>>24&255),y.push(g>>>16&255),y.push(g>>>8&255),y.push(g>>>0&255),h(y),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255]}function n(e,t,n){let i;e=e.length<=64?e:r(e);let o=64+t.length+4,s=Array(o),a=Array(64),u=[];for(i=0;i<64;i++)s[i]=54;for(i=0;i<e.length;i++)s[i]^=e[i];for(i=0;i<t.length;i++)s[64+i]=t[i];for(i=o-4;i<o;i++)s[i]=0;for(i=0;i<64;i++)a[i]=92;for(i=0;i<e.length;i++)a[i]^=e[i];function l(){for(let e=o-1;e>=o-4;e--){if(s[e]++,s[e]<=255)return;s[e]=0}}for(;n>=32;)l(),u=u.concat(r(a.concat(r(s)))),n-=32;return n>0&&(l(),u=u.concat(r(a.concat(r(s))).slice(0,n))),u}function i(e,t,r,n,i){let u;for(a(e,(2*r-1)*16,i,0,16),u=0;u<2*r;u++)s(e,16*u,i,16),function(e,t){a(e,0,t,0,16);for(let r=8;r>0;r-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(let n=0;n<16;++n)e[n]+=t[n]}(i,n),a(i,0,e,t+16*u,16);for(u=0;u<r;u++)a(e,t+32*u,e,16*u,16);for(u=0;u<r;u++)a(e,t+(2*u+1)*16,e,(u+r)*16,16)}function o(e,t){return e<<t|e>>>32-t}function s(e,t,r,n){for(let i=0;i<n;i++)r[i]^=e[t+i]}function a(e,t,r,n,i){for(;i--;)r[n++]=e[t++]}function u(e){if(!e||"number"!=typeof e.length)return!1;for(let t=0;t<e.length;t++){let r=e[t];if("number"!=typeof r||r%1||r<0||r>=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw Error("invalid "+t);return e}function c(e,t,r,o,c,h,f){let d;if(r=l(r,"N"),o=l(o,"r"),c=l(c,"p"),h=l(h,"dkLen"),0===r||(r&r-1)!=0)throw Error("N must be power of 2");if(r>2147483647/128/o)throw Error("N too large");if(o>2147483647/128/c)throw Error("r too large");if(!u(e))throw Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(t))throw Error("salt must be an array or buffer");let p=n(e,t=Array.prototype.slice.call(t),128*c*o),g=new Uint32Array(32*c*o);for(let m=0;m<g.length;m++){let y=4*m;g[m]=(255&p[y+3])<<24|(255&p[y+2])<<16|(255&p[y+1])<<8|(255&p[y+0])<<0}let v=new Uint32Array(64*o),E=new Uint32Array(32*o*r),b=32*o,S=new Uint32Array(16),w=new Uint32Array(16),R=c*r*2,N=0,C=null,A=!1,I=0,P=0,O,T=f?parseInt(1e3/o):4294967295,U="undefined"!=typeof setImmediate?setImmediate:setTimeout,_=function(){let t;if(A)return f(Error("cancelled"),N/R);switch(I){case 0:a(g,d=32*P*o,v,0,b),I=1,O=0;case 1:(t=r-O)>T&&(t=T);for(let u=0;u<t;u++)a(v,0,E,(O+u)*b,b),i(v,b,o,S,w);if(O+=t,N+=t,f){let l=parseInt(1e3*N/R);if(l!==C){if(A=f(null,N/R))break;C=l}}if(O<r)break;O=0,I=2;case 2:(t=r-O)>T&&(t=T);for(let m=0;m<t;m++){let y=(2*o-1)*16,D=v[y]&r-1;s(E,D*b,v,b),i(v,b,o,S,w)}if(O+=t,N+=t,f){let M=parseInt(1e3*N/R);if(M!==C){if(A=f(null,N/R))break;C=M}}if(O<r)break;
1if(a(v,0,g,d,b),++P<c){I=0;break}p=[];for(let x=0;x<g.length;x++)p.push(g[x]>>0&255),p.push(g[x]>>8&255),p.push(g[x]>>16&255),p.push(g[x]>>24&255);let F=n(e,p,h);return f&&f(null,1,F),F}f&&U(_)};if(!f)for(;;){let D=_();if(void 0!=D)return D}_()}e.exports={scrypt:function(e,t,r,n,i,o,s){return new Promise(function(a,u){let l=0;s&&s(0),c(e,t,r,n,i,o,function(e,t,r){if(e)u(e);else if(r)s&&1!==l&&s(1),a(new Uint8Array(r));else if(s&&t!==l)return l=t,s(t)})})},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(c(e,t,r,n,i,o))}}}(0)},20452:function(e,t,r){/**
2 * @license React
3 * use-sync-external-store-shim.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var n=r(2784),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,s=n.useEffect,a=n.useLayoutEffect,u=n.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(n){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return a(function(){i.value=r,i.getSnapshot=t,l(i)&&c({inst:i})},[e,r,t]),s(function(){return l(i)&&c({inst:i}),e(function(){l(i)&&c({inst:i})})},[e]),u(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},80402:function(e,t,r){/**
10 * @license React
11 * use-sync-external-store-shim/with-selector.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var n=r(2784),i=r(43100),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,a=n.useRef,u=n.useEffect,l=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var h=a(null);if(null===h.current){var f={hasValue:!1,value:null};h.current=f}else f=h.current;h=l(function(){function e(e){if(!u){if(u=!0,s=e,e=n(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(s=e,a=r)}var s,a,u=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,r,n,i]);var d=s(e,h[0],h[1]);return u(function(){f.hasValue=!0,f.value=d},[d]),c(d),d}},43100:function(e,t,r){e.exports=r(20452)},41110:function(e,t,r){e.exports=r(80402)},32848:function(e,t,r){r.d(t,{RJ:function(){return o},eG:function(){return n},ws:function(){return i}});var n={id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}},i={id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},o={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}},46562:function(e,t,r){r.d(t,{Ko:function(){return y},U9:function(){return E},ac:function(){return m},ov:function(){return p},qx:function(){return v},wR:function(){return b}});var n=r(13706),i=r(90581),o=r(27805),s=r(21218),a=r(26297),u=r(50930),l=r(1899),c=r(39309),h=r(32848),f=r(10161),d=Object.defineProperty,p=function(e,t,r){var n,i;return n=e,(i=(void 0===t?"undefined":(0,l.Z)(t))!=="symbol"?t+"":t)in n?d(n,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[i]=r,r},g=function(e,t,r){if(!t.has(e))throw TypeError("Cannot "+r)},m=function(e,t,r){return g(e,t,"read from private field"),r?r.call(e):t.get(e)},y=function(e,t,r){if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},v=function(e,t,r,n){return g(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r},E=function(e,t,r){return g(e,t,"access private method"),r},b=function(e){(0,s.Z)(r,e);var t=(0,c.Z)(r);function r(e){var o,s=e.chains,a=void 0===s?[h.RJ,h.ws]:s,u=e.options;return(0,i.Z)(this,r),o=t.call(this),p((0,n.Z)(o),"chains"),p((0,n.Z)(o),"options"),o.chains=a,o.options=u,o}return(0,o.Z)(r,[{key:"getBlockExplorerUrls",value:function(e){var t,r=null!==(t=e.blockExplorers)&&void 0!==t?t:{},n=r.default,i=(0,a.Z)(r,["default"]);if(n)return[n.url].concat((0,u.Z)(Object.values(i).map(function(e){return e.url})))}},{key:"isChainUnsupported",value:function(e){return!this.chains.some(function(t){return t.id===e})}}]),r}(f)},96393:function(e,t,r){r.d(t,{_:function(){return E}});
17var n,i,o=r(13706),s=r(98788),a=r(90581),u=r(27805),l=r(21218),c=r(70865),h=r(87394),f=r(50930),d=r(39309),p=r(45680),g=r(46562),m=r(68176),y=r(8550),v=r(58105),E=function(e){(0,l.Z)(r,e);var t=(0,d.Z)(r);function r(){var e,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=s.chains,l=s.options;(0,a.Z)(this,r);var h=(0,c.Z)({shimDisconnect:!0,shimChainChangedDisconnect:!0,getProvider:function(){return window.ethereum}},l);e=t.call(this,{chains:u,options:h}),(0,g.ov)((0,o.Z)(e),"id"),(0,g.ov)((0,o.Z)(e),"name"),(0,g.ov)((0,o.Z)(e),"ready"),(0,g.Ko)((0,o.Z)(e),n,void 0),(0,g.Ko)((0,o.Z)(e),i,void 0),(0,g.ov)((0,o.Z)(e),"shimDisconnectKey","injected.shimDisconnect"),(0,g.ov)((0,o.Z)(e),"onAccountsChanged",function(t){0===t.length?e.emit("disconnect"):e.emit("change",{account:(0,v.getAddress)(t[0])})}),(0,g.ov)((0,o.Z)(e),"onChainChanged",function(t){var r=(0,m.Jk)(t),n=e.isChainUnsupported(r);e.emit("change",{chain:{id:r,unsupported:n}})}),(0,g.ov)((0,o.Z)(e),"onDisconnect",function(){var t;if(e.options.shimChainChangedDisconnect&&(0,g.ac)((0,o.Z)(e),i)){(0,g.qx)((0,o.Z)(e),i,!1);return}e.emit("disconnect"),e.options.shimDisconnect&&(null===(t=(0,m.s3)().storage)||void 0===t||t.removeItem(e.shimDisconnectKey))});var d=h.getProvider();if("string"==typeof h.name)e.name=h.name;else if(d){var p=function(e){if(!e)return"Injected";var t,r=function(e){return e.isAvalanche?"Core Wallet":e.isBitKeep?"BitKeep":e.isBraveWallet?"Brave Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isExodus?"Exodus":e.isFrame?"Frame":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOpera?"Opera":e.isPortal?"Ripio Portal":e.isRainbow?"Rainbow":e.isTally?"Tally":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isMetaMask?"MetaMask":void 0};if(null===(n=e.providers)||void 0===n?void 0:n.length){var n,i,o=new Set,s=1,a=!0,u=!1,l=void 0;try{for(var c,h=e.providers[Symbol.iterator]();!(a=(c=h.next()).done);a=!0){var d=c.value,p=r(d);p||(p="Unknown Wallet #".concat(s),s+=1),o.add(p)}}catch(g){u=!0,l=g}finally{try{a||null==h.return||h.return()}finally{if(u)throw l}}var m=(0,f.Z)(o);return m.length?m:null!==(i=m[0])&&void 0!==i?i:"Injected"}return null!==(t=r(e))&&void 0!==t?t:"Injected"}(d);h.name?e.name=h.name(p):"string"==typeof p?e.name=p:e.name=p[0]}else e.name="Injected";return e.id="injected",e.ready=!!d,e}return(0,u.Z)(r,[{key:"connect",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).chainId,t=this;return(0,s.Z)(function(){var r,n,i,o,s,a,u;return(0,p.__generator)(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),[4,t.getProvider()];case 1:if(!(n=l.sent()))throw new m.Nu;return n.on&&(n.on("accountsChanged",t.onAccountsChanged),n.on("chainChanged",t.onChainChanged),n.on("disconnect",t.onDisconnect)),t.emit("message",{type:"connecting"}),[4,n.request({method:"eth_requestAccounts"})];case 2:return i=l.sent(),o=(0,v.getAddress)(i[0]),[4,t.getChainId()];case 3:if(s=l.sent(),a=t.isChainUnsupported(s),!(e&&s!==e))return[3,5];return[4,t.switchChain(e)];case 4:s=l.sent().id,a=t.isChainUnsupported(s),l.label=5;case 5:return t.options.shimDisconnect&&(null===(r=(0,m.s3)().storage)||void 0===r||r.setItem(t.shimDisconnectKey,!0)),[2,{account:o,chain:{id:s,unsupported:a},provider:n}];case 6:if(u=l.sent(),t.isUserRejectedRequestError(u))throw new m.ab(u);if(-32002===u.code)throw new m.TA(u);throw u;case 7:return[2]}})})()}},{key:"disconnect",value:function(){var e=this;return(0,s.Z)(function(){var t,r;return(0,p.__generator)(this,function(n){switch(n.label){case 0:return[4,e.getProvider()];case 1:if(!(null==(r=n.sent())?void 0:r.removeListener))return[2];return r.removeListener("accountsChanged",e.onAccountsChanged),r.removeListener("chainChanged",e.onChainChanged),r.removeListener("disconnect",e.onDisconnect),e.options.shimDisconnect&&(null===(t=(0,m.s3)().storage)||void 0===t||t.removeItem(e.shimDisconnectKey)),[2]}})})()}},{key:"getAccount",value:function(){var e=this;return(0,s.Z)(function(){var t,r;return(0,p.__generator)(this,function(n){switch(n.label){case 0:return[4,e.getProvider()];case 1:if(!(t=n.sent()))throw new m.Nu;return[4,t.request({method:"eth_accounts"})];case 2:return r=n.sent(),[2,(0,v.getAddress)(r[0])]}})})()}},{key:"getChainId",value:function(){var e=this;return(0,s.Z)(function(){var t;return(0,p.__generator)(this,function(r){switch(r.label){case 0:return[4,e.getProvider()];case 1:if(!(t=r.sent()))throw new m.Nu;return[2,t.request({method:"eth_chainId"}).then(m.Jk)]}})})()}},{key:"getProvider",value:function(){var e=this;return(0,s.Z)(function(){var t;return(0,p.__generator)(this,function(r){return(t=e.options.getProvider())&&(0,g.qx)(e,n,t),[2,(0,g.ac)(e,n)]})})()}},{key:"getSigner",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).chainId,t=this;return(0,s.Z)(function(){var r,n,i;return(0,p.__generator)(this,function(o){switch(o.label){case 0:return[4,Promise.all([t.getProvider(),t.getAccount()])];case 1:return n=(r=h.Z.apply(void 0,[o.sent(),2]))[0],i=r[1],[2,new y.Q(n,e).getSigner(i)]}})})()}},{key:"isAuthorized",value:function(){var e=this;return(0,s.Z)(function(){var t;return(0,p.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,3,,4]),e.o
17ptions.shimDisconnect&&!(null===(t=(0,m.s3)().storage)||void 0===t?void 0:t.getItem(e.shimDisconnectKey)))return[2,!1];return[4,e.getProvider()];case 1:if(!r.sent())throw new m.Nu;return[4,e.getAccount()];case 2:return[2,!!r.sent()];case 3:return r.sent(),[2,!1];case 4:return[2]}})})()}},{key:"switchChain",value:function(e){var t=this;return(0,s.Z)(function(){var r,n,o,s,a,u,l,c,h,f,d;return(0,p.__generator)(this,function(p){switch(p.label){case 0:return t.options.shimChainChangedDisconnect&&(0,g.qx)(t,i,!0),[4,t.getProvider()];case 1:if(!(r=p.sent()))throw new m.Nu;n=(0,v.hexValue)(e),p.label=2;case 2:return p.trys.push([2,4,,9]),[4,r.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})];case 3:return p.sent(),[2,null!==(o=t.chains.find(function(t){return t.id===e}))&&void 0!==o?o:{id:e,name:"Chain ".concat(n),network:"".concat(n),nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]}}}];case 4:if(s=p.sent(),!(l=t.chains.find(function(t){return t.id===e})))throw new m.X4({chainId:e,connectorId:t.id});if(!(4902===s.code||(null==s?void 0:null===(a=s.data)||void 0===a?void 0:null===(u=a.originalError)||void 0===u?void 0:u.code)===4902))return[3,8];p.label=5;case 5:return p.trys.push([5,7,,8]),[4,r.request({method:"wallet_addEthereumChain",params:[{chainId:n,chainName:l.name,nativeCurrency:l.nativeCurrency,rpcUrls:[null!==(f=null!==(h=null===(c=l.rpcUrls.public)||void 0===c?void 0:c.http[0])&&void 0!==h?h:l.rpcUrls.default.http[0])&&void 0!==f?f:""],blockExplorerUrls:t.getBlockExplorerUrls(l)}]})];case 6:return p.sent(),[2,l];case 7:if(d=p.sent(),t.isUserRejectedRequestError(d))throw new m.ab(s);throw new m.iA;case 8:if(t.isUserRejectedRequestError(s))throw new m.ab(s);throw new m.x3(s);case 9:return[2]}})})()}},{key:"watchAsset",value:function(e){var t=e.address,r=e.decimals,n=void 0===r?18:r,i=e.image,o=e.symbol,a=this;return(0,s.Z)(function(){var e;return(0,p.__generator)(this,function(r){switch(r.label){case 0:return[4,a.getProvider()];case 1:if(!(e=r.sent()))throw new m.Nu;return[2,e.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,decimals:n,image:i,symbol:o}}})]}})})()}},{key:"isUserRejectedRequestError",value:function(e){return 4001===e.code}}]),r}(g.wR);n=new WeakMap,i=new WeakMap},90547:function(e,t,r){r.d(t,{i:function(){return m}});var n,i=r(13706),o=r(98788),s=r(90581),a=r(27805),u=r(21218),l=r(70865),c=r(39309),h=r(45680),f=r(96393),d=r(46562),p=r(68176),g=r(58105),m=function(e){(0,u.Z)(r,e);var t=(0,c.Z)(r);function r(){var e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=o.chains,u=o.options;(0,s.Z)(this,r);var c=(0,l.Z)({name:"MetaMask",shimDisconnect:!0,shimChainChangedDisconnect:!0,getProvider:function(){var e,t=function(e){if((null==e?void 0:e.isMetaMask)&&(!e.isBraveWallet||e._events||e._state)&&!e.isAvalanche&&!e.isKuCoinWallet&&!e.isPortal&&!e.isTokenPocket&&!e.isTokenary)return e};return(null===(e=window.ethereum)||void 0===e?void 0:e.providers)?window.ethereum.providers.find(t):t(window.ethereum)}},u);return e=t.call(this,{chains:a,options:c}),(0,d.ov)((0,i.Z)(e),"id","metaMask"),(0,d.Ko)((0,i.Z)(e),n,void 0),(0,d.qx)((0,i.Z)(e),n,c.UNSTABLE_shimOnConnectSelectAccount),e}return(0,a.Z)(r,[{key:"connect",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).chainId,t=this;return(0,o.Z)(function(){var r,i,o,s,a,u,l,c,f,m,y;return(0,h.__generator)(this,function(h){switch(h.label){case 0:return h.trys.push([0,13,,14]),[4,t.getProvider()];case 1:if(!(a=h.sent()))throw new p.Nu;if(a.on&&(a.on("accountsChanged",t.onAccountsChanged),a.on("chainChanged",t.onChainChanged),a.on("disconnect",t.onDisconnect)),t.emit("message",{type:"connecting"}),u=null,!((0,d.ac)(t,n)&&(null===(r=t.options)||void 0===r?void 0:r.shimDisconnect)&&!(null===(i=(0,p.s3)().storage)||void 0===i?void 0:i.getItem(t.shimDisconnectKey))))return[3,7];return[4,t.getAccount().catch(function(){return null})];case 2:if(!(u=h.sent()))return[3,7];h.label=3;case 3:return h.trys.push([3,6,,7]),[4,a.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]})];case 4:return h.sent(),[4,t.getAccount()];case 5:return u=h.sent(),[3,7];case 6:if(l=h.sent(),t.isUserRejectedRequestError(l))throw new p.ab(l);return[3,7];case 7:if(u)return[3,9];return[4,a.request({method:"eth_requestAccounts"})];case 8:c=h.sent(),u=(0,g.getAddress)(c[0]),h.label=9;case 9:return[4,t.getChainId()];case 10:if(f=h.sent(),m=t.isChainUnsupported(f),!(e&&f!==e))return[3,12];return[4,t.switchChain(e)];case 11:f=h.sent().id,m=t.isChainUnsupported(f),h.label=12;case 12:return(null===(o=t.options)||void 0===o?void 0:o.shimDisconnect)&&(null===(s=(0,p.s3)().storage)||void 0===s||s.setItem(t.shimDisconnectKey,!0)),[2,{account:u,chain:{id:f,unsupported:m},provider:a}];case 13:if(y=h.sent(),t.isUserRejectedRequestError(y))throw new p.ab(y);if(-32002===y.code)throw new p.TA(y);throw y;case 14:return[2]}})})()}}]),r}(f._);n=new WeakMap},26341:function(e,t,r){r.d(t,{Ko:function(){return o},U9:function(){return a},ac:function(){return i},qx:function(){return s}});var n=function(e,t,r){if(!t.has(e))throw TypeError("Cannot "+r)},i=function(e,t,r){return n(e,t,"read from private field"),r?r.call(e):t.get(e)},o=function(e,t,r){if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},s=function(e,t,r,i){return n(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r},a=function(e,t,r){return n(e,t,"access private method"),r}},10534:function(e,t,r){r.d(t,{R:function(){return u}});var n=r(70865),i=r(96670),o=r(68930),s=r(1005),a=r(40552);function u(e){var t=e.priority,r=e.rpc,u=e.stallTimeout,l=e.static,c=void 0===l||l,h=e.weight;return function(e){var l=r(e);return l&&""!==l.http?(0,n.Z)({chain:(0,i.Z)((0,n.Z)({},e),{rpcUrls:(0,i.Z)((0,n.Z)({},e.rpcUrls),{default:{http:[l.http]}})}),provider:function(){var r,n;return Object.assign(new(c?o.c:s.r)(l.http,{ensAddress:null===(r=e.contracts)||void 0===r?void 0:null===(n=r.ensRegistry)||void 0===n?void 0:n.address,chainId:e.id,name:e.network}),{priority:t,stallTimeout:u,weight:h})}},l.webSocket&&{webSocketProvider:function(){return new a.q(l.webSocket,e.id)}}):null}}},85454:function(e,t,r){let n;r.d(t,{eM:function(){return eR},eI:function(){return eb},mA:function(){return eL},KQ:function(){return ej},m8:function(){return eN},$4:function(){return eB},qL:function(){return eq},LK:function(){return eM},LN:function(){return eH},yL:function(){return eO},mx:function(){return eZ},g0:function(){return eX}});var i=r(47842),o=r(70865),s=r(96670),a=r(26297),u=r(87394),l=r(50930);function c(){}let h="undefined"==typeof window||"Deno"in window;function f(){}function d(e){return"number"==typeof e&&e>=0&&e!==1/0}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function g(e,t,r){return I(e)?"function"==typeof t?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function m(e,t,r){return I(e)?"function"==typeof t?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}function y(e,t,r){return I(e)?[{...t,queryKey:e},r]:[e||{},t]}function v(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(I(s)){if(n){if(t.queryHash!==b(s,t.options))return!1}else{if(!w(t.queryKey,s))return!1}}if("all"!==r){let u=t.isActive();if("active"===r&&!u||"inactive"===r&&u)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(void 0===i||i===t.state.fetchStatus)&&(!o||!!o(t))}function E(e,t){let{exact:r,fetching:n,predicate:i,mutationKey:o}=e;if(I(o)){if(!t.options.mutationKey)return!1;if(r){if(S(t.options.mutationKey)!==S(o))return!1}else{if(!w(t.options.mutationKey,o))return!1}}return("boolean"!=typeof n||"loading"===t.state.status===n)&&(!i||!!i(t))}function b(e,t){let r=(null==t?void 0:t.queryKeyHashFn)||S;return r(e)}function S(e){return JSON.stringify(e,(e,t)=>C(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function w(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!w(e[r],t[r]))}function R(e,t){if(e&&!t||t&&!e)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function N(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function C(e){if(!A(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(A(r)&&r.hasOwnProperty("isPrototypeOf"))}function A(e){return"[object Object]"===Object.prototype.toString.call(e)}function I(e){return Array.isArray(e)}function P(e){return new Promise(t=>{setTimeout(t,e)})}function O(e){P(0).then(e)}function T(e,t,r){return null!=r.isDataEqual&&r.isDataEqual(e,t)?e:"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=N(t)&&N(r);if(n||C(t)&&C(r)){let i=n?t.length:Object.keys(t).length,o=n?r:Object.keys(r),s=o.length,a=n?[]:{},u=0;for(let l=0;l<s;l++){let c=n?l:o[l];a[c]=e(t[c],r[c]),a[c]===t[c]&&u++}return i===s&&u===i?t:a}return r}(e,t):t}let U=console,_=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>{let r;t++;try{r=e()}finally{--t||a()}return r},o=n=>{t?e.push(n):O(()=>{r(n)})},s=e=>(...t)=>{o(()=>{e(...t)})},a=()=>{let t=e;e=[],t.length&&O(()=>{n(()=>
17{t.forEach(e=>{r(e)})})})},u=e=>{r=e},l=e=>{n=e};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:u,setBatchNotifyFunction:l}}();class D{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(t=>t!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}let M=new class extends D{constructor(){super(),this.setup=e=>{if(!h&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},x=new class extends D{constructor(){super(),this.setup=e=>{if(!h&&window.addEventListener){let t=()=>e();return window.addEventListener("online",t,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};function F(e){return Math.min(1e3*2**e,3e4)}function k(e){return(null!=e?e:"online")!=="online"||x.isOnline()}class L{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function G(e){return e instanceof L}function j(e){let t,r,n,i=!1,o=0,s=!1,a=new Promise((e,t)=>{r=e,n=t}),u=t=>{s||(d(new L(t)),null==e.abort||e.abort())},l=()=>{i=!0},c=()=>{i=!1},h=()=>!M.isFocused()||"always"!==e.networkMode&&!x.isOnline(),f=n=>{s||(s=!0,null==e.onSuccess||e.onSuccess(n),null==t||t(),r(n))},d=r=>{s||(s=!0,null==e.onError||e.onError(r),null==t||t(),n(r))},p=()=>new Promise(r=>{t=e=>{if(s||!h())return r(e)},null==e.onPause||e.onPause()}).then(()=>{t=void 0,s||null==e.onContinue||e.onContinue()}),g=()=>{let t;if(!s){try{t=e.fn()}catch(r){t=Promise.reject(r)}Promise.resolve(t).then(f).catch(t=>{var r,n;if(s)return;let a=null!=(r=e.retry)?r:3,u=null!=(n=e.retryDelay)?n:F,l="function"==typeof u?u(o,t):u,c=!0===a||"number"==typeof a&&o<a||"function"==typeof a&&a(o,t);if(i||!c){d(t);return}o++,null==e.onFail||e.onFail(o,t),P(l).then(()=>{if(h())return p()}).then(()=>{i?d(t):g()})})}};return k(e.networkMode)?g():p().then(g),{promise:a,cancel:u,continue:()=>{null==t||t()},cancelRetry:l,continueRetry:c}}class K{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),d(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:h?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class B extends K{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||U,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdate
17Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){let r=T(this.state.data,e,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;let r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(f).catch(f):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!p(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var r,n,i,o;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(i=this.retryer)||i.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let s=this.observers.find(e=>e.options.queryFn);s&&this.setOptions(s.options)}Array.isArray(this.options.queryKey);let a=function(){if("function"==typeof AbortController)return new AbortController}(),u={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(u);let c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(u)):Promise.reject("Missing queryFn"),h={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};l(h),null==(r=this.options.behavior)||r.onFetch(h),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(n=h.fetchOptions)?void 0:n.meta))&&this.dispatch({type:"fetch",meta:null==(o=h.fetchOptions)?void 0:o.meta});let f=e=>{if(G(e)&&e.silent||this.dispatch({type:"error",error:e}),!G(e)){var t,r;null==(t=(r=this.cache.config).onError)||t.call(r,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=j({fn:h.fetchFn,abort:null==a?void 0:a.abort.bind(a),onSuccess:e=>{var t,r;if(void 0===e){f(Error("undefined"));return}this.setData(e),null==(t=(r=this.cache.config).onSuccess)||t.call(r,e,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var r,n;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(r=e.meta)?r:null,fetchStatus:k(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(n=e.dataUpdatedAt)?n:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=e.error;if(G(i)&&i.revert&&this.revertState)return{...this.revertState};
17return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),_.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}class W extends D{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,r){var n;let i=t.queryKey,o=null!=(n=t.queryHash)?n:b(i,t),s=this.get(o);return s||(s=new B({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){_.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[r]=y(e,t);return void 0===r.exact&&(r.exact=!0),this.queries.find(e=>v(r,e))}findAll(e,t){let[r]=y(e,t);return Object.keys(r).length>0?this.queries.filter(e=>v(r,e)):this.queries}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){_.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class z extends K{constructor(e){super(),this.options={...e.defaultOptions,...e.options},this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||U,this.observers=[],this.state=e.state||q(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){var e,t,r,n,i,o,s,a,u,l,c,h,f,d,p,g;let m="loading"===this.state.status;try{if(!m){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(s=(a=this.mutationCache.config).onMutate)?void 0:s.call(a,this.state.variables,this));let y=await (null==(u=(l=this.options).onMutate)?void 0:u.call(l,this.state.variables));y!==this.state.context&&this.dispatch({type:"loading",context:y,variables:this.state.variables})}let v=await (()=>{var e;return this.retryer=j({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(e=(t=this.mutationCache.config).onSuccess)?void 0:e.call(t,v,this.state.variables,this.state.context,this)),await (null==(r=(n=this.options).onSuccess)?void 0:r.call(n,v,this.state.variables,this.state.context)),await (null==(i=(o=this.options).onSettled)?void 0:i.call(o,v,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:v}),v}catch(E){try{throw await (null==(c=(h=this.mutationCache.config).onError)?void 0:c.call(h,E,this.state.variables,this.state.context,this)),await (null==(f=(d=this.options).onError)?void 0:f.call(d,E,this.state.variables,this.state.context)),await (null==(p=(g=this.options).onSettled)?void 0:p.call(g,void 0,E,this.state.variables,this.state.context)),E}finally{this.dispatch({type:"error",error:E})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!k(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
17sed:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),_.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function q(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class H extends D{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,r){let n=new z({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(n),n}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){_.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>E(e,t))}findAll(e){return this.mutations.filter(t=>E(e,t))}notify(e){_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.mutations.filter(e=>
17e.state.isPaused);return _.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(f)),Promise.resolve()))}}function V(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}class Q{constructor(e={}){this.queryCache=e.queryCache||new W,this.mutationCache=e.mutationCache||new H,this.logger=e.logger||U,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}mount(){this.unsubscribeFocus=M.subscribe(()=>{M.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=x.subscribe(()=>{x.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})}unmount(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)}isFetching(e,t){let[r]=y(e,t);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data}ensureQueryData(e,t,r){let n=g(e,t,r),i=this.getQueryData(n.queryKey);return i?Promise.resolve(i):this.fetchQuery(n)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>{let r=t.data;return[e,r]})}setQueryData(e,t,r){let n=this.queryCache.find(e),i=null==n?void 0:n.state.data,o="function"==typeof t?t(i):t;if(void 0===o)return;let s=g(e),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return _.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state}removeQueries(e,t){let[r]=y(e,t),n=this.queryCache;_.batch(()=>{n.findAll(r).forEach(e=>{n.remove(e)})})}resetQueries(e,t,r){let[n,i]=y(e,t,r),o=this.queryCache,s={type:"active",...n};return _.batch(()=>(o.findAll(n).forEach(e=>{e.reset()}),this.refetchQueries(s,i)))}cancelQueries(e,t,r){let[n,i={}]=y(e,t,r);void 0===i.revert&&(i.revert=!0);let o=_.batch(()=>this.queryCache.findAll(n).map(e=>e.cancel(i)));return Promise.all(o).then(f).catch(f)}invalidateQueries(e,t,r){let[n,i]=y(e,t,r);return _.batch(()=>{var e,t;if(this.queryCache.findAll(n).forEach(e=>{e.invalidate()}),"none"===n.refetchType)return Promise.resolve();let r={...n,type:null!=(e=null!=(t=n.refetchType)?t:n.type)?e:"active"};return this.refetchQueries(r,i)})}refetchQueries(e,t,r){let[n,i]=y(e,t,r),o=_.batch(()=>this.queryCache.findAll(n).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...i,cancelRefetch:null==(t=null==i?void 0:i.cancelRefetch)||t,meta:{refetchPage:n.refetchPage}})})),s=Promise.all(o).then(f);return null!=i&&i.throwOnError||(s=s.catch(f)),s}fetchQuery(e,t,r){let n=g(e,t,r),i=this.defaultQueryOptions(n);void 0===i.retry&&(i.retry=!1);let o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(f).catch(f)}fetchInfiniteQuery(e,t,r){let n=g(e,t,r);return n.behavior={onFetch:e=>{e.fetchFn=()=>{var t,r,n,i,o,s,a;let u;let l=null==(t=e.fetchOptions)?void 0:null==(r=t.meta)?void 0:r.refetchPage,c=null==(n=e.fetchOptions)?void 0:null==(i=n.meta)?void 0:i.fetchMore,h=null==c?void 0:c.pageParam,f=(null==c?void 0:c.direction)==="forward",d=(null==c?void 0:c.direction)==="backward",p=(null==(o=e.state.data)?void 0:o.pages)||[],g=(null==(s=e.state.data)?void 0:s.pageParams)||[],m=g,y=!1,v=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{var t,r;return null!=(t=e.signal)&&t.aborted?y=!0:null==(r=e.signal)||r.addEventListener("abort",()=>{y=!0}),e.signal}})},E=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),b=(e,t,r,n)=>(m=n?[t,...m]:[...m,t],n?[r,...e]:[...e,r]),S=(t,r,n,i)=>{if(y)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);let o={queryKey:e.queryKey,pageParam:n,meta:e.options.meta};v(o);let s=E(o),a=Promise.resolve(s).then(e=>b(t,n,e,i));return a};if(p.length){if(f){let w=void 0!==h,R=w?h:V(e.options,p);u=S(p,w,R)}else if(d){let N=void 0!==h,C=N?h:null==(a=e.options).getPreviousPageParam?void 0:a.getPreviousPageParam(p[0],p);u=S(p,N,C,!0)}else{m=[];let A=void 0===e.options.getNextPageParam,I=!l||!p[0]||l(p[0],0,p);u=I?S([],A,g[0]):Promise.resolve(b([],g[0],p[0]));for(let P=1;P<p.length;P++)u=u.then(t=>{let r=!l||!p[P]||l(p[P],P,p);if(r){let n=A?g[P]:V(e.options,t);return S(t,A,n)}return Promise.resolve(b(t,g[P],p[P]))})}}else u=S([]);let O=u.then(e=>({pages:e,pageParams:m}));return O}}},this.fetchQuery(n)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(f).catch(f)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let r=this.queryDefaults.find(t=>S(e)===S(t.queryKey));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>w(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let r=this.mutationDefaults.find(t=>S(e)===S(t.mutationKey));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>w(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=b(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}
17function Z(e){return e.state.isPaused}function J(e){return"success"===e.state.status}async function X({queryClient:e,persister:t,maxAge:r=864e5,buster:n="",hydrateOptions:i}){try{let o=await t.restoreClient();if(o){if(o.timestamp){let s=Date.now()-o.timestamp>r,a=o.buster!==n;s||a?t.removeClient():function(e,t,r){if("object"!=typeof t||null===t)return;let n=e.getMutationCache(),i=e.getQueryCache(),o=t.mutations||[],s=t.queries||[];o.forEach(t=>{var i;n.build(e,{...null==r?void 0:null==(i=r.defaultOptions)?void 0:i.mutations,mutationKey:t.mutationKey},t.state)}),s.forEach(t=>{var n;let o=i.get(t.queryHash);if(o){o.state.dataUpdatedAt<t.state.dataUpdatedAt&&o.setState(t.state);return}i.build(e,{...null==r?void 0:null==(n=r.defaultOptions)?void 0:n.queries,queryKey:t.queryKey,queryHash:t.queryHash},t.state)})}(e,o.clientState,i)}else t.removeClient()}}catch(u){t.removeClient()}}async function $({queryClient:e,persister:t,buster:r="",dehydrateOptions:n}){let i={buster:r,timestamp:Date.now(),clientState:function(e,t={}){let r=[],n=[];if(!1!==t.dehydrateMutations){let i=t.shouldDehydrateMutation||Z;e.getMutationCache().getAll().forEach(e=>{i(e)&&r.push({mutationKey:e.options.mutationKey,state:e.state})})}if(!1!==t.dehydrateQueries){let o=t.shouldDehydrateQuery||J;e.getQueryCache().getAll().forEach(e=>{o(e)&&n.push({state:e.state,queryKey:e.queryKey,queryHash:e.queryHash})})}return{mutations:r,queries:n}}(e,n)};await t.persistClient(i)}var Y=r(68176),ee=r(2784);let et=ee.createContext(void 0),er=ee.createContext(!1);function en(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=et),window.ReactQueryClientContext):et)}let ei=({context:e}={})=>{let t=ee.useContext(en(e,ee.useContext(er)));if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},eo=({client:e,children:t,context:r,contextSharing:n=!1})=>{ee.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let i=en(r,n);return ee.createElement(er.Provider,{value:!r&&n},ee.createElement(i.Provider,{value:e},t))},es=ee.createContext(!1),ea=()=>ee.useContext(es);es.Provider;let eu=ee.createContext((n=!1,{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n})),el=()=>ee.useContext(eu);var ec=r(43100);let eh=ec.useSyncExternalStore;class ef extends D{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.client.defaultMutationOptions(e),R(t,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this})}onUnsubscribe(){if(!this.listeners.length){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:q(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){_.batch(()=>{if(this.mutateOptions){var t,r,n,i,o,s,a,u;e.onSuccess?(null==(t=(r=this.mutateOptions).onSuccess)||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(n=(i=this.mutateOptions).onSettled)||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(o=(s=this.mutateOptions).onError)||o.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(u=this.mutateOptions).onSettled)||a.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}
17e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)})})}}function ed(){}class ep extends D{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.length&&(this.currentQuery.addObserver(this),eg(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return em(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return em(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),R(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();let i=this.hasListeners();i&&ey(this.currentQuery,n,this.options,r)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();let o=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){let t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),e[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(f)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),h||this.currentResult.isStale||!d(this.options.staleTime))return;let e=p(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e+1)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!h&&!1!==this.options.enabled&&d(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||M.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){let r;let n=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,u=e!==n,l=u?e.state:this.currentQueryInitialState,c=u?this.currentResult:this.previousQueryResult,{state:h}=e,{dataUpdatedAt:f,error:d,errorUpdatedAt:p,fetchStatus:g,status:m}=h,y=!1,v=!1;if(t._optimisticResults){let E=this.hasListeners(),b=!E&&eg(e,t),S=E&&ey(e,n,t,i);(b||S)&&(g=k(e.options.networkMode)?"fetching":"paused",f||(m="loading")),"isRestoring"===t._optimisticResults&&(g="idle")}if(t.keepPreviousData&&!h.dataUpdatedAt&&null!=c&&c.isSuccess&&"error"!==m)r=c.data,f=c.dataUpdatedAt,m=c.status,y=!0;else if(t.select&&void 0!==h.data){if(o&&h.data===(null==s?void 0:s.data)&&t.select===this.selectFn)r=this.selectResult;else try{this.selectFn=t.select,r=t.select(h.data),r=T(null==o?void 0:o.data,r,t),this.selectResult=r,this.selectError=null}catch(w){this.selectError=w}}else r=h.data;if(void 0!==t.placeholderData&&void 0===r&&"loading"===m){let R;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==a?void 0:a.placeholderData))R=o.data;else if(R="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==R)try{R=t.select(R),this.selectError=null}catch(N){this.selectError=N}void 0!==R&&(m="success",r=T(null==o?void 0:o.data,R,t),v=!0)}this.selectError&&(d=this.selectError,r=this.selectResult,p=Date.now(),m="error");let C="fetching"===g,A="loading"===m,I="error"===m,P={status:m,fetchStatus:g,isLoading:A,isSuccess:"success"===m,isError:I,isInitialLoading:A&&C,data:r,dataUpdatedAt:f,error:d,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdate
17Count:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>l.dataUpdateCount||h.errorUpdateCount>l.errorUpdateCount,isFetching:C,isRefetching:C&&!A,isLoadingError:I&&0===h.dataUpdatedAt,isPaused:"paused"===g,isPlaceholderData:v,isPreviousData:y,isRefetchError:I&&0!==h.dataUpdatedAt,isStale:ev(e,t),refetch:this.refetch,remove:this.remove};return P}updateResult(e){let t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,R(r,t))return;this.currentResult=r;let n={cache:!0};(null==e?void 0:e.listeners)!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;let r=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(e=>{let n=this.currentResult[e]!==t[e];return n&&r.has(e)})})()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||G(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){_.batch(()=>{var t,r,n,i,o,s,a,u;e.onSuccess?(null==(t=(r=this.options).onSuccess)||t.call(r,this.currentResult.data),null==(n=(i=this.options).onSettled)||n.call(i,this.currentResult.data,null)):e.onError&&(null==(o=(s=this.options).onError)||o.call(s,this.currentResult.error),null==(a=(u=this.options).onSettled)||a.call(u,void 0,this.currentResult.error)),e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function eg(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)||e.state.dataUpdatedAt>0&&em(e,t,t.refetchOnMount)}function em(e,t,r){if(!1!==t.enabled){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&ev(e,t)}return!1}function ey(e,t,r,n){return!1!==r.enabled&&(e!==t||!1===n.enabled)&&(!r.suspense||"error"!==e.state.status)&&ev(e,r)}function ev(e,t){return e.isStaleByTime(t.staleTime)}var eE=r(41110);function eb(e){var t=e.queryClient,r=void 0===t?new Q({defaultOptions:{queries:{cacheTime:864e5,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}):t,n=e.storage,i=void 0===n?(0,Y.o6)({storage:window.localStorage?window.localStorage:Y.wp}):n,u=e.persister,l=void 0===u?function({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:i=JSON.parse,retry:o}){if(void 0!==e){let s=r=>{try{e.setItem(t,n(r))}catch(i){return i}};return{persistClient:function(e,t=100){let r=null;return function(...n){null===r&&(r=setTimeout(()=>{e(...n),r=null},t))}}(e=>{let t=e,r=s(t),n=0;for(;r&&t;)n++,(t=null==o?void 0:o({persistedClient:t,error:r,errorCount:n}))&&(r=s(t))},r),restoreClient:()=>{let r=e.getItem(t);if(r)return i(r)},removeClient:()=>{e.removeItem(t)}}}return{persistClient:c,restoreClient:()=>void 0,removeClient:c}}({key:"cache",storage:i,serialize:function(e){return e},deserialize:function(e){return e}}):u,h=(0,a.Z)(e,["queryClient","storage","persister"]),f=(0,Y.eI)((0,s.Z)((0,o.Z)({},h),{storage:i}));return l&&function(e){let t;X(e).then(()=>{(function(e){let t=e.queryClient.getQueryCache().subscribe(()=>{$(e)}),r=e.queryClient.getMutationCache().subscribe(()=>{$(e)});()=>{t(),r()}})(e)})}({queryClient:r,persister:l,dehydrateOptions:{shouldDehydrateQuery:function(e){return 0!==e.cacheTime&&!1!==e.queryKey[0].persist}}}),Object.assign(f,{queryClient:r})}var eS=ee.createContext(void 0),ew=ee.createContext(void 0);function eR(e){var t=e.children,r=e.client;return ee.createElement(eS.Provider,{children:ee.createElement(eo,{children:t,client:r.queryClient,context:ew}),value:r})}function eN(){var e=ee.useContext(eS);if(!e)throw Error("`useClient` must be used within `WagmiConfig`.\n\nRead more: https://wagmi.sh/react/WagmiConfig");return e}var eC=ec.useSyncExternalStore;function eA(e,t,r){var n=m(e,t,r);return function(e,t,r){var n,i;let o=m(e,void 0,void 0),s=ei({context:o.context}),[a]=ee.useState(()=>new ef(s,o));ee.useEffect(()=>{a.setOptions(o)},[a,o]);let u=eh(ee.useCallback(e=>a.subscribe(_.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),l=ee.useCallback((e,t)=>{a.mutate(e,t).catch(ed)},[a]);if(u.error&&(n=a.options.useErrorBoundary,i=[u.error],"function"==typeof n?n(...i):!!n))throw u.error;return{...u,mutate:l,mutateAsync:u.mutate}}((0,o.Z)({context:ew},n))}function eI(e,t,r){var n,i,a=Array.isArray(e)?"function"==typeof t?(0,s.Z)((0,o.Z)({},r),{queryKey:e,queryFn:t}):(0,s.Z)((0,o.Z)({},t),{queryKey:e}):e,c=function(e,t){var r,n,i=ei({context:e.context}),a=ea(),c=el(),h=i.defaultQueryOptions(e);h._optimisticResults=a?"isRestoring":"optimistic",h.onError&&(h.onError=_.batchCalls(h.onError)),h.onSuccess&&(h.onSuccess=_.batchCalls(h.onSuccess)),h.onSettled&&(h.onSettled=_.batchCalls(h.onSettled)),h.suspense&&"number"!=typeof h.staleTime&&(h.staleTime=1e3),(h.suspense||h.useErrorBoundary)&&!c.isReset()&&(h.retryOnMount=!1);var f=(0,u.Z)(ee.useState(function(){return new t(i,h)}),1)[0],d=f.getOptimisticResult(h);if(eC(ee.useCallback(function(e){return a?function(){}:f.subscribe(_.batchCalls(e))}
17,[f,a]),function(){return f.getCurrentResult()},function(){return f.getCurrentResult()}),ee.useEffect(function(){c.clearReset()},[c]),ee.useEffect(function(){f.setOptions(h,{listeners:!1})},[h,f]),h.suspense&&d.isLoading&&d.isFetching&&!a)throw f.fetchOptimistic(h).then(function(e){var t,r,n=e.data;null===(t=h.onSuccess)||void 0===t||t.call(h,n),null===(r=h.onSettled)||void 0===r||r.call(h,n,null)}).catch(function(e){var t,r;c.clearReset(),null===(t=h.onError)||void 0===t||t.call(h,e),null===(r=h.onSettled)||void 0===r||r.call(h,void 0,e)});if(d.isError&&!c.isReset()&&!d.isFetching&&(r=h.useErrorBoundary,n=[d.error,f.getCurrentQuery()],"function"==typeof r?r.apply(void 0,(0,l.Z)(n)):!!r))throw d.error;var p="loading"===d.status&&"idle"===d.fetchStatus?"idle":d.status,g="loading"===p&&"fetching"===d.fetchStatus;return(0,s.Z)((0,o.Z)({},d),{defaultedOptions:h,isIdle:"idle"===p,isLoading:g,observer:f,status:p})}((0,o.Z)({context:ew},a),ep),h={data:c.data,error:c.error,fetchStatus:c.fetchStatus,isError:c.isError,isFetched:c.isFetched,isFetchedAfterMount:c.isFetchedAfterMount,isFetching:c.isFetching,isIdle:c.isIdle,isLoading:c.isLoading,isRefetching:c.isRefetching,isSuccess:c.isSuccess,refetch:c.refetch,status:c.status,internal:{dataUpdatedAt:c.dataUpdatedAt,errorUpdatedAt:c.errorUpdatedAt,failureCount:c.failureCount,isFetchedAfterMount:c.isFetchedAfterMount,isLoadingError:c.isLoadingError,isPaused:c.isPaused,isPlaceholderData:c.isPlaceholderData,isPreviousData:c.isPreviousData,isRefetchError:c.isRefetchError,isStale:c.isStale,remove:c.remove}};return c.defaultedOptions.notifyOnChangeProps?h:(n=c.observer,i={},Object.keys(h).forEach(function(e){Object.defineProperty(i,e,{configurable:!1,enumerable:!0,get:function(){return n.trackedProps.add(e),h[e]}})}),i)}var eP=function(){return ei({context:ew})};function eO(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).chainId;return(0,eE.useSyncExternalStoreWithSelector)(function(t){return(0,Y.b0)({chainId:e},t)},function(){return(0,Y.VH)({chainId:e})},function(){return(0,Y.VH)({chainId:e})},function(e){return e},function(e,t){return e.network.chainId===t.network.chainId})}function eT(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).chainId;return eO({chainId:e}).network.chainId}function eU(e){return[{entity:"blockNumber",chainId:e.chainId,scopeKey:e.scopeKey}]}function e_(e){var t=(0,u.Z)(e.queryKey,1)[0].chainId;return(0,Y.RQ)({chainId:t})}function eD(e){var t=(0,u.Z)(e.queryKey,1)[0],r=t.chainId,n=t.formatUnits;return(0,Y.jS)({chainId:r,formatUnits:n})}function eM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheTime,r=e.chainId,n=e.enabled,i=void 0===n||n,o=e.formatUnits,s=void 0===o?"wei":o,a=e.scopeKey,u=e.staleTime,l=e.suspense,c=e.watch,h=e.onError,f=e.onSettled,d=e.onSuccess,p=eT({chainId:r}),g=ee.useMemo(function(){var e;return[{entity:"feeData",chainId:(e={chainId:p,formatUnits:s,scopeKey:a}).chainId,formatUnits:e.formatUnits,scopeKey:e.scopeKey}]},[p,s,a]),m=eI(g,eD,{cacheTime:t,enabled:i,staleTime:u,suspense:l,onError:h,onSettled:f,onSuccess:d});return ex({chainId:p,enabled:Boolean(i&&c),queryKey:g}),m}function ex(e){var t=e.chainId,r=e.enabled,n=e.queryKey,i=eP();!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheTime,r=e.chainId,n=e.enabled,i=void 0===n||n,o=e.scopeKey,s=e.staleTime,a=e.suspense,u=e.watch,l=void 0!==u&&u,c=e.onBlock,h=e.onError,f=e.onSettled,d=e.onSuccess,p=eT({chainId:r}),g=eO({chainId:p}),m=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).chainId;return(0,eE.useSyncExternalStoreWithSelector)(function(t){return(0,Y.Fx)({chainId:e},t)},function(){return(0,Y.lG)({chainId:e})},function(){return(0,Y.lG)({chainId:e})},function(e){return e},function(e,t){return(null==e?void 0:e.network.chainId)===(null==t?void 0:t.network.chainId)})}({chainId:p}),y=eP();ee.useEffect(function(){if(i&&(l||c)){var e=(0,Y.Ds)(function(e){l&&y.setQueryData(eU({chainId:p,scopeKey:o}),e),c&&c(e)},1),t=null!=m?m:g;return t.on("block",e),function(){t.off("block",e)}}},[p,o,c,g,y,l,m,i]),eI(eU({scopeKey:o,chainId:p}
17),e_,{cacheTime:void 0===t?0:t,enabled:i,staleTime:s,suspense:a,onError:h,onSettled:f,onSuccess:d})}({chainId:t,enabled:r,onBlock:r?function(){return i.invalidateQueries(n)}:void 0,scopeKey:r?void 0:"idle"})}var eF=function(e){return"object"==typeof e&&!Array.isArray(e)};function ek(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Y.vZ,a=ee.useRef([]),l=(0,eE.useSyncExternalStoreWithSelector)(e,t,r,function(e){return e},function(e,t){if(eF(e)&&eF(t)&&a.current.length){var r=!0,i=!1,o=void 0;try{for(var s,u=a.current[Symbol.iterator]();!(r=(s=u.next()).done);r=!0){var l=s.value;if(!n(e[l],t[l]))return!1}}catch(c){i=!0,o=c}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return!0}return n(e,t)});if(eF(l)){var c=(0,o.Z)({},l);return Object.defineProperties(c,Object.entries(c).reduce(function(e,t){var r=(0,u.Z)(t,2),n=r[0],l=r[1];return(0,s.Z)((0,o.Z)({},e),(0,i.Z)({},n,{configurable:!1,enumerable:!0,get:function(){return a.current.includes(n)||a.current.push(n),l}}))},{})),c}return l}function eL(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.onConnect,n=t.onDisconnect,i=ek(Y.uH,Y.D0),o=ee.useRef(),s=null!==(e=o.current)&&void 0!==e?e:{};return r&&("connected"!==s.status||void 0===s.status)&&"connected"===i.status&&r({address:i.address,connector:i.connector,isReconnected:"reconnecting"===s.status||void 0===s.status}),n&&"connected"===s.status&&"disconnected"===i.status&&n(),o.current=i,i}function eG(e){var t=(0,u.Z)(e.queryKey,1)[0],r=t.address,n=t.chainId,i=t.formatUnits,o=t.token;if(!r)throw Error("address is required");return(0,Y.EG)({address:r,chainId:n,formatUnits:i,token:o})}function ej(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.address,r=e.cacheTime,n=e.chainId,i=e.enabled,o=void 0===i||i,s=e.formatUnits,a=e.scopeKey,u=e.staleTime,l=e.suspense,c=e.token,h=e.watch,f=e.onError,d=e.onSettled,p=e.onSuccess,g=eT({chainId:n}),m=ee.useMemo(function(){var e;return[{entity:"balance",address:(e={address:t,chainId:g,formatUnits:s,scopeKey:a,token:c}).address,chainId:e.chainId,formatUnits:e.formatUnits,scopeKey:e.scopeKey,token:e.token}]},[t,g,s,a,c]),y=eI(m,eG,{cacheTime:r,enabled:Boolean(o&&t),staleTime:u,suspense:l,onError:f,onSettled:d,onSuccess:p});return ex({chainId:g,enabled:Boolean(o&&h&&t),queryKey:m}),y}var eK=function(e){var t=e.connector,r=e.chainId;if(!t)throw Error("connector is required");return(0,Y.$j)({connector:t,chainId:r})};function eB(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.chainId,r=e.connector,n=e.onError,i=e.onMutate,s=e.onSettled,a=e.onSuccess,u=eN(),l=eA([(0,o.Z)({entity:"connect"},{connector:r,chainId:t})],eK,{onError:n,onMutate:i,onSettled:s,onSuccess:a}),c=l.data,h=l.error,f=l.isError,d=l.isIdle,p=l.isLoading,g=l.isSuccess,m=l.mutate,y=l.mutateAsync,v=l.reset,E=l.status,b=l.variables;return{connect:ee.useCallback(function(e){var n,i;return m({chainId:null!==(n=null==e?void 0:e.chainId)&&void 0!==n?n:t,connector:null!==(i=null==e?void 0:e.connector)&&void 0!==i?i:r})},[t,r,m]),connectAsync:ee.useCallback(function(e){var n,i;return y({chainId:null!==(n=null==e?void 0:e.chainId)&&void 0!==n?n:t,connector:null!==(i=null==e?void 0:e.connector)&&void 0!==i?i:r})},[t,r,y]),connectors:u.connectors,data:c,error:h,isError:f,isIdle:d,isLoading:p,isSuccess:g,pendingConnector:null==b?void 0:b.connector,reset:v,status:E,variables:b}}var eW=[{entity:"disconnect"}],ez=function(){return(0,Y.zP)()};function eq(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onError,r=e.onMutate,n=e.onSettled,i=e.onSuccess,a=eA(eW,ez,(0,o.Z)((0,s.Z)((0,o.Z)({},t?{onError:function(e,r,n){t(e,n)}}:{}),{onMutate:r}),n?{onSettled:function(e,t,r,i){n(t,i)}}:{},i?{onSuccess:function(e,t,r){i(r)}}:{})),u=a.error,l=a.isError,c=a.isIdle,h=a.isLoading,f=a.isSuccess;return{disconnect:a.mutate,disconnectAsync:a.mutateAsync,error:u,isError:l,isIdle:c,isLoading:h,isSuccess:f,reset:a.reset,status:a.status}}function eH(){return ek(Y.QC,Y.Hy)}function eV(e){return[{entity:"signer",chainId:e.chainId,persist:!1}]}function eQ(e){var t=(0,u.Z)(e.queryKey,1)[0].chainId;return(0,Y.DG)({chainId:t})}function eZ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.chainId,r=e.suspense,n=e.onError,i=e.onSettled,o=e.onSuccess,s=eL().connector,a=eT({chainId:t}),u=eI(eV({chainId:a}),eQ,{cacheTime:0,enabled:Boolean(s),staleTime:1/0,suspense:r,onError:n,onSettled:i,onSuccess:o}),l=eP();return ee.useEffect(function(){return(0,Y.rn)({chainId:a}
17,function(e){e?l.invalidateQueries(eV({chainId:a})):l.removeQueries(eV({chainId:a}))})},[l,a]),u}var eJ=function(e){var t=e.chainId;if(!t)throw Error("chainId is required");return(0,Y.If)({chainId:t})};function eX(){var e,t,r,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=i.chainId,a=i.throwForSwitchChainNotSupported,l=i.onError,c=i.onMutate,h=i.onSettled,f=i.onSuccess,d=eN(),p=(0,u.Z)(ee.useReducer(function(e){return e+1},0),2)[1],g=eA([(0,o.Z)({entity:"switchNetwork"},{chainId:s})],eJ,{onError:l,onMutate:c,onSettled:h,onSuccess:f}),m=g.data,y=g.error,v=g.isError,E=g.isIdle,b=g.isLoading,S=g.isSuccess,w=g.mutate,R=g.mutateAsync,N=g.reset,C=g.status,A=g.variables,I=ee.useCallback(function(e){return w({chainId:null!=e?e:s})},[s,w]),P=ee.useCallback(function(e){return R({chainId:null!=e?e:s})},[s,R]);ee.useEffect(function(){return d.subscribe(function(e){return{chains:e.chains,connector:e.connector}},p)},[d,p]);var O=!!(null===(e=d.connector)||void 0===e?void 0:e.switchChain);return(a||O)&&(t=I,r=P),{chains:null!==(n=d.chains)&&void 0!==n?n:[],data:m,error:y,isError:v,isIdle:E,isLoading:b,isSuccess:S,pendingChainId:null==A?void 0:A.chainId,reset:N,status:C,switchNetwork:t,switchNetworkAsync:r,variables:A}}},47832:function(e,t,r){r.d(t,{XR:function(){return i},tJ:function(){return l}});let n=e=>(t,r,n)=>{let i=n.subscribe;n.subscribe=(e,t,r)=>{let o=e;if(t){let s=(null==r?void 0:r.equalityFn)||Object.is,a=e(n.getState());o=r=>{let n=e(r);if(!s(a,n)){let i=a;t(a=n,i)}},(null==r?void 0:r.fireImmediately)&&t(a,a)}return i(o)};let o=e(t,r,n);return o},i=n,o=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>o(e)(r),catch(e){return this}}}catch(n){return{then(e){return this},catch:e=>o(e)(n)}}},s=(e,t)=>(r,n,i)=>{let s,a,u={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,c=new Set,h=new Set;try{s=u.getStorage()}catch(f){}if(!s)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),r(...e)},n,i);let d=o(u.serialize),p=()=>{let e;let t=u.partialize({...n()}),r=d({state:t,version:u.version}).then(e=>s.setItem(u.name,e)).catch(t=>{e=t});if(e)throw e;return r},g=i.setState;i.setState=(e,t)=>{g(e,t),p()};let m=e((...e)=>{r(...e),p()},n,i),y=()=>{var e;if(!s)return;l=!1,c.forEach(e=>e(n()));let t=(null==(e=u.onRehydrateStorage)?void 0:e.call(u,n()))||void 0;return o(s.getItem.bind(s))(u.name).then(e=>{if(e)return u.deserialize(e)}).then(e=>{if(e){if("number"!=typeof e.version||e.version===u.version)return e.state;if(u.migrate)return u.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(a=u.merge(e,null!=(t=n())?t:m),!0),p()}).then(()=>{null==t||t(a,void 0),l=!0,h.forEach(e=>e(a))}).catch(e=>{null==t||t(void 0,e)})};return i.persist={setOptions:e=>{u={...u,...e},e.getStorage&&(s=e.getStorage())},clearStorage:()=>{null==s||s.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>y(),hasHydrated:()=>l,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(h.add(e),()=>{h.delete(e)})},y(),a||m},a=(e,t)=>(r,n,i)=>{let s,a={storage:function(e){let t;try{t=e()}catch(r){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e),i=null!=(r=t.getItem(e))?r:null;return i instanceof Promise?i.then(n):n(i)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r)),removeItem:e=>t.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,l=new Set,c=new Set,h=a.storage;if(!h)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,i);let f=()=>{let e=a.partialize({...n()});return h.setItem(a.name,{state:e,version:a.version})},d=i.setState;i.setState=(e,t)=>{d(e,t),f()};let p=e((...e)=>{r(...e),f()},n,i),g=()=>{var e;if(!h)return;u=!1,l.forEach(e=>e(n()));
17let t=(null==(e=a.onRehydrateStorage)?void 0:e.call(a,n()))||void 0;return o(h.getItem.bind(h))(a.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(s=a.merge(e,null!=(t=n())?t:p),!0),f()}).then(()=>{null==t||t(s,void 0),u=!0,c.forEach(e=>e(s))}).catch(e=>{null==t||t(void 0,e)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(h=e.storage)},clearStorage:()=>{null==h||h.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>u,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},g(),s||p},u=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Please use `storage` option instead."),s(e,t)):a(e,t),l=u},92532:function(e,t,r){r.d(t,{X:function(){return n}});function n(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,n]of e)if(!Object.is(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;return!0}let o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(let s=0;s<o.length;s++)if(!Object.prototype.hasOwnProperty.call(t,o[s])||!Object.is(e[o[s]],t[o[s]]))return!1;return!0}},42893:function(e,t,r){r.d(t,{M:function(){return i}});let n=e=>{let t;let r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let o=t;t=(null!=n?n:"object"!=typeof i)?i:Object.assign({},t,i),r.forEach(e=>e(t,o))}},i=()=>t,o=e=>(r.add(e),()=>r.delete(e)),s=()=>{console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()},a={setState:n,getState:i,subscribe:o,destroy:s};return t=e(n,i,a),a},i=e=>e?n(e):n}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.