walletchecker.me Open in urlscan Pro
2606:4700:3034::ac43:d359  Public Scan

Submitted URL: http://walletchecker.me/scripts/wallet-connect-v2.js
Effective URL: https://walletchecker.me/scripts/wallet-connect-v2.js
Submission: On February 27 via api from US — Scanned from US

Form analysis 0 forms found in the DOM

Text Content

/*! For license information please see bundle.js.LICENSE.txt */
(()=>{var e={8099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7117);function i(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}function o(e,t,r){return void 0===t&&(t=new Uint8Array(2)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}function s(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function a(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function l(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function u(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}function h(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}function d(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),u(e/4294967296>>>0,t,r),u(e>>>0,t,r+4),t}function p(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),h(e>>>0,t,r),h(e/4294967296>>>0,t,r+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=s,t.readUint32BE=a,t.readInt32LE=c,t.readUint32LE=l,t.writeUint32BE=u,t.writeInt32BE=u,t.writeUint32LE=h,t.writeInt32LE=h,t.readInt64BE=function(e,t){void 0===t&&(t=0);var r=s(e,t),n=s(e,t+4);return 4294967296*r+n-4294967296*(n>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*a(e,t)+a(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var r=c(e,t);return 4294967296*c(e,t+4)+r-4294967296*(r>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var r=l(e,t);return 4294967296*l(e,t+4)+r},t.writeUint64BE=d,t.writeInt64BE=d,t.writeUint64LE=p,t.writeInt64LE=p,t.readUintBE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=e/8+r-1;o>=r;o--)n+=t[o]*i,i*=256;return n},t.readUintLE=function(e,t,r){if(void 0===r&&(r=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o<r+e/8;o++)n+=t[o]*i,i*=256;return n},t.writeUintBE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var o=1,s=e/8+i-1;s>=i;s--)r[s]=t/o&255,o*=256;return r},t.writeUintLE=function(e,t,r,i){if(void 0===r&&(r=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,s=i;s<i+e/8;s++)r[s]=t/o&255,o*=256;return r},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e),t},t.writeFloat32LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(4)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(r,e,!0),t},t.writeFloat64BE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e),t},t.writeFloat64LE=function(e,t,r){return void 0===t&&(t=new Uint8Array(8)),void 0===r&&(r=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(r,e,!0),t}},5501:(e,t,r)=>{"use strict";var n=r(5439),i=r(3027),o=r(7309),s=r(8099),a=r(4153);t.Cv=32,t.WH=12,t.pg=16;var c=new Uint8Array(16),l=function(){function e(e){if(this.nonceLength=t.WH,this.tagLength=t.pg,e.length!==t.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);n.stream(this._key,s,a,4);var c,l=t.length+this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(l);return n.streamXOR(this._key,s,t,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),r),o.wipe(s),c},e.prototype.open=function(e,t,r,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length<this.tagLength)return null;var s=new Uint8Array(16);s.set(e,s.length-e.length);var c=new Uint8Array(32);n.stream(this._key,s,c,4);var l=new Uint8Array(this.tagLength);if(this._authenticate(l,c,t.subarray(0,t.length-this.tagLength),r),!a.equal(l,t.subarray(t.length-this.tagLength,t.length)))return null;var u,h=t.length-this.tagLength;if(i){if(i.length!==h)throw new Error("ChaCha20Poly1305: incorrect destination length");u=i}else u=new Uint8Array(h);return n.streamXOR(this._key,s,t.subarray(0,t.length-this.tagLength),u,4),o.wipe(s),u},e.prototype.clean=function(){return o.wipe(this._key),this},e.prototype._authenticate=function(e,t,r,n){var a=new i.Poly1305(t);n&&(a.update(n),n.length%16>0&&a.update(c.subarray(n.length%16))),a.update(r),r.length%16>0&&a.update(c.subarray(r.length%16));var l=new Uint8Array(8);n&&s.writeUint64LE(n.length,l),a.update(l),s.writeUint64LE(r.length,l),a.update(l);for(var u=a.digest(),h=0;h<u.length;h++)e[h]=u[h];a.clean(),o.wipe(u),o.wipe(l)},e}();t.OK=l},5439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8099),i=r(7309),o=20;function s(e,t,r){for(var i=1634760805,s=857760878,a=2036477234,c=1797285236,l=r[3]<<24|r[2]<<16|r[1]<<8|r[0],u=r[7]<<24|r[6]<<16|r[5]<<8|r[4],h=r[11]<<24|r[10]<<16|r[9]<<8|r[8],d=r[15]<<24|r[14]<<16|r[13]<<8|r[12],p=r[19]<<24|r[18]<<16|r[17]<<8|r[16],f=r[23]<<24|r[22]<<16|r[21]<<8|r[20],m=r[27]<<24|r[26]<<16|r[25]<<8|r[24],g=r[31]<<24|r[30]<<16|r[29]<<8|r[28],w=t[3]<<24|t[2]<<16|t[1]<<8|t[0],b=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],y=t[15]<<24|t[14]<<16|t[13]<<8|t[12],x=i,C=s,A=a,E=c,_=l,I=u,P=h,O=d,k=p,S=f,M=m,N=g,T=w,j=b,R=v,L=y,$=0;$<o;$+=2)_=(_^=k=k+(T=(T^=x=x+_|0)>>>16|T<<16)|0)>>>20|_<<12,I=(I^=S=S+(j=(j^=C=C+I|0)>>>16|j<<16)|0)>>>20|I<<12,P=(P^=M=M+(R=(R^=A=A+P|0)>>>16|R<<16)|0)>>>20|P<<12,O=(O^=N=N+(L=(L^=E=E+O|0)>>>16|L<<16)|0)>>>20|O<<12,P=(P^=M=M+(R=(R^=A=A+P|0)>>>24|R<<8)|0)>>>25|P<<7,O=(O^=N=N+(L=(L^=E=E+O|0)>>>24|L<<8)|0)>>>25|O<<7,I=(I^=S=S+(j=(j^=C=C+I|0)>>>24|j<<8)|0)>>>25|I<<7,_=(_^=k=k+(T=(T^=x=x+_|0)>>>24|T<<8)|0)>>>25|_<<7,I=(I^=M=M+(L=(L^=x=x+I|0)>>>16|L<<16)|0)>>>20|I<<12,P=(P^=N=N+(T=(T^=C=C+P|0)>>>16|T<<16)|0)>>>20|P<<12,O=(O^=k=k+(j=(j^=A=A+O|0)>>>16|j<<16)|0)>>>20|O<<12,_=(_^=S=S+(R=(R^=E=E+_|0)>>>16|R<<16)|0)>>>20|_<<12,O=(O^=k=k+(j=(j^=A=A+O|0)>>>24|j<<8)|0)>>>25|O<<7,_=(_^=S=S+(R=(R^=E=E+_|0)>>>24|R<<8)|0)>>>25|_<<7,P=(P^=N=N+(T=(T^=C=C+P|0)>>>24|T<<8)|0)>>>25|P<<7,I=(I^=M=M+(L=(L^=x=x+I|0)>>>24|L<<8)|0)>>>25|I<<7;n.writeUint32LE(x+i|0,e,0),n.writeUint32LE(C+s|0,e,4),n.writeUint32LE(A+a|0,e,8),n.writeUint32LE(E+c|0,e,12),n.writeUint32LE(_+l|0,e,16),n.writeUint32LE(I+u|0,e,20),n.writeUint32LE(P+h|0,e,24),n.writeUint32LE(O+d|0,e,28),n.writeUint32LE(k+p|0,e,32),n.writeUint32LE(S+f|0,e,36),n.writeUint32LE(M+m|0,e,40),n.writeUint32LE(N+g|0,e,44),n.writeUint32LE(T+w|0,e,48),n.writeUint32LE(j+b|0,e,52),n.writeUint32LE(R+v|0,e,56),n.writeUint32LE(L+y|0,e,60)}function a(e,t,r,n,o){if(void 0===o&&(o=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var a,l;if(0===o){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");l=(a=new Uint8Array(16)).length-t.length,a.set(t,l)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");a=t,l=o}for(var u=new Uint8Array(64),h=0;h<r.length;h+=64){s(u,a,e);for(var d=h;d<h+64&&d<r.length;d++)n[d]=r[d]^u[d-h];c(a,0,l)}return i.wipe(u),0===o&&i.wipe(a),n}function c(e,t,r){for(var n=1;r--;)n=n+(255&e[t])|0,e[t]=255&n,n>>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=a,t.stream=function(e,t,r,n){return void 0===n&&(n=0),i.wipe(r),a(e,t,r,r,n)}},4153:(e,t)=>{"use strict";function r(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n<e.length;n++)r|=e[n]^t[n];return 1&r-1>>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,r){return~(e-1)&t|e-1&r},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=r,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==r(e,t)}},1050:(e,t,r)=>{"use strict";t.Xx=t._w=t.aP=t.KS=t.jQ=void 0;r(1416);const n=r(3350);r(7309);function i(e){const t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}t.jQ=64,t.KS=64,t.aP=32,new Uint8Array(32)[0]=9;const o=i(),s=i([1]),a=(i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222])),c=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]);i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function u(e,t){for(let r=0;r<16;r++)e[r]=0|t[r]}function h(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function d(e,t,r){const n=~(r-1);for(let r=0;r<16;r++){const i=n&(e[r]^t[r]);e[r]^=i,t[r]^=i}}function p(e,t){const r=i(),n=i();for(let e=0;e<16;e++)n[e]=t[e];h(n),h(n),h(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,d(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}function f(e){const t=new Uint8Array(32);return p(t,e),1&t[0]}function m(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function g(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function w(e,t,r){let n,i,o=0,s=0,a=0,c=0,l=0,u=0,h=0,d=0,p=0,f=0,m=0,g=0,w=0,b=0,v=0,y=0,x=0,C=0,A=0,E=0,_=0,I=0,P=0,O=0,k=0,S=0,M=0,N=0,T=0,j=0,R=0,L=r[0],$=r[1],D=r[2],B=r[3],U=r[4],W=r[5],z=r[6],H=r[7],F=r[8],q=r[9],V=r[10],G=r[11],K=r[12],Z=r[13],Q=r[14],Y=r[15];n=t[0],o+=n*L,s+=n*$,a+=n*D,c+=n*B,l+=n*U,u+=n*W,h+=n*z,d+=n*H,p+=n*F,f+=n*q,m+=n*V,g+=n*G,w+=n*K,b+=n*Z,v+=n*Q,y+=n*Y,n=t[1],s+=n*L,a+=n*$,c+=n*D,l+=n*B,u+=n*U,h+=n*W,d+=n*z,p+=n*H,f+=n*F,m+=n*q,g+=n*V,w+=n*G,b+=n*K,v+=n*Z,y+=n*Q,x+=n*Y,n=t[2],a+=n*L,c+=n*$,l+=n*D,u+=n*B,h+=n*U,d+=n*W,p+=n*z,f+=n*H,m+=n*F,g+=n*q,w+=n*V,b+=n*G,v+=n*K,y+=n*Z,x+=n*Q,C+=n*Y,n=t[3],c+=n*L,l+=n*$,u+=n*D,h+=n*B,d+=n*U,p+=n*W,f+=n*z,m+=n*H,g+=n*F,w+=n*q,b+=n*V,v+=n*G,y+=n*K,x+=n*Z,C+=n*Q,A+=n*Y,n=t[4],l+=n*L,u+=n*$,h+=n*D,d+=n*B,p+=n*U,f+=n*W,m+=n*z,g+=n*H,w+=n*F,b+=n*q,v+=n*V,y+=n*G,x+=n*K,C+=n*Z,A+=n*Q,E+=n*Y,n=t[5],u+=n*L,h+=n*$,d+=n*D,p+=n*B,f+=n*U,m+=n*W,g+=n*z,w+=n*H,b+=n*F,v+=n*q,y+=n*V,x+=n*G,C+=n*K,A+=n*Z,E+=n*Q,_+=n*Y,n=t[6],h+=n*L,d+=n*$,p+=n*D,f+=n*B,m+=n*U,g+=n*W,w+=n*z,b+=n*H,v+=n*F,y+=n*q,x+=n*V,C+=n*G,A+=n*K,E+=n*Z,_+=n*Q,I+=n*Y,n=t[7],d+=n*L,p+=n*$,f+=n*D,m+=n*B,g+=n*U,w+=n*W,b+=n*z,v+=n*H,y+=n*F,x+=n*q,C+=n*V,A+=n*G,E+=n*K,_+=n*Z,I+=n*Q,P+=n*Y,n=t[8],p+=n*L,f+=n*$,m+=n*D,g+=n*B,w+=n*U,b+=n*W,v+=n*z,y+=n*H,x+=n*F,C+=n*q,A+=n*V,E+=n*G,_+=n*K,I+=n*Z,P+=n*Q,O+=n*Y,n=t[9],f+=n*L,m+=n*$,g+=n*D,w+=n*B,b+=n*U,v+=n*W,y+=n*z,x+=n*H,C+=n*F,A+=n*q,E+=n*V,_+=n*G,I+=n*K,P+=n*Z,O+=n*Q,k+=n*Y,n=t[10],m+=n*L,g+=n*$,w+=n*D,b+=n*B,v+=n*U,y+=n*W,x+=n*z,C+=n*H,A+=n*F,E+=n*q,_+=n*V,I+=n*G,P+=n*K,O+=n*Z,k+=n*Q,S+=n*Y,n=t[11],g+=n*L,w+=n*$,b+=n*D,v+=n*B,y+=n*U,x+=n*W,C+=n*z,A+=n*H,E+=n*F,_+=n*q,I+=n*V,P+=n*G,O+=n*K,k+=n*Z,S+=n*Q,M+=n*Y,n=t[12],w+=n*L,b+=n*$,v+=n*D,y+=n*B,x+=n*U,C+=n*W,A+=n*z,E+=n*H,_+=n*F,I+=n*q,P+=n*V,O+=n*G,k+=n*K,S+=n*Z,M+=n*Q,N+=n*Y,n=t[13],b+=n*L,v+=n*$,y+=n*D,x+=n*B,C+=n*U,A+=n*W,E+=n*z,_+=n*H,I+=n*F,P+=n*q,O+=n*V,k+=n*G,S+=n*K,M+=n*Z,N+=n*Q,T+=n*Y,n=t[14],v+=n*L,y+=n*$,x+=n*D,C+=n*B,A+=n*U,E+=n*W,_+=n*z,I+=n*H,P+=n*F,O+=n*q,k+=n*V,S+=n*G,M+=n*K,N+=n*Z,T+=n*Q,j+=n*Y,n=t[15],y+=n*L,x+=n*$,C+=n*D,A+=n*B,E+=n*U,_+=n*W,I+=n*z,P+=n*H,O+=n*F,k+=n*q,S+=n*V,M+=n*G,N+=n*K,T+=n*Z,j+=n*Q,R+=n*Y,o+=38*x,s+=38*C,a+=38*A,c+=38*E,l+=38*_,u+=38*I,h+=38*P,d+=38*O,p+=38*k,f+=38*S,m+=38*M,g+=38*N,w+=38*T,b+=38*j,v+=38*R,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=l,e[5]=u,e[6]=h,e[7]=d,e[8]=p,e[9]=f,e[10]=m,e[11]=g,e[12]=w,e[13]=b,e[14]=v,e[15]=y}function b(e,t){w(e,t,t)}function v(e,t){const r=i(),n=i(),o=i(),s=i(),c=i(),l=i(),u=i(),h=i(),d=i();g(r,e[1],e[0]),g(d,t[1],t[0]),w(r,r,d),m(n,e[0],e[1]),m(d,t[0],t[1]),w(n,n,d),w(o,e[3],t[3]),w(o,o,a),w(s,e[2],t[2]),m(s,s,s),g(c,n,r),g(l,s,o),m(u,s,o),m(h,n,r),w(e[0],c,l),w(e[1],h,u),w(e[2],u,l),w(e[3],c,h)}function y(e,t,r){for(let n=0;n<4;n++)d(e[n],t[n],r)}function x(e,t){const r=i(),n=i(),o=i();(function(e,t){const r=i();let n;for(n=0;n<16;n++)r[n]=t[n];for(n=253;n>=0;n--)b(r,r),2!==n&&4!==n&&w(r,r,t);for(n=0;n<16;n++)e[n]=r[n]})(o,t[2]),w(r,t[0],o),w(n,t[1],o),p(e,n),e[31]^=f(r)<<7}function C(e,t){const r=[i(),i(),i(),i()];u(r[0],c),u(r[1],l),u(r[2],s),w(r[3],c,l),function(e,t,r){u(e[0],o),u(e[1],s),u(e[2],s),u(e[3],o);for(let n=255;n>=0;--n){const i=r[n/8|0]>>(7&n)&1;y(e,t,i),v(t,e),v(e,e),y(e,t,i)}}(e,r,t)}t._w=function(e){if(e.length!==t.aP)throw new Error(`ed25519: seed must be ${t.aP} bytes`);const r=(0,n.hash)(e);r[0]&=248,r[31]&=127,r[31]|=64;const o=new Uint8Array(32),s=[i(),i(),i(),i()];C(s,r),x(o,s);const a=new Uint8Array(64);return a.set(e),a.set(o,32),{publicKey:o,secretKey:a}};const A=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function E(e,t){let r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*A[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*A[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*A[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function _(e){const t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=e[r];for(let t=0;t<64;t++)e[t]=0;E(e,t)}t.Xx=function(e,t){const r=new Float64Array(64),o=[i(),i(),i(),i()],s=(0,n.hash)(e.subarray(0,32));s[0]&=248,s[31]&=127,s[31]|=64;const a=new Uint8Array(64);a.set(s.subarray(32),32);const c=new n.SHA512;c.update(a.subarray(32)),c.update(t);const l=c.digest();c.clean(),_(l),C(o,l),x(a,o),c.reset(),c.update(a.subarray(0,32)),c.update(e.subarray(32)),c.update(t);const u=c.digest();_(u);for(let e=0;e<32;e++)r[e]=l[e];for(let e=0;e<32;e++)for(let t=0;t<32;t++)r[e+t]+=u[e]*s[t];return E(a.subarray(32),r),a}},9984:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState}},512:(e,t,r)=>{"use strict";var n=r(5629),i=r(7309),o=function(){function e(e,t,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=n.hmac(this._hash,r,t);this._hmac=new n.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),r=0;r<t.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[r]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),i.wipe(this._buffer),i.wipe(this._counter),this._bufpos=0},e}();t.t=o},5629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9984),i=r(4153),o=r(7309),s=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(r).clean():r.set(t);for(var i=0;i<r.length;i++)r[i]^=54;for(this._inner.update(r),i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),n.isSerializableHash(this._inner)&&n.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),o.wipe(r)}return e.prototype.reset=function(){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){n.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),n.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!n.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!n.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();t.HMAC=s,t.hmac=function(e,t,r){var n=new s(e,t);n.update(r);var i=n.digest();return n.clean(),i},t.equal=i.equal},7117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var r=65535&e,n=65535&t;return r*n+((e>>>16&65535)*n+r*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},3027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4153),i=r(7309);t.DIGEST_LENGTH=16;var o=function(){function e(e){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=8191&r;var n=e[2]|e[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=e[4]|e[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var o=e[6]|e[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=e[8]|e[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=e[10]|e[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=e[12]|e[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var l=e[14]|e[15]<<8;this._r[8]=8191&(c>>>8|l<<8),this._r[9]=l>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,t,r){for(var n=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],l=this._h[5],u=this._h[6],h=this._h[7],d=this._h[8],p=this._h[9],f=this._r[0],m=this._r[1],g=this._r[2],w=this._r[3],b=this._r[4],v=this._r[5],y=this._r[6],x=this._r[7],C=this._r[8],A=this._r[9];r>=16;){var E=e[t+0]|e[t+1]<<8;i+=8191&E;var _=e[t+2]|e[t+3]<<8;o+=8191&(E>>>13|_<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(_>>>10|I<<6);var P=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|P<<9);var O=e[t+8]|e[t+9]<<8;c+=8191&(P>>>4|O<<12),l+=O>>>1&8191;var k=e[t+10]|e[t+11]<<8;u+=8191&(O>>>14|k<<2);var S=e[t+12]|e[t+13]<<8;h+=8191&(k>>>11|S<<5);var M=e[t+14]|e[t+15]<<8,N=0,T=N;T+=i*f,T+=o*(5*A),T+=s*(5*C),T+=a*(5*x),N=(T+=c*(5*y))>>>13,T&=8191,T+=l*(5*v),T+=u*(5*b),T+=h*(5*w),T+=(d+=8191&(S>>>8|M<<8))*(5*g);var j=N+=(T+=(p+=M>>>5|n)*(5*m))>>>13;j+=i*m,j+=o*f,j+=s*(5*A),j+=a*(5*C),N=(j+=c*(5*x))>>>13,j&=8191,j+=l*(5*y),j+=u*(5*v),j+=h*(5*b),j+=d*(5*w),N+=(j+=p*(5*g))>>>13,j&=8191;var R=N;R+=i*g,R+=o*m,R+=s*f,R+=a*(5*A),N=(R+=c*(5*C))>>>13,R&=8191,R+=l*(5*x),R+=u*(5*y),R+=h*(5*v),R+=d*(5*b);var L=N+=(R+=p*(5*w))>>>13;L+=i*w,L+=o*g,L+=s*m,L+=a*f,N=(L+=c*(5*A))>>>13,L&=8191,L+=l*(5*C),L+=u*(5*x),L+=h*(5*y),L+=d*(5*v);var $=N+=(L+=p*(5*b))>>>13;$+=i*b,$+=o*w,$+=s*g,$+=a*m,N=($+=c*f)>>>13,$&=8191,$+=l*(5*A),$+=u*(5*C),$+=h*(5*x),$+=d*(5*y);var D=N+=($+=p*(5*v))>>>13;D+=i*v,D+=o*b,D+=s*w,D+=a*g,N=(D+=c*m)>>>13,D&=8191,D+=l*f,D+=u*(5*A),D+=h*(5*C),D+=d*(5*x);var B=N+=(D+=p*(5*y))>>>13;B+=i*y,B+=o*v,B+=s*b,B+=a*w,N=(B+=c*g)>>>13,B&=8191,B+=l*m,B+=u*f,B+=h*(5*A),B+=d*(5*C);var U=N+=(B+=p*(5*x))>>>13;U+=i*x,U+=o*y,U+=s*v,U+=a*b,N=(U+=c*w)>>>13,U&=8191,U+=l*g,U+=u*m,U+=h*f,U+=d*(5*A);var W=N+=(U+=p*(5*C))>>>13;W+=i*C,W+=o*x,W+=s*y,W+=a*v,N=(W+=c*b)>>>13,W&=8191,W+=l*w,W+=u*g,W+=h*m,W+=d*f;var z=N+=(W+=p*(5*A))>>>13;z+=i*A,z+=o*C,z+=s*x,z+=a*y,N=(z+=c*v)>>>13,z&=8191,z+=l*b,z+=u*w,z+=h*g,z+=d*m,i=T=8191&(N=(N=((N+=(z+=p*f)>>>13)<<2)+N|0)+(T&=8191)|0),o=j+=N>>>=13,s=R&=8191,a=L&=8191,c=$&=8191,l=D&=8191,u=B&=8191,h=U&=8191,d=W&=8191,p=z&=8191,t+=16,r-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=l,this._h[6]=u,this._h[7]=h,this._h[8]=d,this._h[9]=p},e.prototype.finish=function(e,t){void 0===t&&(t=0);var r,n,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=r,r=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=r,s[0]=this._h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this._h[o]=this._h[o]&n|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,r=0,n=e.length;if(this._leftover){(t=16-this._leftover)>n&&(t=n);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[r+i];if(n-=t,r+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(t=n-n%16,this._blocks(e,r,t),r+=t,n-=t),n){for(i=0;i<n;i++)this._buffer[this._leftover+i]=e[r+i];this._leftover+=n}return this},e.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},e.prototype.clean=function(){return i.wipe(this._buffer),i.wipe(this._r),i.wipe(this._h),i.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},e}();t.Poly1305=o,t.oneTimeAuth=function(e,t){var r=new o(e);r.update(t);var n=r.digest();return r.clean(),n},t.equal=function(e,r){return e.length===t.DIGEST_LENGTH&&r.length===t.DIGEST_LENGTH&&n.equal(e,r)}},1416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const n=r(6008),i=r(8099),o=r(7309);function s(e,r=t.defaultRandomSource){return r.randomBytes(e)}t.defaultRandomSource=new n.SystemRandomSource,t.randomBytes=s,t.randomUint32=function(e=t.defaultRandomSource){const r=s(4,e),n=(0,i.readUint32LE)(r);return(0,o.wipe)(r),n};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(e,r=a,n=t.defaultRandomSource){if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const c=r.length,l=256-256%c;for(;e>0;){const t=s(Math.ceil(256*e/l),n);for(let n=0;n<t.length&&e>0;n++){const o=t[n];o<l&&(i+=r.charAt(o%c),e--)}(0,o.wipe)(t)}return i}t.randomString=c,t.randomStringForEntropy=function(e,r=a,n=t.defaultRandomSource){return c(Math.ceil(e/(Math.log(r.length)/Math.LN2)),r,n)}},5455:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0,t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}}},8871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const n=r(7309);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=r(5883);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let e=0;e<r.length;e++)r[e]=t[e];return(0,n.wipe)(t),r}}},6008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const n=r(5455),i=r(8871);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},3294:(e,t,r)=>{"use strict";var n=r(8099),i=r(7309);t.k=32,t.cn=64;var o=function(){function e(){this.digestLength=t.k,this.blockSize=t.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=a(this._temp,this._state,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,s=t%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;n.writeUint32BE(i,this._buffer,s-8),n.writeUint32BE(o,this._buffer,s-4),a(this._temp,this._state,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/4;c++)n.writeUint32BE(this._state[c],e,4*c);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.state),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.mE=o;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(e,t,r,i,o){for(;o>=64;){for(var a=t[0],c=t[1],l=t[2],u=t[3],h=t[4],d=t[5],p=t[6],f=t[7],m=0;m<16;m++){var g=i+4*m;e[m]=n.readUint32BE(r,g)}for(m=16;m<64;m++){var w=e[m-2],b=(w>>>17|w<<15)^(w>>>19|w<<13)^w>>>10,v=((w=e[m-15])>>>7|w<<25)^(w>>>18|w<<14)^w>>>3;e[m]=(b+e[m-7]|0)+(v+e[m-16]|0)}for(m=0;m<64;m++)b=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&d^~h&p)|0)+(f+(s[m]+e[m]|0)|0)|0,v=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&l^c&l)|0,f=p,p=d,d=h,h=u+b|0,u=l,l=c,c=a,a=b+v|0;t[0]+=a,t[1]+=c,t[2]+=l,t[3]+=u,t[4]+=h,t[5]+=d,t[6]+=p,t[7]+=f,i+=64,o-=64}return i}t.vp=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},3350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8099),i=r(7309);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var o=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,r){if(void 0===r&&(r=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,r=this._bufferLength,i=t/536870912|0,o=t<<3,s=t%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<s-8;c++)this._buffer[c]=0;n.writeUint32BE(i,this._buffer,s-8),n.writeUint32BE(o,this._buffer,s-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,s),this._finished=!0}for(c=0;c<this.digestLength/8;c++)n.writeUint32BE(this._stateHi[c],e,8*c),n.writeUint32BE(this._stateLo[c],e,8*c+4);return this},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){i.wipe(e.stateHi),i.wipe(e.stateLo),e.buffer&&i.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=o;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(e,t,r,i,o,a,c){for(var l,u,h,d,p,f,m,g,w=r[0],b=r[1],v=r[2],y=r[3],x=r[4],C=r[5],A=r[6],E=r[7],_=i[0],I=i[1],P=i[2],O=i[3],k=i[4],S=i[5],M=i[6],N=i[7];c>=128;){for(var T=0;T<16;T++){var j=8*T+a;e[T]=n.readUint32BE(o,j),t[T]=n.readUint32BE(o,j+4)}for(T=0;T<80;T++){var R,L,$=w,D=b,B=v,U=y,W=x,z=C,H=A,F=_,q=I,V=P,G=O,K=k,Z=S,Q=M;if(p=65535&(u=N),f=u>>>16,m=65535&(l=E),g=l>>>16,p+=65535&(u=(k>>>14|x<<18)^(k>>>18|x<<14)^(x>>>9|k<<23)),f+=u>>>16,m+=65535&(l=(x>>>14|k<<18)^(x>>>18|k<<14)^(k>>>9|x<<23)),g+=l>>>16,p+=65535&(u=k&S^~k&M),f+=u>>>16,m+=65535&(l=x&C^~x&A),g+=l>>>16,l=s[2*T],p+=65535&(u=s[2*T+1]),f+=u>>>16,m+=65535&l,g+=l>>>16,l=e[T%16],f+=(u=t[T%16])>>>16,m+=65535&l,g+=l>>>16,m+=(f+=(p+=65535&u)>>>16)>>>16,p=65535&(u=d=65535&p|f<<16),f=u>>>16,m=65535&(l=h=65535&m|(g+=m>>>16)<<16),g=l>>>16,p+=65535&(u=(_>>>28|w<<4)^(w>>>2|_<<30)^(w>>>7|_<<25)),f+=u>>>16,m+=65535&(l=(w>>>28|_<<4)^(_>>>2|w<<30)^(_>>>7|w<<25)),g+=l>>>16,f+=(u=_&I^_&P^I&P)>>>16,m+=65535&(l=w&b^w&v^b&v),g+=l>>>16,R=65535&(m+=(f+=(p+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,L=65535&p|f<<16,p=65535&(u=G),f=u>>>16,m=65535&(l=U),g=l>>>16,f+=(u=d)>>>16,m+=65535&(l=h),g+=l>>>16,b=$,v=D,y=B,x=U=65535&(m+=(f+=(p+=65535&u)>>>16)>>>16)|(g+=m>>>16)<<16,C=W,A=z,E=H,w=R,I=F,P=q,O=V,k=G=65535&p|f<<16,S=K,M=Z,N=Q,_=L,T%16==15)for(j=0;j<16;j++)l=e[j],p=65535&(u=t[j]),f=u>>>16,m=65535&l,g=l>>>16,l=e[(j+9)%16],p+=65535&(u=t[(j+9)%16]),f+=u>>>16,m+=65535&l,g+=l>>>16,h=e[(j+1)%16],p+=65535&(u=((d=t[(j+1)%16])>>>1|h<<31)^(d>>>8|h<<24)^(d>>>7|h<<25)),f+=u>>>16,m+=65535&(l=(h>>>1|d<<31)^(h>>>8|d<<24)^h>>>7),g+=l>>>16,h=e[(j+14)%16],f+=(u=((d=t[(j+14)%16])>>>19|h<<13)^(h>>>29|d<<3)^(d>>>6|h<<26))>>>16,m+=65535&(l=(h>>>19|d<<13)^(d>>>29|h<<3)^h>>>6),g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,e[j]=65535&m|g<<16,t[j]=65535&p|f<<16}p=65535&(u=_),f=u>>>16,m=65535&(l=w),g=l>>>16,l=r[0],f+=(u=i[0])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[0]=w=65535&m|g<<16,i[0]=_=65535&p|f<<16,p=65535&(u=I),f=u>>>16,m=65535&(l=b),g=l>>>16,l=r[1],f+=(u=i[1])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[1]=b=65535&m|g<<16,i[1]=I=65535&p|f<<16,p=65535&(u=P),f=u>>>16,m=65535&(l=v),g=l>>>16,l=r[2],f+=(u=i[2])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[2]=v=65535&m|g<<16,i[2]=P=65535&p|f<<16,p=65535&(u=O),f=u>>>16,m=65535&(l=y),g=l>>>16,l=r[3],f+=(u=i[3])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[3]=y=65535&m|g<<16,i[3]=O=65535&p|f<<16,p=65535&(u=k),f=u>>>16,m=65535&(l=x),g=l>>>16,l=r[4],f+=(u=i[4])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[4]=x=65535&m|g<<16,i[4]=k=65535&p|f<<16,p=65535&(u=S),f=u>>>16,m=65535&(l=C),g=l>>>16,l=r[5],f+=(u=i[5])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[5]=C=65535&m|g<<16,i[5]=S=65535&p|f<<16,p=65535&(u=M),f=u>>>16,m=65535&(l=A),g=l>>>16,l=r[6],f+=(u=i[6])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[6]=A=65535&m|g<<16,i[6]=M=65535&p|f<<16,p=65535&(u=N),f=u>>>16,m=65535&(l=E),g=l>>>16,l=r[7],f+=(u=i[7])>>>16,m+=65535&l,g+=l>>>16,g+=(m+=(f+=(p+=65535&u)>>>16)>>>16)>>>16,r[7]=E=65535&m|g<<16,i[7]=N=65535&p|f<<16,a+=128,c-=128}return a}t.hash=function(e){var t=new o;t.update(e);var r=t.digest();return t.clean(),r}},7309:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},7664:(e,t,r)=>{"use strict";t.gi=t.Au=t.KS=t.kz=void 0;const n=r(1416),i=r(7309);function o(e){const t=new Float64Array(16);if(e)for(let r=0;r<e.length;r++)t[r]=e[r];return t}t.kz=32,t.KS=32;const s=new Uint8Array(32);s[0]=9;const a=o([56129,1]);function c(e){let t=1;for(let r=0;r<16;r++){let n=e[r]+t+65535;t=Math.floor(n/65536),e[r]=n-65536*t}e[0]+=t-1+37*(t-1)}function l(e,t,r){const n=~(r-1);for(let r=0;r<16;r++){const i=n&(e[r]^t[r]);e[r]^=i,t[r]^=i}}function u(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]+r[n]}function h(e,t,r){for(let n=0;n<16;n++)e[n]=t[n]-r[n]}function d(e,t,r){let n,i,o=0,s=0,a=0,c=0,l=0,u=0,h=0,d=0,p=0,f=0,m=0,g=0,w=0,b=0,v=0,y=0,x=0,C=0,A=0,E=0,_=0,I=0,P=0,O=0,k=0,S=0,M=0,N=0,T=0,j=0,R=0,L=r[0],$=r[1],D=r[2],B=r[3],U=r[4],W=r[5],z=r[6],H=r[7],F=r[8],q=r[9],V=r[10],G=r[11],K=r[12],Z=r[13],Q=r[14],Y=r[15];n=t[0],o+=n*L,s+=n*$,a+=n*D,c+=n*B,l+=n*U,u+=n*W,h+=n*z,d+=n*H,p+=n*F,f+=n*q,m+=n*V,g+=n*G,w+=n*K,b+=n*Z,v+=n*Q,y+=n*Y,n=t[1],s+=n*L,a+=n*$,c+=n*D,l+=n*B,u+=n*U,h+=n*W,d+=n*z,p+=n*H,f+=n*F,m+=n*q,g+=n*V,w+=n*G,b+=n*K,v+=n*Z,y+=n*Q,x+=n*Y,n=t[2],a+=n*L,c+=n*$,l+=n*D,u+=n*B,h+=n*U,d+=n*W,p+=n*z,f+=n*H,m+=n*F,g+=n*q,w+=n*V,b+=n*G,v+=n*K,y+=n*Z,x+=n*Q,C+=n*Y,n=t[3],c+=n*L,l+=n*$,u+=n*D,h+=n*B,d+=n*U,p+=n*W,f+=n*z,m+=n*H,g+=n*F,w+=n*q,b+=n*V,v+=n*G,y+=n*K,x+=n*Z,C+=n*Q,A+=n*Y,n=t[4],l+=n*L,u+=n*$,h+=n*D,d+=n*B,p+=n*U,f+=n*W,m+=n*z,g+=n*H,w+=n*F,b+=n*q,v+=n*V,y+=n*G,x+=n*K,C+=n*Z,A+=n*Q,E+=n*Y,n=t[5],u+=n*L,h+=n*$,d+=n*D,p+=n*B,f+=n*U,m+=n*W,g+=n*z,w+=n*H,b+=n*F,v+=n*q,y+=n*V,x+=n*G,C+=n*K,A+=n*Z,E+=n*Q,_+=n*Y,n=t[6],h+=n*L,d+=n*$,p+=n*D,f+=n*B,m+=n*U,g+=n*W,w+=n*z,b+=n*H,v+=n*F,y+=n*q,x+=n*V,C+=n*G,A+=n*K,E+=n*Z,_+=n*Q,I+=n*Y,n=t[7],d+=n*L,p+=n*$,f+=n*D,m+=n*B,g+=n*U,w+=n*W,b+=n*z,v+=n*H,y+=n*F,x+=n*q,C+=n*V,A+=n*G,E+=n*K,_+=n*Z,I+=n*Q,P+=n*Y,n=t[8],p+=n*L,f+=n*$,m+=n*D,g+=n*B,w+=n*U,b+=n*W,v+=n*z,y+=n*H,x+=n*F,C+=n*q,A+=n*V,E+=n*G,_+=n*K,I+=n*Z,P+=n*Q,O+=n*Y,n=t[9],f+=n*L,m+=n*$,g+=n*D,w+=n*B,b+=n*U,v+=n*W,y+=n*z,x+=n*H,C+=n*F,A+=n*q,E+=n*V,_+=n*G,I+=n*K,P+=n*Z,O+=n*Q,k+=n*Y,n=t[10],m+=n*L,g+=n*$,w+=n*D,b+=n*B,v+=n*U,y+=n*W,x+=n*z,C+=n*H,A+=n*F,E+=n*q,_+=n*V,I+=n*G,P+=n*K,O+=n*Z,k+=n*Q,S+=n*Y,n=t[11],g+=n*L,w+=n*$,b+=n*D,v+=n*B,y+=n*U,x+=n*W,C+=n*z,A+=n*H,E+=n*F,_+=n*q,I+=n*V,P+=n*G,O+=n*K,k+=n*Z,S+=n*Q,M+=n*Y,n=t[12],w+=n*L,b+=n*$,v+=n*D,y+=n*B,x+=n*U,C+=n*W,A+=n*z,E+=n*H,_+=n*F,I+=n*q,P+=n*V,O+=n*G,k+=n*K,S+=n*Z,M+=n*Q,N+=n*Y,n=t[13],b+=n*L,v+=n*$,y+=n*D,x+=n*B,C+=n*U,A+=n*W,E+=n*z,_+=n*H,I+=n*F,P+=n*q,O+=n*V,k+=n*G,S+=n*K,M+=n*Z,N+=n*Q,T+=n*Y,n=t[14],v+=n*L,y+=n*$,x+=n*D,C+=n*B,A+=n*U,E+=n*W,_+=n*z,I+=n*H,P+=n*F,O+=n*q,k+=n*V,S+=n*G,M+=n*K,N+=n*Z,T+=n*Q,j+=n*Y,n=t[15],y+=n*L,x+=n*$,C+=n*D,A+=n*B,E+=n*U,_+=n*W,I+=n*z,P+=n*H,O+=n*F,k+=n*q,S+=n*V,M+=n*G,N+=n*K,T+=n*Z,j+=n*Q,R+=n*Y,o+=38*x,s+=38*C,a+=38*A,c+=38*E,l+=38*_,u+=38*I,h+=38*P,d+=38*O,p+=38*k,f+=38*S,m+=38*M,g+=38*N,w+=38*T,b+=38*j,v+=38*R,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=l,e[5]=u,e[6]=h,e[7]=d,e[8]=p,e[9]=f,e[10]=m,e[11]=g,e[12]=w,e[13]=b,e[14]=v,e[15]=y}function p(e,t){d(e,t,t)}function f(e,t){const r=new Uint8Array(32),n=new Float64Array(80),i=o(),s=o(),f=o(),m=o(),g=o(),w=o();for(let t=0;t<31;t++)r[t]=e[t];r[31]=127&e[31]|64,r[0]&=248,function(e,t){for(let r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(n,t);for(let e=0;e<16;e++)s[e]=n[e];i[0]=m[0]=1;for(let e=254;e>=0;--e){const t=r[e>>>3]>>>(7&e)&1;l(i,s,t),l(f,m,t),u(g,i,f),h(i,i,f),u(f,s,m),h(s,s,m),p(m,g),p(w,i),d(i,f,i),d(f,s,g),u(g,i,f),h(i,i,f),p(s,i),h(f,m,w),d(i,f,a),u(i,i,m),d(f,f,i),d(i,m,w),d(m,s,n),p(s,g),l(i,s,t),l(f,m,t)}for(let e=0;e<16;e++)n[e+16]=i[e],n[e+32]=f[e],n[e+48]=s[e],n[e+64]=m[e];const b=n.subarray(32),v=n.subarray(16);!function(e,t){const r=o();for(let e=0;e<16;e++)r[e]=t[e];for(let e=253;e>=0;e--)p(r,r),2!==e&&4!==e&&d(r,r,t);for(let t=0;t<16;t++)e[t]=r[t]}(b,b),d(v,v,b);const y=new Uint8Array(32);return function(e,t){const r=o(),n=o();for(let e=0;e<16;e++)n[e]=t[e];c(n),c(n),c(n);for(let e=0;e<2;e++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const e=r[15]>>16&1;r[14]&=65535,l(n,r,1-e)}for(let t=0;t<16;t++)e[2*t]=255&n[t],e[2*t+1]=n[t]>>8}(y,v),y}t.Au=function(e){const r=(0,n.randomBytes)(32,e),o=function(e){if(e.length!==t.KS)throw new Error(`x25519: seed must be ${t.KS} bytes`);const r=new Uint8Array(e);return{publicKey:(n=r,f(n,s)),secretKey:r};var n}(r);return(0,i.wipe)(r),o},t.gi=function(e,r,n=!1){if(e.length!==t.kz)throw new Error("X25519: incorrect secret key length");if(r.length!==t.kz)throw new Error("X25519: incorrect public key length");const i=f(e,r);if(n){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}},926:(e,t,r)=>{"use strict";function n(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function i(){const e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=i,t.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},8618:(e,t)=>{"use strict";function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function n(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=r,t.isNode=n,t.isBrowser=function(){return!r()&&!n()}},1468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(926),t),n.__exportStar(r(8618),t)},7979:(e,t,r)=>{"use strict";r.d(t,{EthereumProvider:()=>Hi,OPTIONAL_EVENTS:()=>Si,OPTIONAL_METHODS:()=>Oi});var n=r(7187),i=r.n(n),o=r(9795),s=r(5150),a=r(772),c=r(9107),l=r(8200);class u extends l.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class h extends l.q{constructor(e,t){super(),this.core=e,this.logger=t,this.records=new Map}}class d{constructor(e,t){this.logger=e,this.core=t}}class p extends l.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class f extends l.q{constructor(e){super()}}class m{constructor(e,t,r,n){this.core=e,this.logger=t,this.name=r}}class g extends l.q{constructor(e,t){super(),this.relayer=e,this.logger=t}}class w extends l.q{constructor(e,t){super(),this.core=e,this.logger=t}}class b{constructor(e,t){this.projectId=e,this.logger=t}}class v{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class y{constructor(e){this.client=e}}const x=e=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString()+"n":t));function C(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return(e=>{const t=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(t,((e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))})(e)}catch(t){return e}}function A(e){return"string"==typeof e?e:x(e)||""}var E=r(1050),_=r(1416),I=r(6736);const P="base64url",O="utf8",k=":",S="did",M="key",N="base58btc",T="z",j="K36";var R=r(605),L=r(2263),$=r(2217);function D(e){return(0,L.B)((0,$.m)(A(e),O),P)}function B(e){const t=(0,$.m)(j,N),r=T+(0,L.B)((0,R.z)([t,e]),N);return[S,M,r].join(k)}function U(e=(0,_.randomBytes)(32)){return E._w(e)}r(3014);var W=r(7466);const z="INTERNAL_ERROR",H="SERVER_ERROR",F=[-32700,-32600,-32601,-32602,-32603],q={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[z]:{code:-32603,message:"Internal error"},[H]:{code:-32e3,message:"Server error"}},V=H;function G(e){return Object.keys(q).includes(e)?q[e]:q[V]}function K(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var Z=r(1468);function Q(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function Y(e=6){return BigInt(Q(e))}function J(e,t,r){return{id:r||Q(),jsonrpc:"2.0",method:e,params:t}}function X(e,t){return{id:e,jsonrpc:"2.0",result:t}}function ee(e,t,r){return{id:e,jsonrpc:"2.0",error:te(t,r)}}function te(e,t){return void 0===e?G(z):("string"==typeof e&&(e=Object.assign(Object.assign({},G(H)),{message:e})),void 0!==t&&(e.data=t),r=e.code,F.includes(r)&&(e=function(e){return Object.values(q).find((t=>t.code===e))||q[V]}(e.code)),e);var r}class re{}class ne extends re{constructor(){super()}}class ie extends ne{constructor(e){super()}}function oe(e,t){const r=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==r&&new RegExp(t).test(r)}function se(e){return oe(e,"^https?:")}function ae(e){return oe(e,"^wss?:")}function ce(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function le(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function ue(e){return le(e)&&"method"in e}function he(e){return le(e)&&(de(e)||pe(e))}function de(e){return"result"in e}function pe(e){return"error"in e}class fe extends ie{constructor(e){super(e),this.events=new n.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(J(e.method,e.params||[],e.id||Y().toString()),t)}async requestStrict(e,t){return new Promise((async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(e){n(e)}this.events.on(`${e.id}`,(e=>{pe(e)?n(e.error):r(e.result)}));try{await this.connection.send(e,t)}catch(e){n(e)}}))}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),he(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}const me=e=>e.split("?")[0],ge="undefined"!=typeof WebSocket?WebSocket:void 0!==r.g&&void 0!==r.g.WebSocket?r.g.WebSocket:"undefined"!=typeof window&&void 0!==window.WebSocket?window.WebSocket:"undefined"!=typeof self&&void 0!==self.WebSocket?self.WebSocket:r(2030);var we=r(2307),be=r.n(we),ve=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw new TypeError(o+" is ambiguous");r[s]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function h(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*l+1>>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h<i)&&-1!==d;d--,h++)u+=a*s[d]>>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var p=o-i;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(n+(o-p)),m=n;p!==o;)f[m++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,p=s-1;(0!==h||d<n)&&-1!==p;p--,d++)h+=256*l[p]>>>0,l[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var f=s-n;f!==s&&0===l[f];)f++;for(var m=c.repeat(r);f<s;++f)m+=e.charAt(l[f]);return m},decodeUnsafe:h,decode:function(e){var r=h(e);if(r)return r;throw new Error(`Non-${t} character`)}}};const ye=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class xe{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Ce{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Ee(this,e)}}class Ae{constructor(e){this.decoders=e}or(e){return Ee(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ee=(e,t)=>new Ae({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class _e{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new xe(e,t,r),this.decoder=new Ce(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ie=({name:e,prefix:t,encode:r,decode:n})=>new _e(e,t,r,n),Pe=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=ve(r,t);return Ie({prefix:e,name:t,encode:n,decode:e=>ye(i(e))})},Oe=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>Ie({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",s=0,a=0;for(let n=0;n<e.length;++n)for(a=a<<8|e[n],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o})(e,n,r),decode:t=>((e,t,r,n)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*r/8|0);let a=0,c=0,l=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${n} character`);c=c<<r|o,a+=r,a>=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,n,r,e)}),ke=Ie({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});var Se=Object.freeze({__proto__:null,identity:ke});const Me=Oe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Ne=Object.freeze({__proto__:null,base2:Me});const Te=Oe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var je=Object.freeze({__proto__:null,base8:Te});const Re=Pe({prefix:"9",name:"base10",alphabet:"0123456789"});var Le=Object.freeze({__proto__:null,base10:Re});const $e=Oe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),De=Oe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Be=Object.freeze({__proto__:null,base16:$e,base16upper:De});const Ue=Oe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),We=Oe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ze=Oe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),He=Oe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Fe=Oe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),qe=Oe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Ve=Oe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ge=Oe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ke=Oe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ze=Object.freeze({__proto__:null,base32:Ue,base32upper:We,base32pad:ze,base32padupper:He,base32hex:Fe,base32hexupper:qe,base32hexpad:Ve,base32hexpadupper:Ge,base32z:Ke});const Qe=Pe({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ye=Pe({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Je=Object.freeze({__proto__:null,base36:Qe,base36upper:Ye});const Xe=Pe({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),et=Pe({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var tt=Object.freeze({__proto__:null,base58btc:Xe,base58flickr:et});const rt=Oe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),nt=Oe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),it=Oe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ot=Oe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var st=Object.freeze({__proto__:null,base64:rt,base64pad:nt,base64url:it,base64urlpad:ot});const at=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),ct=at.reduce(((e,t,r)=>(e[r]=t,e)),[]),lt=at.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),ut=Ie({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+ct[t]),"")},decode:function(e){const t=[];for(const r of e){const e=lt[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var ht=Object.freeze({__proto__:null,base256emoji:ut}),dt=128,pt=-128,ft=Math.pow(2,31),mt=Math.pow(2,7),gt=Math.pow(2,14),wt=Math.pow(2,21),bt=Math.pow(2,28),vt=Math.pow(2,35),yt=Math.pow(2,42),xt=Math.pow(2,49),Ct=Math.pow(2,56),At=Math.pow(2,63),Et=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=ft;)r[n++]=255&t|dt,t/=128;for(;t&pt;)r[n++]=255&t|dt,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},_t=function(e){return e<mt?1:e<gt?2:e<wt?3:e<bt?4:e<vt?5:e<yt?6:e<xt?7:e<Ct?8:e<At?9:10};const It=(e,t,r=0)=>(Et(e,t,r),t),Pt=e=>_t(e),Ot=(e,t)=>{const r=t.byteLength,n=Pt(e),i=n+Pt(r),o=new Uint8Array(i+r);return It(e,o,0),It(r,o,n),o.set(t,i),new kt(e,r,t,o)};class kt{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const St=({name:e,code:t,encode:r})=>new Mt(e,t,r);class Mt{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Ot(this.code,t):t.then((e=>Ot(this.code,e)))}throw Error("Unknown type, must be binary type")}}const Nt=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Tt=St({name:"sha2-256",code:18,encode:Nt("SHA-256")}),jt=St({name:"sha2-512",code:19,encode:Nt("SHA-512")});Object.freeze({__proto__:null,sha256:Tt,sha512:jt});const Rt=ye,Lt={code:0,name:"identity",encode:Rt,digest:e=>Ot(0,Rt(e))};Object.freeze({__proto__:null,identity:Lt}),new TextEncoder,new TextDecoder;const $t={...Se,...Ne,...je,...Le,...Be,...Ze,...Je,...tt,...st,...ht};function Dt(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Bt(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const Ut=Bt("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Wt=Bt("ascii","a",(e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(e=>{const t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Dt(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),zt={utf8:Ut,"utf-8":Ut,hex:$t.base16,latin1:Wt,ascii:Wt,binary:Wt,...$t},Ht="core",Ft=`wc@2:${Ht}:`,qt={database:":memory:"},Vt="client_ed25519_seed",Gt=I.ONE_DAY,Kt=I.SIX_HOURS,Zt="wss://relay.walletconnect.com",Qt="wss://relay.walletconnect.org",Yt="relayer_message",Jt="relayer_message_ack",Xt="relayer_connect",er="relayer_disconnect",tr="relayer_connection_stalled",rr="relayer_publish",nr="payload",ir="connect",or="disconnect",sr="error",ar=I.ONE_SECOND,cr="subscription_created",lr="subscription_deleted",ur="subscription_resubscribed",hr=1e3*I.FIVE_SECONDS,dr={wc_pairingDelete:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:I.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:I.ONE_DAY,prompt:!1,tag:0},res:{ttl:I.ONE_DAY,prompt:!1,tag:0}}},pr="history_created",fr="history_updated",mr="history_deleted",gr="expirer_created",wr="expirer_deleted",br="expirer_expired",vr="verify-api",yr="https://verify.walletconnect.com",xr="https://verify.walletconnect.org";class Cr{constructor(e,t){this.core=e,this.logger=t,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=Ft,this.init=async()=>{if(!this.initialized){const e=await this.getKeyChain();typeof e<"u"&&(this.keychain=e),this.initialized=!0}},this.has=e=>(this.isInitialized(),this.keychain.has(e)),this.set=async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()},this.get=e=>{this.isInitialized();const t=this.keychain.get(e);if(typeof t>"u"){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t},this.del=async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()},this.core=e,this.logger=(0,c.generateChildLogger)(t,this.name)}get context(){return(0,c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,(0,o.KC)(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,o.IP)(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Ar{constructor(e,t,r){this.core=e,this.logger=t,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=e=>(this.isInitialized(),this.keychain.has(e)),this.getClientId=async()=>(this.isInitialized(),B(U(await this.getClientSeed()).publicKey)),this.generateKeyPair=()=>{this.isInitialized();const e=(0,o.Au)();return this.setPrivateKey(e.publicKey,e.privateKey)},this.signJWT=async e=>{this.isInitialized();const t=U(await this.getClientSeed()),r=(0,o.jd)(),n=Gt;return await async function(e,t,r,n,i=(0,I.fromMiliseconds)(Date.now())){const o={alg:"EdDSA",typ:"JWT"},s={iss:B(n.publicKey),sub:e,aud:t,iat:i,exp:i+r},a=(c={header:o,payload:s},(0,$.m)([D(c.header),D(c.payload)].join("."),"utf8"));var c;return function(e){return[D(e.header),D(e.payload),(t=e.signature,(0,L.B)(t,P))].join(".");var t}({header:o,payload:s,signature:E.Xx(n.secretKey,a)})}(r,e,n,t)},this.generateSharedKey=(e,t,r)=>{this.isInitialized();const n=this.getPrivateKey(e),i=(0,o.m$)(n,t);return this.setSymKey(i,r)},this.setSymKey=async(e,t)=>{this.isInitialized();const r=t||(0,o.Ym)(e);return await this.keychain.set(r,e),r},this.deleteKeyPair=async e=>{this.isInitialized(),await this.keychain.del(e)},this.deleteSymKey=async e=>{this.isInitialized(),await this.keychain.del(e)},this.encode=async(e,t,r)=>{this.isInitialized();const n=(0,o.EN)(r),i=A(t);if((0,o.Q8)(n)){const t=n.senderPublicKey,r=n.receiverPublicKey;e=await this.generateSharedKey(t,r)}const s=this.getSymKey(e),{type:a,senderPublicKey:c}=n;return(0,o.HI)({type:a,symKey:s,message:i,senderPublicKey:c})},this.decode=async(e,t,r)=>{this.isInitialized();const n=(0,o.Ll)(t,r);if((0,o.Q8)(n)){const t=n.receiverPublicKey,r=n.senderPublicKey;e=await this.generateSharedKey(t,r)}try{const r=this.getSymKey(e);return C((0,o.pe)({symKey:r,encoded:t}))}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}},this.getPayloadType=e=>{const t=(0,o.vB)(e);return(0,o.WG)(t.type)},this.getPayloadSenderPublicKey=e=>{const t=(0,o.vB)(e);return t.senderPublicKey?(0,W.BB)(t.senderPublicKey,o.AW):void 0},this.core=e,this.logger=(0,c.generateChildLogger)(t,this.name),this.keychain=r||new Cr(this.core,this.logger)}get context(){return(0,c.getLoggerContext)(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Vt)}catch{e=(0,o.jd)(),await this.keychain.set(Vt,e)}return function(e,t="utf8"){const r=zt[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):Dt(globalThis.Buffer.from(e,"utf-8"))}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Er extends d{constructor(e,t){super(e,t),this.logger=e,this.core=t,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Ft,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const e=await this.getRelayerMessages();typeof e<"u"&&(this.messages=e),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}},this.set=async(e,t)=>{this.isInitialized();const r=(0,o.rj)(t);let n=this.messages.get(e);return typeof n>"u"&&(n={}),typeof n[r]<"u"||(n[r]=t,this.messages.set(e,n),await this.persist()),r},this.get=e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t},this.has=(e,t)=>(this.isInitialized(),typeof this.get(e)[(0,o.rj)(t)]<"u"),this.del=async e=>{this.isInitialized(),this.messages.delete(e),await this.persist()},this.logger=(0,c.generateChildLogger)(e,this.name),this.core=t}get context(){return(0,c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,(0,o.KC)(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?(0,o.IP)(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class _r extends p{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.events=new n.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,I.toMiliseconds)(I.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(e,t,r)=>{var n;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});try{const i=r?.ttl||Kt,s=(0,o._H)(r),a=r?.prompt||!1,c=r?.tag||0,l=r?.id||Y().toString(),u={topic:e,message:t,opts:{ttl:i,relay:s,prompt:a,tag:c,id:l}},h=setTimeout((()=>this.queue.set(l,u)),this.publishTimeout);try{await await(0,o.hF)(this.rpcPublish(e,t,i,s,a,c,l),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(l),this.relayer.events.emit(rr,u)}catch(e){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(n=r?.internal)&&n.throwOnFailedPublish)throw this.removeRequestFromQueue(l),e;return}finally{clearTimeout(h)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(e),e}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.relayer=e,this.logger=(0,c.generateChildLogger)(t,this.name),this.registerEventListeners()}get context(){return(0,c.getLoggerContext)(this.logger)}rpcPublish(e,t,r,n,i,s,a){var c,l,u,h;const d={method:(0,o.cO)(n.protocol).publish,params:{topic:e,message:t,ttl:r,prompt:i,tag:s},id:a};return(0,o.o8)(null==(c=d.params)?void 0:c.prompt)&&(null==(l=d.params)||delete l.prompt),(0,o.o8)(null==(u=d.params)?void 0:u.tag)&&(null==(h=d.params)||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:d}),this.relayer.request(d)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach((async e=>{const{topic:t,message:r,opts:n}=e;await this.publish(t,r,n)}))}registerEventListeners(){this.relayer.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(tr);this.checkQueue()})),this.relayer.on(Jt,(e=>{this.removeRequestFromQueue(e.id.toString())}))}}class Ir{constructor(){this.map=new Map,this.set=(e,t)=>{const r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])},this.get=e=>this.map.get(e)||[],this.exists=(e,t)=>this.get(e).includes(t),this.delete=(e,t)=>{if(typeof t>"u")return void this.map.delete(e);if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,t))return;const n=r.filter((e=>e!==t));n.length?this.map.set(e,n):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Pr=Object.defineProperty,Or=Object.defineProperties,kr=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,Tr=(e,t,r)=>t in e?Pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jr=(e,t)=>{for(var r in t||(t={}))Mr.call(t,r)&&Tr(e,r,t[r]);if(Sr)for(var r of Sr(t))Nr.call(t,r)&&Tr(e,r,t[r]);return e},Rr=(e,t)=>Or(e,kr(t));class Lr extends g{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,this.subscriptions=new Map,this.topicMap=new Ir,this.events=new n.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Ft,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{const r=(0,o._H)(t),n={topic:e,relay:r};this.pending.set(e,n);const i=await this.rpcSubscribe(e,r);return this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}}),i}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}},this.unsubscribe=async(e,t)=>{await this.restartToComplete(),this.isInitialized(),typeof t?.id<"u"?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)},this.isSubscribed=async e=>!!this.topics.includes(e)||await new Promise(((t,r)=>{const n=new I.Watch;n.start(this.pendingSubscriptionWatchLabel);const i=setInterval((()=>{!this.pending.has(e)&&this.topics.includes(e)&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),t(!0)),n.elapsed(this.pendingSubscriptionWatchLabel)>=hr&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1)),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=(0,c.generateChildLogger)(t,this.name),this.clientId=""}get context(){return(0,c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){const r=this.topicMap.get(e);await Promise.all(r.map((async r=>await this.unsubscribeById(e,r,t))))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{const n=(0,o._H)(r);await this.rpcUnsubscribe(e,t,n);const i=(0,o.D6)("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t){const r={method:(0,o.cO)(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await(0,o.hF)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(tr)}return(0,o.rj)(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const t=e[0].relay,r={method:(0,o.cO)(t.protocol).batchSubscribe,params:{topics:e.map((e=>e.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await(0,o.hF)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(tr)}}rpcUnsubscribe(e,t,r){const n={method:(0,o.cO)(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(e,t){this.setSubscription(e,Rr(jr({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach((e=>{this.setSubscription(e.id,jr({},e)),this.pending.delete(e.topic)}))}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t))}addSubscription(e,t){this.subscriptions.set(e,jr({},t)),this.topicMap.set(t.topic,e),this.events.emit(cr,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const t=this.subscriptions.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(lr,Rr(jr({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit("subscription_sync")}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t<e;t++){const e=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(e)}}this.events.emit(ur)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const t=await this.rpcBatchSubscribe(e);(0,o.qt)(t)&&this.onBatchSubscribe(t.map(((t,r)=>Rr(jr({},e[r]),{id:t}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach((t=>{e.push(t)})),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(Xt,(async()=>{await this.onConnect()})),this.relayer.on(er,(()=>{this.onDisconnect()})),this.events.on(cr,(async e=>{const t=cr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})),this.events.on(lr,(async e=>{const t=lr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise((e=>{const t=setInterval((()=>{this.restartInProgress||(clearInterval(t),e())}),this.pollingInterval)}))}}var $r=Object.defineProperty,Dr=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Wr=(e,t,r)=>t in e?$r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class zr extends f{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new n.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async e=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(e)}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}},this.onPayloadHandler=e=>{this.onProviderPayload(e)},this.onConnectHandler=()=>{this.events.emit(Xt)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=e=>{this.logger.error(e),this.events.emit("relayer_error",e)},this.registerProviderListeners=()=>{this.provider.on(nr,this.onPayloadHandler),this.provider.on(ir,this.onConnectHandler),this.provider.on(or,this.onDisconnectHandler),this.provider.on(sr,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,c.generateChildLogger)(e.logger,this.name):(0,c.pino)((0,c.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new Er(this.logger,e.core),this.subscriber=new Lr(this,this.logger),this.publisher=new _r(this,this.logger),this.relayUrl=e?.relayUrl||Zt,this.projectId=e.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${Qt}...`),await this.restartTransport(Qt)}this.initialized=!0,setTimeout((async()=>{0===this.subscriber.topics.length&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)}),1e4)}get context(){return(0,c.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now()})}async subscribe(e,t){var r;this.isInitialized();let n=(null==(r=this.subscriber.topicMap.get(e))?void 0:r[0])||"";return n||(await Promise.all([new Promise((t=>{this.subscriber.once(cr,(r=>{r.topic===e&&t()}))})),new Promise((async r=>{n=await this.subscriber.subscribe(e,t),r()}))]),n)}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await(0,o.hF)(this.provider.disconnect(),1e3,"provider.disconnect()").catch((()=>this.onProviderDisconnect())):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise((e=>{if(!this.initialized)return e();this.subscriber.once(ur,(()=>{e()}))})),new Promise((async(e,t)=>{try{await(0,o.hF)(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(e){return void t(e)}e()}))])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.provider.events.emit(or)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await(0,o.Gg)())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some((t=>e.includes(t)))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new fe(new class{constructor(e){if(this.url=e,this.events=new n.EventEmitter,this.registering=!1,!ae(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return void 0!==this.socket}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise(((e,t)=>{void 0!==this.socket?(this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close()):t(new Error("Connection already closed"))}))}async send(e,t){void 0===this.socket&&(this.socket=await this.register());try{this.socket.send(A(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!ae(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.socket)return t(new Error("WebSocket connection is missing or invalid"));e(this.socket)}))}))}return this.url=e,this.registering=!0,new Promise(((t,n)=>{const i=(0,Z.isReactNative)()?void 0:{rejectUnauthorized:!ce(e)},o=new ge(e,[],i);"undefined"!=typeof WebSocket||void 0!==r.g&&void 0!==r.g.WebSocket||"undefined"!=typeof window&&void 0!==window.WebSocket||"undefined"!=typeof self&&void 0!==self.WebSocket?o.onerror=e=>{const t=e;n(this.emitError(t.error))}:o.on("error",(e=>{n(this.emitError(e))})),o.onopen=()=>{this.onOpen(o),t(o)}}))}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?C(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=ee(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return K(e,me(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const t=this.parseError(new Error((null==e?void 0:e.message)||`WebSocket connection failed for host: ${me(this.url)}`));return this.events.emit("register_error",t),t}}((0,o.$0)({sdkVersion:"2.10.0",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:t,message:r}=e;await this.messages.set(t,r)}async shouldIgnoreMessageEvent(e){const{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const n=this.messages.has(t,r);return n&&this.logger.debug(`Ignoring duplicate message: ${r}`),n}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),ue(e)){if(!e.method.endsWith("_subscription"))return;const t=e.params,{topic:r,message:n,publishedAt:i}=t.data,o={topic:r,message:n,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((e,t)=>{for(var r in t||(t={}))Br.call(t,r)&&Wr(e,r,t[r]);if(Dr)for(var r of Dr(t))Ur.call(t,r)&&Wr(e,r,t[r]);return e})({type:"event",event:t.id},o)),this.events.emit(t.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else he(e)&&this.events.emit(Jt,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Yt,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const t=X(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(nr,this.onPayloadHandler),this.provider.off(ir,this.onConnectHandler),this.provider.off(or,this.onDisconnectHandler),this.provider.off(sr,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(tr,(()=>{this.restartTransport().catch((e=>this.logger.error(e)))}));let e=await(0,o.Gg)();(0,o.uw)((async t=>{this.initialized&&e!==t&&(e=t,t?await this.restartTransport().catch((e=>this.logger.error(e))):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch((e=>this.logger.error(e)))))}))}onProviderDisconnect(){this.events.emit(er),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((async()=>{await this.restartTransport().catch((e=>this.logger.error(e)))}),(0,I.toMiliseconds)(ar)))}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise((e=>{const t=setInterval((()=>{this.connected&&(clearInterval(t),e())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var Hr=Object.defineProperty,Fr=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,Gr=(e,t,r)=>t in e?Hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kr=(e,t)=>{for(var r in t||(t={}))qr.call(t,r)&&Gr(e,r,t[r]);if(Fr)for(var r of Fr(t))Vr.call(t,r)&&Gr(e,r,t[r]);return e};class Zr extends m{constructor(e,t,r,n=Ft,i=void 0){super(e,t,r,n),this.core=e,this.logger=t,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Ft,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>{this.getKey&&null!==e&&!(0,o.o8)(e)?this.map.set(this.getKey(e),e):(0,o.xW)(e)?this.map.set(e.id,e):(0,o.h1)(e)&&this.map.set(e.topic,e)})),this.cached=[],this.initialized=!0)},this.set=async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())},this.get=e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e)),this.getAll=e=>(this.isInitialized(),e?this.values.filter((t=>Object.keys(e).every((r=>be()(t[r],e[r]))))):this.values),this.update=async(e,t)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});const r=Kr(Kr({},this.getData(e)),t);this.map.set(e,r),await this.persist()},this.delete=async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),await this.persist())},this.logger=(0,c.generateChildLogger)(t,this.name),this.storagePrefix=n,this.getKey=i}get context(){return(0,c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const t=this.map.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Qr{constructor(e,t){this.core=e,this.logger=t,this.name="pairing",this.version="0.3",this.events=new(i()),this.initialized=!1,this.storagePrefix=Ft,this.ignoredPayloadTypes=[o.rV],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const e=(0,o.jd)(),t=await this.core.crypto.setSymKey(e),r=(0,o.gn)(I.FIVE_MINUTES),n={protocol:"irn"},i={topic:t,expiry:r,relay:n,active:!1},s=(0,o.Bv)({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:e,relay:n});return await this.pairings.set(t,i),await this.core.relayer.subscribe(t),this.core.expirer.set(t,r),{topic:t,uri:s}},this.pair=async e=>{this.isInitialized(),this.isValidPair(e);const{topic:t,symKey:r,relay:n}=(0,o.he)(e.uri);if(this.pairings.keys.includes(t))throw new Error(`Pairing already exists: ${t}`);if(this.core.crypto.hasKeys(t))throw new Error(`Keychain already exists: ${t}`);const i=(0,o.gn)(I.FIVE_MINUTES),s={topic:t,relay:n,expiry:i,active:!1};return await this.pairings.set(t,s),await this.core.crypto.setSymKey(r,t),await this.core.relayer.subscribe(t,{relay:n}),this.core.expirer.set(t,i),e.activatePairing&&await this.activate({topic:t}),s},this.activate=async({topic:e})=>{this.isInitialized();const t=(0,o.gn)(I.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:t}),this.core.expirer.set(e,t)},this.ping=async e=>{this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.pairings.keys.includes(t)){const e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=(0,o.H1)();this.events.once((0,o.E0)("pairing_ping",e),(({error:e})=>{e?i(e):n()})),await r()}},this.updateExpiry=async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})},this.updateMetadata=async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async e=>{this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",(0,o.D6)("USER_DISCONNECTED")),await this.deletePairing(t))},this.sendRequest=async(e,t,r)=>{const n=J(t,r),i=await this.core.crypto.encode(e,n),o=dr[t].req;return this.core.history.set(e,n),this.core.relayer.publish(e,i,o),n.id},this.sendResult=async(e,t,r)=>{const n=X(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),s=dr[o.request.method].res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.sendError=async(e,t,r)=>{const n=ee(e,r),i=await this.core.crypto.encode(t,n),o=await this.core.history.get(t,e),s=dr[o.request.method]?dr[o.request.method].res:dr.unregistered_method.res;await this.core.relayer.publish(t,i,s),await this.core.history.resolve(n)},this.deletePairing=async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,(0,o.D6)("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])},this.cleanup=async()=>{const e=this.pairings.getAll().filter((e=>(0,o.Bw)(e.expiry)));await Promise.all(e.map((e=>this.deletePairing(e.topic))))},this.onRelayEventRequest=e=>{const{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return this.onPairingPingRequest(t,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(t,r);default:return this.onUnknownRpcMethodRequest(t,r)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===n?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(n)},this.onPairingPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit("pairing_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onPairingPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{de(t)?this.events.emit((0,o.E0)("pairing_ping",r),{}):pe(t)&&this.events.emit((0,o.E0)("pairing_ping",r),{error:t.error})}),500)},this.onPairingDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit("pairing_delete",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodRequest=async(e,t)=>{const{id:r,method:n}=t;try{if(this.registeredMethods.includes(n))return;const t=(0,o.D6)("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}},this.onUnknownRpcMethodResponse=e=>{this.registeredMethods.includes(e)||this.logger.error((0,o.D6)("WC_METHOD_UNSUPPORTED",e))},this.isValidPair=e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pair() params: ${e}`);throw new Error(t)}if(!(0,o.jv)(e.uri)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw new Error(t)}},this.isValidPing=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidDisconnect=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidPairingTopic(t)},this.isValidPairingTopic=async e=>{if(!(0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.pairings.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.pairings.get(e).expiry)){await this.deletePairing(e);const{message:t}=(0,o.Z7)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}},this.core=e,this.logger=(0,c.generateChildLogger)(t,this.name),this.pairings=new Zr(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,c.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Yt,(async e=>{const{topic:t,message:r}=e;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const n=await this.core.crypto.decode(t,r);try{ue(n)?(this.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):he(n)&&(await this.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.core.history.delete(t,n.id))}catch(e){this.logger.error(e)}}))}registerExpirerEvents(){this.core.expirer.on(br,(async e=>{const{topic:t}=(0,o.iP)(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit("pairing_expire",{topic:t}))}))}}class Yr extends h{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.records=new Map,this.events=new n.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Ft,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.records.set(e.id,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;const n={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:(0,o.gn)(I.THIRTY_DAYS)};this.records.set(n.id,n),this.events.emit(pr,n)},this.resolve=async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;const t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=pe(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.events.emit(fr,t))},this.get=async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t)),this.delete=(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach((r=>{if(r.topic===e){if(typeof t<"u"&&r.id!==t)return;this.records.delete(r.id),this.events.emit(mr,r)}}))},this.exists=async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e),this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,c.generateChildLogger)(t,this.name)}get context(){return(0,c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach((t=>{if(typeof t.response<"u")return;const r={topic:t.topic,request:J(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)})),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const t=this.records.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit("history_sync")}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(pr,(e=>{const t=pr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(fr,(e=>{const t=fr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.events.on(mr,(e=>{const t=mr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e}),this.persist()})),this.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((e=>{(0,I.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))}))}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Jr extends w{constructor(e,t){super(e,t),this.core=e,this.logger=t,this.expirations=new Map,this.events=new n.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Ft,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach((e=>this.expirations.set(e.target,e))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=e=>{try{const t=this.formatTarget(e);return typeof this.getExpiration(t)<"u"}catch{return!1}},this.set=(e,t)=>{this.isInitialized();const r=this.formatTarget(e),n={target:r,expiry:t};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(gr,{target:r,expiration:n})},this.get=e=>{this.isInitialized();const t=this.formatTarget(e);return this.getExpiration(t)},this.del=e=>{if(this.isInitialized(),this.has(e)){const t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(wr,{target:t,expiration:r})}},this.on=(e,t)=>{this.events.on(e,t)},this.once=(e,t)=>{this.events.once(e,t)},this.off=(e,t)=>{this.events.off(e,t)},this.removeListener=(e,t)=>{this.events.removeListener(e,t)},this.logger=(0,c.generateChildLogger)(t,this.name)}get context(){return(0,c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return(0,o.Z4)(e);if("number"==typeof e)return(0,o.Gq)(e);const{message:t}=(0,o.Z7)("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit("expirer_sync")}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:e}=(0,o.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const t=this.expirations.get(e);if(!t){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),new Error(t)}return t}checkExpiry(e,t){const{expiry:r}=t;(0,I.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(br,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((e,t)=>this.checkExpiry(t,e)))}registerEventListeners(){this.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(gr,(e=>{const t=gr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(br,(e=>{const t=br;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})),this.events.on(wr,(e=>{const t=wr;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Xr extends b{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,this.name=vr,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async e=>{if(this.verifyDisabled||(0,o.b$)()||!(0,o.jU)())return;const t=e?.verifyUrl||yr;this.verifyUrl!==t&&this.removeIframe(),this.verifyUrl=t;try{await this.createIframe()}catch(e){this.logger.warn(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.warn(e)}if(!this.initialized){this.removeIframe(),this.verifyUrl=xr;try{await this.createIframe()}catch(e){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(e),this.verifyDisabled=!0}}},this.register=async e=>{this.initialized?this.sendPost(e.attestationId):(this.addToQueue(e.attestationId),await this.init())},this.resolve=async e=>{if(this.isDevEnv)return"";const t=e?.verifyUrl||yr;let r="";try{r=await this.fetchAttestation(e.attestationId,t)}catch(n){this.logger.warn(`failed to resolve attestation: ${e.attestationId} from url: ${t}`),this.logger.warn(n),r=await this.fetchAttestation(e.attestationId,xr)}return r},this.fetchAttestation=async(e,t)=>{var r;this.logger.info(`resolving attestation: ${e} from url: ${t}`);const n=this.startAbortTimer(2*I.ONE_SECOND),i=await fetch(`${t}/attestation/${e}`,{signal:this.abortController.signal});return clearTimeout(n),200===i.status?null==(r=await i.json())?void 0:r.origin:""},this.addToQueue=e=>{this.queue.push(e)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach((e=>this.sendPost(e))),this.queue=[])},this.sendPost=e=>{var t;try{if(!this.iframe)return;null==(t=this.iframe.contentWindow)||t.postMessage(e,"*"),this.logger.info(`postMessage sent: ${e} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let e;const t=r=>{"verify_ready"===r.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",t),e())};await Promise.race([new Promise((r=>{if(document.getElementById(vr))return r();window.addEventListener("message",t);const n=document.createElement("iframe");n.id=vr,n.src=`${this.verifyUrl}/${this.projectId}`,n.style.display="none",document.body.append(n),this.iframe=n,e=r})),new Promise(((e,r)=>setTimeout((()=>{window.removeEventListener("message",t),r("verify iframe load timeout")}),(0,I.toMiliseconds)(I.FIVE_SECONDS))))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.logger=(0,c.generateChildLogger)(t,this.name),this.verifyUrl=yr,this.abortController=new AbortController,this.isDevEnv=(0,o.UG)()&&process.env.IS_VITEST}get context(){return(0,c.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout((()=>this.abortController.abort()),(0,I.toMiliseconds)(e))}}var en=Object.defineProperty,tn=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,on=(e,t,r)=>t in e?en(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sn=(e,t)=>{for(var r in t||(t={}))rn.call(t,r)&&on(e,r,t[r]);if(tn)for(var r of tn(t))nn.call(t,r)&&on(e,r,t[r]);return e};class an extends u{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=Ht,this.events=new n.EventEmitter,this.initialized=!1,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Zt;const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,c.pino)((0,c.getDefaultLoggerOptions)({level:e?.logger||"error"}));this.logger=(0,c.generateChildLogger)(t,this.name),this.heartbeat=new a.HeartBeat,this.crypto=new Ar(this,this.logger,e?.keychain),this.history=new Yr(this,this.logger),this.expirer=new Jr(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new s.ZP(sn(sn({},qt),e?.storageOptions)),this.relayer=new zr({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Qr(this,this.logger),this.verify=new Xr(this.projectId||"",this.logger)}static async init(e){const t=new an(e);await t.initialize();const r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return(0,c.getLoggerContext)(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}}const cn=an,ln="client",un=`wc@2:${ln}:`,hn=ln,dn="WALLETCONNECT_DEEPLINK_CHOICE",pn="Proposal expired",fn=I.SEVEN_DAYS,mn={wc_sessionPropose:{req:{ttl:I.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1104},res:{ttl:I.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1106},res:{ttl:I.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:I.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:I.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1112},res:{ttl:I.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1115}}},gn={min:I.FIVE_MINUTES,max:I.SEVEN_DAYS},wn="IDLE",bn="ACTIVE",vn=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var yn=Object.defineProperty,xn=Object.defineProperties,Cn=Object.getOwnPropertyDescriptors,An=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,In=(e,t,r)=>t in e?yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pn=(e,t)=>{for(var r in t||(t={}))En.call(t,r)&&In(e,r,t[r]);if(An)for(var r of An(t))_n.call(t,r)&&In(e,r,t[r]);return e},On=(e,t)=>xn(e,Cn(t));class kn extends y{constructor(e){super(e),this.name="engine",this.events=new(i()),this.initialized=!1,this.ignoredPayloadTypes=[o.rV],this.requestQueue={state:wn,queue:[]},this.sessionRequestQueue={state:wn,queue:[]},this.requestQueueDelay=I.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(mn)}),this.initialized=!0,setTimeout((()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()}),(0,I.toMiliseconds)(this.requestQueueDelay)))},this.connect=async e=>{await this.isInitialized();const t=On(Pn({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(t);const{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:s,relays:a}=t;let c,l=r,u=!1;if(l&&(u=this.client.core.pairing.pairings.get(l).active),!l||!u){const{topic:e,uri:t}=await this.client.core.pairing.create();l=e,c=t}const h=await this.client.core.crypto.generateKeyPair(),d=Pn({requiredNamespaces:n,optionalNamespaces:i,relays:a??[{protocol:"irn"}],proposer:{publicKey:h,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:p,resolve:f,done:m}=(0,o.H1)(I.FIVE_MINUTES,pn);if(this.events.once((0,o.E0)("session_connect"),(async({error:e,session:t})=>{if(e)p(e);else if(t){t.self.publicKey=h;const e=On(Pn({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces});await this.client.session.set(t.topic,e),await this.setExpiry(t.topic,t.expiry),l&&await this.client.core.pairing.updateMetadata({topic:l,metadata:t.peer.metadata}),f(e)}})),!l){const{message:e}=(0,o.Z7)("NO_MATCHING_KEY",`connect() pairing topic: ${l}`);throw new Error(e)}const g=await this.sendRequest({topic:l,method:"wc_sessionPropose",params:d}),w=(0,o.gn)(I.FIVE_MINUTES);return await this.setProposal(g,Pn({id:g,expiry:w},d)),{uri:c,approval:m}},this.pair=async e=>(await this.isInitialized(),await this.client.core.pairing.pair(e)),this.approve=async e=>{await this.isInitialized(),await this.isValidApprove(e);const{id:t,relayProtocol:r,namespaces:n,sessionProperties:i}=e,s=this.client.proposal.get(t);let{pairingTopic:a,proposer:c,requiredNamespaces:l,optionalNamespaces:u}=s;a=a||"",(0,o.L5)(l)||(l=(0,o.fc)(n,"approve()"));const h=await this.client.core.crypto.generateKeyPair(),d=c.publicKey,p=await this.client.core.crypto.generateSharedKey(h,d);a&&t&&(await this.client.core.pairing.updateMetadata({topic:a,metadata:c.metadata}),await this.sendResult({id:t,topic:a,result:{relay:{protocol:r??"irn"},responderPublicKey:h}}),await this.client.proposal.delete(t,(0,o.D6)("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:a}));const f=Pn({relay:{protocol:r??"irn"},namespaces:n,requiredNamespaces:l,optionalNamespaces:u,pairingTopic:a,controller:{publicKey:h,metadata:this.client.metadata},expiry:(0,o.gn)(fn)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(p),await this.sendRequest({topic:p,method:"wc_sessionSettle",params:f,throwOnFailedPublish:!0});const m=On(Pn({},f),{topic:p,pairingTopic:a,acknowledged:!1,self:f.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:h});return await this.client.session.set(p,m),await this.setExpiry(p,(0,o.gn)(fn)),{topic:p,acknowledged:()=>new Promise((e=>setTimeout((()=>e(this.client.session.get(p))),500)))}},this.reject=async e=>{await this.isInitialized(),await this.isValidReject(e);const{id:t,reason:r}=e,{pairingTopic:n}=this.client.proposal.get(t);n&&(await this.sendError(t,n,r),await this.client.proposal.delete(t,(0,o.D6)("USER_DISCONNECTED")))},this.update=async e=>{await this.isInitialized(),await this.isValidUpdate(e);const{topic:t,namespaces:r}=e,n=await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r}}),{done:i,resolve:s,reject:a}=(0,o.H1)();return this.events.once((0,o.E0)("session_update",n),(({error:e})=>{e?a(e):s()})),await this.client.session.update(t,{namespaces:r}),{acknowledged:i}},this.extend=async e=>{await this.isInitialized(),await this.isValidExtend(e);const{topic:t}=e,r=await this.sendRequest({topic:t,method:"wc_sessionExtend",params:{}}),{done:n,resolve:i,reject:s}=(0,o.H1)();return this.events.once((0,o.E0)("session_extend",r),(({error:e})=>{e?s(e):i()})),await this.setExpiry(t,(0,o.gn)(fn)),{acknowledged:n}},this.request=async e=>{await this.isInitialized(),await this.isValidRequest(e);const{chainId:t,request:r,topic:n,expiry:i}=e,s=Q(),{done:a,resolve:c,reject:l}=(0,o.H1)(i);return this.events.once((0,o.E0)("session_request",s),(({error:e,result:t})=>{e?l(e):c(t)})),await Promise.all([new Promise((async e=>{await this.sendRequest({clientRpcId:s,topic:n,method:"wc_sessionRequest",params:{request:r,chainId:t},expiry:i,throwOnFailedPublish:!0}).catch((e=>l(e))),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:t,id:s}),e()})),new Promise((async e=>{const t=await this.client.core.storage.getItem(dn);(0,o.Hh)({id:s,topic:n,wcDeepLink:t}),e()})),a()]).then((e=>e[2]))},this.respond=async e=>{await this.isInitialized(),await this.isValidRespond(e);const{topic:t,response:r}=e,{id:n}=r;de(r)?await this.sendResult({id:n,topic:t,result:r.result,throwOnFailedPublish:!0}):pe(r)&&await this.sendError(n,t,r.error),this.cleanupAfterResponse(e)},this.ping=async e=>{await this.isInitialized(),await this.isValidPing(e);const{topic:t}=e;if(this.client.session.keys.includes(t)){const e=await this.sendRequest({topic:t,method:"wc_sessionPing",params:{}}),{done:r,resolve:n,reject:i}=(0,o.H1)();this.events.once((0,o.E0)("session_ping",e),(({error:e})=>{e?i(e):n()})),await r()}else this.client.core.pairing.pairings.keys.includes(t)&&await this.client.core.pairing.ping({topic:t})},this.emit=async e=>{await this.isInitialized(),await this.isValidEmit(e);const{topic:t,event:r,chainId:n}=e;await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:n}})},this.disconnect=async e=>{await this.isInitialized(),await this.isValidDisconnect(e);const{topic:t}=e;this.client.session.keys.includes(t)?(await this.sendRequest({topic:t,method:"wc_sessionDelete",params:(0,o.D6)("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(t)):await this.client.core.pairing.disconnect({topic:t})},this.find=e=>(this.isInitialized(),this.client.session.getAll().filter((t=>(0,o.Ih)(t,e)))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async e=>{if(e.pairingTopic)try{const t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter((r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic}));if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map((e=>this.client.core.pairing.disconnect({topic:e.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async(e,t)=>{const{self:r}=this.client.session.get(e);await this.client.core.relayer.unsubscribe(e),this.client.session.delete(e,(0,o.D6)("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(r.publicKey)&&await this.client.core.crypto.deleteKeyPair(r.publicKey),this.client.core.crypto.keychain.has(e)&&await this.client.core.crypto.deleteSymKey(e),t||this.client.core.expirer.del(e),this.client.core.storage.removeItem(dn).catch((e=>this.client.logger.warn(e)))},this.deleteProposal=async(e,t)=>{await Promise.all([this.client.proposal.delete(e,(0,o.D6)("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)])},this.deletePendingSessionRequest=async(e,t,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter((t=>t.id!==e)),r&&(this.sessionRequestQueue.state=wn)},this.setExpiry=async(e,t)=>{this.client.session.keys.includes(e)&&await this.client.session.update(e,{expiry:t}),this.client.core.expirer.set(e,t)},this.setProposal=async(e,t)=>{await this.client.proposal.set(e,t),this.client.core.expirer.set(e,t.expiry)},this.setPendingSessionRequest=async e=>{const t=mn.wc_sessionRequest.req.ttl,{id:r,topic:n,params:i}=e;await this.client.pendingRequest.set(r,{id:r,topic:n,params:i}),t&&this.client.core.expirer.set(r,(0,o.gn)(t))},this.sendRequest=async e=>{const{topic:t,method:r,params:n,expiry:i,relayRpcId:s,clientRpcId:a,throwOnFailedPublish:c}=e,l=J(r,n,a);if((0,o.jU)()&&vn.includes(r)){const e=(0,o.rj)(JSON.stringify(l));this.client.core.verify.register({attestationId:e})}const u=await this.client.core.crypto.encode(t,l),h=mn[r].req;return i&&(h.ttl=i),s&&(h.id=s),this.client.core.history.set(t,l),c?(h.internal=On(Pn({},h.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(t,u,h)):this.client.core.relayer.publish(t,u,h).catch((e=>this.client.logger.error(e))),l.id},this.sendResult=async e=>{const{id:t,topic:r,result:n,throwOnFailedPublish:i}=e,o=X(t,n),s=await this.client.core.crypto.encode(r,o),a=await this.client.core.history.get(r,t),c=mn[a.request.method].res;i?(c.internal=On(Pn({},c.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,s,c)):this.client.core.relayer.publish(r,s,c).catch((e=>this.client.logger.error(e))),await this.client.core.history.resolve(o)},this.sendError=async(e,t,r)=>{const n=ee(e,r),i=await this.client.core.crypto.encode(t,n),o=await this.client.core.history.get(t,e),s=mn[o.request.method].res;this.client.core.relayer.publish(t,i,s),await this.client.core.history.resolve(n)},this.cleanup=async()=>{const e=[],t=[];this.client.session.getAll().forEach((t=>{(0,o.Bw)(t.expiry)&&e.push(t.topic)})),this.client.proposal.getAll().forEach((e=>{(0,o.Bw)(e.expiry)&&t.push(e.id)})),await Promise.all([...e.map((e=>this.deleteSession(e))),...t.map((e=>this.deleteProposal(e)))])},this.onRelayEventRequest=async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state!==bn){for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=bn;const e=this.requestQueue.queue.shift();if(e)try{this.processRequest(e),await new Promise((e=>setTimeout(e,300)))}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=wn}else this.client.logger.info("Request queue already active, skipping...")},this.processRequest=e=>{const{topic:t,payload:r}=e,n=r.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeRequest(t,r);case"wc_sessionSettle":return this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return this.onSessionExtendRequest(t,r);case"wc_sessionPing":return this.onSessionPingRequest(t,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return this.onSessionRequest(t,r);case"wc_sessionEvent":return this.onSessionEventRequest(t,r);default:return this.client.logger.info(`Unsupported request method ${n}`)}},this.onRelayEventResponse=async e=>{const{topic:t,payload:r}=e,n=(await this.client.core.history.get(t,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${n}`)}},this.onRelayEventUnknownPayload=e=>{const{topic:t}=e,{message:r}=(0,o.Z7)("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw new Error(r)},this.onSessionProposeRequest=async(e,t)=>{const{params:r,id:n}=t;try{this.isValidConnect(Pn({},t.params));const i=(0,o.gn)(I.FIVE_MINUTES),s=Pn({id:n,pairingTopic:e,expiry:i},r);await this.setProposal(n,s);const a=(0,o.rj)(JSON.stringify(t)),c=await this.getVerifyContext(a,s.proposer.metadata);this.client.events.emit("session_proposal",{id:n,params:s,verifyContext:c})}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.onSessionProposeResponse=async(e,t)=>{const{id:r}=t;if(de(t)){const{result:n}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});const i=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const o=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const s=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:s});const a=await this.client.core.crypto.generateSharedKey(o,s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:a});const c=await this.client.core.relayer.subscribe(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else pe(t)&&(await this.client.proposal.delete(r,(0,o.D6)("USER_DISCONNECTED")),this.events.emit((0,o.E0)("session_connect"),{error:t.error}))},this.onSessionSettleRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidSessionSettleRequest(n);const{relay:r,controller:i,expiry:s,namespaces:a,requiredNamespaces:c,optionalNamespaces:l,sessionProperties:u,pairingTopic:h}=t.params,d=Pn({topic:e,relay:r,expiry:s,namespaces:a,acknowledged:!0,pairingTopic:h,requiredNamespaces:c,optionalNamespaces:l,controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},u&&{sessionProperties:u});await this.sendResult({id:t.id,topic:e,result:!0}),this.events.emit((0,o.E0)("session_connect"),{session:d}),this.cleanupDuplicatePairings(d)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionSettleResponse=async(e,t)=>{const{id:r}=t;de(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit((0,o.E0)("session_approve",r),{})):pe(t)&&(await this.client.session.delete(e,(0,o.D6)("USER_DISCONNECTED")),this.events.emit((0,o.E0)("session_approve",r),{error:t.error}))},this.onSessionUpdateRequest=async(e,t)=>{const{params:r,id:n}=t;try{const t=`${e}_session_update`,i=o.O6.get(t);if(i&&this.isRequestOutOfSync(i,n))return void this.client.logger.info(`Discarding out of sync request - ${n}`);this.isValidUpdate(Pn({topic:e},r)),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:n,topic:e,result:!0}),this.client.events.emit("session_update",{id:n,topic:e,params:r}),o.O6.set(t,n)}catch(t){await this.sendError(n,e,t),this.client.logger.error(t)}},this.isRequestOutOfSync=(e,t)=>parseInt(t.toString().slice(0,-3))<=parseInt(e.toString().slice(0,-3)),this.onSessionUpdateResponse=(e,t)=>{const{id:r}=t;de(t)?this.events.emit((0,o.E0)("session_update",r),{}):pe(t)&&this.events.emit((0,o.E0)("session_update",r),{error:t.error})},this.onSessionExtendRequest=async(e,t)=>{const{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,(0,o.gn)(fn)),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionExtendResponse=(e,t)=>{const{id:r}=t;de(t)?this.events.emit((0,o.E0)("session_extend",r),{}):pe(t)&&this.events.emit((0,o.E0)("session_extend",r),{error:t.error})},this.onSessionPingRequest=async(e,t)=>{const{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionPingResponse=(e,t)=>{const{id:r}=t;setTimeout((()=>{de(t)?this.events.emit((0,o.E0)("session_ping",r),{}):pe(t)&&this.events.emit((0,o.E0)("session_ping",r),{error:t.error})}),500)},this.onSessionDeleteRequest=async(e,t)=>{const{id:r}=t;try{this.isValidDisconnect({topic:e,reason:t.params}),await Promise.all([new Promise((t=>{this.client.core.relayer.once(rr,(async()=>{t(await this.deleteSession(e))}))})),this.sendResult({id:r,topic:e,result:!0})]),this.client.events.emit("session_delete",{id:r,topic:e})}catch(e){this.client.logger.error(e)}},this.onSessionRequest=async(e,t)=>{const{id:r,params:n}=t;try{this.isValidRequest(Pn({topic:e},n)),await this.setPendingSessionRequest({id:r,topic:e,params:n}),this.addSessionRequestToSessionRequestQueue({id:r,topic:e,params:n}),await this.processSessionRequestQueue()}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.onSessionRequestResponse=(e,t)=>{const{id:r}=t;de(t)?this.events.emit((0,o.E0)("session_request",r),{result:t.result}):pe(t)&&this.events.emit((0,o.E0)("session_request",r),{error:t.error})},this.onSessionEventRequest=async(e,t)=>{const{id:r,params:n}=t;try{const t=`${e}_session_event_${n.event.name}`,i=o.O6.get(t);if(i&&this.isRequestOutOfSync(i,r))return void this.client.logger.info(`Discarding out of sync request - ${r}`);this.isValidEmit(Pn({topic:e},n)),this.client.events.emit("session_event",{id:r,topic:e,params:n}),o.O6.set(t,r)}catch(t){await this.sendError(r,e,t),this.client.logger.error(t)}},this.addSessionRequestToSessionRequestQueue=e=>{this.sessionRequestQueue.queue.push(e)},this.cleanupAfterResponse=e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout((()=>{this.sessionRequestQueue.state=wn,this.processSessionRequestQueue()}),(0,I.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=async()=>{if(this.sessionRequestQueue.state===bn)return void this.client.logger.info("session request queue is already active.");const e=this.sessionRequestQueue.queue[0];if(e)try{const{id:t,topic:r,params:n}=e,i=(0,o.rj)(JSON.stringify(J("wc_sessionRequest",n,t))),s=this.client.session.get(r),a=await this.getVerifyContext(i,s.peer.metadata);this.sessionRequestQueue.state=bn,this.client.events.emit("session_request",{id:t,topic:r,params:n,verifyContext:a})}catch(e){this.client.logger.error(e)}else this.client.logger.info("session request queue is empty.")},this.isValidConnect=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(t)}const{pairingTopic:t,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:s}=e;if((0,o.o8)(t)||await this.isValidPairingTopic(t),!(0,o.PM)(s,!0)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(e)}!(0,o.o8)(r)&&0!==(0,o.L5)(r)&&this.validateNamespaces(r,"requiredNamespaces"),!(0,o.o8)(n)&&0!==(0,o.L5)(n)&&this.validateNamespaces(n,"optionalNamespaces"),(0,o.o8)(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(e,t)=>{const r=(0,o.n)(e,"connect()",t);if(r)throw new Error(r.message)},this.isValidApprove=async e=>{if(!(0,o.EJ)(e))throw new Error((0,o.Z7)("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:t,namespaces:r,relayProtocol:n,sessionProperties:i}=e;await this.isValidProposalId(t);const s=this.client.proposal.get(t),a=(0,o.in)(r,"approve()");if(a)throw new Error(a.message);const c=(0,o.rF)(s.requiredNamespaces,r,"approve()");if(c)throw new Error(c.message);if(!(0,o.M_)(n,!0)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`approve() relayProtocol: ${n}`);throw new Error(e)}(0,o.o8)(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(t)}const{id:t,reason:r}=e;if(await this.isValidProposalId(t),!(0,o.$t)(r)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidSessionSettleRequest=e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(t)}const{relay:t,controller:r,namespaces:n,expiry:i}=e;if(!(0,o.Z2)(t)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(e)}const s=(0,o.Dd)(r,"onSessionSettleRequest()");if(s)throw new Error(s.message);const a=(0,o.in)(n,"onSessionSettleRequest()");if(a)throw new Error(a.message);if((0,o.Bw)(i)){const{message:e}=(0,o.Z7)("EXPIRED","onSessionSettleRequest()");throw new Error(e)}},this.isValidUpdate=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(t)}const{topic:t,namespaces:r}=e;await this.isValidSessionTopic(t);const n=this.client.session.get(t),i=(0,o.in)(r,"update()");if(i)throw new Error(i.message);const s=(0,o.rF)(n.requiredNamespaces,r,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionTopic(t)},this.isValidRequest=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(t)}const{topic:t,request:r,chainId:n,expiry:i}=e;await this.isValidSessionTopic(t);const{namespaces:s}=this.client.session.get(t);if(!(0,o.p8)(s,n)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() chainId: ${n}`);throw new Error(e)}if(!(0,o.hH)(r)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,o.al)(s,n,r.method)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() method: ${r.method}`);throw new Error(e)}if(i&&!(0,o.ON)(i,gn)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`request() expiry: ${i}. Expiry must be a number (in seconds) between ${gn.min} and ${gn.max}`);throw new Error(e)}},this.isValidRespond=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(t)}const{topic:t,response:r}=e;if(await this.isValidSessionTopic(t),!(0,o.JT)(r)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidPing=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.isValidEmit=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(t)}const{topic:t,event:r,chainId:n}=e;await this.isValidSessionTopic(t);const{namespaces:i}=this.client.session.get(t);if(!(0,o.p8)(i,n)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw new Error(e)}if(!(0,o.nf)(r)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}if(!(0,o.sI)(i,n,r.name)){const{message:e}=(0,o.Z7)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(r)}`);throw new Error(e)}},this.isValidDisconnect=async e=>{if(!(0,o.EJ)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(t)}const{topic:t}=e;await this.isValidSessionOrPairingTopic(t)},this.getVerifyContext=async(e,t)=>{const r={verified:{verifyUrl:t.verifyUrl||yr,validation:"UNKNOWN",origin:t.url||""}};try{const n=await this.client.core.verify.resolve({attestationId:e,verifyUrl:t.verifyUrl});n&&(r.verified.origin=n,r.verified.validation=n===new URL(t.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.error(e)}return this.client.logger.info(`Verify context: ${JSON.stringify(r)}`),r},this.validateSessionProps=(e,t)=>{Object.values(e).forEach((e=>{if(!(0,o.M_)(e,!1)){const{message:r}=(0,o.Z7)("MISSING_OR_INVALID",`${t} must be in Record<string, string> format. Received: ${JSON.stringify(e)}`);throw new Error(r)}}))}}async isInitialized(){if(!this.initialized){const{message:e}=(0,o.Z7)("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Yt,(async e=>{const{topic:t,message:r}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;const n=await this.client.core.crypto.decode(t,r);try{ue(n)?(this.client.core.history.set(t,n),this.onRelayEventRequest({topic:t,payload:n})):he(n)?(await this.client.core.history.resolve(n),await this.onRelayEventResponse({topic:t,payload:n}),this.client.core.history.delete(t,n.id)):this.onRelayEventUnknownPayload({topic:t,payload:n})}catch(e){this.client.logger.error(e)}}))}registerExpirerEvents(){this.client.core.expirer.on(br,(async e=>{const{topic:t,id:r}=(0,o.iP)(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,(0,o.Z7)("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession(t,!0),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))}))}isValidPairingTopic(e){if(!(0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.client.core.pairing.pairings.get(e).expiry)){const{message:t}=(0,o.Z7)("EXPIRED",`pairing topic: ${e}`);throw new Error(t)}}async isValidSessionTopic(e){if(!(0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(t)}if(!this.client.session.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:t}=(0,o.Z7)("EXPIRED",`session topic: ${e}`);throw new Error(t)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else{if(!this.client.core.pairing.pairings.keys.includes(e)){if((0,o.M_)(e,!1)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(t)}{const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(t)}}this.isValidPairingTopic(e)}}async isValidProposalId(e){if(!(0,o.Q0)(e)){const{message:t}=(0,o.Z7)("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(t)}if(!this.client.proposal.keys.includes(e)){const{message:t}=(0,o.Z7)("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(t)}if((0,o.Bw)(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:t}=(0,o.Z7)("EXPIRED",`proposal id: ${e}`);throw new Error(t)}}}class Sn extends Zr{constructor(e,t){super(e,t,"proposal",un),this.core=e,this.logger=t}}class Mn extends Zr{constructor(e,t){super(e,t,"session",un),this.core=e,this.logger=t}}class Nn extends Zr{constructor(e,t){super(e,t,"request",un,(e=>e.id)),this.core=e,this.logger=t}}class Tn extends v{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=hn,this.events=new n.EventEmitter,this.on=(e,t)=>this.events.on(e,t),this.once=(e,t)=>this.events.once(e,t),this.off=(e,t)=>this.events.off(e,t),this.removeListener=(e,t)=>this.events.removeListener(e,t),this.removeAllListeners=e=>this.events.removeAllListeners(e),this.connect=async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}},this.pair=async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}},this.approve=async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}},this.reject=async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}},this.update=async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}},this.extend=async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}},this.request=async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}},this.respond=async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}},this.ping=async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}},this.emit=async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}},this.find=e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}},this.name=e?.name||hn,this.metadata=e?.metadata||(0,o.D)();const t=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,c.pino)((0,c.getDefaultLoggerOptions)({level:e?.logger||"error"}));this.core=e?.core||new cn(e),this.logger=(0,c.generateChildLogger)(t,this.name),this.session=new Mn(this.core,this.logger),this.proposal=new Sn(this.core,this.logger),this.pendingRequest=new Nn(this.core,this.logger),this.engine=new kn(this)}static async init(e){const t=new Tn(e);return await t.initialize(),t}get context(){return(0,c.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var jn=r(4098),Rn=r.n(jn);const Ln={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class $n{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new n.EventEmitter,this.isAvailable=!1,this.registering=!1,!se(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=A(e),r=await Rn()(this.url,Object.assign(Object.assign({},Ln),{body:t})),n=await r.json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!se(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),void 0===this.isAvailable)return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=A({id:1,jsonrpc:"2.0",method:"test",params:[]});await Rn()(e,Object.assign(Object.assign({},Ln),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(void 0===e.data)return;const t="string"==typeof e.data?C(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const r=this.parseError(t),n=ee(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e,t=this.url){return K(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const Dn=$n,Bn="error",Un="wc@2:universal_provider:",Wn="default_chain_changed";var zn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof r.g<"u"?r.g:typeof self<"u"?self:{},Hn={exports:{}};!function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",s=32,a=128,c=1/0,l=9007199254740991,u=NaN,h=4294967295,d=[["ary",a],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],p="[object Arguments]",f="[object Array]",m="[object Boolean]",g="[object Date]",w="[object Error]",b="[object Function]",v="[object GeneratorFunction]",y="[object Map]",x="[object Number]",C="[object Object]",A="[object Promise]",E="[object RegExp]",_="[object Set]",I="[object String]",P="[object Symbol]",O="[object WeakMap]",k="[object ArrayBuffer]",S="[object DataView]",M="[object Float32Array]",N="[object Float64Array]",T="[object Int8Array]",j="[object Int16Array]",R="[object Int32Array]",L="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,q=RegExp(H.source),V=RegExp(F.source),G=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,ee=RegExp(X.source),te=/^\s+/,re=/\s/,ne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ie=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ae=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ue=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,fe=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,be=/['\n\r\u2028\u2029\\]/g,ve="\\ud800-\\udfff",ye="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",_e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+ve+"]",Pe="["+_e+"]",Oe="["+ye+"]",ke="\\d+",Se="["+xe+"]",Me="["+Ce+"]",Ne="[^"+ve+_e+ke+xe+Ce+Ae+"]",Te="\\ud83c[\\udffb-\\udfff]",je="[^"+ve+"]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Le="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+Ae+"]",De="\\u200d",Be="(?:"+Me+"|"+Ne+")",Ue="(?:"+$e+"|"+Ne+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Oe+"|"+Te+")?",Fe="["+Ee+"]?",qe=Fe+He+"(?:"+De+"(?:"+[je,Re,Le].join("|")+")"+Fe+He+")*",Ve="(?:"+[Se,Re,Le].join("|")+")"+qe,Ge="(?:"+[je+Oe+"?",Oe,Re,Le,Ie].join("|")+")",Ke=RegExp("['’]","g"),Ze=RegExp(Oe,"g"),Qe=RegExp(Te+"(?="+Te+")|"+Ge+qe,"g"),Ye=RegExp([$e+"?"+Me+"+"+We+"(?="+[Pe,$e,"$"].join("|")+")",Ue+"+"+ze+"(?="+[Pe,$e+Be,"$"].join("|")+")",$e+"?"+Be+"+"+We,$e+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ke,Ve].join("|"),"g"),Je=RegExp("["+De+ve+ye+Ee+"]"),Xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tt=-1,rt={};rt[M]=rt[N]=rt[T]=rt[j]=rt[R]=rt[L]=rt[$]=rt[D]=rt[B]=!0,rt[p]=rt[f]=rt[k]=rt[m]=rt[S]=rt[g]=rt[w]=rt[b]=rt[y]=rt[x]=rt[C]=rt[E]=rt[_]=rt[I]=rt[O]=!1;var nt={};nt[p]=nt[f]=nt[k]=nt[S]=nt[m]=nt[g]=nt[M]=nt[N]=nt[T]=nt[j]=nt[R]=nt[y]=nt[x]=nt[C]=nt[E]=nt[_]=nt[I]=nt[P]=nt[L]=nt[$]=nt[D]=nt[B]=!0,nt[w]=nt[b]=nt[O]=!1;var it={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,st=parseInt,at="object"==typeof zn&&zn&&zn.Object===Object&&zn,ct="object"==typeof self&&self&&self.Object===Object&&self,lt=at||ct||Function("return this")(),ut=t&&!t.nodeType&&t,ht=ut&&e&&!e.nodeType&&e,dt=ht&&ht.exports===ut,pt=dt&&at.process,ft=function(){try{return ht&&ht.require&&ht.require("util").types||pt&&pt.binding&&pt.binding("util")}catch{}}(),mt=ft&&ft.isArrayBuffer,gt=ft&&ft.isDate,wt=ft&&ft.isMap,bt=ft&&ft.isRegExp,vt=ft&&ft.isSet,yt=ft&&ft.isTypedArray;function xt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ct(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function At(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Et(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function _t(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function It(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Pt(e,t){return!(null==e||!e.length)&&$t(e,t,0)>-1}function Ot(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function kt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function St(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Mt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Nt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var jt=Wt("length");function Rt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Lt(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function $t(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Lt(e,Bt,r)}function Dt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Ft(e,t)/r:u}function Wt(e){return function(t){return null==t?r:t[e]}}function zt(e){return function(t){return null==e?r:e[t]}}function Ht(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Ft(e,t){for(var n,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==r&&(n=n===r?s:n+s)}return n}function qt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Vt(e){return e&&e.slice(0,cr(e)+1).replace(te,"")}function Gt(e){return function(t){return e(t)}}function Kt(e,t){return kt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function Qt(e,t){for(var r=-1,n=e.length;++r<n&&$t(t,e[r],0)>-1;);return r}function Yt(e,t){for(var r=e.length;r--&&$t(t,e[r],0)>-1;);return r}var Jt=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Xt=zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function er(e){return"\\"+it[e]}function tr(e){return Je.test(e)}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function nr(e,t){return function(r){return e(t(r))}}function ir(e,t){for(var r=-1,n=e.length,i=0,s=[];++r<n;){var a=e[r];(a===t||a===o)&&(e[r]=o,s[i++]=r)}return s}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function sr(e){return tr(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):jt(e)}function ar(e){return tr(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function cr(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var lr=zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ur=function e(t){var re=(t=null==t?lt:ur.defaults(lt.Object(),t,ur.pick(lt,et))).Array,ve=t.Date,ye=t.Error,xe=t.Function,Ce=t.Math,Ae=t.Object,Ee=t.RegExp,_e=t.String,Ie=t.TypeError,Pe=re.prototype,Oe=xe.prototype,ke=Ae.prototype,Se=t["__core-js_shared__"],Me=Oe.toString,Ne=ke.hasOwnProperty,Te=0,je=function(){var e=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Re=ke.toString,Le=Me.call(Ae),$e=lt._,De=Ee("^"+Me.call(Ne).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=dt?t.Buffer:r,Ue=t.Symbol,We=t.Uint8Array,ze=Be?Be.allocUnsafe:r,He=nr(Ae.getPrototypeOf,Ae),Fe=Ae.create,qe=ke.propertyIsEnumerable,Ve=Pe.splice,Ge=Ue?Ue.isConcatSpreadable:r,Qe=Ue?Ue.iterator:r,Je=Ue?Ue.toStringTag:r,it=function(){try{var e=so(Ae,"defineProperty");return e({},"",{}),e}catch{}}(),at=t.clearTimeout!==lt.clearTimeout&&t.clearTimeout,ct=ve&&ve.now!==lt.Date.now&&ve.now,ut=t.setTimeout!==lt.setTimeout&&t.setTimeout,ht=Ce.ceil,pt=Ce.floor,ft=Ae.getOwnPropertySymbols,jt=Be?Be.isBuffer:r,zt=t.isFinite,hr=Pe.join,dr=nr(Ae.keys,Ae),pr=Ce.max,fr=Ce.min,mr=ve.now,gr=t.parseInt,wr=Ce.random,br=Pe.reverse,vr=so(t,"DataView"),yr=so(t,"Map"),xr=so(t,"Promise"),Cr=so(t,"Set"),Ar=so(t,"WeakMap"),Er=so(Ae,"create"),_r=Ar&&new Ar,Ir={},Pr=Ro(vr),Or=Ro(yr),kr=Ro(xr),Sr=Ro(Cr),Mr=Ro(Ar),Nr=Ue?Ue.prototype:r,Tr=Nr?Nr.valueOf:r,jr=Nr?Nr.toString:r;function Rr(e){if(Js(e)&&!Ws(e)&&!(e instanceof Br)){if(e instanceof Dr)return e;if(Ne.call(e,"__wrapped__"))return Lo(e)}return new Dr(e)}var Lr=function(){function e(){}return function(t){if(!Ys(t))return{};if(Fe)return Fe(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function $r(){}function Dr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Br(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function Fr(e){var t=this.__data__=new Wr(e);this.size=t.size}function qr(e,t){var r=Ws(e),n=!r&&Us(e),i=!r&&!n&&qs(e),o=!r&&!n&&!i&&sa(e),s=r||n||i||o,a=s?qt(e.length,_e):[],c=a.length;for(var l in e)(t||Ne.call(e,l))&&(!s||!("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||fo(l,c)))&&a.push(l);return a}function Vr(e){var t=e.length;return t?e[Hn(0,t-1)]:r}function Gr(e,t){return So(Ei(e),rn(t,0,e.length))}function Kr(e){return So(Ei(e))}function Zr(e,t,n){(n!==r&&!$s(e[t],n)||n===r&&!(t in e))&&en(e,t,n)}function Qr(e,t,n){var i=e[t];(!Ne.call(e,t)||!$s(i,n)||n===r&&!(t in e))&&en(e,t,n)}function Yr(e,t){for(var r=e.length;r--;)if($s(e[r][0],t))return r;return-1}function Jr(e,t,r,n){return cn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function Xr(e,t){return e&&_i(t,Oa(t),e)}function en(e,t,r){"__proto__"==t&&it?it(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function tn(e,t){for(var n=-1,i=t.length,o=re(i),s=null==e;++n<i;)o[n]=s?r:Aa(e,t[n]);return o}function rn(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function nn(e,t,n,i,o,s){var a,c=1&t,l=2&t,u=4&t;if(n&&(a=o?n(e,i,o,s):n(e)),a!==r)return a;if(!Ys(e))return e;var h=Ws(e);if(h){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return Ei(e,a)}else{var d=lo(e),f=d==b||d==v;if(qs(e))return bi(e,c);if(d==C||d==p||f&&!o){if(a=l||f?{}:ho(e),!c)return l?function(e,t){return _i(e,co(e),t)}(e,function(e,t){return e&&_i(t,ka(t),e)}(a,e)):function(e,t){return _i(e,ao(e),t)}(e,Xr(a,e))}else{if(!nt[d])return o?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case k:return vi(e);case m:case g:return new n(+e);case S:return function(e,t){var r=t?vi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case N:case T:case j:case R:case L:case $:case D:case B:return yi(e,r);case y:return new n;case x:case I:return new n(e);case E:return function(e){var t=new e.constructor(e.source,ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new n;case P:return function(e){return Tr?Ae(Tr.call(e)):{}}(e)}}(e,d,c)}}s||(s=new Fr);var w=s.get(e);if(w)return w;s.set(e,a),na(e)?e.forEach((function(r){a.add(nn(r,t,n,r,e,s))})):Xs(e)&&e.forEach((function(r,i){a.set(i,nn(r,t,n,i,e,s))}));var A=h?r:(u?l?Xi:Ji:l?ka:Oa)(e);return At(A||e,(function(r,i){A&&(r=e[i=r]),Qr(a,i,nn(r,t,n,i,e,s))})),a}function on(e,t,n){var i=n.length;if(null==e)return!i;for(e=Ae(e);i--;){var o=n[i],s=t[o],a=e[o];if(a===r&&!(o in e)||!s(a))return!1}return!0}function sn(e,t,i){if("function"!=typeof e)throw new Ie(n);return Io((function(){e.apply(r,i)}),t)}function an(e,t,r,n){var i=-1,o=Pt,s=!0,a=e.length,c=[],l=t.length;if(!a)return c;r&&(t=kt(t,Gt(r))),n?(o=Ot,s=!1):t.length>=200&&(o=Zt,s=!1,t=new Hr(t));e:for(;++i<a;){var u=e[i],h=null==r?u:r(u);if(u=n||0!==u?u:0,s&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;c.push(u)}else o(t,h,n)||c.push(u)}return c}Rr.templateSettings={escape:G,evaluate:K,interpolate:Z,variable:"",imports:{_:Rr}},Rr.prototype=$r.prototype,Rr.prototype.constructor=Rr,Dr.prototype=Lr($r.prototype),Dr.prototype.constructor=Dr,Br.prototype=Lr($r.prototype),Br.prototype.constructor=Br,Ur.prototype.clear=function(){this.__data__=Er?Er(null):{},this.size=0},Ur.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ur.prototype.get=function(e){var t=this.__data__;if(Er){var n=t[e];return n===i?r:n}return Ne.call(t,e)?t[e]:r},Ur.prototype.has=function(e){var t=this.__data__;return Er?t[e]!==r:Ne.call(t,e)},Ur.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Er&&t===r?i:t,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=Yr(t,e);return!(r<0||(r==t.length-1?t.pop():Ve.call(t,r,1),--this.size,0))},Wr.prototype.get=function(e){var t=this.__data__,n=Yr(t,e);return n<0?r:t[n][1]},Wr.prototype.has=function(e){return Yr(this.__data__,e)>-1},Wr.prototype.set=function(e,t){var r=this.__data__,n=Yr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Ur,map:new(yr||Wr),string:new Ur}},zr.prototype.delete=function(e){var t=io(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return io(this,e).get(e)},zr.prototype.has=function(e){return io(this,e).has(e)},zr.prototype.set=function(e,t){var r=io(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Hr.prototype.add=Hr.prototype.push=function(e){return this.__data__.set(e,i),this},Hr.prototype.has=function(e){return this.__data__.has(e)},Fr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Fr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Fr.prototype.get=function(e){return this.__data__.get(e)},Fr.prototype.has=function(e){return this.__data__.has(e)},Fr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!yr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var cn=Oi(gn),ln=Oi(wn,!0);function un(e,t){var r=!0;return cn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,n){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(c===r?a==a&&!oa(a):n(a,c)))var c=a,l=s}return l}function dn(e,t){var r=[];return cn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function pn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=po),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?pn(a,t-1,r,n,i):St(i,a):n||(i[i.length]=a)}return i}var fn=ki(),mn=ki(!0);function gn(e,t){return e&&fn(e,t,Oa)}function wn(e,t){return e&&mn(e,t,Oa)}function bn(e,t){return It(t,(function(t){return Ks(e[t])}))}function vn(e,t){for(var n=0,i=(t=fi(t,e)).length;null!=e&&n<i;)e=e[jo(t[n++])];return n&&n==i?e:r}function yn(e,t,r){var n=t(e);return Ws(e)?n:St(n,r(e))}function xn(e){return null==e?e===r?"[object Undefined]":"[object Null]":Je&&Je in Ae(e)?function(e){var t=Ne.call(e,Je),n=e[Je];try{e[Je]=r;var i=!0}catch{}var o=Re.call(e);return i&&(t?e[Je]=n:delete e[Je]),o}(e):function(e){return Re.call(e)}(e)}function Cn(e,t){return e>t}function An(e,t){return null!=e&&Ne.call(e,t)}function En(e,t){return null!=e&&t in Ae(e)}function _n(e,t,n){for(var i=n?Ot:Pt,o=e[0].length,s=e.length,a=s,c=re(s),l=1/0,u=[];a--;){var h=e[a];a&&t&&(h=kt(h,Gt(t))),l=fr(h.length,l),c[a]=!n&&(t||o>=120&&h.length>=120)?new Hr(a&&h):r}h=e[0];var d=-1,p=c[0];e:for(;++d<o&&u.length<l;){var f=h[d],m=t?t(f):f;if(f=n||0!==f?f:0,!(p?Zt(p,m):i(u,m,n))){for(a=s;--a;){var g=c[a];if(!(g?Zt(g,m):i(e[a],m,n)))continue e}p&&p.push(m),u.push(f)}}return u}function In(e,t,n){var i=null==(e=Ao(e,t=fi(t,e)))?e:e[jo(Go(t))];return null==i?r:xt(i,e,n)}function Pn(e){return Js(e)&&xn(e)==p}function On(e,t,n,i,o){return e===t||(null==e||null==t||!Js(e)&&!Js(t)?e!=e&&t!=t:function(e,t,n,i,o,s){var a=Ws(e),c=Ws(t),l=a?f:lo(e),u=c?f:lo(t),h=(l=l==p?C:l)==C,d=(u=u==p?C:u)==C,b=l==u;if(b&&qs(e)){if(!qs(t))return!1;a=!0,h=!1}if(b&&!h)return s||(s=new Fr),a||sa(e)?Qi(e,t,n,i,o,s):function(e,t,r,n,i,o,s){switch(r){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case m:case g:case x:return $s(+e,+t);case w:return e.name==t.name&&e.message==t.message;case E:case I:return e==t+"";case y:var a=rr;case _:var c=1&n;if(a||(a=or),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var u=Qi(a(e),a(t),n,i,o,s);return s.delete(e),u;case P:if(Tr)return Tr.call(e)==Tr.call(t)}return!1}(e,t,l,n,i,o,s);if(!(1&n)){var v=h&&Ne.call(e,"__wrapped__"),A=d&&Ne.call(t,"__wrapped__");if(v||A){var O=v?e.value():e,M=A?t.value():t;return s||(s=new Fr),o(O,M,n,i,s)}}return!!b&&(s||(s=new Fr),function(e,t,n,i,o,s){var a=1&n,c=Ji(e),l=c.length;if(l!=Ji(t).length&&!a)return!1;for(var u=l;u--;){var h=c[u];if(!(a?h in t:Ne.call(t,h)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var f=!0;s.set(e,t),s.set(t,e);for(var m=a;++u<l;){var g=e[h=c[u]],w=t[h];if(i)var b=a?i(w,g,h,t,e,s):i(g,w,h,e,t,s);if(!(b===r?g===w||o(g,w,n,i,s):b)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(f=!1)}return s.delete(e),s.delete(t),f}(e,t,n,i,o,s))}(e,t,n,i,On,o))}function kn(e,t,n,i){var o=n.length,s=o,a=!i;if(null==e)return!s;for(e=Ae(e);o--;){var c=n[o];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<s;){var l=(c=n[o])[0],u=e[l],h=c[1];if(a&&c[2]){if(u===r&&!(l in e))return!1}else{var d=new Fr;if(i)var p=i(u,h,l,e,t,d);if(!(p===r?On(h,u,3,i,d):p))return!1}}return!0}function Sn(e){return!(!Ys(e)||function(e){return!!je&&je in e}(e))&&(Ks(e)?De:pe).test(Ro(e))}function Mn(e){return"function"==typeof e?e:null==e?ec:"object"==typeof e?Ws(e)?Ln(e[0],e[1]):Rn(e):lc(e)}function Nn(e){if(!vo(e))return dr(e);var t=[];for(var r in Ae(e))Ne.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Tn(e,t){return e<t}function jn(e,t){var r=-1,n=Hs(e)?re(e.length):[];return cn(e,(function(e,i,o){n[++r]=t(e,i,o)})),n}function Rn(e){var t=oo(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(r){return r===e||kn(r,e,t)}}function Ln(e,t){return go(e)&&yo(t)?xo(jo(e),t):function(n){var i=Aa(n,e);return i===r&&i===t?Ea(n,e):On(t,i,3)}}function $n(e,t,n,i,o){e!==t&&fn(t,(function(s,a){if(o||(o=new Fr),Ys(s))!function(e,t,n,i,o,s,a){var c=Eo(e,n),l=Eo(t,n),u=a.get(l);if(u)Zr(e,n,u);else{var h=s?s(c,l,n+"",e,t,a):r,d=h===r;if(d){var p=Ws(l),f=!p&&qs(l),m=!p&&!f&&sa(l);h=l,p||f||m?Ws(c)?h=c:Fs(c)?h=Ei(c):f?(d=!1,h=bi(l,!0)):m?(d=!1,h=yi(l,!0)):h=[]:ta(l)||Us(l)?(h=c,Us(c)?h=fa(c):(!Ys(c)||Ks(c))&&(h=ho(l))):d=!1}d&&(a.set(l,h),o(h,l,i,s,a),a.delete(l)),Zr(e,n,h)}}(e,t,a,n,$n,i,o);else{var c=i?i(Eo(e,a),s,a+"",e,t,o):r;c===r&&(c=s),Zr(e,a,c)}}),ka)}function Dn(e,t){var n=e.length;if(n)return fo(t+=t<0?n:0,n)?e[t]:r}function Bn(e,t,r){t=t.length?kt(t,(function(e){return Ws(e)?function(t){return vn(t,1===e.length?e[0]:e)}:e})):[ec];var n=-1;return t=kt(t,Gt(no())),function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var c=xi(i[n],o[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(jn(e,(function(e,r,i){return{criteria:kt(t,(function(t){return t(e)})),index:++n,value:e}})))}function Un(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=vn(e,s);r(a,s)&&Kn(o,fi(s,e),a)}return o}function Wn(e,t,r,n){var i=n?Dt:$t,o=-1,s=t.length,a=e;for(e===t&&(t=Ei(t)),r&&(a=kt(e,Gt(r)));++o<s;)for(var c=0,l=t[o],u=r?r(l):l;(c=i(a,u,c,n))>-1;)a!==e&&Ve.call(a,c,1),Ve.call(e,c,1);return e}function zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;fo(i)?Ve.call(e,i,1):si(e,i)}}return e}function Hn(e,t){return e+pt(wr()*(t-e+1))}function Fn(e,t){var r="";if(!e||t<1||t>l)return r;do{t%2&&(r+=e),(t=pt(t/2))&&(e+=e)}while(t);return r}function qn(e,t){return Po(Co(e,t,ec),e+"")}function Vn(e){return Vr($a(e))}function Gn(e,t){var r=$a(e);return So(r,rn(t,0,r.length))}function Kn(e,t,n,i){if(!Ys(e))return e;for(var o=-1,s=(t=fi(t,e)).length,a=s-1,c=e;null!=c&&++o<s;){var l=jo(t[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var h=c[l];(u=i?i(h,l,c):r)===r&&(u=Ys(h)?h:fo(t[o+1])?[]:{})}Qr(c,l,u),c=c[l]}return e}var Zn=_r?function(e,t){return _r.set(e,t),e}:ec,Qn=it?function(e,t){return it(e,"toString",{configurable:!0,enumerable:!1,value:Ya(t),writable:!0})}:ec;function Yn(e){return So($a(e))}function Jn(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=re(i);++n<i;)o[n]=e[n+t];return o}function Xn(e,t){var r;return cn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ei(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!oa(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ti(e,t,ec,r)}function ti(e,t,n,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,c=null===t,l=oa(t),u=t===r;o<s;){var h=pt((o+s)/2),d=n(e[h]),p=d!==r,f=null===d,m=d==d,g=oa(d);if(a)var w=i||m;else w=u?m&&(i||p):c?m&&p&&(i||!f):l?m&&p&&!f&&(i||!g):!f&&!g&&(i?d<=t:d<t);w?o=h+1:s=h}return fr(s,4294967294)}function ri(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!$s(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function ni(e){return"number"==typeof e?e:oa(e)?u:+e}function ii(e){if("string"==typeof e)return e;if(Ws(e))return kt(e,ii)+"";if(oa(e))return jr?jr.call(e):"";var t=e+"";return"0"==t&&1/e==-c?"-0":t}function oi(e,t,r){var n=-1,i=Pt,o=e.length,s=!0,a=[],c=a;if(r)s=!1,i=Ot;else if(o>=200){var l=t?null:Fi(e);if(l)return or(l);s=!1,i=Zt,c=new Hr}else c=t?[]:a;e:for(;++n<o;){var u=e[n],h=t?t(u):u;if(u=r||0!==u?u:0,s&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),a.push(u)}else i(c,h,r)||(c!==a&&c.push(h),a.push(u))}return a}function si(e,t){return null==(e=Ao(e,t=fi(t,e)))||delete e[jo(Go(t))]}function ai(e,t,r,n){return Kn(e,t,r(vn(e,t)),n)}function ci(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?Jn(e,n?0:o,n?o+1:i):Jn(e,n?o+1:0,n?i:o)}function li(e,t){var r=e;return r instanceof Br&&(r=r.value()),Mt(t,(function(e,t){return t.func.apply(t.thisArg,St([e],t.args))}),r)}function ui(e,t,r){var n=e.length;if(n<2)return n?oi(e[0]):[];for(var i=-1,o=re(n);++i<n;)for(var s=e[i],a=-1;++a<n;)a!=i&&(o[i]=an(o[i]||s,e[a],t,r));return oi(pn(o,1),t,r)}function hi(e,t,n){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var c=i<s?t[i]:r;n(a,e[i],c)}return a}function di(e){return Fs(e)?e:[]}function pi(e){return"function"==typeof e?e:ec}function fi(e,t){return Ws(e)?e:go(e,t)?[e]:To(ma(e))}var mi=qn;function gi(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:Jn(e,t,n)}var wi=at||function(e){return lt.clearTimeout(e)};function bi(e,t){if(t)return e.slice();var r=e.length,n=ze?ze(r):new e.constructor(r);return e.copy(n),n}function vi(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function yi(e,t){var r=t?vi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,s=oa(e),a=t!==r,c=null===t,l=t==t,u=oa(t);if(!c&&!u&&!s&&e>t||s&&a&&l&&!c&&!u||i&&a&&l||!n&&l||!o)return 1;if(!i&&!s&&!u&&e<t||u&&n&&o&&!i&&!s||c&&n&&o||!a&&o||!l)return-1}return 0}function Ci(e,t,r,n){for(var i=-1,o=e.length,s=r.length,a=-1,c=t.length,l=pr(o-s,0),u=re(c+l),h=!n;++a<c;)u[a]=t[a];for(;++i<s;)(h||i<o)&&(u[r[i]]=e[i]);for(;l--;)u[a++]=e[i++];return u}function Ai(e,t,r,n){for(var i=-1,o=e.length,s=-1,a=r.length,c=-1,l=t.length,u=pr(o-a,0),h=re(u+l),d=!n;++i<u;)h[i]=e[i];for(var p=i;++c<l;)h[p+c]=t[c];for(;++s<a;)(d||i<o)&&(h[p+r[s]]=e[i++]);return h}function Ei(e,t){var r=-1,n=e.length;for(t||(t=re(n));++r<n;)t[r]=e[r];return t}function _i(e,t,n,i){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var c=t[s],l=i?i(n[c],e[c],c,n,e):r;l===r&&(l=e[c]),o?en(n,c,l):Qr(n,c,l)}return n}function Ii(e,t){return function(r,n){var i=Ws(r)?Ct:Jr,o=t?t():{};return i(r,e,no(n,2),o)}}function Pi(e){return qn((function(t,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;for(s=e.length>3&&"function"==typeof s?(o--,s):r,a&&mo(n[0],n[1],a)&&(s=o<3?r:s,o=1),t=Ae(t);++i<o;){var c=n[i];c&&e(t,c,i,s)}return t}))}function Oi(e,t){return function(r,n){if(null==r)return r;if(!Hs(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ae(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function ki(e){return function(t,r,n){for(var i=-1,o=Ae(t),s=n(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===r(o[c],c,o))break}return t}}function Si(e){return function(t){var n=tr(t=ma(t))?ar(t):r,i=n?n[0]:t.charAt(0),o=n?gi(n,1).join(""):t.slice(1);return i[e]()+o}}function Mi(e){return function(t){return Mt(Ka(Ua(t).replace(Ke,"")),e,"")}}function Ni(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Lr(e.prototype),n=e.apply(r,t);return Ys(n)?n:r}}function Ti(e){return function(t,n,i){var o=Ae(t);if(!Hs(t)){var s=no(n,3);t=Oa(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[s?t[a]:a]:r}}function ji(e){return Yi((function(t){var i=t.length,o=i,s=Dr.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new Ie(n);if(s&&!c&&"wrapper"==to(a))var c=new Dr([],!0)}for(o=c?o:i;++o<i;){var l=to(a=t[o]),u="wrapper"==l?eo(a):r;c=u&&wo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[to(u[0])].apply(c,u[3]):1==a.length&&wo(a)?c[l]():c.thru(a)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Ws(r))return c.plant(r).value();for(var n=0,o=i?t[n].apply(this,e):r;++n<i;)o=t[n].call(this,o);return o}}))}function Ri(e,t,n,i,o,s,c,l,u,h){var d=t&a,p=1&t,f=2&t,m=24&t,g=512&t,w=f?r:Ni(e);return function a(){for(var b=arguments.length,v=re(b),y=b;y--;)v[y]=arguments[y];if(m)var x=ro(a),C=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(v,x);if(i&&(v=Ci(v,i,o,m)),s&&(v=Ai(v,s,c,m)),b-=C,m&&b<h){var A=ir(v,x);return zi(e,t,Ri,a.placeholder,n,v,A,l,u,h-b)}var E=p?n:this,_=f?E[e]:e;return b=v.length,l?v=function(e,t){for(var n=e.length,i=fr(t.length,n),o=Ei(e);i--;){var s=t[i];e[i]=fo(s,n)?o[s]:r}return e}(v,l):g&&b>1&&v.reverse(),d&&u<b&&(v.length=u),this&&this!==lt&&this instanceof a&&(_=w||Ni(_)),_.apply(E,v)}}function Li(e,t){return function(r,n){return function(e,t,r,n){return gn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function $i(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=ii(n),i=ii(i)):(n=ni(n),i=ni(i)),o=e(n,i)}return o}}function Di(e){return Yi((function(t){return t=kt(t,Gt(no())),qn((function(r){var n=this;return e(t,(function(e){return xt(e,n,r)}))}))}))}function Bi(e,t){var n=(t=t===r?" ":ii(t)).length;if(n<2)return n?Fn(t,e):t;var i=Fn(t,ht(e/sr(t)));return tr(t)?gi(ar(i),0,e).join(""):i.slice(0,e)}function Ui(e){return function(t,n,i){return i&&"number"!=typeof i&&mo(t,n,i)&&(n=i=r),t=ua(t),n===r?(n=t,t=0):n=ua(n),function(e,t,r,n){for(var i=-1,o=pr(ht((t-e)/(r||1)),0),s=re(o);o--;)s[n?o:++i]=e,e+=r;return s}(t,n,i=i===r?t<n?1:-1:ua(i),e)}}function Wi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=pa(t),r=pa(r)),e(t,r)}}function zi(e,t,n,i,o,a,c,l,u,h){var d=8&t;t|=d?s:64,4&(t&=~(d?64:s))||(t&=-4);var p=[e,t,o,d?a:r,d?c:r,d?r:a,d?r:c,l,u,h],f=n.apply(r,p);return wo(e)&&_o(f,p),f.placeholder=i,Oo(f,e,t)}function Hi(e){var t=Ce[e];return function(e,r){if(e=pa(e),(r=null==r?0:fr(ha(r),292))&&zt(e)){var n=(ma(e)+"e").split("e");return+((n=(ma(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Fi=Cr&&1/or(new Cr([,-0]))[1]==c?function(e){return new Cr(e)}:oc;function qi(e){return function(t){var r=lo(t);return r==y?rr(t):r==_?function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}(t):function(e,t){return kt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Vi(e,t,i,c,l,u,h,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Ie(n);var f=c?c.length:0;if(f||(t&=-97,c=l=r),h=h===r?h:pr(ha(h),0),d=d===r?d:ha(d),f-=l?l.length:0,64&t){var m=c,g=l;c=l=r}var w=p?r:eo(e),b=[e,t,i,c,l,m,g,u,h,d];if(w&&function(e,t){var r=e[1],n=t[1],i=r|n,s=i<131,c=n==a&&8==r||n==a&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!s&&!c)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?Ci(u,l,t[4]):l,e[4]=u?ir(e[3],o):t[4]}(l=t[5])&&(u=e[5],e[5]=u?Ai(u,l,t[6]):l,e[6]=u?ir(e[5],o):t[6]),(l=t[7])&&(e[7]=l),n&a&&(e[8]=null==e[8]?t[8]:fr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,w),e=b[0],t=b[1],i=b[2],c=b[3],l=b[4],!(d=b[9]=b[9]===r?p?0:e.length:pr(b[9]-f,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,n){var i=Ni(e);return function o(){for(var s=arguments.length,a=re(s),c=s,l=ro(o);c--;)a[c]=arguments[c];var u=s<3&&a[0]!==l&&a[s-1]!==l?[]:ir(a,l);return(s-=u.length)<n?zi(e,t,Ri,o.placeholder,r,a,u,r,r,n-s):xt(this&&this!==lt&&this instanceof o?i:e,this,a)}}(e,t,d):t!=s&&33!=t||l.length?Ri.apply(r,b):function(e,t,r,n){var i=1&t,o=Ni(e);return function t(){for(var s=-1,a=arguments.length,c=-1,l=n.length,u=re(l+a),h=this&&this!==lt&&this instanceof t?o:e;++c<l;)u[c]=n[c];for(;a--;)u[c++]=arguments[++s];return xt(h,i?r:this,u)}}(e,t,i,c);else var v=function(e,t,r){var n=1&t,i=Ni(e);return function t(){return(this&&this!==lt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,i);return Oo((w?Zn:_o)(v,b),e,t)}function Gi(e,t,n,i){return e===r||$s(e,ke[n])&&!Ne.call(i,n)?t:e}function Ki(e,t,n,i,o,s){return Ys(e)&&Ys(t)&&(s.set(t,e),$n(e,t,r,Ki,s),s.delete(t)),e}function Zi(e){return ta(e)?r:e}function Qi(e,t,n,i,o,s){var a=1&n,c=e.length,l=t.length;if(c!=l&&!(a&&l>c))return!1;var u=s.get(e),h=s.get(t);if(u&&h)return u==t&&h==e;var d=-1,p=!0,f=2&n?new Hr:r;for(s.set(e,t),s.set(t,e);++d<c;){var m=e[d],g=t[d];if(i)var w=a?i(g,m,d,t,e,s):i(m,g,d,e,t,s);if(w!==r){if(w)continue;p=!1;break}if(f){if(!Tt(t,(function(e,t){if(!Zt(f,t)&&(m===e||o(m,e,n,i,s)))return f.push(t)}))){p=!1;break}}else if(m!==g&&!o(m,g,n,i,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Yi(e){return Po(Co(e,r,zo),e+"")}function Ji(e){return yn(e,Oa,ao)}function Xi(e){return yn(e,ka,co)}var eo=_r?function(e){return _r.get(e)}:oc;function to(e){for(var t=e.name+"",r=Ir[t],n=Ne.call(Ir,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function ro(e){return(Ne.call(Rr,"placeholder")?Rr:e).placeholder}function no(){var e=Rr.iteratee||tc;return e=e===tc?Mn:e,arguments.length?e(arguments[0],arguments[1]):e}function io(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function oo(e){for(var t=Oa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,yo(i)]}return t}function so(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Sn(n)?n:r}var ao=ft?function(e){return null==e?[]:(e=Ae(e),It(ft(e),(function(t){return qe.call(e,t)})))}:dc,co=ft?function(e){for(var t=[];e;)St(t,ao(e)),e=He(e);return t}:dc,lo=xn;function uo(e,t,r){for(var n=-1,i=(t=fi(t,e)).length,o=!1;++n<i;){var s=jo(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Qs(i)&&fo(s,i)&&(Ws(e)||Us(e))}function ho(e){return"function"!=typeof e.constructor||vo(e)?{}:Lr(He(e))}function po(e){return Ws(e)||Us(e)||!!(Ge&&e&&e[Ge])}function fo(e,t){var r=typeof e;return!!(t=t??l)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,r){if(!Ys(r))return!1;var n=typeof t;return!!("number"==n?Hs(r)&&fo(t,r.length):"string"==n&&t in r)&&$s(r[t],e)}function go(e,t){if(Ws(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!oa(e))||Y.test(e)||!Q.test(e)||null!=t&&e in Ae(t)}function wo(e){var t=to(e),r=Rr[t];if("function"!=typeof r||!(t in Br.prototype))return!1;if(e===r)return!0;var n=eo(r);return!!n&&e===n[0]}(vr&&lo(new vr(new ArrayBuffer(1)))!=S||yr&&lo(new yr)!=y||xr&&lo(xr.resolve())!=A||Cr&&lo(new Cr)!=_||Ar&&lo(new Ar)!=O)&&(lo=function(e){var t=xn(e),n=t==C?e.constructor:r,i=n?Ro(n):"";if(i)switch(i){case Pr:return S;case Or:return y;case kr:return A;case Sr:return _;case Mr:return O}return t});var bo=Se?Ks:pc;function vo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ke)}function yo(e){return e==e&&!Ys(e)}function xo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in Ae(n))}}function Co(e,t,n){return t=pr(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=pr(r.length-t,0),s=re(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=re(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),xt(e,this,a)}}function Ao(e,t){return t.length<2?e:vn(e,Jn(t,0,-1))}function Eo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _o=ko(Zn),Io=ut||function(e,t){return lt.setTimeout(e,t)},Po=ko(Qn);function Oo(e,t,r){var n=t+"";return Po(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ne,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return At(d,(function(r){var n="_."+r[0];t&r[1]&&!Pt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ie);return t?t[1].split(oe):[]}(n),r)))}function ko(e){var t=0,n=0;return function(){var i=mr(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function So(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var s=Hn(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Mo,No,To=(Mo=Ms((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(J,(function(e,r,n,i){t.push(n?i.replace(ce,"$1"):r||e)})),t}),(function(e){return 500===No.size&&No.clear(),e})),No=Mo.cache,Mo);function jo(e){if("string"==typeof e||oa(e))return e;var t=e+"";return"0"==t&&1/e==-c?"-0":t}function Ro(e){if(null!=e){try{return Me.call(e)}catch{}try{return e+""}catch{}}return""}function Lo(e){if(e instanceof Br)return e.clone();var t=new Dr(e.__wrapped__,e.__chain__);return t.__actions__=Ei(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $o=qn((function(e,t){return Fs(e)?an(e,pn(t,1,Fs,!0)):[]})),Do=qn((function(e,t){var n=Go(t);return Fs(n)&&(n=r),Fs(e)?an(e,pn(t,1,Fs,!0),no(n,2)):[]})),Bo=qn((function(e,t){var n=Go(t);return Fs(n)&&(n=r),Fs(e)?an(e,pn(t,1,Fs,!0),r,n):[]}));function Uo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=pr(n+i,0)),Lt(e,no(t,3),i)}function Wo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=ha(n),o=n<0?pr(i+o,0):fr(o,i-1)),Lt(e,no(t,3),o,!0)}function zo(e){return null!=e&&e.length?pn(e,1):[]}function Ho(e){return e&&e.length?e[0]:r}var Fo=qn((function(e){var t=kt(e,di);return t.length&&t[0]===e[0]?_n(t):[]})),qo=qn((function(e){var t=Go(e),n=kt(e,di);return t===Go(n)?t=r:n.pop(),n.length&&n[0]===e[0]?_n(n,no(t,2)):[]})),Vo=qn((function(e){var t=Go(e),n=kt(e,di);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?_n(n,r,t):[]}));function Go(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Ko=qn(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Wn(e,t):e}var Qo=Yi((function(e,t){var r=null==e?0:e.length,n=tn(e,t);return zn(e,kt(t,(function(e){return fo(e,r)?+e:e})).sort(xi)),n}));function Yo(e){return null==e?e:br.call(e)}var Jo=qn((function(e){return oi(pn(e,1,Fs,!0))})),Xo=qn((function(e){var t=Go(e);return Fs(t)&&(t=r),oi(pn(e,1,Fs,!0),no(t,2))})),es=qn((function(e){var t=Go(e);return t="function"==typeof t?t:r,oi(pn(e,1,Fs,!0),r,t)}));function ts(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(Fs(e))return t=pr(e.length,t),!0})),qt(t,(function(t){return kt(e,Wt(t))}))}function rs(e,t){if(!e||!e.length)return[];var n=ts(e);return null==t?n:kt(n,(function(e){return xt(t,r,e)}))}var ns=qn((function(e,t){return Fs(e)?an(e,t):[]})),is=qn((function(e){return ui(It(e,Fs))})),os=qn((function(e){var t=Go(e);return Fs(t)&&(t=r),ui(It(e,Fs),no(t,2))})),ss=qn((function(e){var t=Go(e);return t="function"==typeof t?t:r,ui(It(e,Fs),r,t)})),as=qn(ts),cs=qn((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,rs(e,n)}));function ls(e){var t=Rr(e);return t.__chain__=!0,t}function us(e,t){return t(e)}var hs=Yi((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return tn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Br&&fo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:us,args:[o],thisArg:r}),new Dr(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)})),ds=Ii((function(e,t,r){Ne.call(e,r)?++e[r]:en(e,r,1)})),ps=Ti(Uo),fs=Ti(Wo);function ms(e,t){return(Ws(e)?At:cn)(e,no(t,3))}function gs(e,t){return(Ws(e)?Et:ln)(e,no(t,3))}var ws=Ii((function(e,t,r){Ne.call(e,r)?e[r].push(t):en(e,r,[t])})),bs=qn((function(e,t,r){var n=-1,i="function"==typeof t,o=Hs(e)?re(e.length):[];return cn(e,(function(e){o[++n]=i?xt(t,e,r):In(e,t,r)})),o})),vs=Ii((function(e,t,r){en(e,r,t)}));function ys(e,t){return(Ws(e)?kt:jn)(e,no(t,3))}var xs=Ii((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Cs=qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Bn(e,pn(t,1),[])})),As=ct||function(){return lt.Date.now()};function Es(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Vi(e,a,r,r,r,r,t)}function _s(e,t){var i;if("function"!=typeof t)throw new Ie(n);return e=ha(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var Is=qn((function(e,t,r){var n=1;if(r.length){var i=ir(r,ro(Is));n|=s}return Vi(e,n,t,r,i)})),Ps=qn((function(e,t,r){var n=3;if(r.length){var i=ir(r,ro(Ps));n|=s}return Vi(t,n,e,r,i)}));function Os(e,t,i){var o,s,a,c,l,u,h=0,d=!1,p=!1,f=!0;if("function"!=typeof e)throw new Ie(n);function m(t){var n=o,i=s;return o=s=r,h=t,c=e.apply(i,n)}function g(e){var n=e-u;return u===r||n>=t||n<0||p&&e-h>=a}function w(){var e=As();if(g(e))return b(e);l=Io(w,function(e){var r=t-(e-u);return p?fr(r,a-(e-h)):r}(e))}function b(e){return l=r,f&&o?m(e):(o=s=r,c)}function v(){var e=As(),n=g(e);if(o=arguments,s=this,u=e,n){if(l===r)return function(e){return h=e,l=Io(w,t),d?m(e):c}(u);if(p)return wi(l),l=Io(w,t),m(u)}return l===r&&(l=Io(w,t)),c}return t=pa(t)||0,Ys(i)&&(d=!!i.leading,a=(p="maxWait"in i)?pr(pa(i.maxWait)||0,t):a,f="trailing"in i?!!i.trailing:f),v.cancel=function(){l!==r&&wi(l),h=0,o=u=s=l=r},v.flush=function(){return l===r?c:b(As())},v}var ks=qn((function(e,t){return sn(e,1,t)})),Ss=qn((function(e,t,r){return sn(e,pa(t)||0,r)}));function Ms(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ms.Cache||zr),r}function Ns(e){if("function"!=typeof e)throw new Ie(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ms.Cache=zr;var Ts=mi((function(e,t){var r=(t=1==t.length&&Ws(t[0])?kt(t[0],Gt(no())):kt(pn(t,1),Gt(no()))).length;return qn((function(n){for(var i=-1,o=fr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return xt(e,this,n)}))})),js=qn((function(e,t){var n=ir(t,ro(js));return Vi(e,s,r,t,n)})),Rs=qn((function(e,t){var n=ir(t,ro(Rs));return Vi(e,64,r,t,n)})),Ls=Yi((function(e,t){return Vi(e,256,r,r,r,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Ds=Wi(Cn),Bs=Wi((function(e,t){return e>=t})),Us=Pn(function(){return arguments}())?Pn:function(e){return Js(e)&&Ne.call(e,"callee")&&!qe.call(e,"callee")},Ws=re.isArray,zs=mt?Gt(mt):function(e){return Js(e)&&xn(e)==k};function Hs(e){return null!=e&&Qs(e.length)&&!Ks(e)}function Fs(e){return Js(e)&&Hs(e)}var qs=jt||pc,Vs=gt?Gt(gt):function(e){return Js(e)&&xn(e)==g};function Gs(e){if(!Js(e))return!1;var t=xn(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ta(e)}function Ks(e){if(!Ys(e))return!1;var t=xn(e);return t==b||t==v||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zs(e){return"number"==typeof e&&e==ha(e)}function Qs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function Ys(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}var Xs=wt?Gt(wt):function(e){return Js(e)&&lo(e)==y};function ea(e){return"number"==typeof e||Js(e)&&xn(e)==x}function ta(e){if(!Js(e)||xn(e)!=C)return!1;var t=He(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Me.call(r)==Le}var ra=bt?Gt(bt):function(e){return Js(e)&&xn(e)==E},na=vt?Gt(vt):function(e){return Js(e)&&lo(e)==_};function ia(e){return"string"==typeof e||!Ws(e)&&Js(e)&&xn(e)==I}function oa(e){return"symbol"==typeof e||Js(e)&&xn(e)==P}var sa=yt?Gt(yt):function(e){return Js(e)&&Qs(e.length)&&!!rt[xn(e)]},aa=Wi(Tn),ca=Wi((function(e,t){return e<=t}));function la(e){if(!e)return[];if(Hs(e))return ia(e)?ar(e):Ei(e);if(Qe&&e[Qe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Qe]());var t=lo(e);return(t==y?rr:t==_?or:$a)(e)}function ua(e){return e?(e=pa(e))===c||e===-c?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ha(e){var t=ua(e),r=t%1;return t==t?r?t-r:t:0}function da(e){return e?rn(ha(e),0,h):0}function pa(e){if("number"==typeof e)return e;if(oa(e))return u;if(Ys(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ys(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vt(e);var r=de.test(e);return r||fe.test(e)?st(e.slice(2),r?2:8):he.test(e)?u:+e}function fa(e){return _i(e,ka(e))}function ma(e){return null==e?"":ii(e)}var ga=Pi((function(e,t){if(vo(t)||Hs(t))_i(t,Oa(t),e);else for(var r in t)Ne.call(t,r)&&Qr(e,r,t[r])})),wa=Pi((function(e,t){_i(t,ka(t),e)})),ba=Pi((function(e,t,r,n){_i(t,ka(t),e,n)})),va=Pi((function(e,t,r,n){_i(t,Oa(t),e,n)})),ya=Yi(tn),xa=qn((function(e,t){e=Ae(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&mo(t[0],t[1],o)&&(i=1);++n<i;)for(var s=t[n],a=ka(s),c=-1,l=a.length;++c<l;){var u=a[c],h=e[u];(h===r||$s(h,ke[u])&&!Ne.call(e,u))&&(e[u]=s[u])}return e})),Ca=qn((function(e){return e.push(r,Ki),xt(Ma,r,e)}));function Aa(e,t,n){var i=null==e?r:vn(e,t);return i===r?n:i}function Ea(e,t){return null!=e&&uo(e,t,En)}var _a=Li((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=r}),Ya(ec)),Ia=Li((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ne.call(e,t)?e[t].push(r):e[t]=[r]}),no),Pa=qn(In);function Oa(e){return Hs(e)?qr(e):Nn(e)}function ka(e){return Hs(e)?qr(e,!0):function(e){if(!Ys(e))return function(e){var t=[];if(null!=e)for(var r in Ae(e))t.push(r);return t}(e);var t=vo(e),r=[];for(var n in e)"constructor"==n&&(t||!Ne.call(e,n))||r.push(n);return r}(e)}var Sa=Pi((function(e,t,r){$n(e,t,r)})),Ma=Pi((function(e,t,r,n){$n(e,t,r,n)})),Na=Yi((function(e,t){var r={};if(null==e)return r;var n=!1;t=kt(t,(function(t){return t=fi(t,e),n||(n=t.length>1),t})),_i(e,Xi(e),r),n&&(r=nn(r,7,Zi));for(var i=t.length;i--;)si(r,t[i]);return r})),Ta=Yi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return Ea(e,r)}))}(e,t)}));function ja(e,t){if(null==e)return{};var r=kt(Xi(e),(function(e){return[e]}));return t=no(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var Ra=qi(Oa),La=qi(ka);function $a(e){return null==e?[]:Kt(e,Oa(e))}var Da=Mi((function(e,t,r){return t=t.toLowerCase(),e+(r?Ba(t):t)}));function Ba(e){return Ga(ma(e).toLowerCase())}function Ua(e){return(e=ma(e))&&e.replace(ge,Jt).replace(Ze,"")}var Wa=Mi((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=Mi((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ha=Si("toLowerCase"),Fa=Mi((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),qa=Mi((function(e,t,r){return e+(r?" ":"")+Ga(t)})),Va=Mi((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ga=Si("toUpperCase");function Ka(e,t,n){return e=ma(e),(t=n?r:t)===r?function(e){return Xe.test(e)}(e)?function(e){return e.match(Ye)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Za=qn((function(e,t){try{return xt(e,r,t)}catch(e){return Gs(e)?e:new ye(e)}})),Qa=Yi((function(e,t){return At(t,(function(t){t=jo(t),en(e,t,Is(e[t],e))})),e}));function Ya(e){return function(){return e}}var Ja=ji(),Xa=ji(!0);function ec(e){return e}function tc(e){return Mn("function"==typeof e?e:nn(e,1))}var rc=qn((function(e,t){return function(r){return In(r,e,t)}})),nc=qn((function(e,t){return function(r){return In(e,r,t)}}));function ic(e,t,r){var n=Oa(t),i=bn(t,n);null==r&&(!Ys(t)||!i.length&&n.length)&&(r=t,t=e,e=this,i=bn(t,Oa(t)));var o=!(Ys(r)&&"chain"in r&&!r.chain),s=Ks(e);return At(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ei(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,St([this.value()],arguments))})})),e}function oc(){}var sc=Di(kt),ac=Di(_t),cc=Di(Tt);function lc(e){return go(e)?Wt(jo(e)):function(e){return function(t){return vn(t,e)}}(e)}var uc=Ui(),hc=Ui(!0);function dc(){return[]}function pc(){return!1}var fc=$i((function(e,t){return e+t}),0),mc=Hi("ceil"),gc=$i((function(e,t){return e/t}),1),wc=Hi("floor"),bc=$i((function(e,t){return e*t}),1),vc=Hi("round"),yc=$i((function(e,t){return e-t}),0);return Rr.after=function(e,t){if("function"!=typeof t)throw new Ie(n);return e=ha(e),function(){if(--e<1)return t.apply(this,arguments)}},Rr.ary=Es,Rr.assign=ga,Rr.assignIn=wa,Rr.assignInWith=ba,Rr.assignWith=va,Rr.at=ya,Rr.before=_s,Rr.bind=Is,Rr.bindAll=Qa,Rr.bindKey=Ps,Rr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ws(e)?e:[e]},Rr.chain=ls,Rr.chunk=function(e,t,n){t=(n?mo(e,t,n):t===r)?1:pr(ha(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=re(ht(i/t));o<i;)a[s++]=Jn(e,o,o+=t);return a},Rr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Rr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=re(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return St(Ws(r)?Ei(r):[r],pn(t,1))},Rr.cond=function(e){var t=null==e?0:e.length,r=no();return e=t?kt(e,(function(e){if("function"!=typeof e[1])throw new Ie(n);return[r(e[0]),e[1]]})):[],qn((function(r){for(var n=-1;++n<t;){var i=e[n];if(xt(i[0],this,r))return xt(i[1],this,r)}}))},Rr.conforms=function(e){return function(e){var t=Oa(e);return function(r){return on(r,e,t)}}(nn(e,1))},Rr.constant=Ya,Rr.countBy=ds,Rr.create=function(e,t){var r=Lr(e);return null==t?r:Xr(r,t)},Rr.curry=function e(t,n,i){var o=Vi(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},Rr.curryRight=function e(t,n,i){var o=Vi(t,16,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},Rr.debounce=Os,Rr.defaults=xa,Rr.defaultsDeep=Ca,Rr.defer=ks,Rr.delay=Ss,Rr.difference=$o,Rr.differenceBy=Do,Rr.differenceWith=Bo,Rr.drop=function(e,t,n){var i=null==e?0:e.length;return i?Jn(e,(t=n||t===r?1:ha(t))<0?0:t,i):[]},Rr.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?Jn(e,0,(t=i-(t=n||t===r?1:ha(t)))<0?0:t):[]},Rr.dropRightWhile=function(e,t){return e&&e.length?ci(e,no(t,3),!0,!0):[]},Rr.dropWhile=function(e,t){return e&&e.length?ci(e,no(t,3),!0):[]},Rr.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&mo(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=ha(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:ha(i))<0&&(i+=o),i=n>i?0:da(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},Rr.filter=function(e,t){return(Ws(e)?It:dn)(e,no(t,3))},Rr.flatMap=function(e,t){return pn(ys(e,t),1)},Rr.flatMapDeep=function(e,t){return pn(ys(e,t),c)},Rr.flatMapDepth=function(e,t,n){return n=n===r?1:ha(n),pn(ys(e,t),n)},Rr.flatten=zo,Rr.flattenDeep=function(e){return null!=e&&e.length?pn(e,c):[]},Rr.flattenDepth=function(e,t){return null!=e&&e.length?pn(e,t=t===r?1:ha(t)):[]},Rr.flip=function(e){return Vi(e,512)},Rr.flow=Ja,Rr.flowRight=Xa,Rr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Rr.functions=function(e){return null==e?[]:bn(e,Oa(e))},Rr.functionsIn=function(e){return null==e?[]:bn(e,ka(e))},Rr.groupBy=ws,Rr.initial=function(e){return null!=e&&e.length?Jn(e,0,-1):[]},Rr.intersection=Fo,Rr.intersectionBy=qo,Rr.intersectionWith=Vo,Rr.invert=_a,Rr.invertBy=Ia,Rr.invokeMap=bs,Rr.iteratee=tc,Rr.keyBy=vs,Rr.keys=Oa,Rr.keysIn=ka,Rr.map=ys,Rr.mapKeys=function(e,t){var r={};return t=no(t,3),gn(e,(function(e,n,i){en(r,t(e,n,i),e)})),r},Rr.mapValues=function(e,t){var r={};return t=no(t,3),gn(e,(function(e,n,i){en(r,n,t(e,n,i))})),r},Rr.matches=function(e){return Rn(nn(e,1))},Rr.matchesProperty=function(e,t){return Ln(e,nn(t,1))},Rr.memoize=Ms,Rr.merge=Sa,Rr.mergeWith=Ma,Rr.method=rc,Rr.methodOf=nc,Rr.mixin=ic,Rr.negate=Ns,Rr.nthArg=function(e){return e=ha(e),qn((function(t){return Dn(t,e)}))},Rr.omit=Na,Rr.omitBy=function(e,t){return ja(e,Ns(no(t)))},Rr.once=function(e){return _s(2,e)},Rr.orderBy=function(e,t,n,i){return null==e?[]:(Ws(t)||(t=null==t?[]:[t]),Ws(n=i?r:n)||(n=null==n?[]:[n]),Bn(e,t,n))},Rr.over=sc,Rr.overArgs=Ts,Rr.overEvery=ac,Rr.overSome=cc,Rr.partial=js,Rr.partialRight=Rs,Rr.partition=xs,Rr.pick=Ta,Rr.pickBy=ja,Rr.property=lc,Rr.propertyOf=function(e){return function(t){return null==e?r:vn(e,t)}},Rr.pull=Ko,Rr.pullAll=Zo,Rr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Wn(e,t,no(r,2)):e},Rr.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wn(e,t,r,n):e},Rr.pullAt=Qo,Rr.range=uc,Rr.rangeRight=hc,Rr.rearg=Ls,Rr.reject=function(e,t){return(Ws(e)?It:dn)(e,Ns(no(t,3)))},Rr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=no(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return zn(e,i),r},Rr.rest=function(e,t){if("function"!=typeof e)throw new Ie(n);return qn(e,t=t===r?t:ha(t))},Rr.reverse=Yo,Rr.sampleSize=function(e,t,n){return t=(n?mo(e,t,n):t===r)?1:ha(t),(Ws(e)?Gr:Gn)(e,t)},Rr.set=function(e,t,r){return null==e?e:Kn(e,t,r)},Rr.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Kn(e,t,n,i)},Rr.shuffle=function(e){return(Ws(e)?Kr:Yn)(e)},Rr.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mo(e,t,n)?(t=0,n=i):(t=null==t?0:ha(t),n=n===r?i:ha(n)),Jn(e,t,n)):[]},Rr.sortBy=Cs,Rr.sortedUniq=function(e){return e&&e.length?ri(e):[]},Rr.sortedUniqBy=function(e,t){return e&&e.length?ri(e,no(t,2)):[]},Rr.split=function(e,t,n){return n&&"number"!=typeof n&&mo(e,t,n)&&(t=n=r),(n=n===r?h:n>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ra(t))&&!(t=ii(t))&&tr(e)?gi(ar(e),0,n):e.split(t,n):[]},Rr.spread=function(e,t){if("function"!=typeof e)throw new Ie(n);return t=null==t?0:pr(ha(t),0),qn((function(r){var n=r[t],i=gi(r,0,t);return n&&St(i,n),xt(e,this,i)}))},Rr.tail=function(e){var t=null==e?0:e.length;return t?Jn(e,1,t):[]},Rr.take=function(e,t,n){return e&&e.length?Jn(e,0,(t=n||t===r?1:ha(t))<0?0:t):[]},Rr.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Jn(e,(t=i-(t=n||t===r?1:ha(t)))<0?0:t,i):[]},Rr.takeRightWhile=function(e,t){return e&&e.length?ci(e,no(t,3),!1,!0):[]},Rr.takeWhile=function(e,t){return e&&e.length?ci(e,no(t,3)):[]},Rr.tap=function(e,t){return t(e),e},Rr.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(n);return Ys(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Os(e,t,{leading:i,maxWait:t,trailing:o})},Rr.thru=us,Rr.toArray=la,Rr.toPairs=Ra,Rr.toPairsIn=La,Rr.toPath=function(e){return Ws(e)?kt(e,jo):oa(e)?[e]:Ei(To(ma(e)))},Rr.toPlainObject=fa,Rr.transform=function(e,t,r){var n=Ws(e),i=n||qs(e)||sa(e);if(t=no(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Ys(e)&&Ks(o)?Lr(He(e)):{}}return(i?At:gn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Rr.unary=function(e){return Es(e,1)},Rr.union=Jo,Rr.unionBy=Xo,Rr.unionWith=es,Rr.uniq=function(e){return e&&e.length?oi(e):[]},Rr.uniqBy=function(e,t){return e&&e.length?oi(e,no(t,2)):[]},Rr.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?oi(e,r,t):[]},Rr.unset=function(e,t){return null==e||si(e,t)},Rr.unzip=ts,Rr.unzipWith=rs,Rr.update=function(e,t,r){return null==e?e:ai(e,t,pi(r))},Rr.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ai(e,t,pi(n),i)},Rr.values=$a,Rr.valuesIn=function(e){return null==e?[]:Kt(e,ka(e))},Rr.without=ns,Rr.words=Ka,Rr.wrap=function(e,t){return js(pi(t),e)},Rr.xor=is,Rr.xorBy=os,Rr.xorWith=ss,Rr.zip=as,Rr.zipObject=function(e,t){return hi(e||[],t||[],Qr)},Rr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Kn)},Rr.zipWith=cs,Rr.entries=Ra,Rr.entriesIn=La,Rr.extend=wa,Rr.extendWith=ba,ic(Rr,Rr),Rr.add=fc,Rr.attempt=Za,Rr.camelCase=Da,Rr.capitalize=Ba,Rr.ceil=mc,Rr.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=pa(n))==n?n:0),t!==r&&(t=(t=pa(t))==t?t:0),rn(pa(e),t,n)},Rr.clone=function(e){return nn(e,4)},Rr.cloneDeep=function(e){return nn(e,5)},Rr.cloneDeepWith=function(e,t){return nn(e,5,t="function"==typeof t?t:r)},Rr.cloneWith=function(e,t){return nn(e,4,t="function"==typeof t?t:r)},Rr.conformsTo=function(e,t){return null==t||on(e,t,Oa(t))},Rr.deburr=Ua,Rr.defaultTo=function(e,t){return null==e||e!=e?t:e},Rr.divide=gc,Rr.endsWith=function(e,t,n){e=ma(e),t=ii(t);var i=e.length,o=n=n===r?i:rn(ha(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},Rr.eq=$s,Rr.escape=function(e){return(e=ma(e))&&V.test(e)?e.replace(F,Xt):e},Rr.escapeRegExp=function(e){return(e=ma(e))&&ee.test(e)?e.replace(X,"\\$&"):e},Rr.every=function(e,t,n){var i=Ws(e)?_t:un;return n&&mo(e,t,n)&&(t=r),i(e,no(t,3))},Rr.find=ps,Rr.findIndex=Uo,Rr.findKey=function(e,t){return Rt(e,no(t,3),gn)},Rr.findLast=fs,Rr.findLastIndex=Wo,Rr.findLastKey=function(e,t){return Rt(e,no(t,3),wn)},Rr.floor=wc,Rr.forEach=ms,Rr.forEachRight=gs,Rr.forIn=function(e,t){return null==e?e:fn(e,no(t,3),ka)},Rr.forInRight=function(e,t){return null==e?e:mn(e,no(t,3),ka)},Rr.forOwn=function(e,t){return e&&gn(e,no(t,3))},Rr.forOwnRight=function(e,t){return e&&wn(e,no(t,3))},Rr.get=Aa,Rr.gt=Ds,Rr.gte=Bs,Rr.has=function(e,t){return null!=e&&uo(e,t,An)},Rr.hasIn=Ea,Rr.head=Ho,Rr.identity=ec,Rr.includes=function(e,t,r,n){e=Hs(e)?e:$a(e),r=r&&!n?ha(r):0;var i=e.length;return r<0&&(r=pr(i+r,0)),ia(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&$t(e,t,r)>-1},Rr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ha(r);return i<0&&(i=pr(n+i,0)),$t(e,t,i)},Rr.inRange=function(e,t,n){return t=ua(t),n===r?(n=t,t=0):n=ua(n),function(e,t,r){return e>=fr(t,r)&&e<pr(t,r)}(e=pa(e),t,n)},Rr.invoke=Pa,Rr.isArguments=Us,Rr.isArray=Ws,Rr.isArrayBuffer=zs,Rr.isArrayLike=Hs,Rr.isArrayLikeObject=Fs,Rr.isBoolean=function(e){return!0===e||!1===e||Js(e)&&xn(e)==m},Rr.isBuffer=qs,Rr.isDate=Vs,Rr.isElement=function(e){return Js(e)&&1===e.nodeType&&!ta(e)},Rr.isEmpty=function(e){if(null==e)return!0;if(Hs(e)&&(Ws(e)||"string"==typeof e||"function"==typeof e.splice||qs(e)||sa(e)||Us(e)))return!e.length;var t=lo(e);if(t==y||t==_)return!e.size;if(vo(e))return!Nn(e).length;for(var r in e)if(Ne.call(e,r))return!1;return!0},Rr.isEqual=function(e,t){return On(e,t)},Rr.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?On(e,t,r,n):!!i},Rr.isError=Gs,Rr.isFinite=function(e){return"number"==typeof e&&zt(e)},Rr.isFunction=Ks,Rr.isInteger=Zs,Rr.isLength=Qs,Rr.isMap=Xs,Rr.isMatch=function(e,t){return e===t||kn(e,t,oo(t))},Rr.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,kn(e,t,oo(t),n)},Rr.isNaN=function(e){return ea(e)&&e!=+e},Rr.isNative=function(e){if(bo(e))throw new ye("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Sn(e)},Rr.isNil=function(e){return null==e},Rr.isNull=function(e){return null===e},Rr.isNumber=ea,Rr.isObject=Ys,Rr.isObjectLike=Js,Rr.isPlainObject=ta,Rr.isRegExp=ra,Rr.isSafeInteger=function(e){return Zs(e)&&e>=-l&&e<=l},Rr.isSet=na,Rr.isString=ia,Rr.isSymbol=oa,Rr.isTypedArray=sa,Rr.isUndefined=function(e){return e===r},Rr.isWeakMap=function(e){return Js(e)&&lo(e)==O},Rr.isWeakSet=function(e){return Js(e)&&"[object WeakSet]"==xn(e)},Rr.join=function(e,t){return null==e?"":hr.call(e,t)},Rr.kebabCase=Wa,Rr.last=Go,Rr.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=ha(n))<0?pr(i+o,0):fr(o,i-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Lt(e,Bt,o,!0)},Rr.lowerCase=za,Rr.lowerFirst=Ha,Rr.lt=aa,Rr.lte=ca,Rr.max=function(e){return e&&e.length?hn(e,ec,Cn):r},Rr.maxBy=function(e,t){return e&&e.length?hn(e,no(t,2),Cn):r},Rr.mean=function(e){return Ut(e,ec)},Rr.meanBy=function(e,t){return Ut(e,no(t,2))},Rr.min=function(e){return e&&e.length?hn(e,ec,Tn):r},Rr.minBy=function(e,t){return e&&e.length?hn(e,no(t,2),Tn):r},Rr.stubArray=dc,Rr.stubFalse=pc,Rr.stubObject=function(){return{}},Rr.stubString=function(){return""},Rr.stubTrue=function(){return!0},Rr.multiply=bc,Rr.nth=function(e,t){return e&&e.length?Dn(e,ha(t)):r},Rr.noConflict=function(){return lt._===this&&(lt._=$e),this},Rr.noop=oc,Rr.now=As,Rr.pad=function(e,t,r){e=ma(e);var n=(t=ha(t))?sr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Bi(pt(i),r)+e+Bi(ht(i),r)},Rr.padEnd=function(e,t,r){e=ma(e);var n=(t=ha(t))?sr(e):0;return t&&n<t?e+Bi(t-n,r):e},Rr.padStart=function(e,t,r){e=ma(e);var n=(t=ha(t))?sr(e):0;return t&&n<t?Bi(t-n,r)+e:e},Rr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),gr(ma(e).replace(te,""),t||0)},Rr.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mo(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ua(e),t===r?(t=e,e=0):t=ua(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=wr();return fr(e+o*(t-e+ot("1e-"+((o+"").length-1))),t)}return Hn(e,t)},Rr.reduce=function(e,t,r){var n=Ws(e)?Mt:Ht,i=arguments.length<3;return n(e,no(t,4),r,i,cn)},Rr.reduceRight=function(e,t,r){var n=Ws(e)?Nt:Ht,i=arguments.length<3;return n(e,no(t,4),r,i,ln)},Rr.repeat=function(e,t,n){return t=(n?mo(e,t,n):t===r)?1:ha(t),Fn(ma(e),t)},Rr.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Rr.result=function(e,t,n){var i=-1,o=(t=fi(t,e)).length;for(o||(o=1,e=r);++i<o;){var s=null==e?r:e[jo(t[i])];s===r&&(i=o,s=n),e=Ks(s)?s.call(e):s}return e},Rr.round=vc,Rr.runInContext=e,Rr.sample=function(e){return(Ws(e)?Vr:Vn)(e)},Rr.size=function(e){if(null==e)return 0;if(Hs(e))return ia(e)?sr(e):e.length;var t=lo(e);return t==y||t==_?e.size:Nn(e).length},Rr.snakeCase=Fa,Rr.some=function(e,t,n){var i=Ws(e)?Tt:Xn;return n&&mo(e,t,n)&&(t=r),i(e,no(t,3))},Rr.sortedIndex=function(e,t){return ei(e,t)},Rr.sortedIndexBy=function(e,t,r){return ti(e,t,no(r,2))},Rr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ei(e,t);if(n<r&&$s(e[n],t))return n}return-1},Rr.sortedLastIndex=function(e,t){return ei(e,t,!0)},Rr.sortedLastIndexBy=function(e,t,r){return ti(e,t,no(r,2),!0)},Rr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ei(e,t,!0)-1;if($s(e[r],t))return r}return-1},Rr.startCase=qa,Rr.startsWith=function(e,t,r){return e=ma(e),r=null==r?0:rn(ha(r),0,e.length),t=ii(t),e.slice(r,r+t.length)==t},Rr.subtract=yc,Rr.sum=function(e){return e&&e.length?Ft(e,ec):0},Rr.sumBy=function(e,t){return e&&e.length?Ft(e,no(t,2)):0},Rr.template=function(e,t,n){var i=Rr.templateSettings;n&&mo(e,t,n)&&(t=r),e=ma(e),t=ba({},t,i,Gi);var o,s,a=ba({},t.imports,i.imports,Gi),c=Oa(a),l=Kt(a,c),u=0,h=t.interpolate||we,d="__p += '",p=Ee((t.escape||we).source+"|"+h.source+"|"+(h===Z?le:we).source+"|"+(t.evaluate||we).source+"|$","g"),f="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tt+"]")+"\n";e.replace(p,(function(t,r,n,i,a,c){return n||(n=i),d+=e.slice(u,c).replace(be,er),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),d+="';\n";var m=Ne.call(t,"variable")&&t.variable;if(m){if(ae.test(m))throw new ye("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(U,""):d).replace(W,"$1").replace(z,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Za((function(){return xe(c,f+"return "+d).apply(r,l)}));if(g.source=d,Gs(g))throw g;return g},Rr.times=function(e,t){if((e=ha(e))<1||e>l)return[];var r=h,n=fr(e,h);t=no(t),e-=h;for(var i=qt(n,t);++r<e;)t(r);return i},Rr.toFinite=ua,Rr.toInteger=ha,Rr.toLength=da,Rr.toLower=function(e){return ma(e).toLowerCase()},Rr.toNumber=pa,Rr.toSafeInteger=function(e){return e?rn(ha(e),-l,l):0===e?e:0},Rr.toString=ma,Rr.toUpper=function(e){return ma(e).toUpperCase()},Rr.trim=function(e,t,n){if((e=ma(e))&&(n||t===r))return Vt(e);if(!e||!(t=ii(t)))return e;var i=ar(e),o=ar(t);return gi(i,Qt(i,o),Yt(i,o)+1).join("")},Rr.trimEnd=function(e,t,n){if((e=ma(e))&&(n||t===r))return e.slice(0,cr(e)+1);if(!e||!(t=ii(t)))return e;var i=ar(e);return gi(i,0,Yt(i,ar(t))+1).join("")},Rr.trimStart=function(e,t,n){if((e=ma(e))&&(n||t===r))return e.replace(te,"");if(!e||!(t=ii(t)))return e;var i=ar(e);return gi(i,Qt(i,ar(t))).join("")},Rr.truncate=function(e,t){var n=30,i="...";if(Ys(t)){var o="separator"in t?t.separator:o;n="length"in t?ha(t.length):n,i="omission"in t?ii(t.omission):i}var s=(e=ma(e)).length;if(tr(e)){var a=ar(e);s=a.length}if(n>=s)return e;var c=n-sr(i);if(c<1)return i;var l=a?gi(a,0,c).join(""):e.slice(0,c);if(o===r)return l+i;if(a&&(c+=l.length-c),ra(o)){if(e.slice(c).search(o)){var u,h=l;for(o.global||(o=Ee(o.source,ma(ue.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;l=l.slice(0,d===r?c:d)}}else if(e.indexOf(ii(o),c)!=c){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+i},Rr.unescape=function(e){return(e=ma(e))&&q.test(e)?e.replace(H,lr):e},Rr.uniqueId=function(e){var t=++Te;return ma(e)+t},Rr.upperCase=Va,Rr.upperFirst=Ga,Rr.each=ms,Rr.eachRight=gs,Rr.first=Ho,ic(Rr,function(){var e={};return gn(Rr,(function(t,r){Ne.call(Rr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),Rr.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Rr[e].placeholder=Rr})),At(["drop","take"],(function(e,t){Br.prototype[e]=function(n){n=n===r?1:pr(ha(n),0);var i=this.__filtered__&&!t?new Br(this):this.clone();return i.__filtered__?i.__takeCount__=fr(n,i.__takeCount__):i.__views__.push({size:fr(n,h),type:e+(i.__dir__<0?"Right":"")}),i},Br.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),At(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Br.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:no(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),At(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Br.prototype[e]=function(){return this[r](1).value()[0]}})),At(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Br.prototype[e]=function(){return this.__filtered__?new Br(this):this[r](1)}})),Br.prototype.compact=function(){return this.filter(ec)},Br.prototype.find=function(e){return this.filter(e).head()},Br.prototype.findLast=function(e){return this.reverse().find(e)},Br.prototype.invokeMap=qn((function(e,t){return"function"==typeof e?new Br(this):this.map((function(r){return In(r,e,t)}))})),Br.prototype.reject=function(e){return this.filter(Ns(no(e)))},Br.prototype.slice=function(e,t){e=ha(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Br(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ha(t))<0?n.dropRight(-t):n.take(t-e)),n)},Br.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Br.prototype.toArray=function(){return this.take(h)},gn(Br.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Rr[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(Rr.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof Br,l=a[0],u=c||Ws(t),h=function(e){var t=o.apply(Rr,St([e],a));return i&&d?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var d=this.__chain__,p=!!this.__actions__.length,f=s&&!d,m=c&&!p;if(!s&&u){t=m?t:new Br(this);var g=e.apply(t,a);return g.__actions__.push({func:us,args:[h],thisArg:r}),new Dr(g,d)}return f&&m?e.apply(this,a):(g=this.thru(h),f?i?g.value()[0]:g.value():g)})})),At(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Rr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ws(i)?i:[],e)}return this[r]((function(r){return t.apply(Ws(r)?r:[],e)}))}})),gn(Br.prototype,(function(e,t){var r=Rr[t];if(r){var n=r.name+"";Ne.call(Ir,n)||(Ir[n]=[]),Ir[n].push({name:t,func:r})}})),Ir[Ri(r,2).name]=[{name:"wrapper",func:r}],Br.prototype.clone=function(){var e=new Br(this.__wrapped__);return e.__actions__=Ei(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ei(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ei(this.__views__),e},Br.prototype.reverse=function(){if(this.__filtered__){var e=new Br(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Br.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ws(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=fr(t,e+s);break;case"takeRight":e=pr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,l=n?a:s-1,u=this.__iteratees__,h=u.length,d=0,p=fr(c,this.__takeCount__);if(!r||!n&&i==c&&p==c)return li(e,this.__actions__);var f=[];e:for(;c--&&d<p;){for(var m=-1,g=e[l+=t];++m<h;){var w=u[m],b=w.iteratee,v=w.type,y=b(g);if(2==v)g=y;else if(!y){if(1==v)continue e;break e}}f[d++]=g}return f},Rr.prototype.at=hs,Rr.prototype.chain=function(){return ls(this)},Rr.prototype.commit=function(){return new Dr(this.value(),this.__chain__)},Rr.prototype.next=function(){this.__values__===r&&(this.__values__=la(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Rr.prototype.plant=function(e){for(var t,n=this;n instanceof $r;){var i=Lo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},Rr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Br){var t=e;return this.__actions__.length&&(t=new Br(this)),(t=t.reverse()).__actions__.push({func:us,args:[Yo],thisArg:r}),new Dr(t,this.__chain__)}return this.thru(Yo)},Rr.prototype.toJSON=Rr.prototype.valueOf=Rr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Rr.prototype.first=Rr.prototype.head,Qe&&(Rr.prototype[Qe]=function(){return this}),Rr}();ht?((ht.exports=ur)._=ur,ut._=ur):lt._=ur}).call(zn)}(Hn,Hn.exports);var Fn=Object.defineProperty,qn=Object.defineProperties,Vn=Object.getOwnPropertyDescriptors,Gn=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable,Qn=(e,t,r)=>t in e?Fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yn=(e,t)=>{for(var r in t||(t={}))Kn.call(t,r)&&Qn(e,r,t[r]);if(Gn)for(var r of Gn(t))Zn.call(t,r)&&Qn(e,r,t[r]);return e},Jn=(e,t)=>qn(e,Vn(t));function Xn(e,t,r){let n;const i=ei(e);return t.rpcMap&&(n=t.rpcMap[i]),n||(n=`https://rpc.walletconnect.com/v1?chainId=eip155:${i}&projectId=${r}`),n}function ei(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function ti(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function ri(e){var t,r,n,i;const s={};if(!(0,o.L5)(e))return s;for(const[a,c]of Object.entries(e)){const e=(0,o.gp)(a)?[a]:c.chains,l=c.methods||[],u=c.events||[],h=c.rpcMap||{},d=(0,o.M)(a);s[d]=Jn(Yn(Yn({},s[d]),c),{chains:(0,o.eG)(e,null==(t=s[d])?void 0:t.chains),methods:(0,o.eG)(l,null==(r=s[d])?void 0:r.methods),events:(0,o.eG)(u,null==(n=s[d])?void 0:n.events),rpcMap:Yn(Yn({},h),null==(i=s[d])?void 0:i.rpcMap)})}return s}function ni(e){return e.includes(":")?e.split(":")[2]:e}function ii(e){const t={};for(const[r,n]of Object.entries(e)){const e=n.methods||[],i=n.events||[],s=n.accounts||[],a=(0,o.gp)(r)?[r]:n.chains?n.chains:ti(n.accounts);t[r]={chains:a,methods:e,events:i,accounts:s}}return t}function oi(e){return"number"==typeof e?e:e.includes("0x")?parseInt(e,16):e.includes(":")?Number(e.split(":")[1]):Number(e)}const si={},ai=e=>si[e],ci=(e,t)=>{si[e]=t};class li{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=ai("events"),this.client=ai("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const r=t||Xn(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Wn,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Xn(e,this.namespace);return typeof r>"u"?void 0:new fe(new Dn(r,ai("disableProviderPing")))}}class ui{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=ai("events"),this.client=ai("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const r=ei(e);if(!this.httpProviders[r]){const e=t||Xn(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,e)}this.chainId=r,this.events.emit(Wn,`${this.name}:${r}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const r=t||Xn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new fe(new $n(r,ai("disableProviderPing")))}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;const n=ei(t);e[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,r;let n=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";n=n.startsWith("0x")?n:`0x${n}`;const i=parseInt(n,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class hi{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=ai("events"),this.client=ai("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const r=t||Xn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Wn,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Xn(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new fe(new Dn(r,ai("disableProviderPing")))}}class di{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=ai("events"),this.client=ai("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const r=t||Xn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Wn,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Xn(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new fe(new Dn(r,ai("disableProviderPing")))}}class pi{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=ai("events"),this.client=ai("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const r=t||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Wn,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const r=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,r)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||this.getCardanoRPCUrl(e);return typeof r>"u"?void 0:new fe(new Dn(r,ai("disableProviderPing")))}}class fi{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=ai("events"),this.client=ai("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const r=t||Xn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Wn,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Xn(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new fe(new Dn(r,ai("disableProviderPing")))}}class mi{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=ai("events"),this.client=ai("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const r=t||Xn(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.chainId=e,this.events.emit(Wn,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var r;e[t]=this.createHttpProvider(t,null==(r=this.namespace.rpcMap)?void 0:r[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){const r=t||Xn(e,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new fe(new Dn(r,ai("disableProviderPing")))}}var gi=Object.defineProperty,wi=Object.defineProperties,bi=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,xi=Object.prototype.propertyIsEnumerable,Ci=(e,t,r)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ai=(e,t)=>{for(var r in t||(t={}))yi.call(t,r)&&Ci(e,r,t[r]);if(vi)for(var r of vi(t))xi.call(t,r)&&Ci(e,r,t[r]);return e},Ei=(e,t)=>wi(e,bi(t));class _i{constructor(e){this.events=new(i()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,c.pino)((0,c.getDefaultLoggerOptions)({level:e?.logger||Bn})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new _i(e);return await t.initialize(),t}async request(e,t){const[r,n]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:Ai({},e),chainId:`${r}:${n}`,topic:this.session.topic})}sendAsync(e,t,r){this.request(e,r).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:(0,o.D6)("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await n().then((e=>{this.session=e,this.namespaces||(this.namespaces=ii(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==pn)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[r,n]=this.validateChain(e);this.getProvider(r).setDefaultChain(n,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if((0,o.qt)(t)){for(const r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await Tn.init({logger:this.providerOpts.logger||Bn,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>(0,o.M)(e))))];ci("client",this.client),ci("events",this.events),ci("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=function(e,t){const r=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!r.length)return[];const n=[];return r.forEach((e=>{const r=t.namespaces[e].accounts;n.push(...r)})),n}(e,this.session),r=ti(t),n=function(e={},t={}){const r=ri(e),n=ri(t);return Hn.exports.merge(r,n)}(this.namespaces,this.optionalNamespaces),i=Ei(Ai({},n[e]),{accounts:t,chains:r});switch(e){case"eip155":this.rpcProviders[e]=new ui({namespace:i});break;case"solana":this.rpcProviders[e]=new hi({namespace:i});break;case"cosmos":this.rpcProviders[e]=new di({namespace:i});break;case"polkadot":this.rpcProviders[e]=new li({namespace:i});break;case"cip34":this.rpcProviders[e]=new pi({namespace:i});break;case"elrond":this.rpcProviders[e]=new fi({namespace:i});break;case"multiversx":this.rpcProviders[e]=new mi({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:r}=t;if("accountsChanged"===r.name){const e=r.data;e&&(0,o.qt)(e)&&this.events.emit("accountsChanged",e.map(ni))}else if("chainChanged"===r.name){const e=t.chainId,r=t.event.data,n=(0,o.M)(e),i=oi(e)!==oi(r)?`${n}:${oi(r)}`:e;this.onChainChanged(i)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var r;const{namespaces:n}=t,i=null==(r=this.client)?void 0:r.session.get(e);this.session=Ei(Ai({},i),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",Ei(Ai({},(0,o.D6)("USER_DISCONNECTED")),{data:e.topic}))})),this.on(Wn,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:r,sessionProperties:n}=e;t&&Object.keys(t).length&&(this.namespaces=t),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=n,this.persist("namespaces",t),this.persist("optionalNamespaces",r)}validateChain(e){const[t,r]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map((e=>(0,o.M)(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];const n=(0,o.M)(Object.keys(this.namespaces)[0]);return[n,this.rpcProviders[n].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var r;if(!this.namespaces)return;const[n,i]=this.validateChain(e);t||this.getProvider(n).setDefaultChain(i),(null!=(r=this.namespaces[n])?r:this.namespaces[`${n}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Un}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Un}/${e}`)}}const Ii=_i,Pi=["eth_sendTransaction","personal_sign"],Oi=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],ki=["chainChanged","accountsChanged"],Si=["message","disconnect","connect"];var Mi=Object.defineProperty,Ni=Object.defineProperties,Ti=Object.getOwnPropertyDescriptors,ji=Object.getOwnPropertySymbols,Ri=Object.prototype.hasOwnProperty,Li=Object.prototype.propertyIsEnumerable,$i=(e,t,r)=>t in e?Mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Di=(e,t)=>{for(var r in t||(t={}))Ri.call(t,r)&&$i(e,r,t[r]);if(ji)for(var r of ji(t))Li.call(t,r)&&$i(e,r,t[r]);return e},Bi=(e,t)=>Ni(e,Ti(t));function Ui(e){return Number(e[0].split(":")[1])}function Wi(e){return`0x${e.toString(16)}`}class zi{constructor(){this.events=new n.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new zi;return await t.initialize(e),t}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:r}=function(e){const{chains:t,optionalChains:r,methods:n,optionalMethods:i,events:s,optionalEvents:a,rpcMap:c}=e;if(!(0,o.qt)(t))throw new Error("Invalid chains");const l={chains:t,methods:n||Pi,events:s||ki,rpcMap:Di({},t.length?{[Ui(t)]:c[Ui(t)]}:{})},u=s?.filter((e=>!ki.includes(e))),h=n?.filter((e=>!Pi.includes(e)));if(!(r||a||i||null!=u&&u.length||null!=h&&h.length))return{required:t.length?l:void 0};const d={chains:[...new Set(u?.length&&h?.length||!r?l.chains.concat(r||[]):r)],methods:[...new Set(l.methods.concat(null!=i&&i.length?i:Oi))],events:[...new Set(l.events.concat(a||Si))],rpcMap:c};return{required:t.length?l:void 0,optional:r.length?d:void 0}}(this.rpc);try{const n=await new Promise((async(n,i)=>{var o;this.rpc.showQrModal&&(null==(o=this.modal)||o.subscribeModal((e=>{!e.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),i(new Error("Connection request reset. Please try again.")))}))),await this.signer.connect(Bi(Di({namespaces:Di({},t&&{[this.namespace]:t})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e?.pairingTopic})).then((e=>{n(e)})).catch((e=>{i(new Error(e.message))}))}));if(!n)return;const i=(0,o.gu)(n.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:Wi(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:r}=t;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Wi(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Bi(Di({},(0,o.D6)("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{var t,r;this.rpc.showQrModal&&(null==(t=this.modal)||t.closeModal(),null==(r=this.modal)||r.openModal({uri:e})),this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))).map((e=>this.parseChainId(e)));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",Wi(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,r,n]=e.split(":");return{chainId:`${t}:${r}`,address:n}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,r;const n=null!=(t=e?.chains)?t:[],i=null!=(r=e?.optionalChains)?r:[],o=n.concat(i);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const s=n.length?e?.methods||Pi:[],a=n.length?e?.events||ki:[],c=e?.optionalMethods||[],l=e?.optionalEvents||[],u=e?.rpcMap||this.buildRpcMap(o,e.projectId),h=e?.qrModalOptions||void 0;return{chains:n?.map((e=>this.formatChainId(e))),optionalChains:i.map((e=>this.formatChainId(e))),methods:s,events:a,optionalMethods:c,optionalEvents:l,rpcMap:u,showQrModal:!(null==e||!e.showQrModal),qrModalOptions:h,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const r={};return e.forEach((e=>{r[e]=this.getRpcUrl(e,t)})),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?Ui(this.rpc.chains):Ui(this.rpc.optionalChains),this.signer=await Ii.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let e;try{const{WalletConnectModal:t}=await Promise.resolve().then(r.bind(r,9343));e=t}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(e)try{this.modal=new e(Di({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:r,rpcMap:n}=e;t&&(0,o.qt)(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)}))),r&&(0,o.qt)(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r?.map((e=>this.formatChainId(e))),r.forEach((e=>{this.rpc.rpcMap[e]=n?.[e]||this.getRpcUrl(e)})))}getRpcUrl(e,t){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t?.accounts),this.setAccounts(t?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const Hi=zi},8200:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});class n{}},997:(e,t,r)=>{"use strict";r.r(t),r.d(t,{IEvents:()=>n.q});var n=r(8200)},2568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEARTBEAT_EVENTS=t.HEARTBEAT_INTERVAL=void 0;const n=r(6736);t.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,t.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},3401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(2568),t)},8969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartBeat=void 0;const n=r(655),i=r(7187),o=r(6736),s=r(1614),a=r(3401);class c extends s.IHeartBeat{constructor(e){super(e),this.events=new i.EventEmitter,this.interval=a.HEARTBEAT_INTERVAL,this.interval=(null==e?void 0:e.interval)||a.HEARTBEAT_INTERVAL}static init(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=new c(e);return yield t.init(),t}))}init(){return n.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}initialize(){return n.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),o.toMiliseconds(this.interval))}))}pulse(){this.events.emit(a.HEARTBEAT_EVENTS.pulse)}}t.HeartBeat=c},772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(8969),t),n.__exportStar(r(1614),t),n.__exportStar(r(3401),t)},4174:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IHeartBeat=void 0;const n=r(997);class i extends n.IEvents{constructor(e){super()}}t.IHeartBeat=i},1614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(4174),t)},2030:e=>{"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},5150:(e,t,r)=>{"use strict";const n=r(655),i=r(3954),o=n.__importDefault(r(653)),s=r(9728);t.ZP=class{constructor(){this.localStorage=o.default}getKeys(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.keys(this.localStorage)}))}getEntries(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.entries(this.localStorage).map(s.parseEntry)}))}getItem(e){return n.__awaiter(this,void 0,void 0,(function*(){const t=this.localStorage.getItem(e);if(null!==t)return i.safeJsonParse(t)}))}setItem(e,t){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.setItem(e,i.safeJsonStringify(t))}))}removeItem(e){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.removeItem(e)}))}}},653:(e,t,r)=>{"use strict";!function(){let t;function n(){}t=n,t.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},t.prototype.setItem=function(e,t){this[e]=String(t)},t.prototype.removeItem=function(e){delete this[e]},t.prototype.clear=function(){const e=this;Object.keys(e).forEach((function(t){e[t]=void 0,delete e[t]}))},t.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},t.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),void 0!==r.g&&r.g.localStorage?e.exports=r.g.localStorage:"undefined"!=typeof window&&window.localStorage?e.exports=window.localStorage:e.exports=new n}()},9728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(9076),t),n.__exportStar(r(496),t)},9076:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeyValueStorage=void 0,t.IKeyValueStorage=class{}},496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEntry=void 0;const n=r(3954);t.parseEntry=function(e){var t;return[e[0],n.safeJsonParse(null!==(t=e[1])&&void 0!==t?t:"")]}},5727:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PINO_CUSTOM_CONTEXT_KEY=t.PINO_LOGGER_DEFAULTS=void 0,t.PINO_LOGGER_DEFAULTS={level:"info"},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},9107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const n=r(655),i=n.__importDefault(r(6559));Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return i.default}}),n.__exportStar(r(5727),t),n.__exportStar(r(8048),t)},8048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const n=r(5727);function i(e,t=n.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}function o(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){return e[r]=t,e}function s(e,t=n.PINO_CUSTOM_CONTEXT_KEY){let r="";return r=void 0===e.bindings?i(e,t):e.bindings().context||"",r}function a(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const i=s(e,r);return i.trim()?`${i}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null==e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=i,t.setBrowserLoggerContext=o,t.getLoggerContext=s,t.formatChildLoggerContext=a,t.generateChildLogger=function(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const i=a(e,t,r);return o(e.child({context:i}),i,r)}},1882:()=>{},3014:()=>{},6900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(6869),t),n.__exportStar(r(8033),t)},6869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},8033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},6736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(4273),t),n.__exportStar(r(7001),t),n.__exportStar(r(2939),t),n.__exportStar(r(6900),t)},2939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(8766),t)},8766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0,t.IWatch=class{}},3207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const n=r(6900);t.toMiliseconds=function(e){return e*n.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},3873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},4273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(3873),t),n.__exportStar(r(3207),t)},7001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if(void 0!==t.elapsed)throw new Error(`Watch already stopped for label: ${e}`);const r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){const t=this.timestamps.get(e);if(void 0===t)throw new Error(`No timestamp found for label: ${e}`);return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},9795:(e,t,r)=>{"use strict";r.d(t,{AW:()=>O,O6:()=>jt,rV:()=>N,gn:()=>ye,H1:()=>fe,hF:()=>me,WG:()=>z,pe:()=>F,m$:()=>B,vB:()=>q,HI:()=>H,E0:()=>Ce,Gq:()=>be,$0:()=>ue,Z4:()=>we,Bv:()=>$e,Au:()=>$,jd:()=>D,gu:()=>_,D:()=>ce,Z7:()=>et,cO:()=>Pe,_H:()=>Ie,fc:()=>Ke,D6:()=>tt,Hh:()=>Ee,Ym:()=>U,rj:()=>W,jU:()=>se,gp:()=>Ze,rF:()=>Ot,Bw:()=>xe,UG:()=>ie,Gg:()=>Mt,xW:()=>ut,b$:()=>oe,Ih:()=>at,h1:()=>ht,Q8:()=>K,o8:()=>it,qt:()=>rt,Dd:()=>dt,$t:()=>xt,nf:()=>Et,Q0:()=>vt,in:()=>gt,p8:()=>_t,sI:()=>Pt,al:()=>It,L5:()=>nt,EJ:()=>yt,Z2:()=>wt,PM:()=>bt,hH:()=>Ct,ON:()=>St,n:()=>mt,JT:()=>At,M_:()=>ot,jv:()=>lt,KC:()=>de,eG:()=>Ae,fK:()=>Ye,IP:()=>pe,iP:()=>ve,M:()=>Qe,he:()=>Re,uw:()=>Nt,Ll:()=>V,EN:()=>G});var n=r(5501),i=r(512),o=r(1416),s=r(3294),a=r(7664),c=r(7466),l=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},u=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},h=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},d=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"},p=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},f=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},m=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,g=3,w=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],b=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function v(e){var t=function(e){return""!==e&&w.reduce((function(t,r){var n=r[0],i=r[1];if(t)return t;var o=i.exec(e);return!!o&&[n,o]}),!1)}(e);if(!t)return null;var r=t[0],n=t[1];if("searchbot"===r)return new p;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<g&&(i=l(l([],i,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(g-i.length),!0)):i=[];var o=i.join("."),s=function(e){for(var t=0,r=b.length;t<r;t++){var n=b[t],i=n[0];if(n[1].exec(e))return i}return null}(e),a=m.exec(e);return a&&a[1]?new d(r,o,s,a[1]):new u(r,o,s)}var y=r(6736),x=r(2873),C=r(5755),A=r(6151);r(1882);const E={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function _(e,t=[]){const r=[];return Object.keys(e).forEach((n=>{if(t.length&&!t.includes(n))return;const i=e[n];r.push(...i.accounts)})),r}function I(e,t){return e.includes(":")?[e]:t.chains||[]}const P="base10",O="base16",k="base64pad",S="utf8",M=0,N=1,T=0,j=1,R=12,L=32;function $(){const e=a.Au();return{privateKey:(0,c.BB)(e.secretKey,O),publicKey:(0,c.BB)(e.publicKey,O)}}function D(){const e=(0,o.randomBytes)(L);return(0,c.BB)(e,O)}function B(e,t){const r=a.gi((0,c.mL)(e,O),(0,c.mL)(t,O)),n=new i.t(s.mE,r).expand(L);return(0,c.BB)(n,O)}function U(e){const t=(0,s.vp)((0,c.mL)(e,O));return(0,c.BB)(t,O)}function W(e){const t=(0,s.vp)((0,c.mL)(e,S));return(0,c.BB)(t,O)}function z(e){return Number((0,c.BB)(e,P))}function H(e){const t=function(e){return(0,c.mL)(`${e}`,P)}(typeof e.type<"u"?e.type:M);if(z(t)===N&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?(0,c.mL)(e.senderPublicKey,O):void 0,i=typeof e.iv<"u"?(0,c.mL)(e.iv,O):(0,o.randomBytes)(R);return function(e){if(z(e.type)===N){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return(0,c.BB)((0,c.zo)([e.type,e.senderPublicKey,e.iv,e.sealed]),k)}return(0,c.BB)((0,c.zo)([e.type,e.iv,e.sealed]),k)}({type:t,sealed:new n.OK((0,c.mL)(e.symKey,O)).seal(i,(0,c.mL)(e.message,S)),iv:i,senderPublicKey:r})}function F(e){const t=new n.OK((0,c.mL)(e.symKey,O)),{sealed:r,iv:i}=q(e.encoded),o=t.open(i,r);if(null===o)throw new Error("Failed to decrypt");return(0,c.BB)(o,S)}function q(e){const t=(0,c.mL)(e,k),r=t.slice(T,j),n=j;if(z(r)===N){const e=n+L,i=e+R,o=t.slice(n,e),s=t.slice(e,i);return{type:r,sealed:t.slice(i),iv:s,senderPublicKey:o}}const i=n+R,o=t.slice(n,i);return{type:r,sealed:t.slice(i),iv:o}}function V(e,t){const r=q(e);return G({type:z(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?(0,c.BB)(r.senderPublicKey,O):void 0,receiverPublicKey:t?.receiverPublicKey})}function G(e){const t=e?.type||M;if(t===N){if(typeof e?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function K(e){return e.type===N&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}var Z=Object.defineProperty,Q=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t)=>{for(var r in t||(t={}))Y.call(t,r)&&X(e,r,t[r]);if(Q)for(var r of Q(t))J.call(t,r)&&X(e,r,t[r]);return e};const te="ReactNative",re={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},ne="js";function ie(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function oe(){return!(0,x.getDocument)()&&!!(0,x.getNavigator)()&&navigator.product===te}function se(){return!ie()&&!!(0,x.getNavigator)()}function ae(){return oe()?re.reactNative:ie()?re.node:se()?re.browser:re.unknown}function ce(){return(0,C.D)()||{name:"",description:"",url:"",icons:[""]}}function le(e,t,n){const i=function(){if(ae()===re.reactNative&&typeof r.g<"u"&&typeof(null==r.g?void 0:r.g.Platform)<"u"){const{OS:e,Version:t}=r.g.Platform;return[e,t].join("-")}const e=t?v(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new f:"undefined"!=typeof navigator?v(navigator.userAgent):"undefined"!=typeof process&&process.version?new h(process.version.slice(1)):null;var t;if(null===e)return"unknown";const n=e.os?e.os.replace(" ","").toLowerCase():"unknown";return"browser"===e.type?[n,e.name,e.version].join("-"):[n,e.version].join("-")}(),o=function(){var e;const t=ae();return t===re.browser?[t,(null==(e=(0,x.getLocation)())?void 0:e.host)||"unknown"].join(":"):t}();return[[e,t].join("-"),[ne,n].join("-"),i,o].join("/")}function ue({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:i,projectId:o,useOnCloseEvent:s}){const a=r.split("?"),c={auth:i,ua:le(e,t,n),projectId:o,useOnCloseEvent:s||void 0},l=function(e,t){let r=A.parse(e);return r=ee(ee({},r),t),A.stringify(r)}(a[1]||"",c);return a[0]+"?"+l}function he(e,t){return e.filter((e=>t.includes(e))).length===e.length}function de(e){return Object.fromEntries(e.entries())}function pe(e){return new Map(Object.entries(e))}function fe(e=y.FIVE_MINUTES,t){const r=(0,y.toMiliseconds)(e||y.FIVE_MINUTES);let n,i,o;return{resolve:e=>{o&&n&&(clearTimeout(o),n(e))},reject:e=>{o&&i&&(clearTimeout(o),i(e))},done:()=>new Promise(((e,s)=>{o=setTimeout((()=>{s(new Error(t))}),r),n=e,i=s}))}}function me(e,t,r){return new Promise((async(n,i)=>{const o=setTimeout((()=>i(new Error(r))),t);try{n(await e)}catch(e){i(e)}clearTimeout(o)}))}function ge(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function we(e){return ge("topic",e)}function be(e){return ge("id",e)}function ve(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)n.topic=r;else{if("id"!==t||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);n.id=Number(r)}return n}function ye(e,t){return(0,y.fromMiliseconds)((t||Date.now())+(0,y.toMiliseconds)(e))}function xe(e){return Date.now()>=(0,y.toMiliseconds)(e)}function Ce(e,t){return`${e}${t?`:${t}`:""}`}function Ae(e=[],t=[]){return[...new Set([...e,...t])]}async function Ee({id:e,topic:t,wcDeepLink:n}){try{if(!n)return;const i="string"==typeof n?JSON.parse(n):n;let o=i?.href;if("string"!=typeof o)return;o.endsWith("/")&&(o=o.slice(0,-1));const s=`${o}/wc?requestId=${e}&sessionTopic=${t}`,a=ae();a===re.browser?s.startsWith("https://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):a===re.reactNative&&typeof(null==r.g?void 0:r.g.Linking)<"u"&&await r.g.Linking.openURL(s)}catch(e){console.error(e)}}const _e="irn";function Ie(e){return e?.relay||{protocol:_e}}function Pe(e){const t=E[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var Oe=Object.defineProperty,ke=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ne=(e,t,r)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Te=(e,t)=>{for(var r in t||(t={}))Se.call(t,r)&&Ne(e,r,t[r]);if(ke)for(var r of ke(t))Me.call(t,r)&&Ne(e,r,t[r]);return e};function je(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach((t=>{if(t.startsWith(n)){const i=t.replace(n,""),o=e[t];r[i]=o}})),r}function Re(e){const t=e.indexOf(":"),r=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,t),i=e.substring(t+1,r).split("@"),o=typeof r<"u"?e.substring(r):"",s=A.parse(o);return{protocol:n,topic:Le(i[0]),version:parseInt(i[1],10),symKey:s.symKey,relay:je(s)}}function Le(e){return e.startsWith("//")?e.substring(2):e}function $e(e){return`${e.protocol}:${e.topic}@${e.version}?`+A.stringify(Te({symKey:e.symKey},function(e,t="-"){const r={};return Object.keys(e).forEach((n=>{const i="relay"+t+n;e[n]&&(r[i]=e[n])})),r}(e.relay)))}var De=Object.defineProperty,Be=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Fe=(e,t,r)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qe=(e,t)=>{for(var r in t||(t={}))ze.call(t,r)&&Fe(e,r,t[r]);if(We)for(var r of We(t))He.call(t,r)&&Fe(e,r,t[r]);return e},Ve=(e,t)=>Be(e,Ue(t));function Ge(e){const t=[];return e.forEach((e=>{const[r,n]=e.split(":");t.push(`${r}:${n}`)})),t}function Ke(e,t){const r=gt(e,t);if(r)throw new Error(r.message);const n={};for(const[t,r]of Object.entries(e))n[t]={methods:r.methods,events:r.events,chains:r.accounts.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))};return n}function Ze(e){return e.includes(":")}function Qe(e){return Ze(e)?e.split(":")[0]:e}function Ye(e){var t,r,n;const i={};if(!nt(e))return i;for(const[o,s]of Object.entries(e)){const e=Ze(o)?[o]:s.chains,a=s.methods||[],c=s.events||[],l=Qe(o);i[l]=Ve(qe({},i[l]),{chains:Ae(e,null==(t=i[l])?void 0:t.chains),methods:Ae(a,null==(r=i[l])?void 0:r.methods),events:Ae(c,null==(n=i[l])?void 0:n.events)})}return i}const Je={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Xe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function et(e,t){const{message:r,code:n}=Xe[e];return{message:t?`${r} ${t}`:r,code:n}}function tt(e,t){const{message:r,code:n}=Je[e];return{message:t?`${r} ${t}`:r,code:n}}function rt(e,t){return!!Array.isArray(e)&&(!(typeof t<"u"&&e.length)||e.every(t))}function nt(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function it(e){return typeof e>"u"}function ot(e,t){return!(!t||!it(e))||"string"==typeof e&&!!e.trim().length}function st(e,t){return!(!t||!it(e))||"number"==typeof e&&!isNaN(e)}function at(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),i=Object.keys(r);let o=!0;return!!he(i,n)&&(n.forEach((t=>{const{accounts:n,methods:i,events:s}=e.namespaces[t],a=Ge(n),c=r[t];he(I(t,c),a)&&he(c.methods,i)&&he(c.events,s)||(o=!1)})),o)}function ct(e){return!(!ot(e,!1)||!e.includes(":"))&&2===e.split(":").length}function lt(e){if(ot(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function ut(e){var t;return null==(t=e?.proposer)?void 0:t.publicKey}function ht(e){return e?.topic}function dt(e,t){let r=null;return ot(e?.publicKey,!1)||(r=et("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function pt(e){let t=!0;return rt(e)?e.length&&(t=e.every((e=>ot(e,!1)))):t=!1,t}function ft(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=function(e,t){let r=null;return pt(e?.methods)?pt(e?.events)||(r=tt("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=tt("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}(e,`${t}, namespace`);n&&(r=n)})),r}function mt(e,t,r){let n=null;if(e&&nt(e)){const i=ft(e,t);i&&(n=i);const o=function(e,t,r){let n=null;return Object.entries(e).forEach((([e,i])=>{if(n)return;const o=function(e,t,r){let n=null;return rt(t)&&t.length?t.forEach((e=>{n||ct(e)||(n=tt("UNSUPPORTED_CHAINS",`${r}, chain ${e} should be a string and conform to "namespace:chainId" format`))})):ct(e)||(n=tt("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}(e,I(e,i),`${t} ${r}`);o&&(n=o)})),n}(e,t,r);o&&(n=o)}else n=et("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function gt(e,t){let r=null;if(e&&nt(e)){const n=ft(e,t);n&&(r=n);const i=function(e,t){let r=null;return Object.values(e).forEach((e=>{if(r)return;const n=function(e,t){let r=null;return rt(e)?e.forEach((e=>{r||function(e){if(ot(e,!1)&&e.includes(":")){const t=e.split(":");if(3===t.length){const e=t[0]+":"+t[1];return!!t[2]&&ct(e)}}return!1}(e)||(r=tt("UNSUPPORTED_ACCOUNTS",`${t}, account ${e} should be a string and conform to "namespace:chainId:address" format`))})):r=tt("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}(e?.accounts,`${t} namespace`);n&&(r=n)})),r}(e,t);i&&(r=i)}else r=et("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function wt(e){return ot(e.protocol,!0)}function bt(e,t){let r=!1;return t&&!e?r=!0:e&&rt(e)&&e.length&&e.forEach((e=>{r=wt(e)})),r}function vt(e){return"number"==typeof e}function yt(e){return typeof e<"u"&&null!==typeof e}function xt(e){return!!(e&&"object"==typeof e&&e.code&&st(e.code,!1)&&e.message&&ot(e.message,!1))}function Ct(e){return!(it(e)||!ot(e.method,!1))}function At(e){return!(it(e)||it(e.result)&&it(e.error)||!st(e.id,!1)||!ot(e.jsonrpc,!1))}function Et(e){return!(it(e)||!ot(e.name,!1))}function _t(e,t){return!(!ct(t)||!function(e){const t=[];return Object.values(e).forEach((e=>{t.push(...Ge(e.accounts))})),t}(e).includes(t))}function It(e,t,r){return!!ot(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{Ge(e.accounts).includes(t)&&r.push(...e.methods)})),r}(e,t).includes(r)}function Pt(e,t,r){return!!ot(r,!1)&&function(e,t){const r=[];return Object.values(e).forEach((e=>{Ge(e.accounts).includes(t)&&r.push(...e.events)})),r}(e,t).includes(r)}function Ot(e,t,r){let n=null;const i=function(e){const t={};return Object.keys(e).forEach((r=>{var n;r.includes(":")?t[r]=e[r]:null==(n=e[r].chains)||n.forEach((n=>{t[n]={methods:e[r].methods,events:e[r].events}}))})),t}(e),o=function(e){const t={};return Object.keys(e).forEach((r=>{if(r.includes(":"))t[r]=e[r];else{const n=Ge(e[r].accounts);n?.forEach((n=>{t[n]={accounts:e[r].accounts.filter((e=>e.includes(`${n}:`))),methods:e[r].methods,events:e[r].events}}))}})),t}(t),s=Object.keys(i),a=Object.keys(o),c=kt(Object.keys(e)),l=kt(Object.keys(t)),u=c.filter((e=>!l.includes(e)));return u.length&&(n=et("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n      Required: ${u.toString()}\n      Received: ${Object.keys(t).toString()}`)),he(s,a)||(n=et("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n      Required: ${s.toString()}\n      Approved: ${a.toString()}`)),Object.keys(t).forEach((e=>{if(!e.includes(":")||n)return;const i=Ge(t[e].accounts);i.includes(e)||(n=et("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e}\n        Required: ${e}\n        Approved: ${i.toString()}`))})),s.forEach((e=>{n||(he(i[e].methods,o[e].methods)?he(i[e].events,o[e].events)||(n=et("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):n=et("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))})),n}function kt(e){return[...new Set(e.map((e=>e.includes(":")?e.split(":")[0]:e)))]}function St(e,t){return st(e,!1)&&e<=t.max&&e>=t.min}function Mt(){const e=ae();return new Promise((t=>{switch(e){case re.browser:t(se()&&navigator?.onLine);break;case re.reactNative:t(async function(){if(oe()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo){const e=await(null==r.g?void 0:r.g.NetInfo.fetch());return e?.isConnected}return!0}());break;case re.node:default:t(!0)}}))}function Nt(e){switch(ae()){case re.browser:!function(e){se()&&(window.addEventListener("online",(()=>e(!0))),window.addEventListener("offline",(()=>e(!1))))}(e);break;case re.reactNative:!function(e){oe()&&typeof r.g<"u"&&null!=r.g&&r.g.NetInfo&&r.g?.NetInfo.addEventListener((t=>e(t?.isConnected)))}(e);case re.node:}}const Tt={};class jt{static get(e){return Tt[e]}static set(e,t){Tt[e]=t}static delete(e){delete Tt[e]}}},6151:(e,t,r)=>{"use strict";const n=r(610),i=r(4020),o=r(500),s=r(2806),a=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?i(e):e}function h(e){return Array.isArray(e)?e.sort():"object"==typeof e?h(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function d(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){const t=(e=d(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const i="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!i&&u(r,e).includes(e.arrayFormatSeparator);r=o?u(r,e):r;const s=i||o?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=s};case"bracket-separator":return(t,r,n)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r?u(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const i of e.split("&")){if(""===i)continue;let[e,s]=o(t.decode?i.replace(/\+/g," "):i,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),r(u(e,t),s,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=f(r[e],t);else n[e]=f(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=h(r):e[t]=r,e}),Object.create(null))}t.extract=p,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",i,"]"].join("")]:[...r,[l(t,e),"[",l(i,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[l(r,e),t,l(i,e)].join("")]:[[n,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),i={};for(const t of Object.keys(e))r(t)||(i[t]=e[t]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const i=e[r];return void 0===i?"":null===i?l(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":i.reduce(n(r),[]).join("&"):l(r,t)+"="+l(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);const n=d(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),s=Object.assign(o,e.query);let c=t.stringify(s,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[a]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);const{url:i,query:o,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:s(o,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},2873:(e,t)=>{"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function n(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=n,t.getDocumentOrThrow=function(){return n("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return n("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return n("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return n("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return n("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},5755:(e,t,r)=>{"use strict";t.D=void 0;const n=r(2873);t.D=function(){let e,t;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function r(...t){const r=e.getElementsByTagName("meta");for(let e=0;e<r.length;e++){const n=r[e],i=["itemprop","property","name"].map((e=>n.getAttribute(e))).filter((e=>!!e&&t.includes(e)));if(i.length&&i){const e=n.getAttribute("content");if(e)return e}}return""}const i=function(){let t=r("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:r("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const r=e.getElementsByTagName("link"),n=[];for(let e=0;e<r.length;e++){const i=r[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){const e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{const n=t.pathname.split("/");n.pop(),r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){const r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:i}}},4098:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function m(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=l(e),t=u(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},d.prototype.delete=function(e){delete this.map[l(e)]},d.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},d.prototype.set=function(e,t){this.map[l(e)]=u(t)},d.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),h(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),h(e)},n&&(d.prototype[Symbol.iterator]=d.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var r,n,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),b.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},w.call(v.prototype),w.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];x.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,r){return new Promise((function(n,o){var s=new v(e,r);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new x(i,r))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=d,e.Request=v,e.Response=x),t.Headers=d,t.Request=v,t.Response=x,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},4020:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=i(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var i=o(r[0]);i!==r[0]&&(t[r[0]]=i)}r=n.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),a=0;a<s.length;a++){var c=s[a];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},5987:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var i={},o={};o[r]=0;var s,a,c,l,u,h,d,p=t.PriorityQueue.make();for(p.push(r,0);!p.empty();)for(c in a=(s=p.pop()).value,l=s.cost,u=e[a]||{})u.hasOwnProperty(c)&&(h=l+u[c],d=o[c],(void 0===o[c]||d>h)&&(o[c]=h,p.push(c,h),i[c]=a));if(void 0!==n&&void 0===o[n]){var f=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var i=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,i={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(i[r]=n[r]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},2378:e=>{"use strict";e.exports=function(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);if(i>=55296&&i<=56319&&r>n+1){var o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(i=1024*(i-55296)+o-56320+65536,n+=1)}i<128?t.push(i):i<2048?(t.push(i>>6|192),t.push(63&i|128)):i<55296||i>=57344&&i<65536?(t.push(i>>12|224),t.push(i>>6&63|128),t.push(63&i|128)):i>=65536&&i<=1114111?(t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(63&i|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},6729:e=>{"use strict";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 new TypeError("The listener must be a function");var a=new i(n,o||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=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=new 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 c,l,u=this._events[a],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,o),!0;case 6:return u.fn.call(u.context,t,n,i,o,s),!0}for(l=1,c=new Array(h-1);l<h;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var d,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),h){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,n);break;case 4:u[l].fn.call(u[l].context,t,n,i);break;default:if(!c)for(d=1,c=new Array(h-1);d<h;d++)c[d-1]=arguments[d];u[l].fn.apply(u[l].context,c)}}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 c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||i&&!a[c].once||n&&a[c].context!==n)&&l.push(a[c]);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},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,l;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):f(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=f(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},2806:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var s=n[o],a=e[s];(i?-1!==t.indexOf(s):t(s,a,e))&&(r[s]=a)}return r}},6792:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket);const i=n},2307:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",w="[object Null]",b="[object Object]",v="[object Promise]",y="[object Proxy]",x="[object RegExp]",C="[object Set]",A="[object String]",E="[object Undefined]",_="[object WeakMap]",I="[object ArrayBuffer]",P="[object DataView]",O=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[a]=S[c]=S[I]=S[u]=S[P]=S[h]=S[d]=S[p]=S[m]=S[g]=S[b]=S[x]=S[C]=S[A]=S[_]=!1;var M="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,N="object"==typeof self&&self&&self.Object===Object&&self,T=M||N||Function("return this")(),j=t&&!t.nodeType&&t,R=j&&e&&!e.nodeType&&e,L=R&&R.exports===j,$=L&&M.process,D=function(){try{return $&&$.binding&&$.binding("util")}catch(e){}}(),B=D&&D.isTypedArray;function U(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function W(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function z(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var H,F,q,V=Array.prototype,G=Function.prototype,K=Object.prototype,Z=T["__core-js_shared__"],Q=G.toString,Y=K.hasOwnProperty,J=(H=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",X=K.toString,ee=RegExp("^"+Q.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=L?T.Buffer:void 0,re=T.Symbol,ne=T.Uint8Array,ie=K.propertyIsEnumerable,oe=V.splice,se=re?re.toStringTag:void 0,ae=Object.getOwnPropertySymbols,ce=te?te.isBuffer:void 0,le=(F=Object.keys,q=Object,function(e){return F(q(e))}),ue=Re(T,"DataView"),he=Re(T,"Map"),de=Re(T,"Promise"),pe=Re(T,"Set"),fe=Re(T,"WeakMap"),me=Re(Object,"create"),ge=Be(ue),we=Be(he),be=Be(de),ve=Be(pe),ye=Be(fe),xe=re?re.prototype:void 0,Ce=xe?xe.valueOf:void 0;function Ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function _e(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ie(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new _e;++t<r;)this.add(e[t])}function Pe(e){var t=this.__data__=new Ee(e);this.size=t.size}function Oe(e,t){for(var r=e.length;r--;)if(Ue(e[r][0],t))return r;return-1}function ke(e){return null==e?void 0===e?E:w:se&&se in Object(e)?function(e){var t=Y.call(e,se),r=e[se];try{e[se]=void 0;var n=!0}catch(e){}var i=X.call(e);return n&&(t?e[se]=r:delete e[se]),i}(e):function(e){return X.call(e)}(e)}function Se(e){return Ge(e)&&ke(e)==a}function Me(e,t,r,n,s){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,r,n,s,l){var p=ze(e),f=ze(t),w=p?c:$e(e),v=f?c:$e(t),y=(w=w==a?b:w)==b,E=(v=v==a?b:v)==b,_=w==v;if(_&&He(e)){if(!He(t))return!1;p=!0,y=!1}if(_&&!y)return l||(l=new Pe),p||Ke(e)?Ne(e,t,r,n,s,l):function(e,t,r,n,s,a,c){switch(r){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!a(new ne(e),new ne(t)));case u:case h:case g:return Ue(+e,+t);case d:return e.name==t.name&&e.message==t.message;case x:case A:return e==t+"";case m:var l=W;case C:var p=n&i;if(l||(l=z),e.size!=t.size&&!p)return!1;var f=c.get(e);if(f)return f==t;n|=o,c.set(e,t);var w=Ne(l(e),l(t),n,s,a,c);return c.delete(e),w;case"[object Symbol]":if(Ce)return Ce.call(e)==Ce.call(t)}return!1}(e,t,w,r,n,s,l);if(!(r&i)){var O=y&&Y.call(e,"__wrapped__"),k=E&&Y.call(t,"__wrapped__");if(O||k){var S=O?e.value():e,M=k?t.value():t;return l||(l=new Pe),s(S,M,r,n,l)}}return!!_&&(l||(l=new Pe),function(e,t,r,n,o,s){var a=r&i,c=Te(e),l=c.length;if(l!=Te(t).length&&!a)return!1;for(var u=l;u--;){var h=c[u];if(!(a?h in t:Y.call(t,h)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var p=!0;s.set(e,t),s.set(t,e);for(var f=a;++u<l;){var m=e[h=c[u]],g=t[h];if(n)var w=a?n(g,m,h,t,e,s):n(m,g,h,e,t,s);if(!(void 0===w?m===g||o(m,g,r,n,s):w)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var b=e.constructor,v=t.constructor;b==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,s,l))}(e,t,r,n,Me,s))}function Ne(e,t,r,n,s,a){var c=r&i,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var h=a.get(e);if(h&&a.get(t))return h==t;var d=-1,p=!0,f=r&o?new Ie:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var m=e[d],g=t[d];if(n)var w=c?n(g,m,d,t,e,a):n(m,g,d,e,t,a);if(void 0!==w){if(w)continue;p=!1;break}if(f){if(!U(t,(function(e,t){if(i=t,!f.has(i)&&(m===e||s(m,e,r,n,a)))return f.push(t);var i}))){p=!1;break}}else if(m!==g&&!s(m,g,r,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function Te(e){return function(e,t,r){var n=t(e);return ze(e)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(e))}(e,Ze,Le)}function je(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function Re(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ve(e)||function(e){return!!J&&J in e}(e))&&(Fe(e)?ee:O).test(Be(e))}(r)?r:void 0}Ae.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},Ae.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ae.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Y.call(t,e)?t[e]:void 0},Ae.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Y.call(t,e)},Ae.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=me&&void 0===t?n:t,this},Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(e){var t=this.__data__,r=Oe(t,e);return!(r<0||(r==t.length-1?t.pop():oe.call(t,r,1),--this.size,0))},Ee.prototype.get=function(e){var t=this.__data__,r=Oe(t,e);return r<0?void 0:t[r][1]},Ee.prototype.has=function(e){return Oe(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var r=this.__data__,n=Oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},_e.prototype.clear=function(){this.size=0,this.__data__={hash:new Ae,map:new(he||Ee),string:new Ae}},_e.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},_e.prototype.get=function(e){return je(this,e).get(e)},_e.prototype.has=function(e){return je(this,e).has(e)},_e.prototype.set=function(e,t){var r=je(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Ie.prototype.add=Ie.prototype.push=function(e){return this.__data__.set(e,n),this},Ie.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Ee,this.size=0},Pe.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ee){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new _e(n)}return r.set(e,t),this.size=r.size,this};var Le=ae?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,i=null==t?0:t.length,o=0,s=[];++n<i;){var a=t[n];c=a,ie.call(e,c)&&(s[o++]=a)}var c;return s}(ae(e)))}:function(){return[]},$e=ke;function De(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(ue&&$e(new ue(new ArrayBuffer(1)))!=P||he&&$e(new he)!=m||de&&$e(de.resolve())!=v||pe&&$e(new pe)!=C||fe&&$e(new fe)!=_)&&($e=function(e){var t=ke(e),r=t==b?e.constructor:void 0,n=r?Be(r):"";if(n)switch(n){case ge:return P;case we:return m;case be:return v;case ve:return C;case ye:return _}return t});var We=Se(function(){return arguments}())?Se:function(e){return Ge(e)&&Y.call(e,"callee")&&!ie.call(e,"callee")},ze=Array.isArray,He=ce||function(){return!1};function Fe(e){if(!Ve(e))return!1;var t=ke(e);return t==p||t==f||t==l||t==y}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function Ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Ke=B?function(e){return function(t){return e(t)}}(B):function(e){return Ge(e)&&qe(e.length)&&!!S[ke(e)]};function Ze(e){return null!=(t=e)&&qe(t.length)&&!Fe(t)?function(e,t){var r=ze(e),n=!r&&We(e),i=!r&&!n&&He(e),o=!r&&!n&&!i&&Ke(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=a.length;for(var l in e)!t&&!Y.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||De(l,c))||a.push(l);return a}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||K))return le(e);var t,r,n=[];for(var i in Object(e))Y.call(e,i)&&"constructor"!=i&&n.push(i);return n}(e);var t}e.exports=function(e,t){return Me(e,t)}},4213:(e,t,r)=>{"use strict";r.d(t,{j:()=>ce});const n={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},i=e=>1e3*e,o=e=>e/1e3,s=()=>{},a=e=>e;function c(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}const l=e=>e(),u=(e,t,r=n.duration)=>new Proxy({animations:e.map(l).filter(Boolean),duration:r,options:t},h),h={get:(e,t)=>{const r=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return o((null==r?void 0:r[t])||0);case"playbackRate":case"playState":return null==r?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(d)).catch(s)),e.finished;case"stop":return()=>{e.animations.forEach((e=>c(e)))};case"forEachNative":return t=>{e.animations.forEach((r=>t(r,e)))};default:return void 0===(null==r?void 0:r[t])?void 0:()=>e.animations.forEach((e=>e[t]()))}},set:(e,t,r)=>{switch(t){case"currentTime":r=i(r);case"currentTime":case"playbackRate":for(let n=0;n<e.animations.length;n++)e.animations[n][t]=r;return!0}return!1}},d=e=>e.finished,p=e=>"object"==typeof e&&Boolean(e.createAnimation),f=e=>"number"==typeof e,m=e=>Array.isArray(e)&&!f(e[0]),g=(e,t,r)=>-r*e+r*t+e,w=(e,t,r)=>t-e==0?1:(r-e)/(t-e);function b(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=w(0,t,n);e.push(g(r,1,i))}}const v=(e,t,r)=>Math.min(Math.max(r,e),t);const y=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,x=1e-7,C=12;function A(e,t,r,n){if(e===t&&r===n)return a;return i=>0===i||1===i?i:y(function(e,t,r,n,i){let o,s,a=0;do{s=t+(r-t)/2,o=y(s,n,i)-e,o>0?r=s:t=s}while(Math.abs(o)>x&&++a<C);return s}(i,0,1,e,r),t,n)}const E=e=>"function"==typeof e,_=e=>Array.isArray(e)&&f(e[0]),I={ease:A(.25,.1,.25,1),"ease-in":A(.42,0,1,1),"ease-in-out":A(.42,0,.58,1),"ease-out":A(0,0,.58,1)},P=/\((.*?)\)/;function O(e){if(E(e))return e;if(_(e))return A(...e);if(I[e])return I[e];if(e.startsWith("steps")){const t=P.exec(e);if(t){const e=t[1].split(",");return((e,t="end")=>r=>{const n=(r="end"===t?Math.min(r,.999):Math.max(r,.001))*e,i="end"===t?Math.floor(n):Math.ceil(n);return v(0,1,i/e)})(parseFloat(e[0]),e[1].trim())}}return a}class k{constructor(e,t=[0,1],{easing:r,duration:i=n.duration,delay:o=n.delay,endDelay:s=n.endDelay,repeat:c=n.repeat,offset:l,direction:u="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=a,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),r=r||n.easing,p(r)){const e=r.createAnimation(t);r=e.easing,t=e.keyframes||t,i=e.duration||i}this.repeat=c,this.easing=m(r)?a:O(r),this.updateDuration(i);const h=function(e,t=function(e){const t=[0];return b(t,e-1),t}(e.length),r=a){const n=e.length,i=n-t.length;return i>0&&b(t,i),i=>{let o=0;for(;o<n-2&&!(i<t[o+1]);o++);let s=v(0,1,w(t[o],t[o+1],i));const a=function(e,t){return m(e)?e[((e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e})(0,e.length,t)]:e}(r,o);return s=a(s),g(e[o],e[o+1],s)}}(t,l,m(r)?r.map(O):a);this.tick=t=>{var r;let n=0;n=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=n,n/=1e3,n=Math.max(n-o,0),"finished"===this.playState&&void 0===this.pauseTime&&(n=this.totalDuration);const i=n/this.duration;let a=Math.floor(i),c=i%1;!c&&i>=1&&(c=1),1===c&&a--;const l=a%2;("reverse"===u||"alternate"===u&&l||"alternate-reverse"===u&&!l)&&(c=1-c);const d=n>=this.totalDuration?1:Math.min(c,1),p=h(this.easing(d));e(p),void 0===this.pauseTime&&("finished"===this.playState||n>=this.totalDuration+s)?(this.playState="finished",null===(r=this.resolve)||void 0===r||r.call(this,p)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class S{setAnimation(e){this.animation=e,null==e||e.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const M=new WeakMap;function N(e){return M.has(e)||M.set(e,{transforms:[],values:new Map}),M.get(e)}const T=["","X","Y","Z"],j={x:"translateX",y:"translateY",z:"translateZ"},R={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},L={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:R,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:a},skew:R},$=new Map,D=e=>`--motion-${e}`,B=["x","y","z"];["translate","scale","rotate","skew"].forEach((e=>{T.forEach((t=>{B.push(e+t),$.set(D(e+t),L[e])}))}));const U=(e,t)=>B.indexOf(e)-B.indexOf(t),W=new Set(B),z=e=>W.has(e),H=e=>e.sort(U).reduce(F,"").trim(),F=(e,t)=>`${e} ${t}(var(${D(t)}))`,q=e=>e.startsWith("--"),V=new Set,G=(e,t)=>document.createElement("div").animate(e,t),K={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{G({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(G({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{G({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},Z={},Q={};for(const e in K)Q[e]=()=>(void 0===Z[e]&&(Z[e]=K[e]()),Z[e]);const Y=(e,t)=>E(e)?Q.linearEasing()?`linear(${((e,t)=>{let r="";const n=Math.round(t/.015);for(let t=0;t<n;t++)r+=e(w(0,n-1,t))+", ";return r.substring(0,r.length-2)})(e,t)})`:n.easing:_(e)?J(e):e,J=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function X(e){return j[e]&&(e=j[e]),z(e)?D(e):e}const ee=(e,t)=>{t=X(t);let r=q(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&0!==r){const e=$.get(t);e&&(r=e.initialValue)}return r},te=(e,t,r)=>{t=X(t),q(t)?e.style.setProperty(t,r):e.style[t]=r};function re(e,t,r,o={},l){const u=window.__MOTION_DEV_TOOLS_RECORD,h=!1!==o.record&&u;let d,{duration:g=n.duration,delay:w=n.delay,endDelay:b=n.endDelay,repeat:v=n.repeat,easing:y=n.easing,persist:x=!1,direction:C,offset:A,allowWebkitAcceleration:_=!1}=o;const I=N(e),P=z(t);let O=Q.waapi();P&&((e,t)=>{j[t]&&(t=j[t]);const{transforms:r}=N(e);var n,i;i=t,-1===(n=r).indexOf(i)&&n.push(i),e.style.transform=H(r)})(e,t);const k=X(t),M=function(e,t){return e.has(t)||e.set(t,new S),e.get(t)}(I.values,k),T=$.get(k);return c(M.animation,!(p(y)&&M.generator)&&!1!==o.record),()=>{const n=()=>{var t,r;return null!==(r=null!==(t=ee(e,k))&&void 0!==t?t:null==T?void 0:T.initialValue)&&void 0!==r?r:0};let c=function(e,t){for(let r=0;r<e.length;r++)null===e[r]&&(e[r]=r?e[r-1]:t());return e}((e=>Array.isArray(e)?e:[e])(r),n);const I=function(e,t){var r;let n=(null==t?void 0:t.toDefaultUnit)||a;const i=e[e.length-1];if("string"==typeof i){const e=(null===(r=i.match(/(-?[\d.]+)([a-z%]*)/))||void 0===r?void 0:r[2])||"";e&&(n=t=>t+e)}return n}(c,T);if(p(y)){const e=y.createAnimation(c,"opacity"!==t,n,k,M);y=e.easing,c=e.keyframes||c,g=e.duration||g}if(q(k)&&(Q.cssRegisterProperty()?function(e){if(!V.has(e)){V.add(e);try{const{syntax:t,initialValue:r}=$.has(e)?$.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch(e){}}}(k):O=!1),P&&!Q.linearEasing()&&(E(y)||m(y)&&y.some(E))&&(O=!1),O){T&&(c=c.map((e=>f(e)?T.toDefaultUnit(e):e))),1!==c.length||Q.partialKeyframes()&&!h||c.unshift(n());const t={delay:i(w),duration:i(g),endDelay:i(b),easing:m(y)?void 0:Y(y,g),direction:C,iterations:v+1,fill:"both"};d=e.animate({[k]:c,offset:A,easing:m(y)?y.map((e=>Y(e,g))):void 0},t),d.finished||(d.finished=new Promise(((e,t)=>{d.onfinish=e,d.oncancel=t})));const r=c[c.length-1];d.finished.then((()=>{x||(te(e,k,r),d.cancel())})).catch(s),_||(d.playbackRate=1.000001)}else if(l&&P)c=c.map((e=>"string"==typeof e?parseFloat(e):e)),1===c.length&&c.unshift(parseFloat(n())),d=new l((t=>{te(e,k,I?I(t):t)}),c,Object.assign(Object.assign({},o),{duration:g,easing:y}));else{const t=c[c.length-1];te(e,k,T&&f(t)?T.toDefaultUnit(t):t)}return h&&u(e,t,c,{duration:g,delay:w,easing:y,repeat:v,offset:A},"motion-one"),M.setAnimation(d),d}}const ne=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function ie(e,t,r){return E(e)?e(t,r):e}const oe=(se=k,function(e,t,r={}){const n=(e=function(e,t){return"string"==typeof e?e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(e)).length;Boolean(n),Boolean(t);const i=[];for(let o=0;o<n;o++){const s=e[o];for(const e in t){const a=ne(r,e);a.delay=ie(a.delay,o,n);const c=re(s,e,t[e],a,se);i.push(c)}}return u(i,r,r.duration)});var se;function ae(e,t={}){return u([()=>{const r=new k(e,[0,1],t);return r.finished.catch((()=>{})),r}],t,t.duration)}function ce(e,t,r){return(E(e)?ae:oe)(e,t,r)}},2592:(e,t,r)=>{const n=r(7138),i=r(5115),o=r(6907),s=r(3776);function a(e,t,r,o,s){const a=[].slice.call(arguments,1),c=a.length,l="function"==typeof a[c-1];if(!l&&!n())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=o=void 0):2!==c||t.getContext||(o=r,r=t,t=void 0),new Promise((function(n,s){try{const s=i.create(r,o);n(e(s,t,o))}catch(e){s(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(s=r,r=t,t=o=void 0):3===c&&(t.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=r,r=t,t=void 0));try{const n=i.create(r,o);s(null,e(n,t,o))}catch(e){s(e)}}t.create=i.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,(function(e,t,r){return s.render(e,r)}))},7138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:(e,t,r)=>{const n=r(242).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),i=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let e=1;e<t-1;e++)o[e]=o[e-1]-i;return o.push(6),o.reverse()},t.getPositions=function(e){const r=[],n=t.getRowColCoords(e),i=n.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)0===e&&0===t||0===e&&t===i-1||e===i-1&&0===t||r.push([n[e],n[t]]);return r}},8260:(e,t,r)=>{const n=r(6910),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=n.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*i.indexOf(this.data[t]);r+=i.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},7245:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},3280:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){const i=e*this.size+t;this.data[i]=r,n&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},3424:(e,t,r)=>{const n=r(2378),i=r(6910);function o(e){this.mode=i.BYTE,"string"==typeof e&&(e=n(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=o},5393:(e,t,r)=>{const n=r(4908),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case n.L:return i[4*(e-1)+0];case n.M:return i[4*(e-1)+1];case n.Q:return i[4*(e-1)+2];case n.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return o[4*(e-1)+0];case n.M:return o[4*(e-1)+1];case n.Q:return o[4*(e-1)+2];case n.H:return o[4*(e-1)+3];default:return}}},4908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},6526:(e,t,r)=>{const n=r(242).getSymbolSize;t.getPositions=function(e){const t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},1642:(e,t,r)=>{const n=r(242),i=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){const r=e.bit<<3|t;let o=r<<10;for(;n.getBCHDigit(o)-i>=0;)o^=1335<<n.getBCHDigit(o)-i;return 21522^(r<<10|o)}},9729:(e,t)=>{const r=new Uint8Array(512),n=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},5442:(e,t,r)=>{const n=r(6910),i=r(242);function o(e){this.mode=n.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=i.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=o},7126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function r(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,n=0,i=0,o=null,s=null;for(let a=0;a<t;a++){n=i=0,o=s=null;for(let c=0;c<t;c++){let t=e.get(a,c);t===o?n++:(n>=5&&(r+=n-5+3),o=t,n=1),t=e.get(c,a),t===s?i++:(i>=5&&(r+=i-5+3),s=t,i=1)}n>=5&&(r+=n-5+3),i>=5&&(r+=i-5+3)}return r},t.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let i=0;i<t-1;i++){const t=e.get(n,i)+e.get(n,i+1)+e.get(n+1,i)+e.get(n+1,i+1);4!==t&&0!==t||r++}return 3*r},t.getPenaltyN3=function(e){const t=e.size;let r=0,n=0,i=0;for(let o=0;o<t;o++){n=i=0;for(let s=0;s<t;s++)n=n<<1&2047|e.get(o,s),s>=10&&(1488===n||93===n)&&r++,i=i<<1&2047|e.get(s,o),s>=10&&(1488===i||93===i)&&r++}return 40*r},t.getPenaltyN4=function(e){let t=0;const r=e.data.length;for(let n=0;n<r;n++)t+=e.data[n];return 10*Math.abs(Math.ceil(100*t/r/5)-10)},t.applyMask=function(e,t){const n=t.size;for(let i=0;i<n;i++)for(let o=0;o<n;o++)t.isReserved(o,i)||t.xor(o,i,r(e,o,i))},t.getBestMask=function(e,r){const n=Object.keys(t.Patterns).length;let i=0,o=1/0;for(let s=0;s<n;s++){r(s),t.applyMask(s,e);const n=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),n<o&&(o=n,i=s)}return i}},6910:(e,t,r)=>{const n=r(3114),i=r(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!n.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},1085:(e,t,r)=>{const n=r(6910);function i(e){this.mode=n.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,r,n;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),n=parseInt(r,10),e.put(n,10);const i=this.data.length-t;i>0&&(r=this.data.substr(t),n=parseInt(r,10),e.put(n,3*i+1))},e.exports=i},6143:(e,t,r)=>{const n=r(9729);t.mul=function(e,t){const r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<t.length;o++)r[i+o]^=n.mul(e[i],t[o]);return r},t.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let i=0;i<t.length;i++)r[i]^=n.mul(t[i],e);let i=0;for(;i<r.length&&0===r[i];)i++;r=r.slice(i)}return r},t.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let i=0;i<e;i++)r=t.mul(r,new Uint8Array([1,n.exp(i)]));return r}},5115:(e,t,r)=>{const n=r(242),i=r(4908),o=r(7245),s=r(3280),a=r(1845),c=r(6526),l=r(7126),u=r(5393),h=r(2882),d=r(3103),p=r(1642),f=r(6910),m=r(6130);function g(e,t,r){const n=e.size,i=p.getEncodedBits(t,r);let o,s;for(o=0;o<15;o++)s=1==(i>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(n-15+o,8,s,!0),o<8?e.set(8,n-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(n-8,8,1,!0)}function w(e,t,r,i){let p;if(Array.isArray(e))p=m.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let n=t;if(!n){const t=m.rawSplit(e);n=d.getBestVersionForData(t,r)}p=m.fromString(e,n||40)}}const w=d.getBestVersionForData(p,r);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<w)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+w+".\n")}else t=w;const b=function(e,t,r){const i=new o;r.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(i)}));const s=8*(n.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const a=(s-i.getLengthInBits())/8;for(let e=0;e<a;e++)i.put(e%2?17:236,8);return function(e,t,r){const i=n.getSymbolTotalCodewords(t),o=i-u.getTotalCodewordsCount(t,r),s=u.getBlocksCount(t,r),a=s-i%s,c=Math.floor(i/s),l=Math.floor(o/s),d=l+1,p=c-l,f=new h(p);let m=0;const g=new Array(s),w=new Array(s);let b=0;const v=new Uint8Array(e.buffer);for(let e=0;e<s;e++){const t=e<a?l:d;g[e]=v.slice(m,m+t),w[e]=f.encode(g[e]),m+=t,b=Math.max(b,t)}const y=new Uint8Array(i);let x,C,A=0;for(x=0;x<b;x++)for(C=0;C<s;C++)x<g[C].length&&(y[A++]=g[C][x]);for(x=0;x<p;x++)for(C=0;C<s;C++)y[A++]=w[C][x];return y}(i,e,t)}(t,r,p),v=n.getSymbolSize(t),y=new s(v);return function(e,t){const r=e.size,n=c.getPositions(t);for(let t=0;t<n.length;t++){const i=n[t][0],o=n[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||r<=i+t))for(let n=-1;n<=7;n++)o+n<=-1||r<=o+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(i+t,o+n,!0,!0):e.set(i+t,o+n,!1,!0))}}(y,t),function(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(y),function(e,t){const r=a.getPositions(t);for(let t=0;t<r.length;t++){const n=r[t][0],i=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(n+t,i+r,!0,!0):e.set(n+t,i+r,!1,!0)}}(y,t),g(y,r,0),t>=7&&function(e,t){const r=e.size,n=d.getEncodedBits(t);let i,o,s;for(let t=0;t<18;t++)i=Math.floor(t/3),o=t%3+r-8-3,s=1==(n>>t&1),e.set(i,o,s,!0),e.set(o,i,s,!0)}(y,t),function(e,t){const r=e.size;let n=-1,i=r-1,o=7,s=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(i,a-r)){let n=!1;s<t.length&&(n=1==(t[s]>>>o&1)),e.set(i,a-r,n),o--,-1===o&&(s++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}(y,b),isNaN(i)&&(i=l.getBestMask(y,g.bind(null,y,r))),l.applyMask(i,y),g(y,r,i),{modules:y,version:t,errorCorrectionLevel:r,maskPattern:i,segments:p}}t.create=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,o,s=i.M;return void 0!==t&&(s=i.from(t.errorCorrectionLevel,i.M),r=d.from(t.version),o=l.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),w(e,r,s,o)}},2882:(e,t,r)=>{const n=r(6143);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(r,i),e}return r},e.exports=i},7007:(e,t)=>{const r="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";t.KANJI=new RegExp(n,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+r+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},6130:(e,t,r)=>{const n=r(6910),i=r(1085),o=r(8260),s=r(3424),a=r(5442),c=r(7007),l=r(242),u=r(5987);function h(e){return unescape(encodeURIComponent(e)).length}function d(e,t,r){const n=[];let i;for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function p(e){const t=d(c.NUMERIC,n.NUMERIC,e),r=d(c.ALPHANUMERIC,n.ALPHANUMERIC,e);let i,o;return l.isKanjiModeEnabled()?(i=d(c.BYTE,n.BYTE,e),o=d(c.KANJI,n.KANJI,e)):(i=d(c.BYTE_KANJI,n.BYTE,e),o=[]),t.concat(r,i,o).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function f(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return o.getBitsLength(e);case n.KANJI:return a.getBitsLength(e);case n.BYTE:return s.getBitsLength(e)}}function m(e,t){let r;const c=n.getBestModeForData(e);if(r=n.from(t,c),r!==n.BYTE&&r.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(c));switch(r!==n.KANJI||l.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new i(e);case n.ALPHANUMERIC:return new o(e);case n.KANJI:return new a(e);case n.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e}),[])},t.fromString=function(e,r){const i=function(e){const t=[];for(let r=0;r<e.length;r++){const i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:h(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:h(i.data)}])}}return t}(p(e,l.isKanjiModeEnabled())),o=function(e,t){const r={},i={start:{}};let o=["start"];for(let s=0;s<e.length;s++){const a=e[s],c=[];for(let e=0;e<a.length;e++){const l=a[e],u=""+s+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<o.length;e++){const s=o[e];r[s]&&r[s].node.mode===l.mode?(i[s][u]=f(r[s].lastCount+l.length,l.mode)-f(r[s].lastCount,l.mode),r[s].lastCount+=l.length):(r[s]&&(r[s].lastCount=l.length),i[s][u]=f(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,t))}}o=c}for(let e=0;e<o.length;e++)i[o[e]].end=0;return{map:i,table:r}}(i,r),s=u.find_path(o.map,"start","end"),a=[];for(let e=1;e<s.length-1;e++)a.push(o.table[s[e]].node);return t.fromArray(a.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[]))},t.rawSplit=function(e){return t.fromArray(p(e,l.isKanjiModeEnabled()))}},242:(e,t)=>{let r;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return n[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},3114:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},3103:(e,t,r)=>{const n=r(242),i=r(5393),o=r(4908),s=r(6910),a=r(3114),c=n.getBCHDigit(7973);function l(e,t){return s.getCharCountIndicator(e,t)+4}function u(e,t){let r=0;return e.forEach((function(e){const n=l(e.mode,t);r+=n+e.getBitsLength()})),r}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=s.BYTE);const o=8*(n.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(r===s.MIXED)return o;const c=o-l(r,e);switch(r){case s.NUMERIC:return Math.floor(c/10*3);case s.ALPHANUMERIC:return Math.floor(c/11*2);case s.KANJI:return Math.floor(c/13);case s.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,r){let n;const i=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let n=1;n<=40;n++)if(u(e,n)<=t.getCapacity(n,r,s.MIXED))return n}(e,i);if(0===e.length)return 1;n=e[0]}else n=e;return function(e,r,n){for(let i=1;i<=40;i++)if(r<=t.getCapacity(i,n,e))return i}(n.mode,n.getLength(),i)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;n.getBCHDigit(t)-c>=0;)t^=7973<<n.getBCHDigit(t)-c;return e<<12|t}},6907:(e,t,r)=>{const n=r(9653);t.render=function(e,t,r){let i=r,o=t;void 0!==i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);const s=n.getImageWidth(e.modules.size,i),a=o.getContext("2d"),c=a.createImageData(s,s);return n.qrToImageData(c.data,e,i),function(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,o,s),a.putImageData(c,0,0),o},t.renderToDataURL=function(e,r,n){let i=n;void 0!==i||r&&r.getContext||(i=r,r=void 0),i||(i={});const o=t.render(e,r,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},3776:(e,t,r)=>{const n=r(9653);function i(e,t){const r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function o(e,t,r){let n=e+t;return void 0!==r&&(n+=" "+r),n}t.render=function(e,t,r){const s=n.getOptions(t),a=e.modules.size,c=e.modules.data,l=a+2*s.margin,u=s.color.light.a?"<path "+i(s.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",h="<path "+i(s.color.dark,"stroke")+' d="'+function(e,t,r){let n="",i=0,s=!1,a=0;for(let c=0;c<e.length;c++){const l=Math.floor(c%t),u=Math.floor(c/t);l||s||(s=!0),e[c]?(a++,c>0&&l>0&&e[c-1]||(n+=s?o("M",l+r,.5+u+r):o("m",i,0),i=0,s=!1),l+1<t&&e[c+1]||(n+=o("h",a),a=0)):i++}return n}(c,a,s.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+u+h+"</svg>\n";return"function"==typeof r&&r(null,p),p}},9653:(e,t)=>{function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){const n=t.getScale(e,r);return Math.floor((e+2*r.margin)*n)},t.qrToImageData=function(e,r,n){const i=r.modules.size,o=r.modules.data,s=t.getScale(i,n),a=Math.floor((i+2*n.margin)*s),c=n.margin*s,l=[n.color.light,n.color.dark];for(let t=0;t<a;t++)for(let r=0;r<a;r++){let u=4*(t*a+r),h=n.color.light;t>=c&&r>=c&&t<a-c&&r<a-c&&(h=l[o[Math.floor((t-c)/s)*i+Math.floor((r-c)/s)]?1:0]),e[u++]=h.r,e[u++]=h.g,e[u++]=h.b,e[u]=h.a}}},5346:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var o=r.length+1;if(1===o)return e;var s=new Array(o);s[0]=i(e);for(var a=1;a<o;a++)s[a]=i(r[a]);return s.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var l="",u=0,h=-1,d=e&&e.length||0,p=0;p<d;){if(37===e.charCodeAt(p)&&p+1<d){switch(h=h>-1?h:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=c)break;if(null==r[u])break;h<p&&(l+=e.slice(h,p)),l+=Number(r[u]),h=p+2,p++;break;case 105:if(u>=c)break;if(null==r[u])break;h<p&&(l+=e.slice(h,p)),l+=Math.floor(Number(r[u])),h=p+2,p++;break;case 79:case 111:case 106:if(u>=c)break;if(void 0===r[u])break;h<p&&(l+=e.slice(h,p));var f=typeof r[u];if("string"===f){l+="'"+r[u]+"'",h=p+2,p++;break}if("function"===f){l+=r[u].name||"<anonymous>",h=p+2,p++;break}l+=i(r[u]),h=p+2,p++;break;case 115:if(u>=c)break;h<p&&(l+=e.slice(h,p)),l+=String(r[u]),h=p+2,p++;break;case 37:h<p&&(l+=e.slice(h,p)),l+="%",h=p+2,p++,u--}++u}++p}return-1===h?e:(h<d&&(l+=e.slice(h)),l)}},3954:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeJsonParse=function(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}},t.safeJsonStringify=function(e){return"string"==typeof e?e:JSON.stringify(e,((e,t)=>void 0===t?null:t))}},500:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>y,__asyncGenerator:()=>v,__asyncValues:()=>x,__await:()=>b,__awaiter:()=>u,__classPrivateFieldGet:()=>_,__classPrivateFieldSet:()=>I,__createBinding:()=>d,__decorate:()=>a,__exportStar:()=>p,__extends:()=>i,__generator:()=>h,__importDefault:()=>E,__importStar:()=>A,__makeTemplateObject:()=>C,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>s,__spread:()=>g,__spreadArrays:()=>w,__values:()=>f});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function h(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function v(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(c,l):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function y(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}function _(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function I(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},5883:()=>{},6559:(e,t,r)=>{"use strict";const n=r(5346);e.exports=s;const i=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},o={mapHttpRequest:d,mapHttpResponse:d,wrapRequestSerializer:p,wrapResponseSerializer:p,wrapErrorSerializer:p,req:d,res:d,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function s(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},o=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n);let d=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(d=!1),"function"==typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");const p=e.level||"info",m=Object.create(r);m.log||(m.log=f),Object.defineProperty(m,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(m,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(g,m,"error","log"),a(g,m,"fatal","error"),a(g,m,"warn","error"),a(g,m,"info","log"),a(g,m,"debug","log"),a(g,m,"trace","log")}});const g={transmit:t,serialize:o,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:h(e)};return m.levels=s.levels,m.level=p,m.setMaxListeners=m.getMaxListeners=m.emit=m.addListener=m.on=m.prependListener=m.once=m.prependOnceListener=m.removeListener=m.removeAllListeners=m.listeners=m.listenerCount=m.eventNames=m.write=m.flush=f,m.serializers=n,m._serialize=o,m._stdErrSerialize=d,m.child=function(r,i){if(!r)throw new Error("missing bindings for child Pino");i=i||{},o&&r.serializers&&(i.serializers=r.serializers);const s=i.serializers;if(o&&s){var a=Object.assign({},n,s),h=!0===e.browser.serialize?Object.keys(a):o;delete r.serializers,c([r],h,a,this._stdErrSerialize)}function d(e){this._childLevel=1+(0|e._childLevel),this.error=l(e,r,"error"),this.fatal=l(e,r,"fatal"),this.warn=l(e,r,"warn"),this.info=l(e,r,"info"),this.debug=l(e,r,"debug"),this.trace=l(e,r,"trace"),a&&(this.serializers=a,this._serialize=h),t&&(this._logEvent=u([].concat(e._logEvent.bindings,r)))}return d.prototype=this,new d(this)},t&&(m._logEvent=u()),m}function a(e,t,r,o){const a=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?f:a[r]?a[r]:i[r]||i[o]||f,function(e,t,r){var o;(e.transmit||t[r]!==f)&&(t[r]=(o=t[r],function(){const a=e.timestamp(),l=new Array(arguments.length),h=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];if(e.serialize&&!e.asObject&&c(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?o.call(h,function(e,t,r,i){e._serialize&&c(r,e._serialize,e.serializers,e._stdErrSerialize);const o=r.slice();let a=o[0];const l={};i&&(l.time=i),l.level=s.levels.values[t];let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==a&&"object"==typeof a){for(;u--&&"object"==typeof o[0];)Object.assign(l,o.shift());a=o.length?n(o.shift(),o):void 0}else"string"==typeof a&&(a=n(o.shift(),o));return void 0!==a&&(l.msg=a),l}(this,r,l,a)):o.apply(h,l),e.transmit){const n=e.transmit.level||t.level,i=s.levels.values[n],o=s.levels.values[r];if(o<i)return;!function(e,t,r){const n=t.send,i=t.ts,o=t.methodLevel,s=t.methodValue,a=t.val,l=e._logEvent.bindings;c(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=s,n(o,e._logEvent,a),e._logEvent=u(l)}(this,{ts:a,methodLevel:r,methodValue:o,transmitLevel:n,transmitValue:s.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},l)}}))}(e,t,r)}function c(e,t,r,n){for(const i in e)if(n&&e[i]instanceof Error)e[i]=s.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(const n in e[i])t&&t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function l(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return e[r].apply(this,n)}}function u(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function h(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?m:g}function d(){return{}}function p(e){return e}function f(){}function m(){return!1}function g(){return Date.now()}s.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},s.stdSerializers=o,s.stdTimeFunctions=Object.assign({},{nullTime:m,epochTime:g,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},672:(e,t,r)=>{"use strict";r.d(t,{AV:()=>o,ConfigCtrl:()=>p,ExplorerCtrl:()=>R,OptionsCtrl:()=>h,ThemeCtrl:()=>F,ToastCtrl:()=>V,jb:()=>$,uA:()=>l,zv:()=>s});var n=r(6828);const i=(0,n.sj)({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),o={state:i,subscribe:e=>(0,n.Ld)(i,(()=>e(i))),push(e,t){e!==i.view&&(i.view=e,t&&(i.data=t),i.history.push(e))},reset(e){i.view=e,i.history=[e]},replace(e){i.history.length>1&&(i.history[i.history.length-1]=e,i.view=e)},goBack(){if(i.history.length>1){i.history.pop();const[e]=i.history.slice(-1);i.view=e}},setData(e){i.data=e}},s={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>s.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return s.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,r){if(s.isHttpUrl(e))return this.formatUniversalUrl(e,t,r);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,r){if(!s.isHttpUrl(e))return this.formatNativeUrl(e,t,r);let n=e;return n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(s.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(s.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(s.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(s.WCM_VERSION,"2.6.1")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=o.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},a=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),c=(0,n.sj)({enabled:a,userSessionId:"",events:[],connectedWalletId:void 0}),l={state:c,subscribe:e=>(0,n.Ld)(c.events,(()=>e((0,n.CO)(c.events[c.events.length-1])))),initialize(){c.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(c.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){c.connectedWalletId=e},click(e){if(c.enabled){const t={type:"CLICK",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}},track(e){if(c.enabled){const t={type:"TRACK",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}},view(e){if(c.enabled){const t={type:"VIEW",name:e.name,userSessionId:c.userSessionId,timestamp:Date.now(),data:e};c.events.push(t)}}},u=(0,n.sj)({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),h={state:u,subscribe:e=>(0,n.Ld)(u,(()=>e(u))),setChains(e){u.chains=e},setWalletConnectUri(e){u.walletConnectUri=e},setIsCustomDesktop(e){u.isCustomDesktop=e},setIsCustomMobile(e){u.isCustomMobile=e},setIsDataLoaded(e){u.isDataLoaded=e},setIsUiLoaded(e){u.isUiLoaded=e},setIsAuth(e){u.isAuth=e}},d=(0,n.sj)({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),p={state:d,subscribe:e=>(0,n.Ld)(d,(()=>e(d))),setConfig(e){var t,r;l.initialize(),h.setChains(e.chains),h.setIsAuth(Boolean(e.enableAuthMode)),h.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),h.setIsCustomDesktop(Boolean(null==(r=e.desktopWallets)?void 0:r.length)),s.setModalVersionInStorage(),Object.assign(d,e)}};var f=Object.defineProperty,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,b=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const v="https://explorer-api.walletconnect.com",y="wcm",x="js-2.6.1";async function C(e,t){const r=((e,t)=>{for(var r in t||(t={}))g.call(t,r)&&b(e,r,t[r]);if(m)for(var r of m(t))w.call(t,r)&&b(e,r,t[r]);return e})({sdkType:y,sdkVersion:x},t),n=new URL(e,v);return n.searchParams.append("projectId",p.state.projectId),Object.entries(r).forEach((([e,t])=>{t&&n.searchParams.append(e,String(t))})),(await fetch(n)).json()}const A=async e=>C("/w3m/v1/getDesktopListings",e),E=async e=>C("/w3m/v1/getMobileListings",e),_=async e=>C("/w3m/v1/getAllListings",e),I=e=>`${v}/w3m/v1/getWalletImage/${e}?projectId=${p.state.projectId}&sdkType=${y}&sdkVersion=${x}`,P=e=>`${v}/w3m/v1/getAssetImage/${e}?projectId=${p.state.projectId}&sdkType=${y}&sdkVersion=${x}`;var O=Object.defineProperty,k=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,N=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const T=s.isMobile(),j=(0,n.sj)({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),R={state:j,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=p.state;if("NONE"===e||"ALL"===t&&!e)return j.recomendedWallets;if(s.isArray(e)){const t={recommendedIds:e.join(",")},{listings:r}=await _(t),n=Object.values(r);n.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id))),j.recomendedWallets=n}else{const{chains:e,isAuth:r}=h.state,n=e?.join(","),i=s.isArray(t),o={page:1,sdks:r?"auth_v1":void 0,entries:s.RECOMMENDED_WALLET_AMOUNT,chains:n,version:2,excludedIds:i?t.join(","):void 0},{listings:a}=T?await E(o):await A(o);j.recomendedWallets=Object.values(a)}return j.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var r in t||(t={}))S.call(t,r)&&N(e,r,t[r]);if(k)for(var r of k(t))M.call(t,r)&&N(e,r,t[r]);return e})({},e),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=p.state,{recomendedWallets:i}=j;if("ALL"===n)return j.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):s.isArray(r)&&(t.excludedIds=r.join(",")),s.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),h.state.isAuth&&(t.sdks="auth_v1");const{page:o,search:a}=e,{listings:c,total:l}=T?await E(t):await A(t),u=Object.values(c),d=a?"search":"wallets";return j[d]={listings:[...j[d].listings,...u],total:l,page:o??1},{listings:u,total:l}},getWalletImageUrl:e=>I(e),getAssetImageUrl:e=>P(e),resetSearch(){j.search={listings:[],total:0,page:1}}},L=(0,n.sj)({open:!1}),$={state:L,subscribe:e=>(0,n.Ld)(L,(()=>e(L))),open:async e=>new Promise((t=>{const{isUiLoaded:r,isDataLoaded:n}=h.state;if(s.removeWalletConnectDeepLink(),h.setWalletConnectUri(e?.uri),h.setChains(e?.chains),o.reset("ConnectWallet"),r&&n)L.open=!0,t();else{const e=setInterval((()=>{const r=h.state;r.isUiLoaded&&r.isDataLoaded&&(clearInterval(e),L.open=!0,t())}),200)}})),close(){L.open=!1}};var D=Object.defineProperty,B=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,z=(e,t,r)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const H=(0,n.sj)({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),F={state:H,subscribe:e=>(0,n.Ld)(H,(()=>e(H))),setThemeConfig(e){const{themeMode:t,themeVariables:r}=e;t&&(H.themeMode=t),r&&(H.themeVariables=((e,t)=>{for(var r in t||(t={}))U.call(t,r)&&z(e,r,t[r]);if(B)for(var r of B(t))W.call(t,r)&&z(e,r,t[r]);return e})({},r))}},q=(0,n.sj)({open:!1,message:"",variant:"success"}),V={state:q,subscribe:e=>(0,n.Ld)(q,(()=>e(q))),openToast(e,t){q.open=!0,q.message=e,q.variant=t},closeToast(){q.open=!1}}},8189:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WcmModal:()=>Je,WcmQrCode:()=>oe});var n=r(9392),i=r(7408),o=r(623),s=r(672),a=r(3692),c=r(4213),l=r(796),u=r(2592),h=Object.defineProperty,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,m=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&m(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&m(e,r,t[r]);return e};const w={getPreset:e=>({"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[e]),setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=s.ThemeCtrl.state;if(e){const r=g(g(g({},function(){var e;const t={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(e=s.ThemeCtrl.state.themeMode)?e:"dark"];return{"--wcm-color-fg-1":t.foreground[1],"--wcm-color-fg-2":t.foreground[2],"--wcm-color-fg-3":t.foreground[3],"--wcm-color-bg-1":t.background[1],"--wcm-color-bg-2":t.background[2],"--wcm-color-bg-3":t.background[3],"--wcm-color-overlay":t.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),t);Object.entries(r).forEach((([t,r])=>e.style.setProperty(t,r)))}},globalCss:n.iv`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},b=n.iv`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,x=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?y(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&v(t,r,o),o};let C=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const e={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant};let t="inverse";return"ghost"===this.variant&&(t="secondary"),"outline"===this.variant&&(t="accent"),n.dy`<button class="${(0,o.$)(e)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<wcm-text variant="small-regular" color="${t}"><slot></slot></wcm-text>${this.iconRight}</button>`}};C.styles=[w.globalCss,b],x([(0,i.Cb)({type:Boolean})],C.prototype,"disabled",2),x([(0,i.Cb)()],C.prototype,"iconLeft",2),x([(0,i.Cb)()],C.prototype,"iconRight",2),x([(0,i.Cb)()],C.prototype,"onClick",2),x([(0,i.Cb)()],C.prototype,"variant",2),C=x([(0,i.Mo)("wcm-button")],C);const A=n.iv`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var E=Object.defineProperty,_=Object.getOwnPropertyDescriptor,I=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?_(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&E(t,r,o),o};let P=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"wcm-secondary":"secondary"===this.variant};return n.dy`<button ?disabled="${this.disabled}" class="${(0,o.$)(e)}"><slot></slot></button>`}};P.styles=[w.globalCss,A],I([(0,i.Cb)({type:Boolean})],P.prototype,"disabled",2),I([(0,i.Cb)()],P.prototype,"variant",2),P=I([(0,i.Mo)("wcm-button-big")],P);const O=n.iv`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let k=class extends n.oi{render(){return n.dy`<div><slot></slot></div>`}};k.styles=[w.globalCss,O],k=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-info-footer")],k);const S={CROSS_ICON:a.YP`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,WALLET_CONNECT_LOGO:a.YP`<svg width="178" height="29" viewBox="0 0 178 29" id="wcm-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,WALLET_CONNECT_ICON:a.YP`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,WALLET_CONNECT_ICON_COLORED:a.YP`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,BACK_ICON:a.YP`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,COPY_ICON:a.YP`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,RETRY_ICON:a.YP`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,DESKTOP_ICON:a.YP`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,MOBILE_ICON:a.YP`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,ARROW_DOWN_ICON:a.YP`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,ARROW_UP_RIGHT_ICON:a.YP`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,ARROW_RIGHT_ICON:a.YP`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,QRCODE_ICON:a.YP`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,SCAN_ICON:a.YP`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,CHECKMARK_ICON:a.YP`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,SEARCH_ICON:a.YP`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,WALLET_PLACEHOLDER:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,GLOBE_ICON:a.YP`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>`},M=n.iv`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let N=class extends n.oi{render(){return n.dy`<div class="wcm-toolbar-placeholder"></div><div class="wcm-toolbar">${S.WALLET_CONNECT_LOGO} <button @click="${s.jb.close}">${S.CROSS_ICON}</button></div>`}};N.styles=[w.globalCss,M],N=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-modal-backcard")],N);const T=n.iv`main{padding:20px;padding-top:0;width:100%}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let j=class extends n.oi{render(){return n.dy`<main><slot></slot></main>`}};j.styles=[w.globalCss,T],j=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-modal-content")],j);const R=n.iv`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let L=class extends n.oi{render(){return n.dy`<footer><slot></slot></footer>`}};L.styles=[w.globalCss,R],L=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-modal-footer")],L);const $=n.iv`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var D=Object.defineProperty,B=Object.getOwnPropertyDescriptor,U=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?B(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&D(t,r,o),o};let W=class extends n.oi{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return n.dy`<button class="wcm-back-btn" @click="${s.AV.goBack}">${S.BACK_ICON}</button>`}actionBtnTemplate(){return n.dy`<button class="wcm-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`}render(){const e={"wcm-border":this.border},t=s.AV.state.history.length>1,r=this.title?n.dy`<wcm-text variant="big-bold">${this.title}</wcm-text>`:n.dy`<slot></slot>`;return n.dy`<header class="${(0,o.$)(e)}">${t?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}</header>`}};W.styles=[w.globalCss,$],U([(0,i.Cb)()],W.prototype,"title",2),U([(0,i.Cb)()],W.prototype,"onAction",2),U([(0,i.Cb)()],W.prototype,"actionIcon",2),U([(0,i.Cb)({type:Boolean})],W.prototype,"border",2),W=U([(0,i.Mo)("wcm-modal-header")],W);const z={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(e,t){const r=e.renderRoot.querySelector(t);if(!r)throw new Error(`${t} not found`);return r},getWalletIcon({id:e,image_id:t}){const{walletImages:r}=s.ConfigCtrl.state;return null!=r&&r[e]?r[e]:t?s.ExplorerCtrl.getWalletImageUrl(t):""},getWalletName:(e,t=!1)=>t&&e.length>8?`${e.substring(0,8)}..`:e,isMobileAnimation:()=>window.innerWidth<=z.MOBILE_BREAKPOINT,async preloadImage(e){const t=new Promise(((t,r)=>{const n=new Image;n.onload=t,n.onerror=r,n.crossOrigin="anonymous",n.src=e}));return Promise.race([t,s.zv.wait(3e3)])},getErrorMessage:e=>e instanceof Error?e.message:"Unknown Error",debounce(e,t=500){let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...n)}),t)}},handleMobileLinking(e){const{walletConnectUri:t}=s.OptionsCtrl.state,{mobile:r,name:n}=e,i=r?.native,o=r?.universal;z.setRecentWallet(e),t&&function(e){let t="";i?t=s.zv.formatUniversalUrl(i,e,n):o&&(t=s.zv.formatNativeUrl(o,e,n)),s.zv.openHref(t,"_self")}(t)},handleAndroidLinking(){const{walletConnectUri:e}=s.OptionsCtrl.state;e&&(s.zv.setWalletConnectAndroidDeepLink(e),s.zv.openHref(e,"_self"))},async handleUriCopy(){const{walletConnectUri:e}=s.OptionsCtrl.state;if(e)try{await navigator.clipboard.writeText(e),s.ToastCtrl.openToast("Link copied","success")}catch{s.ToastCtrl.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:e}=s.ConfigCtrl.state,t=Object.values(e??{});return Object.values(t)},truncate:(e,t=8)=>e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`,setRecentWallet(e){try{localStorage.setItem(z.WCM_RECENT_WALLET_DATA,JSON.stringify(e))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const e=localStorage.getItem(z.WCM_RECENT_WALLET_DATA);return e?JSON.parse(e):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(e,t)=>e.toUpperCase().includes(t.toUpperCase()),openWalletExplorerUrl(){s.zv.openHref(z.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:e,mobile:t}=s.zv.getWalletRouterData(),r=Boolean(e?.native),n=Boolean(e?.universal);return{isDesktop:r,isMobile:Boolean(t?.native)||Boolean(t?.universal),isWeb:n}},goToConnectingView(e){s.AV.setData({Wallet:e});const t=s.zv.isMobile(),{isDesktop:r,isWeb:n,isMobile:i}=z.getCachedRouterWalletPlatforms();t?i?s.AV.push("MobileConnecting"):n?s.AV.push("WebConnecting"):s.AV.push("InstallWallet"):r?s.AV.push("DesktopConnecting"):n?s.AV.push("WebConnecting"):i?s.AV.push("MobileQrcodeConnecting"):s.AV.push("InstallWallet")}},H=n.iv`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var F=Object.defineProperty,q=Object.getOwnPropertyDescriptor,V=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?q(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&F(t,r,o),o};let G=class extends n.oi{constructor(){super(),this.view=s.AV.state.view,this.prevView=s.AV.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=s.AV.subscribe((e=>{this.view!==e.view&&this.onChangeRoute()}))}firstUpdated(){this.resizeObserver=new ResizeObserver((([e])=>{const t=`${e.contentRect.height}px`;"0px"!==this.oldHeight&&(0,c.j)(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t})),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;null==(e=this.unsubscribe)||e.call(this),null==(t=this.resizeObserver)||t.disconnect()}get routerEl(){return z.getShadowRootElement(this,".wcm-router")}get contentEl(){return z.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return n.dy`<wcm-connect-wallet-view></wcm-connect-wallet-view>`;case"DesktopConnecting":return n.dy`<wcm-desktop-connecting-view></wcm-desktop-connecting-view>`;case"MobileConnecting":return n.dy`<wcm-mobile-connecting-view></wcm-mobile-connecting-view>`;case"WebConnecting":return n.dy`<wcm-web-connecting-view></wcm-web-connecting-view>`;case"MobileQrcodeConnecting":return n.dy`<wcm-mobile-qr-connecting-view></wcm-mobile-qr-connecting-view>`;case"WalletExplorer":return n.dy`<wcm-wallet-explorer-view></wcm-wallet-explorer-view>`;case"Qrcode":return n.dy`<wcm-qrcode-view></wcm-qrcode-view>`;case"InstallWallet":return n.dy`<wcm-install-wallet-view></wcm-install-wallet-view>`;default:return n.dy`<div>Not Found</div>`}}async onChangeRoute(){await(0,c.j)(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=s.AV.state.view,(0,c.j)(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return n.dy`<div class="wcm-router"><div class="wcm-content">${this.viewTemplate()}</div></div>`}};G.styles=[w.globalCss,H],V([(0,i.SB)()],G.prototype,"view",2),V([(0,i.SB)()],G.prototype,"prevView",2),G=V([(0,i.Mo)("wcm-modal-router")],G);const K=n.iv`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var Z=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,Y=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Q(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Z(t,r,o),o};let J=class extends n.oi{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=s.ToastCtrl.subscribe((e=>{e.open?(this.open=!0,this.timeout=setTimeout((()=>s.ToastCtrl.closeToast()),2200)):(this.open=!1,clearTimeout(this.timeout))}))}disconnectedCallback(){var e;null==(e=this.unsubscribe)||e.call(this),clearTimeout(this.timeout),s.ToastCtrl.closeToast()}render(){const{message:e,variant:t}=s.ToastCtrl.state,r={"wcm-success":"success"===t,"wcm-error":"error"===t};return this.open?n.dy`<div class="${(0,o.$)(r)}">${"success"===t?S.CHECKMARK_ICON:null} ${"error"===t?S.CROSS_ICON:null}<wcm-text variant="small-regular">${e}</wcm-text></div>`:null}};function X(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}J.styles=[w.globalCss,K],Y([(0,i.SB)()],J.prototype,"open",2),J=Y([(0,i.Mo)("wcm-modal-toast")],J);const ee={generate(e,t,r){const i="#141414",o=[],s=function(e,t){const r=Array.prototype.slice.call(u.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),n=Math.sqrt(r.length);return r.reduce(((e,t,r)=>(r%n==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e),a=t/s.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((({x:e,y:t})=>{const r=(s.length-7)*a*e,l=(s.length-7)*a*t;for(let e=0;e<c.length;e+=1){const t=a*(7-2*e);o.push(n.YP`<rect fill="${e%2==0?i:"#ffffff"}" height="${t}" rx="${.45*t}" ry="${.45*t}" width="${t}" x="${r+a*e}" y="${l+a*e}">`)}}));const l=Math.floor((r+25)/a),h=s.length/2-l/2,d=s.length/2+l/2-1,p=[];s.forEach(((e,t)=>{e.forEach(((e,r)=>{if(s[t][r]&&!(t<7&&r<7||t>s.length-8&&r<7||t<7&&r>s.length-8)&&!(t>h&&t<d&&r>h&&r<d)){const e=t*a+a/2,n=r*a+a/2;p.push([e,n])}}))}));const f={};return p.forEach((([e,t])=>{f[e]?f[e].push(t):f[e]=[t]})),Object.entries(f).map((([e,t])=>{const r=t.filter((e=>t.every((t=>!X(e,t,a)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{o.push(n.YP`<circle cx="${e}" cy="${t}" fill="${i}" r="${a/2.5}">`)}))})),Object.entries(f).filter((([e,t])=>t.length>1)).map((([e,t])=>{const r=t.filter((e=>t.some((t=>X(e,t,a)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>e<t?-1:1));const r=[];for(const e of t){const t=r.find((t=>t.some((t=>X(e,t,a)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{o.push(n.YP`<line x1="${e}" x2="${e}" y1="${t}" y2="${r}" stroke="${i}" stroke-width="${a/1.25}" stroke-linecap="round">`)}))})),o}},te=n.iv`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var re=Object.defineProperty,ne=Object.getOwnPropertyDescriptor,ie=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ne(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&re(t,r,o),o};let oe=class extends n.oi{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e="light"===s.ThemeCtrl.state.themeMode?this.size:this.size-36;return n.YP`<svg height="${e}" width="${e}">${ee.generate(this.uri,e,e/4)}</svg>`}render(){const e={"wcm-dark":"dark"===s.ThemeCtrl.state.themeMode};return n.dy`<div style="${`width: ${this.size}px`}" class="${(0,o.$)(e)}">${this.walletId||this.imageUrl?n.dy`<wcm-wallet-image walletId="${(0,l.o)(this.walletId)}" imageId="${(0,l.o)(this.imageId)}" imageUrl="${(0,l.o)(this.imageUrl)}"></wcm-wallet-image>`:S.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}};oe.styles=[w.globalCss,te],ie([(0,i.Cb)()],oe.prototype,"uri",2),ie([(0,i.Cb)({type:Number})],oe.prototype,"size",2),ie([(0,i.Cb)()],oe.prototype,"imageId",2),ie([(0,i.Cb)()],oe.prototype,"walletId",2),ie([(0,i.Cb)()],oe.prototype,"imageUrl",2),oe=ie([(0,i.Mo)("wcm-qrcode")],oe);const se=n.iv`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,le=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ce(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ae(t,r,o),o};let ue=class extends n.oi{constructor(){super(...arguments),this.onChange=()=>null}render(){return n.dy`<input type="text" @input="${this.onChange}" placeholder="Search wallets"> ${S.SEARCH_ICON}`}};ue.styles=[w.globalCss,se],le([(0,i.Cb)()],ue.prototype,"onChange",2),ue=le([(0,i.Mo)("wcm-search-input")],ue);const he=n.iv`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let de=class extends n.oi{render(){return n.dy`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`}};de.styles=[w.globalCss,he],de=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-spinner")],de);const pe=n.iv`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var fe=Object.defineProperty,me=Object.getOwnPropertyDescriptor,ge=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?me(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&fe(t,r,o),o};let we=class extends n.oi{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return n.dy`<span><slot class="${(0,o.$)(e)}"></slot></span>`}};we.styles=[w.globalCss,pe],ge([(0,i.Cb)()],we.prototype,"variant",2),ge([(0,i.Cb)()],we.prototype,"color",2),we=ge([(0,i.Mo)("wcm-text")],we);const be=n.iv`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var ve=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,xe=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ye(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ve(t,r,o),o};let Ce=class extends n.oi{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?n.dy`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">RECENT</wcm-text>`:this.installed?n.dy`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</wcm-text>`:null}handleClick(){s.uA.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return n.dy`<button @click="${this.handleClick.bind(this)}"><div><wcm-wallet-image walletId="${this.walletId}" imageId="${(0,l.o)(this.imageId)}"></wcm-wallet-image><wcm-text variant="xsmall-regular">${null!=(e=this.label)?e:z.getWalletName(this.name,!0)}</wcm-text>${this.sublabelTemplate()}</div></button>`}};Ce.styles=[w.globalCss,be],xe([(0,i.Cb)()],Ce.prototype,"onClick",2),xe([(0,i.Cb)()],Ce.prototype,"name",2),xe([(0,i.Cb)()],Ce.prototype,"walletId",2),xe([(0,i.Cb)()],Ce.prototype,"label",2),xe([(0,i.Cb)()],Ce.prototype,"imageId",2),xe([(0,i.Cb)({type:Boolean})],Ce.prototype,"installed",2),xe([(0,i.Cb)({type:Boolean})],Ce.prototype,"recent",2),Ce=xe([(0,i.Mo)("wcm-wallet-button")],Ce);const Ae=n.iv`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Ee=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,Ie=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?_e(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ee(t,r,o),o};let Pe=class extends n.oi{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const t=null!=(e=this.imageUrl)&&e.length?this.imageUrl:z.getWalletIcon({id:this.walletId,image_id:this.imageId});return n.dy`${t.length?n.dy`<div><img crossorigin="anonymous" src="${t}" alt="${this.id}"></div>`:S.WALLET_PLACEHOLDER}`}};Pe.styles=[w.globalCss,Ae],Ie([(0,i.Cb)()],Pe.prototype,"walletId",2),Ie([(0,i.Cb)()],Pe.prototype,"imageId",2),Ie([(0,i.Cb)()],Pe.prototype,"imageUrl",2),Pe=Ie([(0,i.Mo)("wcm-wallet-image")],Pe);var Oe=Object.defineProperty,ke=Object.getOwnPropertyDescriptor,Se=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ke(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Oe(t,r,o),o};let Me=class extends n.oi{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{null!=e&&e.length&&await Promise.all(e.map((async e=>z.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){if(s.ConfigCtrl.state.enableExplorer){await s.ExplorerCtrl.getRecomendedWallets(),s.OptionsCtrl.setIsDataLoaded(!0);const{recomendedWallets:e}=s.ExplorerCtrl.state,t=e.map((e=>z.getWalletIcon(e)));await this.loadImages(t)}else s.OptionsCtrl.setIsDataLoaded(!0)}async preloadCustomImages(){const e=z.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),s.ToastCtrl.openToast("Failed preloading","error")}}};Se([(0,i.SB)()],Me.prototype,"preload",2),Me=Se([(0,i.Mo)("wcm-explorer-context")],Me);Object.defineProperty,Object.getOwnPropertyDescriptor;let Ne=class extends n.oi{constructor(){super(),this.unsubscribeTheme=void 0,w.setTheme(),this.unsubscribeTheme=s.ThemeCtrl.subscribe(w.setTheme)}disconnectedCallback(){var e;null==(e=this.unsubscribeTheme)||e.call(this)}};Ne=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-theme-context")],Ne);const Te=n.iv`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let je=class extends n.oi{onGoToQrcode(){s.AV.push("Qrcode")}render(){const{recomendedWallets:e}=s.ExplorerCtrl.state,t=[...e,...e],r=2*s.zv.RECOMMENDED_WALLET_AMOUNT;return n.dy`<wcm-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${S.QRCODE_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-title">${S.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">WalletConnect</wcm-text></div><div class="wcm-slider"><div class="wcm-track">${[...Array(r)].map(((e,r)=>{const i=t[r%t.length];return i?n.dy`<wcm-wallet-image walletId="${i.id}" imageId="${i.image_id}"></wcm-wallet-image>`:S.WALLET_PLACEHOLDER}))}</div><wcm-button-big @click="${z.handleAndroidLinking}"><wcm-text variant="medium-regular" color="inverse">Select Wallet</wcm-text></wcm-button-big></div></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">Choose WalletConnect to see supported apps on your device</wcm-text></wcm-info-footer>`}};je.styles=[w.globalCss,Te],je=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-android-wallet-selection")],je);const Re=n.iv`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Le=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,De=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?$e(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Le(t,r,o),o};let Be=class extends n.oi{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;const r=null!=(t=null==(e=s.ThemeCtrl.state.themeVariables)?void 0:e["--wcm-wallet-icon-large-border-radius"])?t:w.getPreset("--wcm-wallet-icon-large-border-radius");let i=0;i=r.includes("%")?.88*parseInt(r,10):parseInt(r,10),i*=1.17;const o=317-1.57*i,a=425-1.8*i;return n.dy`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="wcm-loader" x="2" y="2" width="106" height="106" rx="${i}"/><use xlink:href="#wcm-loader" stroke-dasharray="106 ${o}" stroke-dashoffset="${a}"></use></svg>`}render(){const e={"wcm-error":this.isError,"wcm-stale":this.isStale};return n.dy`<div class="${(0,o.$)(e)}">${this.svgLoaderTemplate()}<wcm-wallet-image walletId="${(0,l.o)(this.walletId)}" imageId="${(0,l.o)(this.imageId)}"></wcm-wallet-image></div><wcm-text variant="medium-regular" color="${this.isError?"error":"primary"}">${this.isError?"Connection declined":this.label}</wcm-text>`}};Be.styles=[w.globalCss,Re],De([(0,i.Cb)()],Be.prototype,"walletId",2),De([(0,i.Cb)()],Be.prototype,"imageId",2),De([(0,i.Cb)({type:Boolean})],Be.prototype,"isError",2),De([(0,i.Cb)({type:Boolean})],Be.prototype,"isStale",2),De([(0,i.Cb)()],Be.prototype,"label",2),Be=De([(0,i.Mo)("wcm-connector-waiting")],Be);const Ue={manualWallets(){var e,t;const{mobileWallets:r,desktopWallets:n}=s.ConfigCtrl.state,i=null==(e=Ue.recentWallet())?void 0:e.id,o=s.zv.isMobile()?r:n,a=o?.filter((e=>i!==e.id));return null!=(t=s.zv.isMobile()?a?.map((({id:e,name:t,links:r})=>({id:e,name:t,mobile:r,links:r}))):a?.map((({id:e,name:t,links:r})=>({id:e,name:t,desktop:r,links:r}))))?t:[]},recentWallet:()=>z.getRecentWallet(),recomendedWallets(e=!1){var t;const r=e||null==(t=Ue.recentWallet())?void 0:t.id,{recomendedWallets:n}=s.ExplorerCtrl.state;return n.filter((e=>r!==e.id))}},We={onConnecting(e){z.goToConnectingView(e)},manualWalletsTemplate(){return Ue.manualWallets().map((e=>n.dy`<wcm-wallet-button walletId="${e.id}" name="${e.name}" .onClick="${()=>this.onConnecting(e)}"></wcm-wallet-button>`))},recomendedWalletsTemplate(e=!1){return Ue.recomendedWallets(e).map((e=>n.dy`<wcm-wallet-button name="${e.name}" walletId="${e.id}" imageId="${e.image_id}" .onClick="${()=>this.onConnecting(e)}"></wcm-wallet-button>`))},recentWalletTemplate(){const e=Ue.recentWallet();if(e)return n.dy`<wcm-wallet-button name="${e.name}" walletId="${e.id}" imageId="${(0,l.o)(e.image_id)}" .recent="${!0}" .onClick="${()=>this.onConnecting(e)}"></wcm-wallet-button>`}},ze=n.iv`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let He=class extends n.oi{render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=s.ConfigCtrl.state,r="ALL"!==e&&t,i=We.manualWalletsTemplate(),o=We.recomendedWalletsTemplate();let a=[We.recentWalletTemplate(),...i,...o];a=a.filter(Boolean);const c=a.length>4||r;let l=[];l=c?a.slice(0,3):a;const u=Boolean(l.length);return n.dy`<wcm-modal-header .border="${!0}" title="Connect your wallet" .onAction="${z.handleUriCopy}" .actionIcon="${S.COPY_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-mobile-title"><div class="wcm-subtitle">${S.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">Mobile</wcm-text></div><div class="wcm-subtitle">${S.SCAN_ICON}<wcm-text variant="small-regular" color="secondary">Scan with your wallet</wcm-text></div></div><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>${u?n.dy`<wcm-modal-footer><div class="wcm-desktop-title">${S.DESKTOP_ICON}<wcm-text variant="small-regular" color="accent">Desktop</wcm-text></div><div class="wcm-grid">${l} ${c?n.dy`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>`:null}</div></wcm-modal-footer>`:null}`}};He.styles=[w.globalCss,ze],He=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-desktop-wallet-selection")],He);const Fe=n.iv`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let qe=class extends n.oi{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=s.ConfigCtrl.state;return e??t?n.dy`<div><wcm-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${e?n.dy`<a href="${e}" target="_blank" rel="noopener noreferrer">Terms of Service</a>`:null} ${e&&t?"and":null} ${t?n.dy`<a href="${t}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>`:null}</wcm-text></div>`:null}};qe.styles=[w.globalCss,Fe],qe=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-legal-notice")],qe);const Ve=n.iv`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Ge=class extends n.oi{onQrcode(){s.AV.push("Qrcode")}render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=s.ConfigCtrl.state,r="ALL"!==e&&t,i=We.manualWalletsTemplate(),o=We.recomendedWalletsTemplate();let a=[We.recentWalletTemplate(),...i,...o];a=a.filter(Boolean);const c=a.length>8||r;let l=[];l=c?a.slice(0,7):a;const u=Boolean(l.length);return n.dy`<wcm-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${S.QRCODE_ICON}"></wcm-modal-header>${u?n.dy`<wcm-modal-content><div>${l} ${c?n.dy`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>`:null}</div></wcm-modal-content>`:null}`}};Ge.styles=[w.globalCss,Ve],Ge=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-mobile-wallet-selection")],Ge);const Ke=n.iv`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var Ze=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ye=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Qe(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ze(t,r,o),o};let Je=class extends n.oi{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=s.jb.subscribe((e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()}))}disconnectedCallback(){var e;null==(e=this.unsubscribeModal)||e.call(this)}get overlayEl(){return z.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return z.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(e){if(document.querySelector("body"))if(e){const e=document.getElementById("wcm-styles");e?.remove()}else document.head.insertAdjacentHTML("beforeend",'<style id="wcm-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>')}onCloseModal(e){e.target===e.currentTarget&&s.jb.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((async()=>{const e=z.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,(0,c.j)(this.containerEl,e,{delay:.1,duration:.2}).finished]),this.active=!0}),0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=z.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,(0,c.j)(this.containerEl,e,{duration:.2}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",(e=>{var t;"Escape"===e.key?s.jb.close():"Tab"===e.key&&(null!=(t=e.target)&&t.tagName.includes("wcm-")||this.containerEl.focus())}),this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;null==(e=this.abortController)||e.abort(),this.abortController=void 0}render(){const e={"wcm-overlay":!0,"wcm-active":this.active};return n.dy`<wcm-explorer-context></wcm-explorer-context><wcm-theme-context></wcm-theme-context><div id="wcm-modal" class="${(0,o.$)(e)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="wcm-container" tabindex="0">${this.open?n.dy`<wcm-modal-backcard></wcm-modal-backcard><div class="wcm-card"><wcm-modal-router></wcm-modal-router><wcm-modal-toast></wcm-modal-toast></div>`:null}</div></div>`}};Je.styles=[w.globalCss,Ke],Ye([(0,i.SB)()],Je.prototype,"open",2),Ye([(0,i.SB)()],Je.prototype,"active",2),Je=Ye([(0,i.Mo)("wcm-modal")],Je);const Xe=n.iv`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,rt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?tt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&et(t,r,o),o};let nt=class extends n.oi{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){s.zv.isMobile()?s.AV.replace("MobileConnecting"):s.AV.replace("MobileQrcodeConnecting")}onDesktop(){s.AV.replace("DesktopConnecting")}onWeb(){s.AV.replace("WebConnecting")}render(){return n.dy`<div>${this.isRetry?n.dy`<slot></slot>`:null} ${this.isMobile?n.dy`<wcm-button .onClick="${this.onMobile}" .iconLeft="${S.MOBILE_ICON}" variant="outline">Mobile</wcm-button>`:null} ${this.isDesktop?n.dy`<wcm-button .onClick="${this.onDesktop}" .iconLeft="${S.DESKTOP_ICON}" variant="outline">Desktop</wcm-button>`:null} ${this.isWeb?n.dy`<wcm-button .onClick="${this.onWeb}" .iconLeft="${S.GLOBE_ICON}" variant="outline">Web</wcm-button>`:null}</div>`}};nt.styles=[w.globalCss,Xe],rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isMobile",2),rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isDesktop",2),rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isWeb",2),rt([(0,i.Cb)({type:Boolean})],nt.prototype,"isRetry",2),nt=rt([(0,i.Mo)("wcm-platform-selection")],nt);const it=n.iv`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ot=class extends n.oi{onClick(){s.AV.push("WalletExplorer")}render(){const{recomendedWallets:e}=s.ExplorerCtrl.state,t=[...e,...Ue.manualWallets()].reverse().slice(0,4);return n.dy`<button @click="${this.onClick}"><div class="wcm-icons">${t.map((e=>{const t=z.getWalletIcon(e);if(t)return n.dy`<img crossorigin="anonymous" src="${t}">`;const r=z.getWalletIcon({id:e.id});return r?n.dy`<img crossorigin="anonymous" src="${r}">`:S.WALLET_PLACEHOLDER}))} ${[...Array(4-t.length)].map((()=>S.WALLET_PLACEHOLDER))}</div><wcm-text variant="xsmall-regular">View All</wcm-text></button>`}};ot.styles=[w.globalCss,it],ot=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-view-all-wallets-button")],ot);const st=n.iv`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var at=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ct(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&at(t,r,o),o};let ut=class extends n.oi{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout((()=>{const{walletConnectUri:e}=s.OptionsCtrl.state;this.uri=e}),0)}get overlayEl(){return z.getShadowRootElement(this,".wcm-qr-container")}render(){return n.dy`<div class="wcm-qr-container">${this.uri?n.dy`<wcm-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${(0,l.o)(this.walletId)}" imageId="${(0,l.o)(this.imageId)}"></wcm-qrcode>`:n.dy`<wcm-spinner></wcm-spinner>`}</div>`}};ut.styles=[w.globalCss,st],lt([(0,i.Cb)()],ut.prototype,"walletId",2),lt([(0,i.Cb)()],ut.prototype,"imageId",2),lt([(0,i.SB)()],ut.prototype,"uri",2),ut=lt([(0,i.Mo)("wcm-walletconnect-qr")],ut);Object.defineProperty,Object.getOwnPropertyDescriptor;let ht=class extends n.oi{viewTemplate(){return s.zv.isAndroid()?n.dy`<wcm-android-wallet-selection></wcm-android-wallet-selection>`:s.zv.isMobile()?n.dy`<wcm-mobile-wallet-selection></wcm-mobile-wallet-selection>`:n.dy`<wcm-desktop-wallet-selection></wcm-desktop-wallet-selection>`}render(){return n.dy`${this.viewTemplate()}<wcm-legal-notice></wcm-legal-notice>`}};ht.styles=[w.globalCss],ht=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-connect-wallet-view")],ht);const dt=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var pt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,mt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ft(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&pt(t,r,o),o};let gt=class extends n.oi{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(e){const{desktop:t,name:r}=s.zv.getWalletRouterData(),n=t?.native;if(n){const t=s.zv.formatNativeUrl(n,e,r);s.zv.openHref(t,"_self")}}openDesktopApp(){const{walletConnectUri:e}=s.OptionsCtrl.state,t=s.zv.getWalletRouterData();z.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=s.zv.getWalletRouterData(),{isMobile:i,isWeb:o}=z.getCachedRouterWalletPlatforms();return n.dy`<wcm-modal-header title="${e}" .onAction="${z.handleUriCopy}" .actionIcon="${S.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${(0,l.o)(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Connection can continue loading if ${e} is not installed on your device`}</wcm-text><wcm-platform-selection .isMobile="${i}" .isWeb="${o}" .isRetry="${!0}"><wcm-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${S.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`}};gt.styles=[w.globalCss,dt],mt([(0,i.SB)()],gt.prototype,"isError",2),gt=mt([(0,i.Mo)("wcm-desktop-connecting-view")],gt);const wt=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let bt=class extends n.oi{onInstall(e){e&&s.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,homepage:i}=s.zv.getWalletRouterData();return n.dy`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${(0,l.o)(r)}" label="Not Detected" .isStale="${!0}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}</wcm-text><wcm-button .onClick="${()=>this.onInstall(i)}" .iconLeft="${S.ARROW_DOWN_ICON}">Download</wcm-button></wcm-info-footer>`}};bt.styles=[w.globalCss,wt],bt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-install-wallet-view")],bt);const vt=n.iv`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var yt=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,Ct=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?xt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&yt(t,r,o),o};let At=class extends n.oi{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(e,t=!1){const{mobile:r,name:n}=s.zv.getWalletRouterData(),i=r?.native,o=r?.universal;if(i&&!t){const t=s.zv.formatNativeUrl(i,e,n);s.zv.openHref(t,"_self")}else if(o){const t=s.zv.formatUniversalUrl(o,e,n);s.zv.openHref(t,"_self")}}openMobileApp(e=!1){const{walletConnectUri:t}=s.OptionsCtrl.state,r=s.zv.getWalletRouterData();z.setRecentWallet(r),t&&this.onFormatAndRedirect(t,e)}onGoToAppStore(e){e&&s.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,app:i,mobile:o}=s.zv.getWalletRouterData(),{isWeb:a}=z.getCachedRouterWalletPlatforms(),c=i?.ios,u=o?.universal;return n.dy`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${(0,l.o)(r)}" label="Tap 'Open' to continue…" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer class="wcm-note"><wcm-platform-selection .isWeb="${a}" .isRetry="${!0}"><wcm-button .onClick="${()=>this.openMobileApp(!1)}" .iconRight="${S.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection>${u?n.dy`<wcm-text color="secondary" variant="small-thin">Still doesn't work? <span tabindex="0" @click="${()=>this.openMobileApp(!0)}">Try this alternate link</span></wcm-text>`:null}</wcm-info-footer><wcm-info-footer class="wcm-app-store"><div><wcm-wallet-image walletId="${t}" imageId="${(0,l.o)(r)}"></wcm-wallet-image><wcm-text>${`Get ${e}`}</wcm-text></div><wcm-button .iconRight="${S.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGoToAppStore(c)}" variant="ghost">App Store</wcm-button></wcm-info-footer>`}};At.styles=[w.globalCss,vt],Ct([(0,i.SB)()],At.prototype,"isError",2),At=Ct([(0,i.Mo)("wcm-mobile-connecting-view")],At);const Et=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let _t=class extends n.oi{render(){const{name:e,id:t,image_id:r}=s.zv.getWalletRouterData(),{isDesktop:i,isWeb:o}=z.getCachedRouterWalletPlatforms();return n.dy`<wcm-modal-header title="${e}" .onAction="${z.handleUriCopy}" .actionIcon="${S.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr walletId="${t}" imageId="${(0,l.o)(r)}"></wcm-walletconnect-qr></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Scan this QR Code with your phone's camera or inside ${e} app`}</wcm-text><wcm-platform-selection .isDesktop="${i}" .isWeb="${o}"></wcm-platform-selection></wcm-info-footer>`}};_t.styles=[w.globalCss,Et],_t=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-mobile-qr-connecting-view")],_t);Object.defineProperty,Object.getOwnPropertyDescriptor;let It=class extends n.oi{render(){return n.dy`<wcm-modal-header title="Scan the code" .onAction="${z.handleUriCopy}" .actionIcon="${S.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>`}};It.styles=[w.globalCss],It=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("wcm-qrcode-view")],It);const Pt=n.iv`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var Ot=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,St=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?kt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ot(t,r,o),o};let Mt=class extends n.oi{constructor(){super(...arguments),this.loading=!s.ExplorerCtrl.state.wallets.listings.length,this.firstFetch=!s.ExplorerCtrl.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=z.debounce((e=>{e.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=e,s.ExplorerCtrl.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),s.ExplorerCtrl.resetSearch())}))}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;null==(e=this.intersectionObserver)||e.disconnect()}get placeholderEl(){return z.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver((([e])=>{e.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=s.ExplorerCtrl.state,{listings:r,total:n}=this.search?t:e;return n<=40||r.length>=n}async fetchWallets(){var e;const{wallets:t,search:r}=s.ExplorerCtrl.state,{listings:n,total:i,page:o}=this.search?r:t;if(!this.endReached&&(this.firstFetch||i>40&&n.length<i))try{this.loading=!0;const t=null==(e=s.OptionsCtrl.state.chains)?void 0:e.join(","),{listings:r}=await s.ExplorerCtrl.getWallets({page:this.firstFetch?1:o+1,entries:40,search:this.search,version:2,chains:t}),n=r.map((e=>z.getWalletIcon(e)));await Promise.all([...n.map((async e=>z.preloadImage(e))),s.zv.wait(300)]),this.endReached=this.isLastPage()}catch(e){console.error(e),s.ToastCtrl.openToast(z.getErrorMessage(e),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){s.zv.isAndroid()?z.handleMobileLinking(e):z.goToConnectingView(e)}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=s.ExplorerCtrl.state,{listings:r}=this.search?t:e,i=this.loading&&!r.length,a=this.search.length>=3;let c=We.manualWalletsTemplate(),l=We.recomendedWalletsTemplate(!0);a&&(c=c.filter((({values:e})=>z.caseSafeIncludes(e[0],this.search))),l=l.filter((({values:e})=>z.caseSafeIncludes(e[0],this.search))));const u=!this.loading&&!r.length&&!l.length,h={"wcm-loading":i,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":u};return n.dy`<wcm-modal-header><wcm-search-input .onChange="${this.onSearchChange.bind(this)}"></wcm-search-input></wcm-modal-header><wcm-modal-content class="${(0,o.$)(h)}"><div class="wcm-grid">${i?null:c} ${i?null:l} ${i?null:r.map((e=>n.dy`${e?n.dy`<wcm-wallet-button imageId="${e.image_id}" name="${e.name}" walletId="${e.id}" .onClick="${()=>this.onConnect(e)}"></wcm-wallet-button>`:null}`))}</div><div class="wcm-placeholder-block">${u?n.dy`<wcm-text variant="big-bold" color="secondary">No results found</wcm-text>`:null} ${!u&&this.loading?n.dy`<wcm-spinner></wcm-spinner>`:null}</div></wcm-modal-content>`}};Mt.styles=[w.globalCss,Pt],St([(0,i.SB)()],Mt.prototype,"loading",2),St([(0,i.SB)()],Mt.prototype,"firstFetch",2),St([(0,i.SB)()],Mt.prototype,"search",2),St([(0,i.SB)()],Mt.prototype,"endReached",2),Mt=St([(0,i.Mo)("wcm-wallet-explorer-view")],Mt);const Nt=n.iv`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Tt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,Rt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?jt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Tt(t,r,o),o};let Lt=class extends n.oi{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(e){const{desktop:t,name:r}=s.zv.getWalletRouterData(),n=t?.universal;if(n){const t=s.zv.formatUniversalUrl(n,e,r);s.zv.openHref(t,"_blank")}}openWebWallet(){const{walletConnectUri:e}=s.OptionsCtrl.state,t=s.zv.getWalletRouterData();z.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=s.zv.getWalletRouterData(),{isMobile:i,isDesktop:o}=z.getCachedRouterWalletPlatforms(),a=s.zv.isMobile();return n.dy`<wcm-modal-header title="${e}" .onAction="${z.handleUriCopy}" .actionIcon="${S.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${(0,l.o)(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}</wcm-text><wcm-platform-selection .isMobile="${i}" .isDesktop="${!a&&o}" .isRetry="${!0}"><wcm-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${S.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`}};Lt.styles=[w.globalCss,Nt],Rt([(0,i.SB)()],Lt.prototype,"isError",2),Lt=Rt([(0,i.Mo)("wcm-web-connecting-view")],Lt)},9343:(e,t,r)=>{"use strict";r.d(t,{WalletConnectModal:()=>i});var n=r(672);class i{constructor(e){this.openModal=n.jb.open,this.closeModal=n.jb.close,this.subscribeModal=n.jb.subscribe,this.setTheme=n.ThemeCtrl.setThemeConfig,n.ThemeCtrl.setThemeConfig(e),n.ConfigCtrl.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(r.bind(r,8189));const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),n.OptionsCtrl.setIsUiLoaded(!0)}}}},1475:(e,t,r)=>{"use strict";r.d(t,{AV:()=>o,AccountCtrl:()=>b,ConfigCtrl:()=>m,ExplorerCtrl:()=>W,Id:()=>c,OptionsCtrl:()=>p,ThemeCtrl:()=>J,ToastCtrl:()=>ee,WcConnectionCtrl:()=>H,jb:()=>q,uA:()=>h,zv:()=>s});var n=r(6828);const i=(0,n.sj)({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),o={state:i,subscribe:e=>(0,n.Ld)(i,(()=>e(i))),push(e,t){e!==i.view&&(i.view=e,t&&(i.data=t),i.history.push(e))},reset(e){i.view=e,i.history=[e]},replace(e){i.history.length>1&&(i.history[i.history.length-1]=e,i.view=e)},goBack(){if(i.history.length>1){i.history.pop();const[e]=i.history.slice(-1);i.view=e}},setData(e){i.data=e}},s={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",W3M_VERSION:"W3M_VERSION",W3M_PREFER_INJECTED_URL_FLAG:"w3mPreferInjected",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>s.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return s.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,r){if(s.isHttpUrl(e))return this.formatUniversalUrl(e,t,r);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,r){if(!s.isHttpUrl(e))return this.formatNativeUrl(e,t,r);let n=e;return n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r),`${n}wc?uri=${encodeURIComponent(t)}`},wait:async e=>new Promise((t=>{setTimeout(t,e)})),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(s.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(s.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(s.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setWeb3ModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(s.W3M_VERSION,"2.7.1")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=o.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t},getSwitchNetworkRouterData(){var e;const t=null==(e=o.state.data)?void 0:e.SwitchNetwork;if(!t)throw new Error('Missing "SwitchNetwork" view data');return t},isPreferInjectedFlag:()=>typeof location<"u"&&new URLSearchParams(location.search).has(s.W3M_PREFER_INJECTED_URL_FLAG)};let a;const c={ethereumClient:void 0,setEthereumClient(e){a=e},client(){if(a)return a;throw new Error("ClientCtrl has no client set")}},l=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=(0,n.sj)({enabled:l,userSessionId:"",events:[],connectedWalletId:void 0}),h={state:u,subscribe:e=>(0,n.Ld)(u.events,(()=>e((0,n.CO)(u.events[u.events.length-1])))),initialize(){u.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},d=(0,n.sj)({selectedChain:void 0,chains:void 0,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1,isPreferInjected:!1}),p={state:d,subscribe:e=>(0,n.Ld)(d,(()=>e(d))),setChains(e){d.chains=e},getSelectedChain(){const e=c.client().getNetwork().chain;return e&&(d.selectedChain=e),d.selectedChain},setSelectedChain(e){d.selectedChain=e},setIsCustomDesktop(e){d.isCustomDesktop=e},setIsCustomMobile(e){d.isCustomMobile=e},setIsDataLoaded(e){d.isDataLoaded=e},setIsUiLoaded(e){d.isUiLoaded=e},setIsPreferInjected(e){d.isPreferInjected=e}},f=(0,n.sj)({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chainImages:void 0,tokenImages:void 0,tokenContracts:void 0,enableNetworkView:!1,enableAccountView:!0,enableExplorer:!0,defaultChain:void 0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),m={state:f,subscribe:e=>(0,n.Ld)(f,(()=>e(f))),setConfig(e){var t,r;h.initialize(),p.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),p.setIsCustomDesktop(Boolean(null==(r=e.desktopWallets)?void 0:r.length)),p.setChains(c.client().chains),p.setIsPreferInjected(c.client().isInjectedProviderInstalled()&&s.isPreferInjectedFlag()),e.defaultChain&&p.setSelectedChain(e.defaultChain),s.setWeb3ModalVersionInStorage(),Object.assign(f,e)}},g={async getIdentity(e,t){const{projectId:r}=m.state,n=`https://rpc.walletconnect.com/v1/identity/${e}?chainId=eip155:${t}&projectId=${r}`;return(await fetch(n)).json()}},w=(0,n.sj)({address:void 0,profileName:void 0,profileAvatar:void 0,profileLoading:!1,balanceLoading:!1,balance:void 0,isConnected:!1}),b={state:w,subscribe:e=>(0,n.Ld)(w,(()=>e(w))),getAccount(){const e=c.client().getAccount();w.address=e.address,w.isConnected=e.isConnected},async fetchProfile(e,t){var r;try{w.profileLoading=!0,w.profileName=null,w.profileAvatar=null;const n=t??w.address,i=1,o=null==(r=p.state.chains)?void 0:r.find((e=>e.id===i));if(n&&o){try{const e=await g.getIdentity(n,i);w.profileName=e.name,w.profileAvatar=e.avatar}catch{const e=await c.client().fetchEnsName({address:n,chainId:i});if(w.profileName=e,e){const t=await c.client().fetchEnsAvatar({name:e,chainId:i});w.profileAvatar=t}}w.profileAvatar&&await e(w.profileAvatar)}}finally{w.profileLoading=!1}},async fetchBalance(e){try{const{chain:t}=c.client().getNetwork(),{tokenContracts:r}=m.state;let n;t&&r&&(n=r[t.id]),w.balanceLoading=!0;const i=e??w.address;if(i){const e=await c.client().fetchBalance({address:i,token:n});w.balance={amount:e.formatted,symbol:e.symbol}}}finally{w.balanceLoading=!1}},setAddress(e){w.address=e},setIsConnected(e){w.isConnected=e},resetBalance(){w.balance=void 0},resetAccount(){w.address=void 0,w.isConnected=!1,w.profileName=void 0,w.profileAvatar=void 0,w.balance=void 0}};var v=Object.defineProperty,y=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const E="https://explorer-api.walletconnect.com",_="w3m",I="js-2.7.1";async function P(e,t){const r=((e,t)=>{for(var r in t||(t={}))x.call(t,r)&&A(e,r,t[r]);if(y)for(var r of y(t))C.call(t,r)&&A(e,r,t[r]);return e})({sdkType:_,sdkVersion:I},t),n=new URL(e,E);return n.searchParams.append("projectId",m.state.projectId),Object.entries(r).forEach((([e,t])=>{t&&n.searchParams.append(e,String(t))})),(await fetch(n)).json()}const O=async e=>P("/w3m/v1/getDesktopListings",e),k=async e=>P("/w3m/v1/getMobileListings",e),S=async e=>P("/w3m/v1/getInjectedListings",e),M=async e=>P("/w3m/v1/getAllListings",e),N=e=>`${E}/w3m/v1/getWalletImage/${e}?projectId=${m.state.projectId}&sdkType=${_}&sdkVersion=${I}`,T=e=>`${E}/w3m/v1/getAssetImage/${e}?projectId=${m.state.projectId}&sdkType=${_}&sdkVersion=${I}`;var j=Object.defineProperty,R=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,D=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const B=s.isMobile(),U=(0,n.sj)({wallets:{listings:[],total:0,page:1},injectedWallets:[],search:{listings:[],total:0,page:1},recomendedWallets:[]}),W={state:U,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=m.state;if("NONE"===e||"ALL"===t&&!e)return U.recomendedWallets;if(s.isArray(e)){const t={recommendedIds:e.join(",")},{listings:r}=await M(t),n=Object.values(r);n.sort(((t,r)=>e.indexOf(t.id)-e.indexOf(r.id))),U.recomendedWallets=n}else{const e=s.isArray(t),r={page:1,entries:s.RECOMMENDED_WALLET_AMOUNT,version:2,excludedIds:e?t.join(","):void 0},{listings:n}=B?await k(r):await O(r);U.recomendedWallets=Object.values(n)}return U.recomendedWallets},async getWallets(e){const t=((e,t)=>{for(var r in t||(t={}))L.call(t,r)&&D(e,r,t[r]);if(R)for(var r of R(t))$.call(t,r)&&D(e,r,t[r]);return e})({},e),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=m.state,{recomendedWallets:i}=U;if("ALL"===n)return U.wallets;i.length?t.excludedIds=i.map((e=>e.id)).join(","):s.isArray(r)&&(t.excludedIds=r.join(",")),s.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(","));const{page:o,search:a}=e,{listings:c,total:l}=B?await k(t):await O(t),u=Object.values(c),h=a?"search":"wallets";return U[h]={listings:[...U[h].listings,...u],total:l,page:o??1},{listings:u,total:l}},async getInjectedWallets(){const{listings:e}=await S({}),t=Object.values(e);return U.injectedWallets=t,U.injectedWallets},getWalletImageUrl:e=>N(e),getAssetImageUrl:e=>T(e),resetSearch(){U.search={listings:[],total:0,page:1}}},z=(0,n.sj)({pairingEnabled:!1,pairingUri:"",pairingError:!1}),H={state:z,subscribe:e=>(0,n.Ld)(z,(()=>e(z))),setPairingUri(e){z.pairingUri=e},setPairingError(e){z.pairingError=e},setPairingEnabled(e){z.pairingEnabled=e}},F=(0,n.sj)({open:!1}),q={state:F,subscribe:e=>(0,n.Ld)(F,(()=>e(F))),open:async e=>new Promise((t=>{const{isUiLoaded:r,isDataLoaded:n,isPreferInjected:i,selectedChain:a}=p.state,{isConnected:l}=b.state,{enableNetworkView:u}=m.state;if(H.setPairingEnabled(!0),l||s.removeWalletConnectDeepLink(),null!=e&&e.route)o.reset(e.route);else if(l)o.reset("Account");else if(u)o.reset("SelectNetwork");else{if(i)return c.client().connectConnector("injected",a?.id).catch((e=>console.error(e))),void t();o.reset("ConnectWallet")}const{pairingUri:h}=H.state;if(r&&n&&(h||l))F.open=!0,t();else{const e=setInterval((()=>{const r=p.state,n=H.state;r.isUiLoaded&&r.isDataLoaded&&(n.pairingUri||l)&&(clearInterval(e),F.open=!0,t())}),200)}})),close(){F.open=!1}};var V=Object.defineProperty,G=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,Q=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const Y=(0,n.sj)({themeMode:typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}),J={state:Y,subscribe:e=>(0,n.Ld)(Y,(()=>e(Y))),setThemeConfig(e){const{themeMode:t,themeVariables:r}=e;t&&(Y.themeMode=t),r&&(Y.themeVariables=((e,t)=>{for(var r in t||(t={}))K.call(t,r)&&Q(e,r,t[r]);if(G)for(var r of G(t))Z.call(t,r)&&Q(e,r,t[r]);return e})({},r))}},X=(0,n.sj)({open:!1,message:"",variant:"success"}),ee={state:X,subscribe:e=>(0,n.Ld)(X,(()=>e(X))),openToast(e,t){X.open=!0,X.message=e,X.variant=t},closeToast(){X.open=!1}}},8416:(e,t,r)=>{"use strict";r.r(t),r.d(t,{W3mAccountButton:()=>vt,W3mConnectButton:()=>Gt,W3mCoreButton:()=>rr,W3mModal:()=>pr,W3mNetworkSwitch:()=>br,W3mQrCode:()=>Ie});var n=r(9392),i=r(7408),o=r(1475),s=r(623),a=r(3692),c=r(4213),l=r(2592),u=r(796),h=Object.defineProperty,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,m=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&m(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&m(e,r,t[r]);return e};const w={getPreset:e=>({"--w3m-accent-color":"#3396FF","--w3m-accent-fill-color":"#FFFFFF","--w3m-z-index":"89","--w3m-background-color":"#3396FF","--w3m-background-border-radius":"8px","--w3m-container-border-radius":"30px","--w3m-wallet-icon-border-radius":"15px","--w3m-wallet-icon-large-border-radius":"30px","--w3m-wallet-icon-small-border-radius":"7px","--w3m-input-border-radius":"28px","--w3m-button-border-radius":"10px","--w3m-notification-border-radius":"36px","--w3m-secondary-button-border-radius":"28px","--w3m-icon-button-border-radius":"50%","--w3m-button-hover-highlight-border-radius":"10px","--w3m-text-big-bold-size":"20px","--w3m-text-big-bold-weight":"600","--w3m-text-big-bold-line-height":"24px","--w3m-text-big-bold-letter-spacing":"-0.03em","--w3m-text-big-bold-text-transform":"none","--w3m-text-xsmall-bold-size":"10px","--w3m-text-xsmall-bold-weight":"700","--w3m-text-xsmall-bold-line-height":"12px","--w3m-text-xsmall-bold-letter-spacing":"0.02em","--w3m-text-xsmall-bold-text-transform":"uppercase","--w3m-text-xsmall-regular-size":"12px","--w3m-text-xsmall-regular-weight":"600","--w3m-text-xsmall-regular-line-height":"14px","--w3m-text-xsmall-regular-letter-spacing":"-0.03em","--w3m-text-xsmall-regular-text-transform":"none","--w3m-text-small-thin-size":"14px","--w3m-text-small-thin-weight":"500","--w3m-text-small-thin-line-height":"16px","--w3m-text-small-thin-letter-spacing":"-0.03em","--w3m-text-small-thin-text-transform":"none","--w3m-text-small-regular-size":"14px","--w3m-text-small-regular-weight":"600","--w3m-text-small-regular-line-height":"16px","--w3m-text-small-regular-letter-spacing":"-0.03em","--w3m-text-small-regular-text-transform":"none","--w3m-text-medium-regular-size":"16px","--w3m-text-medium-regular-weight":"600","--w3m-text-medium-regular-line-height":"20px","--w3m-text-medium-regular-letter-spacing":"-0.03em","--w3m-text-medium-regular-text-transform":"none","--w3m-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--w3m-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--w3m-success-color":"rgb(38,181,98)","--w3m-error-color":"rgb(242, 90, 103)","--w3m-overlay-background-color":"rgba(0, 0, 0, 0.3)","--w3m-overlay-backdrop-filter":"none"}[e]),setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=o.ThemeCtrl.state;if(e){const r=g(g(g(g({},function(){var e;const t={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(e=o.ThemeCtrl.state.themeMode)?e:"dark"];return{"--w3m-color-fg-1":t.foreground[1],"--w3m-color-fg-2":t.foreground[2],"--w3m-color-fg-3":t.foreground[3],"--w3m-color-bg-1":t.background[1],"--w3m-color-bg-2":t.background[2],"--w3m-color-bg-3":t.background[3],"--w3m-color-overlay":t.overlay}}()),{"--w3m-accent-color":"#3396FF","--w3m-accent-fill-color":"#FFFFFF","--w3m-z-index":"89","--w3m-background-color":"#3396FF","--w3m-background-border-radius":"8px","--w3m-container-border-radius":"30px","--w3m-wallet-icon-border-radius":"15px","--w3m-wallet-icon-large-border-radius":"30px","--w3m-wallet-icon-small-border-radius":"7px","--w3m-input-border-radius":"28px","--w3m-button-border-radius":"10px","--w3m-notification-border-radius":"36px","--w3m-secondary-button-border-radius":"28px","--w3m-icon-button-border-radius":"50%","--w3m-button-hover-highlight-border-radius":"10px","--w3m-text-big-bold-size":"20px","--w3m-text-big-bold-weight":"600","--w3m-text-big-bold-line-height":"24px","--w3m-text-big-bold-letter-spacing":"-0.03em","--w3m-text-big-bold-text-transform":"none","--w3m-text-xsmall-bold-size":"10px","--w3m-text-xsmall-bold-weight":"700","--w3m-text-xsmall-bold-line-height":"12px","--w3m-text-xsmall-bold-letter-spacing":"0.02em","--w3m-text-xsmall-bold-text-transform":"uppercase","--w3m-text-xsmall-regular-size":"12px","--w3m-text-xsmall-regular-weight":"600","--w3m-text-xsmall-regular-line-height":"14px","--w3m-text-xsmall-regular-letter-spacing":"-0.03em","--w3m-text-xsmall-regular-text-transform":"none","--w3m-text-small-thin-size":"14px","--w3m-text-small-thin-weight":"500","--w3m-text-small-thin-line-height":"16px","--w3m-text-small-thin-letter-spacing":"-0.03em","--w3m-text-small-thin-text-transform":"none","--w3m-text-small-regular-size":"14px","--w3m-text-small-regular-weight":"600","--w3m-text-small-regular-line-height":"16px","--w3m-text-small-regular-letter-spacing":"-0.03em","--w3m-text-small-regular-text-transform":"none","--w3m-text-medium-regular-size":"16px","--w3m-text-medium-regular-weight":"600","--w3m-text-medium-regular-line-height":"20px","--w3m-text-medium-regular-letter-spacing":"-0.03em","--w3m-text-medium-regular-text-transform":"none","--w3m-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--w3m-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--w3m-success-color":"rgb(38,181,98)","--w3m-error-color":"rgb(242, 90, 103)","--w3m-overlay-background-color":"rgba(0, 0, 0, 0.3)","--w3m-overlay-backdrop-filter":"none"}),t),function(){const{themeVariables:e}=o.ThemeCtrl.state;return{"--w3m-background-image-url":null!=e&&e["--w3m-background-image-url"]?`url(${e["--w3m-background-image-url"]})`:"none"}}());Object.entries(r).forEach((([t,r])=>e.style.setProperty(t,r)))}},globalCss:n.iv`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button w3m-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--w3m-accent-fill-color);background:var(--w3m-accent-color)}`},b=n.iv`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;justify-content:center;padding:5px;width:100px}button:active{background-color:var(--w3m-color-overlay)}button:disabled{opacity:.7}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button>div{display:flex;justify-content:center;align-items:center;width:32px;height:32px;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-accent-color);border-radius:var(--w3m-icon-button-border-radius);margin-bottom:4px}button path{fill:var(--w3m-accent-fill-color)}`;var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,x=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?y(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&v(t,r,o),o};let C=class extends n.oi{constructor(){super(...arguments),this.icon=void 0,this.label="",this.loading=!1,this.onClick=()=>null}render(){return n.dy`<button data-testid="component-button-box" @click="${this.onClick}" .disabled="${Boolean(this.loading)}"><div>${this.loading?n.dy`<w3m-spinner size="${20}" color="fill"></w3m-spinner>`:n.dy`${this.icon}`}</div><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};C.styles=[w.globalCss,b],x([(0,i.Cb)()],C.prototype,"icon",2),x([(0,i.Cb)()],C.prototype,"label",2),x([(0,i.Cb)()],C.prototype,"loading",2),x([(0,i.Cb)()],C.prototype,"onClick",2),C=x([(0,i.Mo)("w3m-box-button")],C);const A=n.iv`button{border-radius:var(--w3m-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--w3m-accent-color)}button path{fill:var(--w3m-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--w3m-color-overlay)}button:disabled::after{background-color:transparent}.w3m-icon-left svg{margin-right:5px}.w3m-icon-right svg{margin-left:5px}button:active::after{background-color:var(--w3m-color-overlay)}.w3m-ghost,.w3m-ghost:active::after,.w3m-outline{background-color:transparent}.w3m-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--w3m-color-overlay)}.w3m-ghost:hover::after{background-color:transparent}.w3m-ghost:hover{opacity:.5}}button:disabled{background-color:var(--w3m-color-bg-3);pointer-events:none}.w3m-ghost::after{border-color:transparent}.w3m-ghost path{fill:var(--w3m-color-fg-2)}.w3m-outline path{fill:var(--w3m-accent-color)}.w3m-outline:disabled{background-color:transparent;opacity:.5}`;var E=Object.defineProperty,_=Object.getOwnPropertyDescriptor,I=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?_(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&E(t,r,o),o};let P=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const e={"w3m-icon-left":void 0!==this.iconLeft,"w3m-icon-right":void 0!==this.iconRight,"w3m-ghost":"ghost"===this.variant,"w3m-outline":"outline"===this.variant};let t="inverse";return"ghost"===this.variant&&(t="secondary"),"outline"===this.variant&&(t="accent"),n.dy`<button class="${(0,s.$)(e)}" data-testid="component-button" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<w3m-text variant="small-regular" color="${t}"><slot></slot></w3m-text>${this.iconRight}</button>`}};P.styles=[w.globalCss,A],I([(0,i.Cb)()],P.prototype,"disabled",2),I([(0,i.Cb)()],P.prototype,"iconLeft",2),I([(0,i.Cb)()],P.prototype,"iconRight",2),I([(0,i.Cb)()],P.prototype,"onClick",2),I([(0,i.Cb)()],P.prototype,"variant",2),P=I([(0,i.Mo)("w3m-button")],P);const O=n.iv`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--w3m-button-border-radius);color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:active::after{background-color:var(--w3m-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--w3m-color-bg-3);color:var(--w3m-color-fg-3)}.w3m-secondary{color:var(--w3m-accent-color);background-color:transparent}.w3m-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--w3m-color-overlay)}}`;var k=Object.defineProperty,S=Object.getOwnPropertyDescriptor,M=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?S(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&k(t,r,o),o};let N=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"w3m-secondary":"secondary"===this.variant};return n.dy`<button ?disabled="${this.disabled}" data-testid="component-big-button" class="${(0,s.$)(e)}"><slot></slot></button>`}};N.styles=[w.globalCss,O],M([(0,i.Cb)()],N.prototype,"disabled",2),M([(0,i.Cb)()],N.prototype,"variant",2),N=M([(0,i.Mo)("w3m-button-big")],N);const T=n.iv`:host{background-color:var(--w3m-color-bg-2);border-top:1px solid var(--w3m-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let j=class extends n.oi{render(){return n.dy`<div><slot></slot></div>`}};j.styles=[w.globalCss,T],j=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-info-footer")],j);const R={CROSS_ICON:a.YP`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,WALLET_CONNECT_LOGO:a.YP`<svg width="178" height="29" viewBox="0 0 178 29" id="w3m-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,WALLET_CONNECT_ICON:a.YP`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,WALLET_CONNECT_ICON_COLORED:a.YP`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,BACK_ICON:a.YP`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,COPY_ICON:a.YP`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,RETRY_ICON:a.YP`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,DESKTOP_ICON:a.YP`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,MOBILE_ICON:a.YP`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,ARROW_DOWN_ICON:a.YP`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,ARROW_UP_RIGHT_ICON:a.YP`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,ARROW_RIGHT_ICON:a.YP`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,QRCODE_ICON:a.YP`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,SCAN_ICON:a.YP`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,CHECKMARK_ICON:a.YP`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,HELP_ETH_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#j)"><rect width="60" height="60" rx="30" fill="#987DE8"/><path fill-rule="evenodd" clip-rule="evenodd" d="m15.48 28.367 11.966-19.3c1.174-1.892 3.927-1.892 5.1 0l11.97 19.306a6 6 0 0 1 .9 3.142v.028a6 6 0 0 1-1.154 3.56L33.227 50.208c-1.599 2.188-4.864 2.188-6.461 0L15.733 35.095a6 6 0 0 1-1.154-3.538v-.029a6 6 0 0 1 .9-3.161Z" fill="#fff"/><path d="M30.84 10.112a.992.992 0 0 0-.844-.464V24.5l12.598 5.53c.081-.466-.001-.963-.27-1.398L30.84 10.112Z" fill="#643CDD"/><path d="M29.996 9.648a.991.991 0 0 0-.845.465l-11.489 18.53a1.991 1.991 0 0 0-.264 1.387l12.598-5.53V9.648Z" fill="#BDADEB"/><path d="M29.996 50.544a.994.994 0 0 0 .808-.41l11.235-15.38c.307-.434-.193-.988-.658-.72L31.49 39.71a2.998 2.998 0 0 1-1.494.398v10.437Z" fill="#643CDD"/><path d="M17.966 34.762 29.19 50.134c.2.274.503.41.807.41V40.108a2.998 2.998 0 0 1-1.493-.398l-9.884-5.676c-.468-.27-.971.292-.653.728Z" fill="#BDADEB"/><path d="M42.594 30.03 29.996 24.5v13.138a3 3 0 0 0 1.495-.399l10.149-5.83c.525-.31.856-.823.954-1.38Z" fill="#401AB3"/><path d="M29.996 37.638V24.462l-12.598 5.566c.098.564.437 1.083.974 1.392l10.13 5.82c.462.265.978.398 1.494.398Z" fill="#7C5AE2"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="29.5"/><defs><clipPath id="j"><rect width="60" height="60" rx="30" fill="#fff"/></clipPath></defs></svg>`,HELP_PAINTING_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#k)"><rect width="60" height="60" rx="3" fill="#C653C6"/><path d="M52.094 47.344c0-4.246-1.436-9.557-5.885-12.4a2.876 2.876 0 0 0-1.615-3.891v-.819a4.037 4.037 0 0 0-1.34-3.007 4.75 4.75 0 0 0-2.41-6.252v-5.506c0-6.248-5.065-11.313-11.313-11.313-6.247 0-11.312 5.065-11.312 11.313v2.152a3.343 3.343 0 0 0-1.18 5.045 4.738 4.738 0 0 0-1.633 3.584 4.73 4.73 0 0 0 .956 2.858 5.218 5.218 0 0 0-2.358 6.815c-3.06 4.129-6.098 8.298-6.098 15.64 0 2.668.364 4.856.731 6.385.184.765.368 1.366.509 1.78a12.721 12.721 0 0 0 .225.611l.015.037.005.011.001.004v.002h.001l.92-.393-.92.394.26.606h38.26l.291-.49-.86-.51.86.51v-.001l.002-.002.002-.005.01-.017.035-.06.127-.225c.108-.195.26-.477.441-.835.363-.714.845-1.732 1.328-2.953.959-2.427 1.945-5.725 1.945-9.068Z" fill="#E87DE8" stroke="#fff" stroke-width="2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M26.5 29.5c-3-.5-5.5-3-5.503-7l.002-7c0-.466 0-.698.026-.893a3 3 0 0 1 2.582-2.582c.195-.026.428-.026.893-.026 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.398 0 2.097 0 2.648.229a3 3 0 0 1 1.624 1.623c.228.552.228 1.25.228 2.649v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.495 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z" fill="#fff"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="2.5"/><defs><clipPath id="k"><rect width="60" height="60" rx="3" fill="#fff"/></clipPath></defs></svg>`,HELP_CHART_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#l)"><path d="M0 25.01C0 15.76 0 11.133 1.97 7.678a15 15 0 0 1 5.598-5.597C11.023.11 15.648.11 24.9.11h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.597C60 11.133 60 15.758 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a15 15 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a14.999 14.999 0 0 1-5.597-5.598C0 49.087 0 44.462 0 35.21v-10.2Z" fill="#1DC956"/><path d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z" stroke="#fff" stroke-opacity=".1"/><path d="M16.109 60c-3.833-.179-6.41-.645-8.541-1.86a15 15 0 0 1-5.598-5.598C.553 50.057.155 46.967.043 41.985l4.146-1.382a4 4 0 0 0 2.48-2.39l4.654-12.409a2 2 0 0 1 2.505-1.195l2.526.842a2 2 0 0 0 2.422-1.003l2.968-5.938c.81-1.62 3.185-1.415 3.705.32l3.774 12.581a2 2 0 0 0 3.025 1.09l3.342-2.228c.27-.18.49-.422.646-.706l5.297-9.712a2 2 0 0 1 1.428-1.016l4.134-.689a2 2 0 0 1 1.61.437l3.892 3.243a2 2 0 0 0 2.694-.122l4.633-4.632C60 19.28 60 21.88 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a14.998 14.998 0 0 1-5.598 5.598c-2.131 1.215-4.708 1.681-8.54 1.86H16.108Z" fill="#2BEE6C"/><path d="M.072 43.03a112.37 112.37 0 0 1-.048-2.093l3.85-1.283a3 3 0 0 0 1.86-1.793l4.653-12.408a3 3 0 0 1 3.758-1.793l2.526.842a1 1 0 0 0 1.21-.501l2.97-5.938c1.214-2.43 4.775-2.123 5.556.48l3.774 12.58a1 1 0 0 0 1.513.545l3.341-2.227a1 1 0 0 0 .323-.353l5.298-9.712a3 3 0 0 1 2.14-1.523l4.135-.69a3 3 0 0 1 2.414.655l3.892 3.244a1 1 0 0 0 1.347-.061l5.28-5.28c.046.845.077 1.752.097 2.732l-3.962 3.962a3 3 0 0 1-4.042.183l-3.893-3.243a1 1 0 0 0-.804-.218l-4.135.689a1 1 0 0 0-.714.507l-5.297 9.712c-.233.427-.565.79-.97 1.06l-3.34 2.228a3 3 0 0 1-4.538-1.635l-3.775-12.58c-.26-.868-1.447-.97-1.852-.16l-2.969 5.937a3 3 0 0 1-3.632 1.505l-2.526-.842a1 1 0 0 0-1.252.597L7.606 38.564a5 5 0 0 1-3.1 2.988L.072 43.029Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" fill="#2BEE6C"/><path d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" fill="#fff"/><path d="M45 .283v59.654c-.63.042-1.294.074-2 .098V.185c.706.025 1.37.056 2 .098Z" fill="#fff"/><path class="help-img-highlight" d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z"/></g><defs><clipPath id="l"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_KEY_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#m)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M39.192 29.192c5.077-5.077 5.077-13.308 0-18.385-5.076-5.077-13.308-5.077-18.384 0-5.077 5.077-5.077 13.308 0 18.385l1.287 1.291c1.137 1.142 1.706 1.712 2.097 2.387.267.462.472.957.608 1.473.2.755.2 1.56.2 3.171V48.75c0 1.077 0 1.615.134 2.119a4 4 0 0 0 .407.984c.262.45.643.831 1.404 1.592l.294.295c.654.654.982.981 1.365 1.086.26.07.533.07.792 0 .383-.105.71-.432 1.365-1.086l3.478-3.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.478-.479c-.655-.654-.982-.981-1.087-1.365a1.5 1.5 0 0 1 0-.791c.105-.384.432-.711 1.087-1.365l.478-.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.492-.493c-.65-.65-.974-.974-1.08-1.355a1.5 1.5 0 0 1-.003-.788c.102-.382.425-.71 1.069-1.364l5.46-5.547Z"/><circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="m"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_USER_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#n)"><rect width="60" height="60" fill="#00ACE6" rx="30"/><path fill="#1AC6FF" stroke="#fff" stroke-width="2" d="M59 73c0 16.016-12.984 29-29 29S1 89.016 1 73c0-16.017 11-29 29-29s29 12.983 29 29ZM18.69 19.902a11 11 0 0 1 9.281-8.692 14.842 14.842 0 0 1 4.058 0 11 11 0 0 1 9.28 8.692c.178.866.322 1.75.44 2.625.132.977.132 1.968 0 2.945a39.467 39.467 0 0 1-.44 2.625 11 11 0 0 1-9.28 8.692 14.862 14.862 0 0 1-4.058 0 11 11 0 0 1-9.28-8.692 39.467 39.467 0 0 1-.44-2.625 11.004 11.004 0 0 1 0-2.945c.118-.876.262-1.759.44-2.625Z"/><circle cx="24.5" cy="23.5" r="1.5" fill="#fff"/><circle cx="35.5" cy="23.5" r="1.5" fill="#fff"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m31 20-3 8h4"/></g><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/><defs><clipPath id="n"><rect width="60" height="60" fill="#fff" rx="30"/></clipPath></defs></svg>`,HELP_LOCK_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#C653C6" rx="3"/><path fill="#fff" d="M20.034 15.216C20 15.607 20 16.07 20 17v2.808c0 1.13 0 1.696-.2 2.11a1.78 1.78 0 0 1-.584.714c-.366.28-1.051.42-2.423.7a7.076 7.076 0 0 0-1.597.511 9.001 9.001 0 0 0-4.353 4.353C10 30.005 10 32.336 10 37c0 4.663 0 6.995.843 8.804a9.001 9.001 0 0 0 4.353 4.353C17.005 51 19.336 51 24 51h12c4.663 0 6.995 0 8.804-.843a9.001 9.001 0 0 0 4.353-4.353C50 43.995 50 41.664 50 37c0-4.663 0-6.995-.843-8.804a9.001 9.001 0 0 0-4.353-4.353 7.076 7.076 0 0 0-1.597-.511c-1.372-.28-2.057-.42-2.423-.7a1.78 1.78 0 0 1-.583-.715C40 21.505 40 20.94 40 19.809V17c0-.929 0-1.393-.034-1.784a9 9 0 0 0-8.182-8.182C31.393 7 30.93 7 30 7s-1.393 0-1.784.034a9 9 0 0 0-8.182 8.182Z"/><path fill="#E87DE8" d="M22 17c0-.929 0-1.393.044-1.784a7 7 0 0 1 6.172-6.172C28.606 9 29.071 9 30 9s1.393 0 1.784.044a7 7 0 0 1 6.172 6.172c.044.39.044.855.044 1.784v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.394-.077-1.78a4 4 0 0 0-3.143-3.143C31.394 12 30.93 12 30 12s-1.394 0-1.78.077a4 4 0 0 0-3.143 3.143C25 15.606 25 16.07 25 17v4.5a1.5 1.5 0 0 1-3 0V17Z"/><path fill="#E87DE8" fill-rule="evenodd" d="M12 36.62c0-4.317 0-6.476.92-8.088a7 7 0 0 1 2.612-2.612c1.612-.92 3.77-.92 8.088-.92h6.855c.469 0 .703 0 .906.017 2.73.222 4.364 2.438 4.619 4.983.27-2.698 2.111-5 5.015-5A6.985 6.985 0 0 1 48 31.985v5.395c0 4.317 0 6.476-.92 8.088a7 7 0 0 1-2.612 2.612c-1.612.92-3.77.92-8.088.92h-5.855c-.469 0-.703 0-.906-.017-2.73-.222-4.364-2.438-4.619-4.983-.258 2.583-1.943 4.818-4.714 4.99-.155.01-.335.01-.694.01-.55 0-.825 0-1.057-.015a7 7 0 0 1-6.52-6.52C12 42.233 12 41.958 12 41.408V36.62Zm21.24-.273a4 4 0 1 0-6.478 0c.985 1.36 1.479 2.039 1.564 2.229.178.398.176.818.174 1.247V42.5a1.5 1.5 0 0 0 3 0v-2.677c-.002-.429-.004-.85.174-1.247.085-.19.579-.87 1.565-2.229Z" clip-rule="evenodd"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_COMPAS_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#1DC956" rx="30"/><circle cx="30" cy="29.999" r="3" fill="#fff"/><path fill="#2BEE6C" stroke="#fff" stroke-width="2" d="m45.316 17.9-.88-.425.88.424a7.9 7.9 0 0 1 .026-.053c.093-.192.21-.432.26-.687l-.819-.162.819.162a2 2 0 0 0-.239-1.405c-.132-.224-.32-.412-.472-.562a8.415 8.415 0 0 1-.042-.042l-.042-.042c-.15-.151-.338-.34-.562-.472l-.508.862.508-.862a2 2 0 0 0-1.405-.239c-.255.05-.495.167-.687.26l-.053.026-15.05 7.246-.108.052c-1.131.545-1.843.887-2.456 1.374a6.994 6.994 0 0 0-1.13 1.13c-.487.613-.83 1.325-1.375 2.457l-.051.108-7.247 15.05-.025.053c-.094.192-.21.431-.26.686a2 2 0 0 0 .239 1.406l.855-.505-.856.505c.133.224.321.411.473.562l.042.042.041.042c.15.151.338.34.563.472a2 2 0 0 0 1.405.239l-.195-.981.195.98c.255-.05.494-.166.686-.26l.054-.025-.419-.87.419.87 15.05-7.247.107-.051c1.132-.545 1.844-.888 2.457-1.374a7.002 7.002 0 0 0 1.13-1.13c.487-.614.83-1.325 1.374-2.457l.052-.108 7.246-15.05Z"/><path fill="#1DC956" d="m33.376 32.723-2.669-3.43-14.85 14.849.206.205a1 1 0 0 0 1.141.194l15.105-7.273a3 3 0 0 0 1.067-4.545Z"/><path fill="#86F999" d="m26.624 27.276 2.669 3.43 14.85-14.849-.206-.205a1 1 0 0 0-1.141-.194L27.69 22.731a3 3 0 0 0-1.067 4.545Z"/><circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/></svg>`,HELP_NOUN_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#794CFF" rx="3"/><path fill="#987DE8" stroke="#fff" stroke-width="2" d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z"/><path fill="#fff" d="M37.5 25h10v10h-10z"/><path fill="#4019B2" d="M42.5 25h5v10h-5z"/><path fill="#fff" d="M19.5 25h10v10h-10z"/><path fill="#4019B2" d="M24.5 25h5v10h-5z"/><path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_DAO_IMG:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#o)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M19 52c5.523 0 10-4.477 10-10s-4.477-10-10-10S9 36.477 9 42s4.477 10 10 10Z"/><path fill="#fff" fill-rule="evenodd" d="M42.844 8.326a1 1 0 0 0-1.687 0L28.978 27.463A1 1 0 0 0 29.822 29h24.357a1 1 0 0 0 .843-1.537L42.844 8.326Z" clip-rule="evenodd"/><path fill="#FF974C" fill-rule="evenodd" d="M42.335 11.646c.324.115.571.504 1.066 1.28l7.332 11.523c.562.883.843 1.325.792 1.69a1 1 0 0 1-.342.623c-.28.238-.803.238-1.85.238H34.667c-1.047 0-1.57 0-1.85-.238a1 1 0 0 1-.342-.623c-.051-.365.23-.806.792-1.69l7.332-11.523c.495-.776.742-1.165 1.066-1.28a1 1 0 0 1 .67 0ZM35 27a7 7 0 0 0 7-7 7 7 0 0 0 7 7H35Z" clip-rule="evenodd"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M10.106 9.357c-.109.32-.107.682-.106.975V25.668c-.001.293-.003.654.106.975a2 2 0 0 0 1.251 1.25c.32.11.682.108.975.107H19c5.523 0 10-4.477 10-10S24.523 8 19 8h-6.668c-.293-.001-.654-.003-.975.106a2 2 0 0 0-1.25 1.251Z"/><circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/><circle cx="19" cy="41.999" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="o"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,SEARCH_ICON:a.YP`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,HELP_ICON:a.YP`<svg width="11" height="17" viewBox="0 0 11 17"><path fill="#fff" d="M5.22 2.97c-1.07 0-2.25.843-2.25 2.25a.75.75 0 0 1-1.5 0c0-2.393 2.019-3.75 3.75-3.75 1.73 0 3.75 1.357 3.75 3.75 0 1.64-1.038 2.466-1.785 3.057-.802.635-1.215.984-1.215 1.693a.75.75 0 1 1-1.5 0c0-1.466.985-2.24 1.681-2.788l.103-.081C7.007 6.504 7.47 6.08 7.47 5.22c0-1.407-1.181-2.25-2.25-2.25ZM5.22 14.97a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"/></svg>`,WALLET_ICON:a.YP`<svg width="15" height="14" fill="none" viewBox="0 0 15 14"><path fill="#fff" fill-rule="evenodd" d="M.64 9.2v-3h.001c.009-1.857.07-2.886.525-3.682a4 4 0 0 1 1.492-1.493C3.58.5 4.813.5 7.28.5h3.735c.58 0 .871 0 1.114.04A3 3 0 0 1 14.6 3.011c.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041h-.777c.178.307.302.648.362 1.011.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041H4.507A3.867 3.867 0 0 1 .64 9.633V9.2ZM7.28 2h3.735c.64 0 .779.005.87.02a1.5 1.5 0 0 1 1.235 1.236c.015.09.02.229.02.869s-.005.779-.02.87a1.5 1.5 0 0 1-1.236 1.235c-.09.015-.229.02-.869.02H4.023c-.697 0-1.345.21-1.883.572V6.25h.001c.004-.791.015-1.383.059-1.867.056-.629.157-.926.269-1.122a2.5 2.5 0 0 1 .932-.933c.197-.111.494-.212 1.123-.268C5.173 2 6.019 2 7.28 2Zm-.265 5.75H4.023c-1.04 0-1.883.843-1.883 1.883A2.367 2.367 0 0 0 4.507 12h2.508c.64 0 .779-.005.87-.02a1.5 1.5 0 0 0 1.235-1.236c.015-.09.02-.229.02-.869s-.005-.779-.02-.87A1.5 1.5 0 0 0 7.884 7.77c-.09-.015-.228-.02-.869-.02Z" clip-rule="evenodd"/></svg>`,NETWORK_PLACEHOLDER:a.YP`<svg width="28" height="28" fill="none" viewBox="0 0 28 28"><mask id="p" width="26" height="28" x="1" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#D9D9D9" d="M12 1.172a4 4 0 0 1 4 0l8.124 4.69a4 4 0 0 1 2 3.465v9.381a4 4 0 0 1-2 3.464L16 26.862a4 4 0 0 1-4 0l-8.124-4.69a4 4 0 0 1-2-3.464V9.327a4 4 0 0 1 2-3.464L12 1.173Z"/></mask><g mask="url(#p)"><path id="network-placeholder-fill" fill="#fff" d="M0 0h28v28H0z"/><path id="network-placeholder-dash" stroke="#000" stroke-dasharray="2 2" d="m8.953 2.931 2.032-1.173.25.433 1.015-.586c.269-.155.553-.271.844-.35l-.13-.483a4.003 4.003 0 0 1 2.071 0l-.13.483c.293.079.576.195.845.35l1.016.586.25-.433 2.03 1.173-.25.433 2.032 1.173.25-.433 2.03 1.172-.25.433 1.016.587c.269.155.512.342.725.556l.354-.354a4.003 4.003 0 0 1 1.035 1.794l-.483.129c.078.292.12.596.12.906v1.172h.5v2.346h-.5v2.345h.5v2.345h-.5v1.173c0 .31-.042.614-.12.906l.483.13a4.003 4.003 0 0 1-1.035 1.793l-.354-.354a3.498 3.498 0 0 1-.725.556l-1.015.586.25.434-2.031 1.172-.25-.433-2.031 1.173.25.433-2.031 1.172-.25-.433-1.016.587a3.494 3.494 0 0 1-.844.35l.13.482a4.003 4.003 0 0 1-2.071 0l.13-.483a3.496 3.496 0 0 1-.845-.35l-1.015-.586-.25.433-2.032-1.172.25-.433-2.03-1.173-.25.433L4.89 22.76l.25-.434-1.015-.586a3.498 3.498 0 0 1-.725-.556l-.354.354a4.003 4.003 0 0 1-1.035-1.794l.483-.13a3.497 3.497 0 0 1-.12-.905v-1.173h-.5V15.19h.5v-2.345h-.5v-2.346h.5V9.327c0-.31.042-.614.12-.906l-.483-.13a4.003 4.003 0 0 1 1.035-1.793l.354.354c.213-.214.456-.401.725-.556l1.015-.587-.25-.433 2.031-1.172.25.433 2.031-1.173-.25-.433Z"/><path fill="#798686" stroke="#fff" d="M14.243 13.563 14 13.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.538.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.538-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#9EA9A9" stroke="#fff" d="M14.243 8.563 14 8.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.316.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.316-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#C9CFCF" stroke="#fff" d="m22.344 9.53-.468-.176.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-3.163-1.758-.09-.05c-1.163-.645-1.856-1.03-2.606-1.161a4.5 4.5 0 0 0-1.544 0c-.75.13-1.443.516-2.607 1.162l-.088.05-3.164 1.757-.024.013c-.432.24-.79.44-1.053.622-.266.185-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722Z"/></g></svg>`,WALLET_PLACEHOLDER:a.YP`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,TOKEN_PLACEHOLDER:a.YP`<svg width="60" height="60" viewBox="0 0 60 60" fill="none"><rect id="token-placeholder-fill" width="58" height="58" x="1" y="1" fill="#fff" rx="29"/><path fill="#3B4040" stroke="#fff" stroke-width="2" d="M32 10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v5.566c0 .357.192.685.495.875a16.001 16.001 0 0 1 4.256 3.894c.667.88.33 2.113-.627 2.665l-2.494 1.44c-.956.552-2.166.204-2.913-.609a9.12 9.12 0 1 0 .064 12.267c.739-.82 1.945-1.181 2.907-.64l2.509 1.415c.962.542 1.312 1.77.654 2.658a16 16 0 0 1-4.356 4.028c-.303.19-.495.518-.495.875V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-2.992c0-.602-.528-1.065-1.13-1.032-.579.032-1.16.032-1.74 0-.602-.032-1.13.43-1.13 1.032V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-5.566c0-.357-.192-.685-.495-.875a16 16 0 0 1 0-27.118c.303-.19.495-.517.495-.875V10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2.992c0 .601.528 1.064 1.13 1.032.58-.032 1.161-.032 1.74 0 .602.033 1.13-.43 1.13-1.032V10Z"/><rect id="token-placeholder-dash" width="58" height="58" x="1" y="1" stroke="#000" stroke-dasharray="6 6" stroke-width="2" rx="29"/></svg>`,ACCOUNT_COPY:a.YP`<svg width="14" height="14" fill="none" viewBox="0 0 14 14"><path fill="#fff" fill-rule="evenodd" d="M4.003 4.005c.012-1.225.074-1.936.391-2.491a3 3 0 0 1 1.12-1.12C6.204 0 7.136 0 9 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C14 2.204 14 3.136 14 5s0 2.795-.394 3.486a3 3 0 0 1-1.12 1.12c-.555.317-1.266.379-2.491.391l.002.003c-.012 1.222-.075 1.932-.391 2.486a3 3 0 0 1-1.12 1.12C7.796 14 6.864 14 5 14s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C0 11.796 0 10.864 0 9s0-2.795.394-3.486a3 3 0 0 1 1.12-1.12c.554-.316 1.264-.379 2.486-.391l.003.002ZM9 8.5c-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.045-.08-.113-.243-.154-.693C5.501 6.58 5.5 5.959 5.5 5c0-.959.001-1.58.043-2.05.04-.45.109-.613.154-.693a1.5 1.5 0 0 1 .56-.56c.08-.045.243-.113.693-.154C7.42 1.501 8.041 1.5 9 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.045.08.113.243.154.693.042.47.043 1.091.043 2.05 0 .959-.001 1.58-.043 2.05-.04.45-.109.613-.154.693a1.5 1.5 0 0 1-.56.56c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043ZM4 5.503a13.77 13.77 0 0 0-1.05.04c-.45.04-.613.109-.693.154a1.5 1.5 0 0 0-.56.56c-.045.08-.113.243-.154.693C1.501 7.42 1.5 8.041 1.5 9c0 .959.001 1.58.043 2.05.04.45.109.613.154.693a1.5 1.5 0 0 0 .56.56c.08.045.243.113.693.154.47.042 1.091.043 2.05.043.959 0 1.58-.001 2.05-.043.45-.04.613-.109.693-.154a1.5 1.5 0 0 0 .56-.56c.045-.08.113-.242.154-.693.025-.283.035-.619.04-1.05-1.534-.003-2.358-.037-2.983-.394a3 3 0 0 1-1.12-1.12c-.357-.625-.39-1.449-.394-2.983Z" clip-rule="evenodd"/></svg>`,ACCOUNT_DISCONNECT:a.YP`<svg width="16" height="14" fill="none" viewBox="0 0 16 14"><path fill="#fff" d="M9.677 1.5h-2.61c-1.261 0-2.107.001-2.757.06-.629.056-.926.157-1.122.268a2.5 2.5 0 0 0-.933.933c-.112.196-.212.493-.269 1.122-.058.65-.06 1.496-.06 2.757v.72c0 1.26.002 2.107.06 2.756.057.63.157.927.27 1.123a2.5 2.5 0 0 0 .932.933c.196.111.493.212 1.122.268.65.059 1.496.06 2.757.06h2.61a.75.75 0 1 1 0 1.5h-2.61c-2.467 0-3.7 0-4.622-.525a4 4 0 0 1-1.493-1.493C.427 11.06.427 9.827.427 7.36v-.72c0-2.467 0-3.7.525-4.622A4 4 0 0 1 2.445.525C3.366 0 4.6 0 7.067 0h2.61a.75.75 0 1 1 0 1.5Z"/><path fill="#fff" d="M10.896 11.03a.75.75 0 0 1 0-1.06l1.793-1.793a.25.25 0 0 0-.176-.427H8.177a.75.75 0 0 1 0-1.5h4.336a.25.25 0 0 0 .176-.427L10.896 4.03a.75.75 0 0 1 1.061-1.06l3.323 3.323a1 1 0 0 1 0 1.414l-3.323 3.323a.75.75 0 0 1-1.06 0Z"/></svg>`,GLOBE_ICON:a.YP`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>`},L=n.iv`.w3m-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--w3m-background-border-radius) * .9);background-color:var(--w3m-background-color);background-image:var(--w3m-background-image-url);background-position:center;background-size:cover}.w3m-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.w3m-toolbar img,.w3m-toolbar svg{height:28px;object-position:left center;object-fit:contain}#w3m-wc-logo path{fill:var(--w3m-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--w3m-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--w3m-color-bg-1);box-shadow:0 0 0 1px var(--w3m-color-overlay)}button:active{background-color:var(--w3m-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--w3m-color-fg-1)}.w3m-toolbar div{display:flex}.w3m-toolbar div button:first-child{margin-right:16px}.w3m-help-active button:first-child{background-color:var(--w3m-color-fg-1)}.w3m-help-active button:first-child path{fill:var(--w3m-color-bg-1)}@media(hover:hover){button:hover{background-color:var(--w3m-color-bg-2)}}`;var $=Object.defineProperty,D=Object.getOwnPropertyDescriptor,B=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?D(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&$(t,r,o),o};let U=class extends n.oi{constructor(){super(),this.isHelp=!1,this.unsubscribeRouter=void 0,this.unsubscribeRouter=o.AV.subscribe((e=>{this.isHelp="Help"===e.view}))}disconnectedCallback(){var e;null==(e=this.unsubscribeRouter)||e.call(this)}onHelp(){o.AV.push("Help")}logoTemplate(){var e;const t=null==(e=o.ThemeCtrl.state.themeVariables)?void 0:e["--w3m-logo-image-url"];return t?n.dy`<img crossorigin="anonymous" src="${t}" data-testid="component-modal-backcard">`:R.WALLET_CONNECT_LOGO}render(){const e={"w3m-help-active":this.isHelp};return n.dy`<div class="w3m-toolbar-placeholder"></div><div class="w3m-toolbar">${this.logoTemplate()}<div class="${(0,s.$)(e)}"><button @click="${this.onHelp}">${R.HELP_ICON}</button> <button @click="${o.jb.close}">${R.CROSS_ICON}</button></div></div>`}};U.styles=[w.globalCss,L],B([(0,i.SB)()],U.prototype,"isHelp",2),U=B([(0,i.Mo)("w3m-modal-backcard")],U);const W=n.iv`main{padding:20px;padding-top:0;width:100%}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let z=class extends n.oi{render(){return n.dy`<main data-testid="component-modal-content"><slot></slot></main>`}};z.styles=[w.globalCss,W],z=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-modal-content")],z);const H=n.iv`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--w3m-color-bg-2)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let F=class extends n.oi{render(){return n.dy`<footer data-testid="component-modal-footer"><slot></slot></footer>`}};F.styles=[w.globalCss,H],F=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-modal-footer")],F);const q=n.iv`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.w3m-border{border-bottom:1px solid var(--w3m-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.w3m-back-btn{position:absolute;left:0}.w3m-action-btn{position:absolute;right:0}path{fill:var(--w3m-accent-color)}`;var V=Object.defineProperty,G=Object.getOwnPropertyDescriptor,K=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?G(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&V(t,r,o),o};let Z=class extends n.oi{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return n.dy`<button class="w3m-back-btn" data-testid="component-header-back-button" @click="${o.AV.goBack}">${R.BACK_ICON}</button>`}actionBtnTemplate(){return n.dy`<button class="w3m-action-btn" data-testid="component-header-action-button" @click="${this.onAction}">${this.actionIcon}</button>`}render(){const e={"w3m-border":this.border},t=o.AV.state.history.length>1,r=this.title?n.dy`<w3m-text variant="big-bold">${this.title}</w3m-text>`:n.dy`<slot></slot>`;return n.dy`<header class="${(0,s.$)(e)}">${t?this.backBtnTemplate():null} ${r} ${this.onAction?this.actionBtnTemplate():null}</header>`}};Z.styles=[w.globalCss,q],K([(0,i.Cb)()],Z.prototype,"title",2),K([(0,i.Cb)()],Z.prototype,"onAction",2),K([(0,i.Cb)()],Z.prototype,"actionIcon",2),K([(0,i.Cb)()],Z.prototype,"border",2),Z=K([(0,i.Mo)("w3m-modal-header")],Z);const Q={1:"692ed6ba-e569-459a-556a-776476829e00",42161:"600a9a04-c1b9-42ca-6785-9b4b6ff85200",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00"},Y={ETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},WETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},AVAX:{icon:"30c46e53-e989-45fb-4549-be3bd4eb3b00"},FTM:{icon:"06b26297-fe0c-4733-5d6b-ffa5498aac00"},BNB:{icon:"93564157-2e8e-4ce7-81df-b264dbee9b00"},MATIC:{icon:"41d04d42-da3b-4453-8506-668cc0727900"},OP:{icon:"ab9c186a-c52f-464b-2906-ca59d760a400"},xDAI:{icon:"02b53f6a-e3d4-479e-1cb4-21178987d100"},EVMOS:{icon:"f926ff41-260d-4028-635e-91913fc28e00"},METIS:{icon:"3897a66d-40b9-4833-162f-a2c90531c900"},IOTX:{icon:"34e68754-e536-40da-c153-6ef2e7188a00"}},J={externalWallets(){let e=o.Id.client().getConnectors();return e=e.filter((e=>"injected"!==e.id)),e},manualWallets(){var e,t;const{mobileWallets:r,desktopWallets:n}=o.ConfigCtrl.state,i=null==(e=J.recentWallet())?void 0:e.id,s=o.zv.isMobile()?r:n,a=s?.filter((e=>i!==e.id));return null!=(t=o.zv.isMobile()?a?.map((({id:e,name:t,links:r})=>({id:e,name:t,mobile:r,links:r}))):a?.map((({id:e,name:t,links:r})=>({id:e,name:t,desktop:r,links:r}))))?t:[]},installedInjectedWallets(){if(!o.Id.client().isInjectedProviderInstalled())return[];const{namespace:e}=o.Id.client(),{injectedWallets:t}=o.ExplorerCtrl.state;let r=t.filter((({injected:t})=>Boolean(t.some((t=>o.Id.client().safeCheckInjectedProvider(t.injected_id)&&t.namespace===e)))));return r.length>1&&(r=r.filter((({injected:e})=>{const t=e.map((({injected_id:e})=>e));return Boolean(t.every((e=>"isMetaMask"!==e)))}))),r.length?r:[{name:"Browser",id:"browser",image_id:void 0}]},injectedWallets(){const{explorerExcludedWalletIds:e,explorerRecommendedWalletIds:t}=o.ConfigCtrl.state,r=o.zv.isMobile();if("ALL"===e||r)return[];const{namespace:n}=o.Id.client(),{injectedWallets:i}=o.ExplorerCtrl.state;return i.filter((({id:r,injected:i})=>{const s=o.zv.isArray(e)?e:[],a=o.zv.isArray(t)?t:[];return Boolean(i.some((e=>e.namespace===n&&!s.includes(r)&&!a.includes(r))))}))},recentWallet:()=>X.getRecentWallet(),recomendedWallets(e=!1){var t;const r=[...J.installedInjectedWallets().map((({id:e})=>e)),e||null==(t=J.recentWallet())?void 0:t.id],{recomendedWallets:n}=o.ExplorerCtrl.state;return n.filter((e=>!r.includes(e.id)))}},X={MOBILE_BREAKPOINT:600,W3M_RECENT_WALLET_INFO:"W3M_RECENT_WALLET_INFO",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",WAGMI_WALLET:"wagmi.wallet",getShadowRootElement(e,t){const r=e.renderRoot.querySelector(t);if(!r)throw new Error(`${t} not found`);return r},getWalletIcon({id:e,image_id:t}){const{walletImages:r}=o.ConfigCtrl.state;return null!=r&&r[e]?r[e]:t?o.ExplorerCtrl.getWalletImageUrl(t):""},getWalletName:(e,t=!1)=>t&&e.length>8?`${e.substring(0,8)}..`:e,getChainIcon(e){var t;const r=Q[e],{projectId:n,chainImages:i}=o.ConfigCtrl.state;return null!=(t=i?.[e])?t:n&&r?o.ExplorerCtrl.getAssetImageUrl(r):""},getTokenIcon(e){var t,r;const n=null==(t=Y[e])?void 0:t.icon,{projectId:i,tokenImages:s}=o.ConfigCtrl.state;return null!=(r=s?.[e])?r:i&&n?o.ExplorerCtrl.getAssetImageUrl(n):""},isMobileAnimation:()=>window.innerWidth<=X.MOBILE_BREAKPOINT,async preloadImage(e){const t=new Promise(((t,r)=>{const n=new Image;n.onload=t,n.onerror=r,n.crossOrigin="anonymous",n.src=e}));return Promise.race([t,o.zv.wait(3e3)])},getErrorMessage:e=>e instanceof Error?e.message:"Unknown Error",debounce(e,t=500){let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout((function(){e(...n)}),t)}},handleMobileLinking(e){const{pairingUri:t}=o.WcConnectionCtrl.state,{mobile:r,name:n}=e,i=r?.native,s=r?.universal;X.setRecentWallet(e),function(e){let t="";i?t=o.zv.formatUniversalUrl(i,e,n):s&&(t=o.zv.formatNativeUrl(s,e,n)),o.zv.openHref(t,"_self")}(t)},handleAndroidLinking(){const{pairingUri:e}=o.WcConnectionCtrl.state;o.zv.setWalletConnectAndroidDeepLink(e),o.zv.openHref(e,"_self")},async handleUriCopy(){try{const{pairingUri:e}=o.WcConnectionCtrl.state;await navigator.clipboard.writeText(e),o.ToastCtrl.openToast("Link copied","success")}catch{o.ToastCtrl.openToast("Failed to copy","error")}},async handleConnectorConnection(e,t){try{const{selectedChain:t}=o.OptionsCtrl.state;await o.Id.client().connectConnector(e,t?.id),o.jb.close()}catch(e){console.error(e),t?t():o.ToastCtrl.openToast(X.getErrorMessage(e),"error")}},getCustomImageUrls(){const{chainImages:e,walletImages:t}=o.ConfigCtrl.state,r=Object.values(e??{}),n=Object.values(t??{});return Object.values([...r,...n])},truncate:(e,t=8)=>e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`,generateAvatarColors(e){var t;const r=null==(t=e.match(/.{1,7}/g))?void 0:t.splice(0,5),n=[];r?.forEach((e=>{let t=0;for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t&=t;const r=[0,0,0];for(let e=0;e<3;e+=1){const n=t>>8*e&255;r[e]=n}n.push(`rgb(${r[0]}, ${r[1]}, ${r[2]})`)}));const i=document.querySelector(":root");if(i){const e={"--w3m-color-av-1":n[0],"--w3m-color-av-2":n[1],"--w3m-color-av-3":n[2],"--w3m-color-av-4":n[3],"--w3m-color-av-5":n[4]};Object.entries(e).forEach((([e,t])=>i.style.setProperty(e,t)))}},setRecentWallet(e){try{localStorage.setItem(X.W3M_RECENT_WALLET_INFO,JSON.stringify(e))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const e=localStorage.getItem(X.W3M_RECENT_WALLET_INFO);return e?JSON.parse(e):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(e,t)=>e.toUpperCase().includes(t.toUpperCase()),openWalletExplorerUrl(){o.zv.openHref(X.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{id:e,desktop:t,mobile:r,injected:n}=o.zv.getWalletRouterData(),i=J.installedInjectedWallets(),s=Boolean(n?.length),a=i.some((t=>t.id===e)),c=Boolean(t?.native),l=Boolean(t?.universal);return{isInjectedInstalled:a,isInjected:s,isDesktop:c,isMobile:Boolean(r?.native)||Boolean(r?.universal),isWeb:l}},goToConnectingView(e){o.AV.setData({Wallet:e});const t=o.zv.isMobile(),{isDesktop:r,isWeb:n,isMobile:i,isInjectedInstalled:s}=X.getCachedRouterWalletPlatforms();t?s?o.AV.push("InjectedConnecting"):i?o.AV.push("MobileConnecting"):n?o.AV.push("WebConnecting"):o.AV.push("InstallWallet"):s?o.AV.push("InjectedConnecting"):r?o.AV.push("DesktopConnecting"):n?o.AV.push("WebConnecting"):i?o.AV.push("MobileQrcodeConnecting"):o.AV.push("InstallWallet")},getWagmiWalletType:()=>localStorage.getItem(X.WAGMI_WALLET)},ee=n.iv`.w3m-router{overflow:hidden;will-change:transform}.w3m-content{display:flex;flex-direction:column}`;var te=Object.defineProperty,re=Object.getOwnPropertyDescriptor,ne=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?re(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&te(t,r,o),o};let ie=class extends n.oi{constructor(){super(),this.view=o.AV.state.view,this.prevView=o.AV.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=o.AV.subscribe((e=>{this.view!==e.view&&this.onChangeRoute()}))}firstUpdated(){this.resizeObserver=new ResizeObserver((([e])=>{const t=`${e.contentRect.height}px`;"0px"!==this.oldHeight&&(0,c.j)(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t})),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;null==(e=this.unsubscribe)||e.call(this),null==(t=this.resizeObserver)||t.disconnect()}get routerEl(){return X.getShadowRootElement(this,".w3m-router")}get contentEl(){return X.getShadowRootElement(this,".w3m-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return n.dy`<w3m-connect-wallet-view></w3m-connect-wallet-view>`;case"SelectNetwork":return n.dy`<w3m-select-network-view></w3m-select-network-view>`;case"InjectedConnecting":return n.dy`<w3m-injected-connecting-view></w3m-injected-connecting-view>`;case"DesktopConnecting":return n.dy`<w3m-desktop-connecting-view></w3m-desktop-connecting-view>`;case"MobileConnecting":return n.dy`<w3m-mobile-connecting-view></w3m-mobile-connecting-view>`;case"WebConnecting":return n.dy`<w3m-web-connecting-view></w3m-web-connecting-view>`;case"MobileQrcodeConnecting":return n.dy`<w3m-mobile-qr-connecting-view></w3m-mobile-qr-connecting-view>`;case"GetWallet":return n.dy`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"WalletExplorer":return n.dy`<w3m-wallet-explorer-view></w3m-wallet-explorer-view>`;case"Qrcode":return n.dy`<w3m-qrcode-view></w3m-qrcode-view>`;case"Help":return n.dy`<w3m-help-view></w3m-help-view>`;case"Account":return n.dy`<w3m-account-view></w3m-account-view>`;case"SwitchNetwork":return n.dy`<w3m-switch-network-view></w3m-switch-network-view>`;case"InstallWallet":return n.dy`<w3m-install-wallet-view></w3m-install-wallet-view>`;default:return n.dy`<div>Not Found</div>`}}async onChangeRoute(){await(0,c.j)(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=o.AV.state.view,(0,c.j)(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return n.dy`<div class="w3m-router"><div class="w3m-content">${this.viewTemplate()}</div></div>`}};ie.styles=[w.globalCss,ee],ne([(0,i.SB)()],ie.prototype,"view",2),ne([(0,i.SB)()],ie.prototype,"prevView",2),ie=ne([(0,i.Mo)("w3m-modal-router")],ie);const oe=n.iv`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--w3m-notification-border-radius);border:1px solid var(--w3m-color-overlay);background-color:var(--w3m-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--w3m-color-bg-3)}}.w3m-success path{fill:var(--w3m-accent-color)}.w3m-error path{fill:var(--w3m-error-color)}`;var se=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,ce=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ae(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&se(t,r,o),o};let le=class extends n.oi{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=o.ToastCtrl.subscribe((e=>{e.open?(this.open=!0,this.timeout=setTimeout((()=>o.ToastCtrl.closeToast()),2200)):(this.open=!1,clearTimeout(this.timeout))}))}disconnectedCallback(){var e;null==(e=this.unsubscribe)||e.call(this),clearTimeout(this.timeout),o.ToastCtrl.closeToast()}render(){const{message:e,variant:t}=o.ToastCtrl.state,r={"w3m-success":"success"===t,"w3m-error":"error"===t};return this.open?n.dy`<div data-testid="component-modal-toast" class="${(0,s.$)(r)}">${"success"===t?R.CHECKMARK_ICON:null} ${"error"===t?R.CROSS_ICON:null}<w3m-text variant="small-regular">${e}</w3m-text></div>`:null}};le.styles=[w.globalCss,oe],ce([(0,i.SB)()],le.prototype,"open",2),le=ce([(0,i.Mo)("w3m-modal-toast")],le);const ue=n.iv`button{padding:5px;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;height:90px;position:relative}w3m-network-image{width:54px;height:59px}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;margin-top:5px}button:active{background-color:var(--w3m-color-overlay)}.w3m-unsupported{opacity:.3}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}`;var he=Object.defineProperty,de=Object.getOwnPropertyDescriptor,pe=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?de(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&he(t,r,o),o};let fe=class extends n.oi{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.chainId="",this.unsupported=!1}render(){const e={"w3m-unsupported":this.unsupported};return n.dy`<button data-testid="component-network-button" @click="${this.onClick}" class="${(0,s.$)(e)}"><w3m-network-image chainId="${this.chainId}"></w3m-network-image><w3m-text variant="xsmall-regular">${this.name}</w3m-text></button>`}};fe.styles=[w.globalCss,ue],pe([(0,i.Cb)()],fe.prototype,"onClick",2),pe([(0,i.Cb)()],fe.prototype,"name",2),pe([(0,i.Cb)()],fe.prototype,"chainId",2),pe([(0,i.Cb)()],fe.prototype,"unsupported",2),fe=pe([(0,i.Mo)("w3m-network-button")],fe);const me=n.iv`@keyframes loading{to{stroke-dashoffset:0}}:host{width:inherit;height:inherit;position:relative}path{stroke:var(--w3m-color-overlay)}svg{width:100%;height:100%;margin:0}#network-placeholder-fill{fill:var(--w3m-color-bg-3)}#network-placeholder-dash{stroke:var(--w3m-color-overlay)}image{clip-path:path('M17.033 4.964c3.852-2.262 5.778-3.393 7.84-3.77a11.807 11.807 0 0 1 4.254 0c2.062.377 3.988 1.508 7.84 3.77l6.066 3.562c3.852 2.263 5.777 3.394 7.13 5.022a12.268 12.268 0 0 1 2.127 3.747c.71 2.006.71 4.268.71 8.793v7.124c0 4.525 0 6.787-.71 8.793a12.268 12.268 0 0 1-2.126 3.747c-1.354 1.628-3.28 2.76-7.131 5.022l-6.066 3.562c-3.852 2.262-5.778 3.393-7.84 3.771a11.814 11.814 0 0 1-4.254 0c-2.062-.378-3.988-1.509-7.84-3.77l-6.066-3.563c-3.852-2.263-5.778-3.394-7.13-5.022a12.268 12.268 0 0 1-2.127-3.747C1 40 1 37.737 1 33.212v-7.124c0-4.525 0-6.787.71-8.793a12.268 12.268 0 0 1 2.127-3.747c1.352-1.628 3.278-2.76 7.13-5.022l6.066-3.562Z')}`;var ge=Object.defineProperty,we=Object.getOwnPropertyDescriptor,be=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?we(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ge(t,r,o),o};let ve=class extends n.oi{constructor(){super(...arguments),this.chainId=""}render(){const e=X.getChainIcon(this.chainId);return e?n.dy`<svg width="54" height="59" viewBox="0 0 54 59" fill="none" data-testid="component-network-logo-svg"><image href="${e}"/><image href="${e}" width="54" height="59"/><path d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z"/></svg>`:n.dy`${R.NETWORK_PLACEHOLDER}`}};function ye(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}ve.styles=[w.globalCss,me],be([(0,i.Cb)()],ve.prototype,"chainId",2),ve=be([(0,i.Mo)("w3m-network-image")],ve);const xe={generate(e,t,r){const i="#141414",o=[],s=function(e,t){const r=Array.prototype.slice.call(l.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),n=Math.sqrt(r.length);return r.reduce(((e,t,r)=>(r%n==0?e.push([t]):e[e.length-1].push(t))&&e),[])}(e),a=t/s.length,c=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];c.forEach((({x:e,y:t})=>{const r=(s.length-7)*a*e,l=(s.length-7)*a*t;for(let e=0;e<c.length;e+=1){const t=a*(7-2*e);o.push(n.YP`<rect fill="${e%2==0?i:"#ffffff"}" height="${t}" rx="${.45*t}" ry="${.45*t}" width="${t}" x="${r+a*e}" y="${l+a*e}">`)}}));const u=Math.floor((r+25)/a),h=s.length/2-u/2,d=s.length/2+u/2-1,p=[];s.forEach(((e,t)=>{e.forEach(((e,r)=>{if(s[t][r]&&!(t<7&&r<7||t>s.length-8&&r<7||t<7&&r>s.length-8)&&!(t>h&&t<d&&r>h&&r<d)){const e=t*a+a/2,n=r*a+a/2;p.push([e,n])}}))}));const f={};return p.forEach((([e,t])=>{f[e]?f[e].push(t):f[e]=[t]})),Object.entries(f).map((([e,t])=>{const r=t.filter((e=>t.every((t=>!ye(e,t,a)))));return[Number(e),r]})).forEach((([e,t])=>{t.forEach((t=>{o.push(n.YP`<circle cx="${e}" cy="${t}" fill="${i}" r="${a/2.5}">`)}))})),Object.entries(f).filter((([e,t])=>t.length>1)).map((([e,t])=>{const r=t.filter((e=>t.some((t=>ye(e,t,a)))));return[Number(e),r]})).map((([e,t])=>{t.sort(((e,t)=>e<t?-1:1));const r=[];for(const e of t){const t=r.find((t=>t.some((t=>ye(e,t,a)))));t?t.push(e):r.push([e])}return[e,r.map((e=>[e[0],e[e.length-1]]))]})).forEach((([e,t])=>{t.forEach((([t,r])=>{o.push(n.YP`<line x1="${e}" x2="${e}" y1="${t}" y2="${r}" stroke="${i}" stroke-width="${a/1.25}" stroke-linecap="round">`)}))})),o}},Ce=n.iv`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.w3m-dark{background-color:#fff;border-radius:var(--w3m-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,w3m-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{width:25%;height:25%;border-radius:var(--w3m-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--w3m-accent-color)}svg:first-child path:last-child{stroke:var(--w3m-color-overlay)}`;var Ae=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,_e=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ee(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ae(t,r,o),o};let Ie=class extends n.oi{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e="light"===o.ThemeCtrl.state.themeMode?this.size:this.size-36;return n.YP`<svg height="${e}" width="${e}" data-testid="component-qrcode-svg">${xe.generate(this.uri,e,e/4)}</svg>`}render(){const e={"w3m-dark":"dark"===o.ThemeCtrl.state.themeMode};return n.dy`<div style="${`width: ${this.size}px`}" class="${(0,s.$)(e)}">${this.walletId||this.imageUrl?n.dy`<w3m-wallet-image walletId="${this.walletId}" imageId="${this.imageId}" imageUrl="${this.imageUrl}"></w3m-wallet-image>`:R.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}};Ie.styles=[w.globalCss,Ce],_e([(0,i.Cb)()],Ie.prototype,"uri",2),_e([(0,i.Cb)({type:Number})],Ie.prototype,"size",2),_e([(0,i.Cb)()],Ie.prototype,"imageId",2),_e([(0,i.Cb)()],Ie.prototype,"walletId",2),_e([(0,i.Cb)()],Ie.prototype,"imageUrl",2),Ie=_e([(0,i.Mo)("w3m-qrcode")],Ie);const Pe=n.iv`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--w3m-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--w3m-color-fg-1);background-color:var(--w3m-color-bg-3);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);caret-color:var(--w3m-accent-color)}input::placeholder{color:var(--w3m-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--w3m-accent-color)}path{fill:var(--w3m-color-fg-2)}`;var Oe=Object.defineProperty,ke=Object.getOwnPropertyDescriptor,Se=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ke(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Oe(t,r,o),o};let Me=class extends n.oi{constructor(){super(...arguments),this.onChange=()=>null}render(){return n.dy`<input type="text" @input="${this.onChange}" placeholder="Search wallets" data-testid="component-search-input"> ${R.SEARCH_ICON}`}};Me.styles=[w.globalCss,Pe],Se([(0,i.Cb)()],Me.prototype,"onChange",2),Me=Se([(0,i.Mo)("w3m-search-input")],Me);const Ne=n.iv`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}:host{width:100%;height:100%;display:flex;justify-content:center;align-items:center}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite}.accent{stroke:var(--w3m-accent-color)}.fill{stroke:var(--w3m-accent-fill-color)}`;var Te=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Re=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?je(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Te(t,r,o),o};let Le=class extends n.oi{constructor(){super(...arguments),this.color="accent",this.size=24}render(){return n.dy`<svg viewBox="0 0 50 50" width="${this.size}" height="${this.size}" data-testid="component-spinner-svg"><circle class="${this.color}" cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`}};Le.styles=[w.globalCss,Ne],Re([(0,i.Cb)()],Le.prototype,"color",2),Re([(0,i.Cb)({type:Number})],Le.prototype,"size",2),Le=Re([(0,i.Mo)("w3m-spinner")],Le);const $e=n.iv`span{font-style:normal;font-family:var(--w3m-font-family);font-feature-settings:var(--w3m-font-feature-settings)}.w3m-xsmall-bold{font-family:var(--w3m-text-xsmall-bold-font-family);font-weight:var(--w3m-text-xsmall-bold-weight);font-size:var(--w3m-text-xsmall-bold-size);line-height:var(--w3m-text-xsmall-bold-line-height);letter-spacing:var(--w3m-text-xsmall-bold-letter-spacing);text-transform:var(--w3m-text-xsmall-bold-text-transform)}.w3m-xsmall-regular{font-family:var(--w3m-text-xsmall-regular-font-family);font-weight:var(--w3m-text-xsmall-regular-weight);font-size:var(--w3m-text-xsmall-regular-size);line-height:var(--w3m-text-xsmall-regular-line-height);letter-spacing:var(--w3m-text-xsmall-regular-letter-spacing);text-transform:var(--w3m-text-xsmall-regular-text-transform)}.w3m-small-thin{font-family:var(--w3m-text-small-thin-font-family);font-weight:var(--w3m-text-small-thin-weight);font-size:var(--w3m-text-small-thin-size);line-height:var(--w3m-text-small-thin-line-height);letter-spacing:var(--w3m-text-small-thin-letter-spacing);text-transform:var(--w3m-text-small-thin-text-transform)}.w3m-small-regular{font-family:var(--w3m-text-small-regular-font-family);font-weight:var(--w3m-text-small-regular-weight);font-size:var(--w3m-text-small-regular-size);line-height:var(--w3m-text-small-regular-line-height);letter-spacing:var(--w3m-text-small-regular-letter-spacing);text-transform:var(--w3m-text-small-regular-text-transform)}.w3m-medium-regular{font-family:var(--w3m-text-medium-regular-font-family);font-weight:var(--w3m-text-medium-regular-weight);font-size:var(--w3m-text-medium-regular-size);line-height:var(--w3m-text-medium-regular-line-height);letter-spacing:var(--w3m-text-medium-regular-letter-spacing);text-transform:var(--w3m-text-medium-regular-text-transform)}.w3m-big-bold{font-family:var(--w3m-text-big-bold-font-family);font-weight:var(--w3m-text-big-bold-weight);font-size:var(--w3m-text-big-bold-size);line-height:var(--w3m-text-big-bold-line-height);letter-spacing:var(--w3m-text-big-bold-letter-spacing);text-transform:var(--w3m-text-big-bold-text-transform)}:host(*){color:var(--w3m-color-fg-1)}.w3m-color-primary{color:var(--w3m-color-fg-1)}.w3m-color-secondary{color:var(--w3m-color-fg-2)}.w3m-color-tertiary{color:var(--w3m-color-fg-3)}.w3m-color-inverse{color:var(--w3m-accent-fill-color)}.w3m-color-accnt{color:var(--w3m-accent-color)}.w3m-color-error{color:var(--w3m-error-color)}`;var De=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,Ue=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Be(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&De(t,r,o),o};let We=class extends n.oi{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"w3m-big-bold":"big-bold"===this.variant,"w3m-medium-regular":"medium-regular"===this.variant,"w3m-small-regular":"small-regular"===this.variant,"w3m-small-thin":"small-thin"===this.variant,"w3m-xsmall-regular":"xsmall-regular"===this.variant,"w3m-xsmall-bold":"xsmall-bold"===this.variant,"w3m-color-primary":"primary"===this.color,"w3m-color-secondary":"secondary"===this.color,"w3m-color-tertiary":"tertiary"===this.color,"w3m-color-inverse":"inverse"===this.color,"w3m-color-accnt":"accent"===this.color,"w3m-color-error":"error"===this.color};return n.dy`<span data-testid="component-text"><slot class="${(0,s.$)(e)}"></slot></span>`}};We.styles=[w.globalCss,$e],Ue([(0,i.Cb)()],We.prototype,"variant",2),Ue([(0,i.Cb)()],We.prototype,"color",2),We=Ue([(0,i.Mo)("w3m-text")],We);const ze=n.iv`div{overflow:hidden;position:relative;border-radius:50%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:50%;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}svg{width:100%;height:100%}#token-placeholder-fill{fill:var(--w3m-color-bg-3)}#token-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var He=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,qe=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Fe(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&He(t,r,o),o};let Ve=class extends n.oi{constructor(){super(...arguments),this.symbol=void 0}render(){var e;const t=X.getTokenIcon(null!=(e=this.symbol)?e:"");return t?n.dy`<div><img crossorigin="anonymous" src="${t}" alt="${this.id}" data-testid="component-token-image"></div>`:R.TOKEN_PLACEHOLDER}};Ve.styles=[w.globalCss,ze],qe([(0,i.Cb)()],Ve.prototype,"symbol",2),Ve=qe([(0,i.Mo)("w3m-token-image")],Ve);const Ge=n.iv`button{width:100%;height:100%;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}w3m-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--w3m-wallet-icon-border-radius);margin-bottom:5px}.w3m-sublabel{margin-top:2px}`;var Ke=Object.defineProperty,Ze=Object.getOwnPropertyDescriptor,Qe=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ze(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ke(t,r,o),o};let Ye=class extends n.oi{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?n.dy`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">RECENT</w3m-text>`:this.installed?n.dy`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</w3m-text>`:null}handleClick(){o.uA.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return n.dy`<button @click="${this.handleClick.bind(this)}" data-testid="component-wallet-button-${this.name.toLowerCase()}"><div><w3m-wallet-image walletId="${this.walletId}" imageId="${this.imageId}"></w3m-wallet-image><w3m-text variant="xsmall-regular">${null!=(e=this.label)?e:X.getWalletName(this.name,!0)}</w3m-text>${this.sublabelTemplate()}</div></button>`}};Ye.styles=[w.globalCss,Ge],Qe([(0,i.Cb)()],Ye.prototype,"onClick",2),Qe([(0,i.Cb)()],Ye.prototype,"name",2),Qe([(0,i.Cb)()],Ye.prototype,"walletId",2),Qe([(0,i.Cb)()],Ye.prototype,"label",2),Qe([(0,i.Cb)()],Ye.prototype,"imageId",2),Qe([(0,i.Cb)()],Ye.prototype,"installed",2),Qe([(0,i.Cb)()],Ye.prototype,"recent",2),Ye=Qe([(0,i.Mo)("w3m-wallet-button")],Ye);const Je=n.iv`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--w3m-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var Xe=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?et(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Xe(t,r,o),o};let rt=class extends n.oi{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const t=null!=(e=this.imageUrl)&&e.length?this.imageUrl:X.getWalletIcon({id:this.walletId,image_id:this.imageId});return n.dy`${t.length?n.dy`<div><img crossorigin="anonymous" src="${t}" alt="${this.id}"></div>`:R.WALLET_PLACEHOLDER}`}};rt.styles=[w.globalCss,Je],tt([(0,i.Cb)()],rt.prototype,"walletId",2),tt([(0,i.Cb)()],rt.prototype,"imageId",2),tt([(0,i.Cb)()],rt.prototype,"imageUrl",2),rt=tt([(0,i.Mo)("w3m-wallet-image")],rt);Object.defineProperty,Object.getOwnPropertyDescriptor;let nt=class extends n.oi{constructor(){super(),this.unwatchAccount=void 0,o.AccountCtrl.getAccount(),this.fetchProfile(),this.fetchBalance(),this.unwatchAccount=o.Id.client().watchAccount((e=>{const{address:t,isConnected:r}=o.AccountCtrl.state;e.isConnected&&e.address!==t&&(this.fetchProfile(e.address),this.fetchBalance(e.address),o.AccountCtrl.setAddress(e.address)),e.isConnected||o.AccountCtrl.resetAccount(),r!==e.isConnected&&o.jb.close(),!r&&e.isConnected?o.uA.track({name:"ACCOUNT_CONNECTED"}):r&&!e.isConnected&&o.uA.track({name:"ACCOUNT_DISCONNECTED"}),o.AccountCtrl.setIsConnected(e.isConnected)}))}disconnectedCallback(){var e;null==(e=this.unwatchAccount)||e.call(this)}async fetchProfile(e){var t;const r=null==(t=o.OptionsCtrl.state.chains)?void 0:t.find((e=>1===e.id));if(o.ConfigCtrl.state.enableAccountView&&r)try{await o.AccountCtrl.fetchProfile(X.preloadImage,e)}catch(e){console.error(e),o.ToastCtrl.openToast(X.getErrorMessage(e),"error")}}async fetchBalance(e){if(o.ConfigCtrl.state.enableAccountView)try{await o.AccountCtrl.fetchBalance(e)}catch(e){console.error(e),o.ToastCtrl.openToast(X.getErrorMessage(e),"error")}}};nt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-account-context")],nt);var it=Object.defineProperty,ot=Object.getOwnPropertyDescriptor,st=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?ot(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&it(t,r,o),o};let at=class extends n.oi{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{null!=e&&e.length&&await Promise.all(e.map((async e=>X.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){var e;if(o.ConfigCtrl.state.enableExplorer){const{chains:t}=o.OptionsCtrl.state;await Promise.all([o.ExplorerCtrl.getRecomendedWallets(),o.ExplorerCtrl.getInjectedWallets()]),o.OptionsCtrl.setIsDataLoaded(!0);const{recomendedWallets:r}=o.ExplorerCtrl.state,n=J.installedInjectedWallets(),i=null!=(e=t?.map((e=>X.getChainIcon(e.id))))?e:[],s=r.map((e=>X.getWalletIcon(e))),a=n.map((e=>X.getWalletIcon(e)));await this.loadImages([...i,...s,...a])}else o.OptionsCtrl.setIsDataLoaded(!0)}async preloadCustomImages(){const e=X.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),o.ToastCtrl.openToast("Failed preloading","error")}}};st([(0,i.SB)()],at.prototype,"preload",2),at=st([(0,i.Mo)("w3m-explorer-context")],at);var ct=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,ut=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?lt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ct(t,r,o),o};let ht=class extends n.oi{constructor(){super(),this.activeChainId=void 0,this.unwatchNetwork=void 0;const e=o.OptionsCtrl.getSelectedChain();this.activeChainId=e?.id,this.unwatchNetwork=o.Id.client().watchNetwork((e=>{const t=e.chain;t&&this.activeChainId!==t.id&&(o.OptionsCtrl.setSelectedChain(t),this.activeChainId=t.id,o.AccountCtrl.resetBalance(),this.fetchBalance())}))}disconnectedCallback(){var e;null==(e=this.unwatchNetwork)||e.call(this)}async fetchBalance(){if(o.ConfigCtrl.state.enableAccountView)try{await o.AccountCtrl.fetchBalance()}catch(e){console.error(e),o.ToastCtrl.openToast(X.getErrorMessage(e),"error")}}};ut([(0,i.SB)()],ht.prototype,"activeChainId",2),ht=ut([(0,i.Mo)("w3m-network-context")],ht);Object.defineProperty,Object.getOwnPropertyDescriptor;let dt=class extends n.oi{constructor(){super(),this.unsubscribeTheme=void 0,w.setTheme(),this.unsubscribeTheme=o.ThemeCtrl.subscribe(w.setTheme),this.preloadThemeImages()}disconnectedCallback(){var e;null==(e=this.unsubscribeTheme)||e.call(this)}async preloadThemeImages(){try{const{themeVariables:e}=o.ThemeCtrl.state,t=[e?.["--w3m-background-image-url"],e?.["--w3m-logo-image-url"]].filter(Boolean);t.length&&await Promise.all(t.map((async e=>X.preloadImage(e))))}catch{console.info("Unsuccessful attempt at preloading some images")}}};dt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-theme-context")],dt);var pt;Object.defineProperty,Object.getOwnPropertyDescriptor;let ft=class extends n.oi{constructor(){super(),this.unwatchOptions=void 0,this.unwatchAccount=void 0,this.unwatchWcConnection=void 0,this.timeout=void 0,this.isGenerated=!1,this.selectedChainId=null==(pt=o.OptionsCtrl.state.selectedChain)?void 0:pt.id,this.isAccountConnected=o.AccountCtrl.state.isConnected,this.lastRetry=Date.now(),this.unwatchOptions=o.OptionsCtrl.subscribe((e=>{var t,r;(null==(t=e.selectedChain)?void 0:t.id)!==this.selectedChainId&&(this.selectedChainId=null==(r=e.selectedChain)?void 0:r.id,this.connectAndWait())})),this.unwatchAccount=o.AccountCtrl.subscribe((e=>{(this.isAccountConnected!==e.isConnected||!this.isGenerated)&&(this.isAccountConnected=e.isConnected,this.connectAndWait())})),this.unwatchWcConnection=o.WcConnectionCtrl.subscribe((e=>{e.pairingEnabled&&!this.isGenerated&&this.connectAndWait()}))}disconnectedCallback(){var e,t,r;null==(e=this.unwatchOptions)||e.call(this),null==(t=this.unwatchAccount)||t.call(this),null==(r=this.unwatchWcConnection)||r.call(this)}async connectAndWait(){const{pairingEnabled:e}=o.WcConnectionCtrl.state;if(clearTimeout(this.timeout),!this.isAccountConnected&&e){this.isGenerated=!0,this.timeout=setTimeout(this.connectAndWait.bind(this),24e4);try{const{selectedChain:e}=o.OptionsCtrl.state;await o.Id.client().connectWalletConnect((e=>o.WcConnectionCtrl.setPairingUri(e)),e?.id)}catch(e){console.error(e),o.WcConnectionCtrl.setPairingError(!0),o.ToastCtrl.openToast("Connection request declined","error"),Date.now()-this.lastRetry>=1e3&&(this.lastRetry=Date.now(),this.connectAndWait())}}}};ft=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-wc-connection-context")],ft);const mt=n.iv`:host{all:initial}div{display:flex;align-items:center;background-color:var(--w3m-color-overlay);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);border-radius:var(--w3m-button-border-radius);padding:4px 4px 4px 8px}div button{border-radius:var(--w3m-secondary-button-border-radius);padding:4px 8px;padding-left:4px;height:auto;margin-left:10px;color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}.w3m-no-avatar{padding-left:8px}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}w3m-avatar{margin-right:6px}w3m-button-big w3m-avatar{margin-left:-5px}`;var gt=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,bt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?wt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&gt(t,r,o),o};let vt=class extends n.oi{constructor(){super(),this.balance="hide",this.avatar="show"}onOpen(){o.uA.click({name:"ACCOUNT_BUTTON"}),o.jb.open({route:"Account"})}accountTemplate(){const e="show"===this.avatar;return n.dy`${e?n.dy`<w3m-avatar data-testid="partial-account-avatar"></w3m-avatar>`:null}<w3m-address-text data-testid="partial-account-address"></w3m-address-text>`}render(){const e="show"===this.balance,t={"w3m-no-avatar":"hide"===this.avatar};return e?n.dy`<div><w3m-balance data-testid="partial-account-balance"></w3m-balance><button @click="${this.onOpen}" class="${(0,s.$)(t)}" data-testid="partial-account-open-button">${this.accountTemplate()}</button></div>`:n.dy`<w3m-button-big @click="${this.onOpen}" data-testid="partial-account-open-button">${this.accountTemplate()}</w3m-button-big>`}};vt.styles=[w.globalCss,mt],bt([(0,i.Cb)()],vt.prototype,"balance",2),bt([(0,i.Cb)()],vt.prototype,"avatar",2),vt=bt([(0,i.Mo)("w3m-account-button")],vt);const yt=n.iv`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;justify-content:center;padding:5px;width:100px}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}button:disabled{pointer-events:none}w3m-network-image{width:32px;height:32px}w3m-text{margin-top:4px}`;var xt=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,At=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ct(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&xt(t,r,o),o};let Et=class extends n.oi{constructor(){super(),this.chainId=0,this.label="",this.unsubscribeNetwork=void 0;const{selectedChain:e}=o.OptionsCtrl.state;this.chainId=e?.id,this.label=e?.name,this.unsubscribeNetwork=o.OptionsCtrl.subscribe((({selectedChain:e})=>{this.chainId=e?.id,this.label=e?.name}))}disconnectedCallback(){var e;null==(e=this.unsubscribeNetwork)||e.call(this)}onClick(){o.AV.push("SelectNetwork")}render(){const{chains:e,selectedChain:t}=o.OptionsCtrl.state,r=e?.map((e=>e.id)),i=t&&r?.includes(t.id),s=e&&e.length<=1&&i;return n.dy`<button @click="${this.onClick}" ?disabled="${s}"><w3m-network-image chainId="${(0,u.o)(this.chainId)}"></w3m-network-image><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};Et.styles=[w.globalCss,yt],At([(0,i.SB)()],Et.prototype,"chainId",2),At([(0,i.SB)()],Et.prototype,"label",2),Et=At([(0,i.Mo)("w3m-account-network-button")],Et);const _t=n.iv`@keyframes slide{0%{background-position:0 0}100%{background-position:200px 0}}w3m-text{padding:1px 0}.w3m-loading{background:linear-gradient(270deg,var(--w3m-color-fg-1) 36.33%,var(--w3m-color-fg-3) 42.07%,var(--w3m-color-fg-1) 83.3%);background-size:200px 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation-name:slide;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}`;var It=Object.defineProperty,Pt=Object.getOwnPropertyDescriptor,Ot=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Pt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&It(t,r,o),o};let kt=class extends n.oi{constructor(){super(),this.address=void 0,this.name=void 0,this.loading=!0,this.variant="button",this.unsubscribeAccount=void 0,this.address=o.AccountCtrl.state.address,this.name=o.AccountCtrl.state.profileName,this.loading=Boolean(o.AccountCtrl.state.profileLoading),this.unsubscribeAccount=o.AccountCtrl.subscribe((({address:e,profileName:t,profileLoading:r})=>{this.address=e,this.name=t,this.loading=Boolean(r)}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){var e;const t="button"===this.variant,r={"w3m-loading":this.loading};return n.dy`<w3m-text class="${(0,s.$)(r)}" data-testid="partial-address-text" variant="${t?"medium-regular":"big-bold"}" color="${t?"inverse":"primary"}">${this.name?this.name:X.truncate(null!=(e=this.address)?e:"")}</w3m-text>`}};kt.styles=[w.globalCss,_t],Ot([(0,i.SB)()],kt.prototype,"address",2),Ot([(0,i.SB)()],kt.prototype,"name",2),Ot([(0,i.SB)()],kt.prototype,"loading",2),Ot([(0,i.Cb)()],kt.prototype,"variant",2),kt=Ot([(0,i.Mo)("w3m-address-text")],kt);const St={onConnecting(e){X.goToConnectingView(e)},onExternal(e){X.handleConnectorConnection(e)},manualWalletsTemplate(){return J.manualWallets().map((e=>n.dy`<w3m-wallet-button walletId="${e.id}" name="${e.name}" .onClick="${()=>this.onConnecting(e)}"></w3m-wallet-button>`))},recomendedWalletsTemplate(e=!1){return J.recomendedWallets(e).map((e=>n.dy`<w3m-wallet-button name="${e.name}" walletId="${e.id}" imageId="${e.image_id}" .onClick="${()=>this.onConnecting(e)}"></w3m-wallet-button>`))},externalWalletsTemplate(){return J.externalWallets().map((e=>n.dy`<w3m-wallet-button name="${e.name}" walletId="${e.id}" .onClick="${()=>this.onExternal(e.id)}"></w3m-wallet-button>`))},recentWalletTemplate(){const e=J.recentWallet();if(e)return n.dy`<w3m-wallet-button name="${e.name}" walletId="${e.id}" imageId="${e.image_id}" .recent="${!0}" .onClick="${()=>this.onConnecting(e)}"></w3m-wallet-button>`},installedInjectedWalletsTemplate(){return J.installedInjectedWallets().map((e=>n.dy`<w3m-wallet-button .installed="${!0}" name="${e.name}" walletId="${e.id}" imageId="${e.image_id}" .onClick="${()=>this.onConnecting(e)}"></w3m-wallet-button>`))},injectedWalletsTemplate(){return J.injectedWallets().map((e=>n.dy`<w3m-wallet-button name="${e.name}" walletId="${e.id}" imageId="${e.image_id}" .onClick="${()=>this.onConnecting(e)}"></w3m-wallet-button>`))}},Mt=n.iv`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.w3m-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.w3m-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.w3m-track svg{margin:0 5px}w3m-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--w3m-wallet-icon-border-radius)}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-title{display:flex;align-items:center;margin-bottom:10px}.w3m-title svg{margin-right:6px}.w3m-title path{fill:var(--w3m-accent-color)}w3m-modal-footer .w3m-title{padding:0 10px}w3m-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--w3m-color-bg-1))}w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-info-footer w3m-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Nt=class extends n.oi{onGoToQrcode(){o.AV.push("Qrcode")}onGetWallet(){o.AV.push("GetWallet")}render(){const{recomendedWallets:e}=o.ExplorerCtrl.state,t=[...e,...e],r=St.externalWalletsTemplate(),i=St.installedInjectedWalletsTemplate(),s=[...i,...r].length>0,a=2*o.zv.RECOMMENDED_WALLET_AMOUNT;return n.dy`<w3m-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${R.QRCODE_ICON}"></w3m-modal-header><w3m-modal-content><div class="w3m-title">${R.MOBILE_ICON}<w3m-text variant="small-regular" color="accent">WalletConnect</w3m-text></div><div class="w3m-slider"><div class="w3m-track">${[...Array(a)].map(((e,r)=>{const i=t[r%t.length];return i?n.dy`<w3m-wallet-image walletId="${i.id}" imageId="${i.image_id}"></w3m-wallet-image>`:R.WALLET_PLACEHOLDER}))}</div><w3m-button-big @click="${X.handleAndroidLinking}" data-testid="partial-android-wallet-button"><w3m-text variant="medium-regular" color="inverse">Select Wallet</w3m-text></w3m-button-big></div></w3m-modal-content>${s?n.dy`<w3m-modal-footer data-testid="partial-android-footer"><div class="w3m-title">${R.WALLET_ICON}<w3m-text variant="small-regular" color="accent">Other</w3m-text></div><div class="w3m-grid">${i} ${r}</div></w3m-modal-footer>`:null}<w3m-info-footer><w3m-text color="secondary" variant="small-thin">${"Choose WalletConnect to see supported apps on your device"+(s?", or select from other options":"")}</w3m-text><w3m-button variant="outline" .iconRight="${R.ARROW_UP_RIGHT_ICON}" .onClick="${()=>this.onGetWallet()}" data-testid="partial-android-nowallet-button">I don't have a wallet</w3m-button></w3m-info-footer>`}};Nt.styles=[w.globalCss,Mt],Nt=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-android-wallet-selection")],Nt);const Tt=n.iv`@keyframes slide{0%{transform:translateX(-50px)}100%{transform:translateX(200px)}}.w3m-placeholder,img{border-radius:50%;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);display:block;position:relative;overflow:hidden!important;background-color:var(--w3m-color-av-1);background-image:radial-gradient(at 66% 77%,var(--w3m-color-av-2) 0,transparent 50%),radial-gradient(at 29% 97%,var(--w3m-color-av-3) 0,transparent 50%),radial-gradient(at 99% 86%,var(--w3m-color-av-4) 0,transparent 50%),radial-gradient(at 29% 88%,var(--w3m-color-av-5) 0,transparent 50%);transform:translateZ(0)}.w3m-loader{width:50px;height:100%;background:linear-gradient(270deg,transparent 0,rgba(255,255,255,.4) 30%,transparent 100%);animation-name:slide;animation-duration:1.5s;transform:translateX(-50px);animation-iteration-count:infinite;animation-timing-function:linear;animation-delay:.55s}.w3m-small{width:24px;height:24px}.w3m-medium{width:60px;height:60px}`;var jt=Object.defineProperty,Rt=Object.getOwnPropertyDescriptor,Lt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Rt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&jt(t,r,o),o};let $t=class extends n.oi{constructor(){super(),this.address=void 0,this.avatar=void 0,this.loading=!0,this.size="small",this.unsubscribeAccount=void 0,this.address=o.AccountCtrl.state.address,this.avatar=o.AccountCtrl.state.profileAvatar,this.loading=Boolean(o.AccountCtrl.state.profileLoading),this.unsubscribeAccount=o.AccountCtrl.subscribe((({address:e,profileAvatar:t,profileLoading:r})=>{this.address=e,this.avatar=t,this.loading=Boolean(r)}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){const e={"w3m-placeholder":!0,"w3m-small":"small"===this.size,"w3m-medium":"medium"===this.size};return this.avatar?n.dy`<img crossorigin="anonymous" class="${(0,s.$)(e)}" src="${this.avatar}" data-testid="partial-avatar-image">`:this.address?(X.generateAvatarColors(this.address),n.dy`<div class="${(0,s.$)(e)}">${this.loading?n.dy`<div class="w3m-loader"></div>`:null}</div>`):null}};$t.styles=[w.globalCss,Tt],Lt([(0,i.SB)()],$t.prototype,"address",2),Lt([(0,i.SB)()],$t.prototype,"avatar",2),Lt([(0,i.SB)()],$t.prototype,"loading",2),Lt([(0,i.Cb)()],$t.prototype,"size",2),$t=Lt([(0,i.Mo)("w3m-avatar")],$t);const Dt=n.iv`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;var Bt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Wt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ut(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Bt(t,r,o),o};let zt=class extends n.oi{constructor(){var e,t;super(),this.symbol=void 0,this.amount=void 0,this.unsubscribeAccount=void 0,this.symbol=null==(e=o.AccountCtrl.state.balance)?void 0:e.symbol,this.amount=null==(t=o.AccountCtrl.state.balance)?void 0:t.amount,this.unsubscribeAccount=o.AccountCtrl.subscribe((({balance:e})=>{this.symbol=e?.symbol,this.amount=e?.amount}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){let e="_._";return"0.0"===this.amount?e="0":"string"==typeof this.amount&&this.amount.length>6?e=this.amount.substring(0,6):"string"==typeof this.amount&&(e=this.amount),n.dy`<div><w3m-token-image symbol="${(0,u.o)(this.symbol)}" data-testid="partial-balance-token-image"></w3m-token-image><w3m-text variant="medium-regular" color="primary" data-testid="partial-balance-token-text">${e} ${this.symbol}</w3m-text></div>`}};zt.styles=[w.globalCss,Dt],Wt([(0,i.SB)()],zt.prototype,"symbol",2),Wt([(0,i.SB)()],zt.prototype,"amount",2),zt=Wt([(0,i.Mo)("w3m-balance")],zt);const Ht=n.iv`:host{all:initial}svg{width:28px;height:20px;margin:-1px 3px 0 -5px}svg path{fill:var(--w3m-accent-fill-color)}button:disabled svg path{fill:var(--w3m-color-fg-3)}w3m-spinner{margin:0 10px 0 0}`;var Ft=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,Vt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?qt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Ft(t,r,o),o};let Gt=class extends n.oi{constructor(){super(),this.loading=!1,this.label="Connect Wallet",this.icon="show",this.modalUnsub=void 0,this.modalUnsub=o.jb.subscribe((e=>{e.open&&(this.loading=!0),e.open||(this.loading=!1)}))}disconnectedCallback(){var e;null==(e=this.modalUnsub)||e.call(this)}iconTemplate(){return"show"===this.icon?R.WALLET_CONNECT_ICON:null}onClick(){o.AccountCtrl.state.isConnected?this.onDisconnect():this.onConnect()}async onConnect(){this.loading=!0,o.uA.click({name:"CONNECT_BUTTON"}),await o.jb.open(),o.jb.state.open||(this.loading=!1)}async onDisconnect(){o.uA.click({name:"DISCONNECT_BUTTON"}),await o.Id.client().disconnect()}render(){return n.dy`<w3m-button-big .disabled="${this.loading}" @click="${this.onClick}" data-testid="partial-connect-button">${this.loading?n.dy`<w3m-spinner data-testid="partial-connect-spinner"></w3m-spinner><w3m-text variant="medium-regular" color="accent" data-testid="partial-connect-text">Connecting...</w3m-text>`:n.dy`${this.iconTemplate()}<w3m-text variant="medium-regular" color="inverse" data-testid="partial-connect-text">${this.label}</w3m-text>`}</w3m-button-big>`}};Gt.styles=[w.globalCss,Ht],Vt([(0,i.SB)()],Gt.prototype,"loading",2),Vt([(0,i.Cb)()],Gt.prototype,"label",2),Vt([(0,i.Cb)()],Gt.prototype,"icon",2),Gt=Vt([(0,i.Mo)("w3m-connect-button")],Gt);const Kt=n.iv`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--w3m-accent-color);animation:loading 1s linear infinite}w3m-wallet-image{border-radius:var(--w3m-wallet-icon-large-border-radius);width:90px;height:90px}w3m-text{margin-bottom:40px}.w3m-error svg{stroke:var(--w3m-error-color)}.w3m-error use{display:none}.w3m-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.w3m-stale svg,.w3m-stale use{display:none}`;var Zt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,Yt=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Qt(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Zt(t,r,o),o};let Jt=class extends n.oi{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;const r=null!=(t=null==(e=o.ThemeCtrl.state.themeVariables)?void 0:e["--w3m-wallet-icon-large-border-radius"])?t:w.getPreset("--w3m-wallet-icon-large-border-radius");let i=0;i=r.includes("%")?.88*parseInt(r,10):parseInt(r,10),i*=1.17;const s=317-1.57*i,a=425-1.8*i;return n.dy`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="w3m-loader" x="2" y="2" width="106" height="106" rx="${i}"/><use xlink:href="#w3m-loader" stroke-dasharray="106 ${s}" stroke-dashoffset="${a}"></use></svg>`}render(){const e={"w3m-error":this.isError,"w3m-stale":this.isStale};return n.dy`<div class="${(0,s.$)(e)}">${this.svgLoaderTemplate()}<w3m-wallet-image walletId="${(0,u.o)(this.walletId)}" imageId="${(0,u.o)(this.imageId)}" data-useid="partial-connector-wallet-image"></w3m-wallet-image></div><w3m-text variant="medium-regular" color="${this.isError?"error":"primary"}" data-useid="partial-connector-error-text">${this.isError?"Connection declined":this.label}</w3m-text>`}};Jt.styles=[w.globalCss,Kt],Yt([(0,i.Cb)()],Jt.prototype,"walletId",2),Yt([(0,i.Cb)()],Jt.prototype,"imageId",2),Yt([(0,i.Cb)()],Jt.prototype,"isError",2),Yt([(0,i.Cb)()],Jt.prototype,"isStale",2),Yt([(0,i.Cb)()],Jt.prototype,"label",2),Jt=Yt([(0,i.Mo)("w3m-connector-waiting")],Jt);var Xt=Object.defineProperty,er=Object.getOwnPropertyDescriptor,tr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?er(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Xt(t,r,o),o};let rr=class extends n.oi{constructor(){super(),this.isConnected=!1,this.label="Connect Wallet",this.icon="show",this.avatar="show",this.balance="hide",this.unsubscribeAccount=void 0,this.isConnected=o.AccountCtrl.state.isConnected,this.unsubscribeAccount=o.AccountCtrl.subscribe((({isConnected:e})=>{this.isConnected=e}))}disconnectedCallback(){var e;null==(e=this.unsubscribeAccount)||e.call(this)}render(){const{enableAccountView:e}=o.ConfigCtrl.state,t=this.balance,r=this.label,i=this.icon,s=this.avatar;return this.isConnected&&e?n.dy`<w3m-account-button .balance="${t}" .avatar="${s}" data-testid="partial-core-account-button"></w3m-account-button>`:n.dy`<w3m-connect-button label="${(0,u.o)(this.isConnected?"Disconnect":r)}" .icon="${i}" data-testid="partial-core-connect-button"></w3m-connect-button>`}};tr([(0,i.SB)()],rr.prototype,"isConnected",2),tr([(0,i.Cb)()],rr.prototype,"label",2),tr([(0,i.Cb)()],rr.prototype,"icon",2),tr([(0,i.Cb)()],rr.prototype,"avatar",2),tr([(0,i.Cb)()],rr.prototype,"balance",2),rr=tr([(0,i.Mo)("w3m-core-button")],rr);const nr=n.iv`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-desktop-title,.w3m-mobile-title{display:flex;align-items:center}.w3m-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.w3m-desktop-title{margin-bottom:10px;padding:0 10px}.w3m-subtitle{display:flex;align-items:center}.w3m-subtitle:last-child path{fill:var(--w3m-color-fg-3)}.w3m-desktop-title svg,.w3m-mobile-title svg{margin-right:6px}.w3m-desktop-title path,.w3m-mobile-title path{fill:var(--w3m-accent-color)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ir=class extends n.oi{render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=o.ConfigCtrl.state,r="ALL"!==e&&t,i=St.manualWalletsTemplate(),s=St.recomendedWalletsTemplate(),a=St.externalWalletsTemplate(),c=St.recentWalletTemplate();let l=[...St.installedInjectedWalletsTemplate(),c,...a,...i,...s];l=l.filter(Boolean);const u=l.length>4||r;let h=[];h=u?l.slice(0,3):l;const d=Boolean(h.length);return n.dy`<w3m-modal-header .border="${!0}" title="Connect your wallet" .onAction="${X.handleUriCopy}" .actionIcon="${R.COPY_ICON}" data-testid="partial-desktop-wallet-selection-header"></w3m-modal-header><w3m-modal-content data-testid="partial-desktop-wallet-selection-content"><div class="w3m-mobile-title"><div class="w3m-subtitle">${R.MOBILE_ICON}<w3m-text variant="small-regular" color="accent">Mobile</w3m-text></div><div class="w3m-subtitle">${R.SCAN_ICON}<w3m-text variant="small-regular" color="secondary">Scan with your wallet</w3m-text></div></div><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>${d?n.dy`<w3m-modal-footer data-testid="partial-desktop-wallet-selection-footer"><div class="w3m-desktop-title">${R.DESKTOP_ICON}<w3m-text variant="small-regular" color="accent">Desktop</w3m-text></div><div class="w3m-grid">${h} ${u?n.dy`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}</div></w3m-modal-footer>`:null}`}};ir.styles=[w.globalCss,nr],ir=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-desktop-wallet-selection")],ir);const or=n.iv`div{background-color:var(--w3m-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--w3m-color-bg-3);text-align:center}a{color:var(--w3m-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let sr=class extends n.oi{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=o.ConfigCtrl.state;return e??t?n.dy`<div><w3m-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${e?n.dy`<a href="${e}" target="_blank" rel="noopener noreferrer">Terms of Service</a>`:null} ${e&&t?"and":null} ${t?n.dy`<a href="${t}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>`:null}</w3m-text></div>`:null}};sr.styles=[w.globalCss,or],sr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-legal-notice")],sr);const ar=n.iv`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let cr=class extends n.oi{onQrcode(){o.AV.push("Qrcode")}render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=o.ConfigCtrl.state,r="ALL"!==e&&t,i=St.manualWalletsTemplate(),s=St.recomendedWalletsTemplate(),a=St.externalWalletsTemplate(),c=St.recentWalletTemplate();let l=[...St.installedInjectedWalletsTemplate(),c,...a,...i,...s];l=l.filter(Boolean);const u=l.length>8||r;let h=[];h=u?l.slice(0,7):l;const d=Boolean(h.length);return n.dy`<w3m-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${R.QRCODE_ICON}" data-testid="partial-mobile-wallet-selection-header"></w3m-modal-header>${d?n.dy`<w3m-modal-content data-testid="partial-mobile-wallet-selection-content"><div>${h} ${u?n.dy`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}</div></w3m-modal-content>`:null}`}};cr.styles=[w.globalCss,ar],cr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-mobile-wallet-selection")],cr);const lr=n.iv`:host{all:initial}.w3m-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--w3m-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--w3m-overlay-background-color);backdrop-filter:var(--w3m-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.w3m-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.w3m-active{pointer-events:auto}.w3m-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) var(--w3m-container-border-radius) var(--w3m-container-border-radius);border:1px solid var(--w3m-color-overlay);overflow:hidden}.w3m-card{width:100%;position:relative;border-radius:var(--w3m-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-color-bg-1);color:var(--w3m-color-fg-1)}@media(max-width:600px){.w3m-container{max-width:440px;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) 0 0}.w3m-card{border-radius:var(--w3m-container-border-radius) var(--w3m-container-border-radius) 0 0}.w3m-overlay{align-items:flex-end}}@media(max-width:440px){.w3m-container{border:0}}`;var ur=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,dr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?hr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&ur(t,r,o),o};let pr=class extends n.oi{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=o.jb.subscribe((e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()}))}disconnectedCallback(){var e;null==(e=this.unsubscribeModal)||e.call(this)}get overlayEl(){return X.getShadowRootElement(this,".w3m-overlay")}get containerEl(){return X.getShadowRootElement(this,".w3m-container")}toggleBodyScroll(e){if(document.querySelector("body"))if(e){const e=document.getElementById("w3m-styles");e?.remove()}else document.head.insertAdjacentHTML("beforeend",'<style id="w3m-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>')}onCloseModal(e){e.target===e.currentTarget&&o.jb.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((async()=>{const e=X.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,(0,c.j)(this.containerEl,e,{delay:.1,duration:.2}).finished]),this.active=!0}),0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=X.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};await Promise.all([(0,c.j)(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished,(0,c.j)(this.containerEl,e,{duration:.2}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",(e=>{var t;"Escape"===e.key?o.jb.close():"Tab"===e.key&&(null!=(t=e.target)&&t.tagName.includes("W3M-")||this.containerEl.focus())}),this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;null==(e=this.abortController)||e.abort(),this.abortController=void 0}render(){const e={"w3m-overlay":!0,"w3m-active":this.active};return n.dy`<w3m-explorer-context data-id="partial-modal-explorer-context"></w3m-explorer-context><w3m-theme-context data-id="partial-modal-theme-context"></w3m-theme-context><w3m-wc-connection-context data-id="partial-modal-connection-context"></w3m-wc-connection-context><w3m-account-context data-id="partial-modal-account-context"></w3m-account-context><w3m-network-context data-id="partial-modal-network-context"></w3m-network-context><div id="w3m-modal" class="${(0,s.$)(e)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="w3m-container" tabindex="0">${this.open?n.dy`<w3m-modal-backcard></w3m-modal-backcard><div class="w3m-card"><w3m-modal-router></w3m-modal-router><w3m-modal-toast></w3m-modal-toast></div>`:null}</div></div>`}};pr.styles=[w.globalCss,lr],dr([(0,i.SB)()],pr.prototype,"open",2),dr([(0,i.SB)()],pr.prototype,"active",2),pr=dr([(0,i.Mo)("w3m-modal")],pr);const fr=n.iv`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;var mr=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,wr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?gr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&mr(t,r,o),o};let br=class extends n.oi{constructor(){super(),this.chainId="",this.label="",this.wrongNetwork=!1,this.unsubscribeNetwork=void 0;const{selectedChain:e}=o.OptionsCtrl.state;this.onSetChainData(e),this.unsubscribeNetwork=o.OptionsCtrl.subscribe((({selectedChain:e})=>{this.onSetChainData(e)}))}disconnectedCallback(){var e;null==(e=this.unsubscribeNetwork)||e.call(this)}onSetChainData(e){if(e){const{chains:t}=o.OptionsCtrl.state,r=t?.map((e=>e.id));this.chainId=e.id.toString(),this.wrongNetwork=!(null!=r&&r.includes(e.id)),this.label=this.wrongNetwork?"Wrong Network":e.name}}onClick(){o.uA.click({name:"NETWORK_BUTTON"}),o.jb.open({route:"SelectNetwork"})}render(){var e;const{chains:t}=o.OptionsCtrl.state,r=t&&t.length>1;return n.dy`<w3m-button-big @click="${this.onClick}" ?disabled="${!r}" data-testid="partial-network-switch-button"><w3m-network-image chainId="${(0,u.o)(this.chainId)}" data-testid="partial-network-switch-image"></w3m-network-image><w3m-text variant="medium-regular" color="inverse" data-testid="partial-network-switch-text">${null!=(e=this.label)&&e.length?this.label:"Select Network"}</w3m-text></w3m-button-big>`}};br.styles=[w.globalCss,fr],wr([(0,i.SB)()],br.prototype,"chainId",2),wr([(0,i.SB)()],br.prototype,"label",2),wr([(0,i.SB)()],br.prototype,"wrongNetwork",2),br=wr([(0,i.Mo)("w3m-network-switch")],br);const vr=n.iv`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:1px;top:0;left:0}use{stroke:var(--w3m-accent-color);animation:loading 1s linear infinite}w3m-network-image{width:92px;height:92px}w3m-text{margin-bottom:40px}.w3m-error svg{stroke:var(--w3m-error-color)}.w3m-error use{display:none}.w3m-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}`;var yr=Object.defineProperty,xr=Object.getOwnPropertyDescriptor,Cr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?xr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&yr(t,r,o),o};let Ar=class extends n.oi{constructor(){super(...arguments),this.chainId=void 0,this.isError=!1,this.label=""}svgLoaderTemplate(){return n.dy`<svg width="54" height="59" viewBox="0 0 54 59" fill="none" class="w3m-loader" data-testid="partial-network-waiting-svg"><path id="w3m-loader-path" d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z"/><use xlink:href="#w3m-loader-path" stroke-dasharray="54 118" stroke-dashoffset="172"></use></svg>`}render(){const e={"w3m-error":this.isError};return n.dy`<div class="${(0,s.$)(e)}">${this.svgLoaderTemplate()}<w3m-network-image chainId="${(0,u.o)(this.chainId)}" data-testid="partial-network-waiting-image"></w3m-network-image></div><w3m-text variant="medium-regular" color="${this.isError?"error":"primary"}" data-testid="partial-network-waiting-text">${this.isError?"Switch declined":this.label}</w3m-text>`}};Ar.styles=[w.globalCss,vr],Cr([(0,i.Cb)()],Ar.prototype,"chainId",2),Cr([(0,i.Cb)()],Ar.prototype,"isError",2),Cr([(0,i.Cb)()],Ar.prototype,"label",2),Ar=Cr([(0,i.Mo)("w3m-network-waiting")],Ar);const Er=n.iv`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}w3m-button{margin:0 5px}`;var _r=Object.defineProperty,Ir=Object.getOwnPropertyDescriptor,Pr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ir(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&_r(t,r,o),o};let Or=class extends n.oi{constructor(){super(...arguments),this.isMobile=!1,this.isInjected=!1,this.isInjectedInstalled=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){o.zv.isMobile()?o.AV.replace("MobileConnecting"):o.AV.replace("MobileQrcodeConnecting")}onInjected(){this.isInjectedInstalled?o.AV.replace("InjectedConnecting"):o.AV.replace("InstallWallet")}onDesktop(){o.AV.replace("DesktopConnecting")}onWeb(){o.AV.replace("WebConnecting")}render(){return n.dy`<div>${this.isRetry?n.dy`<slot></slot>`:null} ${this.isMobile?n.dy`<w3m-button .onClick="${this.onMobile}" .iconLeft="${R.MOBILE_ICON}" variant="outline">Mobile</w3m-button>`:null} ${this.isInjected?n.dy`<w3m-button .onClick="${this.onInjected}" .iconLeft="${R.WALLET_ICON}" variant="outline">Browser</w3m-button>`:null} ${this.isDesktop?n.dy`<w3m-button .onClick="${this.onDesktop}" .iconLeft="${R.DESKTOP_ICON}" variant="outline">Desktop</w3m-button>`:null} ${this.isWeb?n.dy`<w3m-button .onClick="${this.onWeb}" .iconLeft="${R.GLOBE_ICON}" variant="outline">Web</w3m-button>`:null}</div>`}};Or.styles=[w.globalCss,Er],Pr([(0,i.Cb)()],Or.prototype,"isMobile",2),Pr([(0,i.Cb)()],Or.prototype,"isInjected",2),Pr([(0,i.Cb)()],Or.prototype,"isInjectedInstalled",2),Pr([(0,i.Cb)()],Or.prototype,"isDesktop",2),Pr([(0,i.Cb)()],Or.prototype,"isWeb",2),Pr([(0,i.Cb)()],Or.prototype,"isRetry",2),Or=Pr([(0,i.Mo)("w3m-platform-selection")],Or);const kr=n.iv`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--w3m-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.w3m-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--w3m-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}button:active{background-color:var(--w3m-color-overlay)}@media(hover:hover){button:hover{background-color:var(--w3m-color-overlay)}}.w3m-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--w3m-wallet-icon-border-radius)/ 2);border:1px solid var(--w3m-color-overlay)}.w3m-icons svg{width:21px;height:21px}.w3m-icons img:nth-child(1),.w3m-icons img:nth-child(2),.w3m-icons svg:nth-child(1),.w3m-icons svg:nth-child(2){margin-bottom:4px}w3m-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Sr=class extends n.oi{onClick(){o.AV.push("WalletExplorer")}render(){const{recomendedWallets:e}=o.ExplorerCtrl.state,t=[...e,...J.manualWallets()].reverse().slice(0,4);return n.dy`<button @click="${this.onClick}" data-testid="partial-all-wallets-button"><div class="w3m-icons">${t.map((e=>{const t=X.getWalletIcon(e);if(t)return n.dy`<img crossorigin="anonymous" src="${t}">`;const r=X.getWalletIcon({id:e.id});return r?n.dy`<img crossorigin="anonymous" src="${r}">`:R.WALLET_PLACEHOLDER}))} ${[...Array(4-t.length)].map((()=>R.WALLET_PLACEHOLDER))}</div><w3m-text variant="xsmall-regular">View All</w3m-text></button>`}};Sr.styles=[w.globalCss,kr],Sr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-view-all-wallets-button")],Sr);const Mr=n.iv`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Nr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,jr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Tr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Nr(t,r,o),o};let Rr=class extends n.oi{constructor(){super(),this.walletId="",this.imageId="",this.uri="",this.unwatchWcConnection=void 0,setTimeout((()=>{const{pairingUri:e}=o.WcConnectionCtrl.state;this.uri=e}),0),this.unwatchWcConnection=o.WcConnectionCtrl.subscribe((e=>{e.pairingUri&&(this.uri=e.pairingUri)}))}disconnectedCallback(){var e;null==(e=this.unwatchWcConnection)||e.call(this)}get overlayEl(){return X.getShadowRootElement(this,".w3m-qr-container")}render(){return n.dy`<div class="w3m-qr-container">${this.uri?n.dy`<w3m-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${this.walletId}" imageId="${this.imageId}" data-testid="partial-qr-code"></w3m-qrcode>`:n.dy`<w3m-spinner data-testid="partial-qr-spinner"></w3m-spinner>`}</div>`}};Rr.styles=[w.globalCss,Mr],jr([(0,i.Cb)()],Rr.prototype,"walletId",2),jr([(0,i.Cb)()],Rr.prototype,"imageId",2),jr([(0,i.SB)()],Rr.prototype,"uri",2),Rr=jr([(0,i.Mo)("w3m-walletconnect-qr")],Rr);const Lr=n.iv`.w3m-profile{display:flex;justify-content:space-between;align-items:flex-start;padding-top:20px}.w3m-connection-badge{background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);padding:6px 10px 6px 26px;position:relative;border-radius:28px}.w3m-connection-badge::before{content:'';position:absolute;width:10px;height:10px;left:10px;background-color:var(--w3m-success-color);border-radius:50%;top:50%;margin-top:-5px;box-shadow:0 1px 4px 1px var(--w3m-success-color),inset 0 0 0 1px var(--w3m-color-overlay)}.w3m-footer{display:flex;justify-content:space-between}w3m-address-text{margin-top:10px;display:block}.w3m-balance{border-top:1px solid var(--w3m-color-bg-2);padding:11px 20px}`;var $r=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,Br=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Dr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&$r(t,r,o),o};let Ur=class extends n.oi{constructor(){super(...arguments),this.loading=!1}async onDisconnect(){this.loading||(this.loading=!0,await o.Id.client().disconnect(),this.loading=!1)}async onCopyAddress(){var e;try{await navigator.clipboard.writeText(null!=(e=o.AccountCtrl.state.address)?e:""),o.ToastCtrl.openToast("Address copied","success")}catch{o.ToastCtrl.openToast("Failed to copy","error")}}render(){return n.dy`<w3m-modal-content data-testid="view-account-content"><div class="w3m-profile"><div class="w3m-info"><w3m-avatar size="medium" data-testid="view-account-avatar"></w3m-avatar><w3m-address-text variant="modal" data-testid="view-account-address-text"></w3m-address-text></div><div class="w3m-connection-badge"><w3m-text variant="small-regular" color="secondary" data-testid="view-account-connection-badge">Connected</w3m-text></div></div></w3m-modal-content><div class="w3m-balance"><w3m-balance data-testid="view-account-balance"></w3m-balance></div><w3m-modal-footer data-testid="view-account-footer"><div class="w3m-footer"><w3m-account-network-button data-testid="view-account-network-button"></w3m-account-network-button><w3m-box-button label="Copy Address" .onClick="${this.onCopyAddress}" .icon="${R.ACCOUNT_COPY}" data-testid="view-account-copy-button"></w3m-box-button><w3m-box-button label="Disconnect" .loading="${this.loading}" .onClick="${this.onDisconnect}" .icon="${R.ACCOUNT_DISCONNECT}" data-testid="view-account-disconnect-button"></w3m-box-button></div></w3m-modal-footer>`}};Ur.styles=[w.globalCss,Lr],Br([(0,i.SB)()],Ur.prototype,"loading",2),Ur=Br([(0,i.Mo)("w3m-account-view")],Ur);Object.defineProperty,Object.getOwnPropertyDescriptor;let Wr=class extends n.oi{viewTemplate(){return o.zv.isAndroid()?n.dy`<w3m-android-wallet-selection></w3m-android-wallet-selection>`:o.zv.isMobile()?n.dy`<w3m-mobile-wallet-selection></w3m-mobile-wallet-selection>`:n.dy`<w3m-desktop-wallet-selection></w3m-desktop-wallet-selection>`}render(){return n.dy`${this.viewTemplate()}<w3m-legal-notice></w3m-legal-notice>`}};Wr.styles=[w.globalCss],Wr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-connect-wallet-view")],Wr);const zr=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var Hr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,qr=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Fr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Hr(t,r,o),o};let Vr=class extends n.oi{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openDesktopApp(),this.unwatchConnection=o.WcConnectionCtrl.subscribe((e=>{this.isError=e.pairingError}))}disconnectedCallback(){var e;null==(e=this.unwatchConnection)||e.call(this)}onFormatAndRedirect(e){const{desktop:t,name:r}=o.zv.getWalletRouterData(),n=t?.native;if(n){const t=o.zv.formatNativeUrl(n,e,r);o.zv.openHref(t,"_self")}}openDesktopApp(){o.WcConnectionCtrl.setPairingError(!1);const{pairingUri:e}=o.WcConnectionCtrl.state,t=o.zv.getWalletRouterData();X.setRecentWallet(t),this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isMobile:i,isInjected:s,isWeb:a}=X.getCachedRouterWalletPlatforms();return n.dy`<w3m-modal-header title="${e}" .onAction="${X.handleUriCopy}" .actionIcon="${R.COPY_ICON}" data-testid="view-desktop-connecting-header"></w3m-modal-header><w3m-modal-content><w3m-connector-waiting walletId="${t}" imageId="${r}" label="${`Continue in ${e}...`}" .isError="${this.isError}" data-testid="view-desktop-connecting-waiting"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer data-testid="view-desktop-connecting-footer"><w3m-text color="secondary" variant="small-thin">${`Connection can continue loading if ${e} is not installed on your device`}</w3m-text><w3m-platform-selection .isMobile="${i}" .isInjected="${s}" .isWeb="${a}" .isRetry="${!0}"><w3m-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${R.RETRY_ICON}" data-testid="view-desktop-connecting-retry-button">Retry</w3m-button></w3m-platform-selection></w3m-info-footer>`}};Vr.styles=[w.globalCss,zr],qr([(0,i.SB)()],Vr.prototype,"isError",2),Vr=qr([(0,i.Mo)("w3m-desktop-connecting-view")],Vr);const Gr=n.iv`.w3m-info-text{margin:5px 0 15px;max-width:320px;text-align:center}.w3m-wallet-item{margin:0 -20px 0 0;padding-right:20px;display:flex;align-items:center;border-bottom:1px solid var(--w3m-color-bg-2)}.w3m-wallet-item:last-child{margin-bottom:-20px;border-bottom:0}.w3m-wallet-content{margin-left:20px;height:60px;display:flex;flex:1;align-items:center;justify-content:space-between}.w3m-footer-actions{display:flex;flex-direction:column;align-items:center;padding:20px 0;border-top:1px solid var(--w3m-color-bg-2)}w3m-wallet-image{display:block;width:40px;height:40px;border-radius:10px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Kr=class extends n.oi{onGet(e){o.zv.openHref(e,"_blank")}render(){const e=o.ExplorerCtrl.state.recomendedWallets.slice(0,5),t=J.manualWallets().slice(0,5),r=e.length,i=t.length;return n.dy`<w3m-modal-header title="Get a wallet" data-testid="view-get-wallet-header"></w3m-modal-header><w3m-modal-content data-testid="view-get-wallet-content">${r?e.map((e=>n.dy`<div class="w3m-wallet-item" data-testid="view-get-wallet-${e.id}"><w3m-wallet-image walletId="${e.id}" imageId="${e.image_id}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${e.name}</w3m-text><w3m-button .iconRight="${R.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(e.homepage)}" data-testid="view-get-wallet-button-${e.id}">Get</w3m-button></div></div>`)):null} ${i?t.map((e=>n.dy`<div class="w3m-wallet-item" data-testid="view-get-wallet-${e.id}"><w3m-wallet-image walletId="${e.id}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${e.name}</w3m-text><w3m-button .iconRight="${R.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(e.links.universal)}" data-testid="view-get-wallet-button-${e.id}">Get</w3m-button></div></div>`)):null}</w3m-modal-content><div class="w3m-footer-actions"><w3m-text variant="medium-regular">Not what you're looking for?</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With hundreds of wallets out there, there's something for everyone</w3m-text><w3m-button .onClick="${X.openWalletExplorerUrl}" .iconRight="${R.ARROW_UP_RIGHT_ICON}" data-testid="view-get-wallet-explorer-button">Explore Wallets</w3m-button></div>`}};Kr.styles=[w.globalCss,Gr],Kr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-get-wallet-view")],Kr);const Zr=n.iv`.w3m-footer-actions{display:flex;justify-content:center}.w3m-footer-actions w3m-button{margin:0 5px}.w3m-info-container{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:20px}.w3m-info-container:last-child{margin-bottom:0}.w3m-info-text{margin-top:5px;text-align:center}.w3m-images svg{margin:0 2px 5px;width:55px;height:55px}.help-img-highlight{stroke:var(--w3m-color-overlay)}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Qr=class extends n.oi{constructor(){super(...arguments),this.learnUrl="https://ethereum.org/en/wallets/"}onGet(){o.ConfigCtrl.state.enableExplorer?o.AV.push("GetWallet"):X.openWalletExplorerUrl()}onLearnMore(){o.zv.openHref(this.learnUrl,"_blank")}render(){return n.dy`<w3m-modal-header title="What is a wallet?"></w3m-modal-header><w3m-modal-content><div class="w3m-info-container"><div class="w3m-images">${R.HELP_CHART_IMG} ${R.HELP_PAINTING_IMG} ${R.HELP_ETH_IMG}</div><w3m-text variant="medium-regular">A home for your digital assets</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${R.HELP_KEY_IMG} ${R.HELP_USER_IMG} ${R.HELP_LOCK_IMG}</div><w3m-text variant="medium-regular">One login for all of web3</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">Log in to any app by connecting your wallet. Say goodbye to countless passwords!</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${R.HELP_COMPAS_IMG} ${R.HELP_NOUN_IMG} ${R.HELP_DAO_IMG}</div><w3m-text variant="medium-regular">Your gateway to a new web</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more.</w3m-text></div><div class="w3m-footer-actions"><w3m-button .onClick="${this.onGet.bind(this)}" .iconLeft="${R.WALLET_ICON}">Get a Wallet</w3m-button><w3m-button .onClick="${this.onLearnMore.bind(this)}" .iconRight="${R.ARROW_UP_RIGHT_ICON}">Learn More</w3m-button></div></w3m-modal-content>`}};Qr.styles=[w.globalCss,Zr],Qr=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-help-view")],Qr);const Yr=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var Jr=Object.defineProperty,Xr=Object.getOwnPropertyDescriptor,en=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Xr(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Jr(t,r,o),o};let tn=class extends n.oi{constructor(){super(),this.isError=!1,this.connector=o.Id.client().getConnectorById("injected"),this.openInjectedApp()}async openInjectedApp(){const{ready:e}=this.connector;e&&(this.isError=!1,await X.handleConnectorConnection("injected",(()=>{this.isError=!0})))}render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isMobile:i,isDesktop:s,isWeb:a}=X.getCachedRouterWalletPlatforms();return n.dy`<w3m-modal-header title="${e}" data-testid="view-injected-header"></w3m-modal-header><w3m-modal-content data-testid="view-injected-content"><w3m-connector-waiting walletId="${t}" imageId="${r}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer data-testid="view-injected-footer"><w3m-text color="secondary" variant="small-thin">Connection can be declined if multiple wallets are installed or previous request is still active</w3m-text><w3m-platform-selection .isMobile="${i}" .isDesktop="${s}" .isWeb="${a}" .isRetry="${!0}"><w3m-button .onClick="${this.openInjectedApp.bind(this)}" .disabled="${!this.isError}" .iconRight="${R.RETRY_ICON}">Retry</w3m-button></w3m-platform-selection></w3m-info-footer>`}};tn.styles=[w.globalCss,Yr],en([(0,i.SB)()],tn.prototype,"isError",2),tn=en([(0,i.Mo)("w3m-injected-connecting-view")],tn);const rn=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}w3m-button{margin-top:15px}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let nn=class extends n.oi{onInstall(e){e&&o.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,homepage:i}=o.zv.getWalletRouterData();return n.dy`<w3m-modal-header title="${e}" data-testid="view-install-wallet-header"></w3m-modal-header><w3m-modal-content data-testid="view-install-wallet-content"><w3m-connector-waiting walletId="${t}" imageId="${r}" label="Not Detected" .isStale="${!0}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer data-testid="view-install-wallet-footer"><w3m-text color="secondary" variant="small-thin">${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}</w3m-text><w3m-button .onClick="${()=>this.onInstall(i)}" .iconLeft="${R.ARROW_DOWN_ICON}" data-testid="view-install-wallet-download-button">Download</w3m-button></w3m-info-footer>`}};nn.styles=[w.globalCss,rn],nn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-install-wallet-view")],nn);const on=n.iv`w3m-wallet-image{border-radius:var(--w3m-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}w3m-info-footer{display:flex;width:100%}.w3m-app-store{justify-content:space-between}.w3m-app-store w3m-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--w3m-wallet-icon-small-border-radius)}.w3m-app-store div{display:flex;align-items:center}.w3m-app-store w3m-button{margin-right:-10px}.w3m-note{flex-direction:column;align-items:center;padding:5px 0}.w3m-note w3m-text{text-align:center}w3m-platform-selection{margin-top:-15px}.w3m-note w3m-text{margin-top:15px}.w3m-note w3m-text span{color:var(--w3m-accent-color)}`;var sn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,cn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?an(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&sn(t,r,o),o};let ln=class extends n.oi{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openMobileApp(),this.unwatchConnection=o.WcConnectionCtrl.subscribe((e=>{this.isError=e.pairingError}))}disconnectedCallback(){var e;null==(e=this.unwatchConnection)||e.call(this)}onFormatAndRedirect(e,t=!1){const{mobile:r,name:n}=o.zv.getWalletRouterData(),i=r?.native,s=r?.universal;if(i&&!t){const t=o.zv.formatNativeUrl(i,e,n);o.zv.openHref(t,"_self")}else if(s){const t=o.zv.formatUniversalUrl(s,e,n);o.zv.openHref(t,"_self")}}openMobileApp(e=!1){o.WcConnectionCtrl.setPairingError(!1);const{pairingUri:t}=o.WcConnectionCtrl.state,r=o.zv.getWalletRouterData();X.setRecentWallet(r),this.onFormatAndRedirect(t,e)}onGoToAppStore(e){e&&o.zv.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:r,app:i,mobile:s}=o.zv.getWalletRouterData(),{isWeb:a}=X.getCachedRouterWalletPlatforms(),c=i?.ios,l=s?.universal;return n.dy`<w3m-modal-header title="${e}" data-testid="view-mobile-connecting-header"></w3m-modal-header><w3m-modal-content data-testid="view-mobile-connecting-content"><w3m-connector-waiting walletId="${t}" imageId="${r}" label="Tap 'Open' to continue…" .isError="${this.isError}"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer class="w3m-note" data-testid="view-mobile-connecting-footer"><w3m-platform-selection .isWeb="${a}" .isRetry="${!0}"><w3m-button .onClick="${()=>this.openMobileApp(!1)}" .iconRight="${R.RETRY_ICON}">Retry</w3m-button></w3m-platform-selection>${l?n.dy`<w3m-text color="secondary" variant="small-thin">Still doesn't work? <span tabindex="0" @click="${()=>this.openMobileApp(!0)}">Try this alternate link</span></w3m-text>`:null}</w3m-info-footer><w3m-info-footer class="w3m-app-store" data-testid="view-mobile-connecting-footer"><div><w3m-wallet-image walletId="${t}" imageId="${r}"></w3m-wallet-image><w3m-text>${`Get ${e}`}</w3m-text></div><w3m-button .iconRight="${R.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGoToAppStore(c)}" variant="ghost" data-testid="view-mobile-connecting-app-store-button">App Store</w3m-button></w3m-info-footer>`}};ln.styles=[w.globalCss,on],cn([(0,i.SB)()],ln.prototype,"isError",2),ln=cn([(0,i.Mo)("w3m-mobile-connecting-view")],ln);const un=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;Object.defineProperty,Object.getOwnPropertyDescriptor;let hn=class extends n.oi{render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isInjected:i,isDesktop:s,isWeb:a}=X.getCachedRouterWalletPlatforms();return n.dy`<w3m-modal-header title="${e}" .onAction="${X.handleUriCopy}" .actionIcon="${R.COPY_ICON}" data-testid="view-mobile-qr-connecting-header"></w3m-modal-header><w3m-modal-content data-testid="view-mobile-qr-connecting-content"><w3m-walletconnect-qr walletId="${t}" imageId="${r}"></w3m-walletconnect-qr></w3m-modal-content><w3m-info-footer data-testid="view-mobile-qr-connecting-footer"><w3m-text color="secondary" variant="small-thin">${`Scan this QR Code with your phone's camera or inside ${e} app`}</w3m-text><w3m-platform-selection .isDesktop="${s}" .isInjected="${i}" .isWeb="${a}"></w3m-platform-selection></w3m-info-footer>`}};hn.styles=[w.globalCss,un],hn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-mobile-qr-connecting-view")],hn);Object.defineProperty,Object.getOwnPropertyDescriptor;let dn=class extends n.oi{render(){return n.dy`<w3m-modal-header title="Scan the code" .onAction="${X.handleUriCopy}" .actionIcon="${R.COPY_ICON}"></w3m-modal-header><w3m-modal-content><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>`}};dn.styles=[w.globalCss],dn=((e,t,r,n)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([(0,i.Mo)("w3m-qrcode-view")],dn);const pn=n.iv`div{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-info-footer w3m-text{text-align:center}`;var fn=Object.defineProperty,mn=Object.defineProperties,gn=Object.getOwnPropertyDescriptor,wn=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,xn=(e,t,r)=>t in e?fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?gn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&fn(t,r,o),o};let An=class extends n.oi{constructor(){super(),this.connectedChains="ALL",this.isUnsupportedChains=!1,this.getConnectedChainIds()}async getConnectedChainIds(){this.connectedChains=await o.Id.client().getConnectedChainIds()}async onSelectChain(e){try{const{selectedChain:t,isPreferInjected:r}=o.OptionsCtrl.state,{isConnected:n}=o.AccountCtrl.state;n?t?.id===e.id?o.AV.reset("Account"):'"walletConnect"'===X.getWagmiWalletType()?(await o.Id.client().switchNetwork({chainId:e.id}),o.AV.reset("Account")):o.AV.push("SwitchNetwork",{SwitchNetwork:e}):r?(o.OptionsCtrl.setSelectedChain(e),o.jb.close()):(o.OptionsCtrl.setSelectedChain(e),o.AV.push("ConnectWallet"))}catch(e){console.error(e),o.ToastCtrl.openToast("Unsupported chain","error")}}isUnsuportedChainId(e){return("string"==typeof this.connectedChains&&"ALL"!==this.connectedChains||!(!Array.isArray(this.connectedChains)||this.connectedChains.includes(String(e))))&&(this.isUnsupportedChains=!0,!0)}render(){const{chains:e}=o.OptionsCtrl.state,t=e?.map((e=>((e,t)=>mn(e,wn(t)))(((e,t)=>{for(var r in t||(t={}))vn.call(t,r)&&xn(e,r,t[r]);if(bn)for(var r of bn(t))yn.call(t,r)&&xn(e,r,t[r]);return e})({},e),{unsupported:this.isUnsuportedChainId(e.id)}))),r=t?.sort(((e,t)=>Number(e.unsupported)-Number(t.unsupported)));return n.dy`<w3m-modal-header title="Select network" data-testid="view-select-network-header"></w3m-modal-header><w3m-modal-content data-testid="view-select-network-content"><div>${r?.map((e=>n.dy`<w3m-network-button name="${e.name}" chainId="${e.id}" .unsupported="${e.unsupported}" .onClick="${async()=>this.onSelectChain(e)}" data-testid="view-select-network-button-${e.id}">${e.name}</w3m-network-button>`))}</div></w3m-modal-content>${this.isUnsupportedChains?n.dy`<w3m-info-footer><w3m-text color="secondary" variant="small-thin">Your connected wallet may not support some of the networks available for this dapp</w3m-text></w3m-info-footer>`:null}`}};An.styles=[w.globalCss,pn],Cn([(0,i.SB)()],An.prototype,"connectedChains",2),Cn([(0,i.SB)()],An.prototype,"isUnsupportedChains",2),An=Cn([(0,i.Mo)("w3m-select-network-view")],An);const En=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}w3m-button{margin-top:15px}`;var _n=Object.defineProperty,In=Object.getOwnPropertyDescriptor,Pn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?In(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&_n(t,r,o),o};let On=class extends n.oi{constructor(){super(),this.isError=!1,this.onSwitchNetwork()}async onSwitchNetwork(){try{this.isError=!1;const e=o.zv.getSwitchNetworkRouterData();await o.Id.client().switchNetwork({chainId:e.id}),o.OptionsCtrl.setSelectedChain(e),o.AV.reset("Account")}catch{this.isError=!0}}render(){const{id:e,name:t}=o.zv.getSwitchNetworkRouterData();return n.dy`<w3m-modal-header title="${`Connect to ${t}`}" data-testid="view-switch-network-header"></w3m-modal-header><w3m-modal-content data-testid="view-switch-network-content"><w3m-network-waiting chainId="${e}" label="Approve in your wallet" .isError="${this.isError}"></w3m-network-waiting></w3m-modal-content><w3m-info-footer data-testid="view-switch-network-footer"><w3m-text color="secondary" variant="small-thin">Switch can be declined if chain is not supported by a wallet or previous request is still active</w3m-text><w3m-button .onClick="${this.onSwitchNetwork.bind(this)}" .disabled="${!this.isError}" .iconRight="${R.RETRY_ICON}" data-testid="view-switch-network-retry-button">Try Again</w3m-button></w3m-info-footer>`}};On.styles=[w.globalCss,En],Pn([(0,i.SB)()],On.prototype,"isError",2),On=Pn([(0,i.Mo)("w3m-switch-network-view")],On);const kn=n.iv`w3m-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}w3m-modal-content::after,w3m-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}w3m-modal-content::before{box-shadow:0 -1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(var(--w3m-color-bg-1),rgba(255,255,255,0))}w3m-modal-content::after{box-shadow:0 1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--w3m-color-bg-1));top:calc(100% - 20px)}w3m-modal-content::-webkit-scrollbar{display:none}.w3m-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.w3m-empty,.w3m-loading{display:flex}.w3m-loading .w3m-placeholder-block{height:100%}.w3m-end-reached .w3m-placeholder-block{height:0;opacity:0}.w3m-empty .w3m-placeholder-block{opacity:1;height:100%}w3m-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var Sn=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,Nn=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Mn(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Sn(t,r,o),o};let Tn=class extends n.oi{constructor(){super(...arguments),this.loading=!o.ExplorerCtrl.state.wallets.listings.length,this.firstFetch=!o.ExplorerCtrl.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=X.debounce((e=>{e.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=e,o.ExplorerCtrl.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),o.ExplorerCtrl.resetSearch())}))}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;null==(e=this.intersectionObserver)||e.disconnect()}get placeholderEl(){return X.getShadowRootElement(this,".w3m-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver((([e])=>{e.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()})),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=o.ExplorerCtrl.state,{listings:r,total:n}=this.search?t:e;return n<=40||r.length>=n}async fetchWallets(){const{wallets:e,search:t,injectedWallets:r}=o.ExplorerCtrl.state,{listings:n,total:i,page:s}=this.search?t:e;if(!this.endReached&&(this.firstFetch||i>40&&n.length<i))try{this.loading=!0;const{listings:e}=await o.ExplorerCtrl.getWallets({page:this.firstFetch?1:s+1,entries:40,search:this.search,version:2}),t=e.map((e=>X.getWalletIcon(e))),n=r.map((e=>X.getWalletIcon(e)));await Promise.all([...t.map((async e=>X.preloadImage(e))),...n.map((async e=>X.preloadImage(e))),o.zv.wait(300)]),this.endReached=this.isLastPage()}catch(e){console.error(e),o.ToastCtrl.openToast(X.getErrorMessage(e),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){o.zv.isAndroid()?X.handleMobileLinking(e):X.goToConnectingView(e)}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=o.ExplorerCtrl.state,{listings:r}=this.search?t:e,i=this.loading&&!r.length,a=this.search.length>=3;let c=St.injectedWalletsTemplate(),l=St.manualWalletsTemplate(),u=St.recomendedWalletsTemplate(!0);a&&(c=c.filter((({values:e})=>X.caseSafeIncludes(e[0],this.search))),l=l.filter((({values:e})=>X.caseSafeIncludes(e[0],this.search))),u=u.filter((({values:e})=>X.caseSafeIncludes(e[0],this.search)))),c=c.filter((e=>!u.find((t=>X.caseSafeIncludes(e.values[0],t.values[0])))));const h=!(this.loading||r.length||c.length||u.length),d=Math.max(c.length,r.length),p={"w3m-loading":i,"w3m-end-reached":this.endReached||!this.loading,"w3m-empty":h};return n.dy`<w3m-modal-header data-testid="view-wallet-explorer-header"><w3m-search-input .onChange="${this.onSearchChange.bind(this)}"></w3m-search-input></w3m-modal-header><w3m-modal-content class="${(0,s.$)(p)}" data-testid="view-wallet-explorer-content"><div class="w3m-grid">${i?null:u} ${i?null:[...Array(d)].map(((e,t)=>n.dy`${l[t]} ${c[t]} ${r[t]?n.dy`<w3m-wallet-button imageId="${r[t].image_id}" name="${r[t].name}" walletId="${r[t].id}" .onClick="${()=>this.onConnect(r[t])}" data-testid="view-wallet-explorer-button-${r[t].id}"></w3m-wallet-button>`:null}`))}</div><div class="w3m-placeholder-block">${h?n.dy`<w3m-text variant="big-bold" color="secondary">No results found</w3m-text>`:null} ${!h&&this.loading?n.dy`<w3m-spinner></w3m-spinner>`:null}</div></w3m-modal-content>`}};Tn.styles=[w.globalCss,kn],Nn([(0,i.SB)()],Tn.prototype,"loading",2),Nn([(0,i.SB)()],Tn.prototype,"firstFetch",2),Nn([(0,i.SB)()],Tn.prototype,"search",2),Nn([(0,i.SB)()],Tn.prototype,"endReached",2),Tn=Nn([(0,i.Mo)("w3m-wallet-explorer-view")],Tn);const jn=n.iv`w3m-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}w3m-text{text-align:center}`;var Rn=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,$n=(e,t,r,n)=>{for(var i,o=n>1?void 0:n?Ln(t,r):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(n?i(t,r,o):i(o))||o);return n&&o&&Rn(t,r,o),o};let Dn=class extends n.oi{constructor(){super(),this.isError=!1,this.unwatchConnection=void 0,this.openWebWallet(),this.unwatchConnection=o.WcConnectionCtrl.subscribe((e=>{this.isError=e.pairingError}))}disconnectedCallback(){var e;null==(e=this.unwatchConnection)||e.call(this)}onFormatAndRedirect(e){const{desktop:t,name:r}=o.zv.getWalletRouterData(),n=t?.universal;if(n){const t=o.zv.formatUniversalUrl(n,e,r);o.zv.openHref(t,"_blank")}}openWebWallet(){o.WcConnectionCtrl.setPairingError(!1);const{pairingUri:e}=o.WcConnectionCtrl.state,t=o.zv.getWalletRouterData();X.setRecentWallet(t),this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:r}=o.zv.getWalletRouterData(),{isMobile:i,isInjected:s,isDesktop:a}=X.getCachedRouterWalletPlatforms(),c=o.zv.isMobile();return n.dy`<w3m-modal-header title="${e}" .onAction="${X.handleUriCopy}" .actionIcon="${R.COPY_ICON}" data-testid="view-web-connecting-header"></w3m-modal-header><w3m-modal-content data-testid="view-web-connecting-content"><w3m-connector-waiting walletId="${t}" imageId="${r}" label="${`Continue in ${e}...`}" .isError="${this.isError}" data-testid="view-web-connecting-waiting"></w3m-connector-waiting></w3m-modal-content><w3m-info-footer data-testid="view-web-connecting-footer"><w3m-text color="secondary" variant="small-thin">${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}</w3m-text><w3m-platform-selection .isMobile="${i}" .isInjected="${!c&&s}" .isDesktop="${!c&&a}" .isRetry="${!0}"><w3m-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${R.RETRY_ICON}" data-testid="view-web-connecting-retry-button">Retry</w3m-button></w3m-platform-selection></w3m-info-footer>`}};Dn.styles=[w.globalCss,jn],$n([(0,i.SB)()],Dn.prototype,"isError",2),Dn=$n([(0,i.Mo)("w3m-web-connecting-view")],Dn)},3692:(e,t,r)=>{"use strict";var n;r.d(t,{Jb:()=>I,Ld:()=>P,YP:()=>_,dy:()=>E,sY:()=>H});const i=window,o=i.trustedTypes,s=o?o.createPolicy("lit-html",{createHTML:e=>e}):void 0,a="$lit$",c=`lit$${(Math.random()+"").slice(9)}$`,l="?"+c,u=`<${l}>`,h=document,d=()=>h.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,f=Array.isArray,m="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,b=/>/g,v=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),y=/'/g,x=/"/g,C=/^(?:script|style|textarea|title)$/i,A=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),E=A(1),_=A(2),I=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),O=new WeakMap,k=h.createTreeWalker(h,129,null,!1);function S(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(t):t}const M=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"<svg>":"",s=g;for(let t=0;t<r;t++){const r=e[t];let l,h,d=-1,p=0;for(;p<r.length&&(s.lastIndex=p,h=s.exec(r),null!==h);)p=s.lastIndex,s===g?"!--"===h[1]?s=w:void 0!==h[1]?s=b:void 0!==h[2]?(C.test(h[2])&&(i=RegExp("</"+h[2],"g")),s=v):void 0!==h[3]&&(s=v):s===v?">"===h[0]?(s=null!=i?i:g,d=-1):void 0===h[1]?d=-2:(d=s.lastIndex-h[2].length,l=h[1],s=void 0===h[3]?v:'"'===h[3]?x:y):s===x||s===y?s=v:s===w||s===b?s=g:(s=v,i=void 0);const f=s===v&&e[t+1].startsWith("/>")?" ":"";o+=s===g?r+u:d>=0?(n.push(l),r.slice(0,d)+a+r.slice(d)+c+f):r+c+(-2===d?(n.push(void 0),t):f)}return[S(e,o+(e[r]||"<?>")+(2===t?"</svg>":"")),n]};class N{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,s=0;const u=e.length-1,h=this.parts,[p,f]=M(e,t);if(this.el=N.createElement(p,r),k.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=k.nextNode())&&h.length<u;){if(1===n.nodeType){if(n.hasAttributes()){const e=[];for(const t of n.getAttributeNames())if(t.endsWith(a)||t.startsWith(c)){const r=f[s++];if(e.push(t),void 0!==r){const e=n.getAttribute(r.toLowerCase()+a).split(c),t=/([.?@])?(.*)/.exec(r);h.push({type:1,index:i,name:t[2],strings:e,ctor:"."===t[1]?$:"?"===t[1]?B:"@"===t[1]?U:L})}else h.push({type:6,index:i})}for(const t of e)n.removeAttribute(t)}if(C.test(n.tagName)){const e=n.textContent.split(c),t=e.length-1;if(t>0){n.textContent=o?o.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],d()),k.nextNode(),h.push({type:2,index:++i});n.append(e[t],d())}}}else if(8===n.nodeType)if(n.data===l)h.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(c,e+1));)h.push({type:7,index:i}),e+=c.length-1}i++}}static createElement(e,t){const r=h.createElement("template");return r.innerHTML=e,r}}function T(e,t,r=e,n){var i,o,s,a;if(t===I)return t;let c=void 0!==n?null===(i=r._$Co)||void 0===i?void 0:i[n]:r._$Cl;const l=p(t)?void 0:t._$litDirective$;return(null==c?void 0:c.constructor)!==l&&(null===(o=null==c?void 0:c._$AO)||void 0===o||o.call(c,!1),void 0===l?c=void 0:(c=new l(e),c._$AT(e,r,n)),void 0!==n?(null!==(s=(a=r)._$Co)&&void 0!==s?s:a._$Co=[])[n]=c:r._$Cl=c),void 0!==c&&(t=T(e,c._$AS(e,t.values),c,n)),t}class j{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:r},parts:n}=this._$AD,i=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:h).importNode(r,!0);k.currentNode=i;let o=k.nextNode(),s=0,a=0,c=n[0];for(;void 0!==c;){if(s===c.index){let t;2===c.type?t=new R(o,o.nextSibling,this,e):1===c.type?t=new c.ctor(o,c.name,c.strings,this,e):6===c.type&&(t=new W(o,this,e)),this._$AV.push(t),c=n[++a]}s!==(null==c?void 0:c.index)&&(o=k.nextNode(),s++)}return k.currentNode=h,i}v(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class R{constructor(e,t,r,n){var i;this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cp=null===(i=null==n?void 0:n.isConnected)||void 0===i||i}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=T(this,e,t),p(e)?e===P||null==e||""===e?(this._$AH!==P&&this._$AR(),this._$AH=P):e!==this._$AH&&e!==I&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>f(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==P&&p(this._$AH)?this._$AA.nextSibling.data=e:this.$(h.createTextNode(e)),this._$AH=e}g(e){var t;const{values:r,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=N.createElement(S(n.h,n.h[0]),this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.v(r);else{const e=new j(i,this),t=e.u(this.options);e.v(r),this.$(t),this._$AH=e}}_$AC(e){let t=O.get(e.strings);return void 0===t&&O.set(e.strings,t=new N(e)),t}T(e){f(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const i of e)n===t.length?t.push(r=new R(this.k(d()),this.k(d()),this,this.options)):r=t[n],r._$AI(i),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var r;for(null===(r=this._$AP)||void 0===r||r.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class L{constructor(e,t,r,n,i){this.type=1,this._$AH=P,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=i,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=P}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=T(this,e,t,0),o=!p(e)||e!==this._$AH&&e!==I,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s<i.length-1;s++)a=T(this,n[r+s],t,s),a===I&&(a=this._$AH[s]),o||(o=!p(a)||a!==this._$AH[s]),a===P?e=P:e!==P&&(e+=(null!=a?a:"")+i[s+1]),this._$AH[s]=a}o&&!n&&this.j(e)}j(e){e===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class $ extends L{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===P?void 0:e}}const D=o?o.emptyScript:"";class B extends L{constructor(){super(...arguments),this.type=4}j(e){e&&e!==P?this.element.setAttribute(this.name,D):this.element.removeAttribute(this.name)}}class U extends L{constructor(e,t,r,n,i){super(e,t,r,n,i),this.type=5}_$AI(e,t=this){var r;if((e=null!==(r=T(this,e,t,0))&&void 0!==r?r:P)===I)return;const n=this._$AH,i=e===P&&n!==P||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==P&&(n===P||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;"function"==typeof this._$AH?this._$AH.call(null!==(r=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==r?r:this.element,e):this._$AH.handleEvent(e)}}class W{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){T(this,e)}}const z=i.litHtmlPolyfillSupport;null==z||z(N,R),(null!==(n=i.litHtmlVersions)&&void 0!==n?n:i.litHtmlVersions=[]).push("2.8.0");const H=(e,t,r)=>{var n,i;const o=null!==(n=null==r?void 0:r.renderBefore)&&void 0!==n?n:t;let s=o._$litPart$;if(void 0===s){const e=null!==(i=null==r?void 0:r.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new R(t.insertBefore(d(),e),e,void 0,null!=r?r:{})}return s._$AI(e),s}},7408:(e,t,r)=>{"use strict";r.d(t,{Mo:()=>n,Cb:()=>s,SB:()=>a});const n=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:r,elements:n}=t;return{kind:r,elements:n,finisher(t){customElements.define(e,t)}}})(e,t),i=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(r){r.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}},o=(e,t,r)=>{t.constructor.createProperty(r,e)};function s(e){return(t,r)=>void 0!==r?o(e,t,r):i(e,t)}function a(e){return s({...e,state:!0})}var c;null===(c=window.HTMLSlotElement)||void 0===c||c.prototype.assignedElements},623:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(3692);class i{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const o=(s=class extends i{constructor(e){var t;if(super(e),1!==e.type||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var r,i;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(e))&&this.it.add(e);return this.render(t)}const o=e.element.classList;this.it.forEach((e=>{e in t||(o.remove(e),this.it.delete(e))}));for(const e in t){const r=!!t[e];r===this.it.has(e)||(null===(i=this.nt)||void 0===i?void 0:i.has(e))||(r?(o.add(e),this.it.add(e)):(o.remove(e),this.it.delete(e)))}return n.Jb}},(...e)=>({_$litDirective$:s,values:e}));var s},796:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(3692);const i=e=>null!=e?e:n.Ld},9392:(e,t,r)=>{"use strict";r.d(t,{oi:()=>A,iv:()=>c,dy:()=>C.dy,YP:()=>C.YP});const n=window,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(t,e))}return e}toString(){return this.cssText}}const c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1]),e[0]);return new a(r,e,o)},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,o))(t)})(e):e;var u;const h=window,d=h.trustedTypes,p=d?d.emptyScript:"",f=h.reactiveElementPolyfillSupport,m={toAttribute(e,t){switch(t){case Boolean:e=e?p:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},g=(e,t)=>t!==e&&(t==t||e==e),w={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:g},b="finalized";class v extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,r)=>{const n=this._$Ep(r,t);void 0!==n&&(this._$Ev.set(n,r),e.push(n))})),e}static createProperty(e,t=w){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||w}static finalize(){if(this.hasOwnProperty(b))return!1;this[b]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of t)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Ep(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,r;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(r=e.hostConnected)||void 0===r||r.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{i?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const r=document.createElement("style"),i=n.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=t.cssText,e.appendChild(r)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EO(e,t,r=w){var n;const i=this.constructor._$Ep(e,r);if(void 0!==i&&!0===r.reflect){const o=(void 0!==(null===(n=r.converter)||void 0===n?void 0:n.toAttribute)?r.converter:m).toAttribute(t,r.type);this._$El=e,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var r;const n=this.constructor,i=n._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=n.getPropertyOptions(i),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(r=e.converter)||void 0===r?void 0:r.fromAttribute)?e.converter:m;this._$El=i,this[i]=o.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,r){let n=!0;void 0!==e&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||g)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(r)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}v[b]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:v}),(null!==(u=h.reactiveElementVersions)&&void 0!==u?u:h.reactiveElementVersions=[]).push("1.6.3");var y,x,C=r(3692);class A extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const r=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=r.firstChild),r}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,C.sY)(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return C.Jb}}A.finalized=!0,A._$litElement$=!0,null===(y=globalThis.litElementHydrateSupport)||void 0===y||y.call(globalThis,{LitElement:A});const E=globalThis.litElementPolyfillSupport;null==E||E({LitElement:A}),(null!==(x=globalThis.litElementVersions)&&void 0!==x?x:globalThis.litElementVersions=[]).push("3.3.3")},3160:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(6867);function i(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?(0,n.P)(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}},605:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});var n=r(3160),i=r(6867);function o(e,t){t||(t=e.reduce(((e,t)=>e+t.length),0));const r=(0,n.E)(t);let o=0;for(const t of e)r.set(t,o),o+=t.length;return(0,i.P)(r)}},2217:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(5114),i=r(6867);function o(e,t="utf8"){const r=n.Z[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${e}`):(0,i.P)(globalThis.Buffer.from(e,"utf-8"))}},7466:(e,t,r)=>{"use strict";r.d(t,{BB:()=>o.B,mL:()=>i.m,zo:()=>n.z});var n=r(605),i=r(2217),o=r(2263)},2263:(e,t,r)=>{"use strict";r.d(t,{B:()=>i});var n=r(5114);function i(e,t="utf8"){const r=n.Z[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},6867:(e,t,r)=>{"use strict";function n(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}r.d(t,{P:()=>n})},5114:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Ue});var n={};r.r(n),r.d(n,{identity:()=>P});var i={};r.r(i),r.d(i,{base2:()=>O});var o={};r.r(o),r.d(o,{base8:()=>k});var s={};r.r(s),r.d(s,{base10:()=>S});var a={};r.r(a),r.d(a,{base16:()=>M,base16upper:()=>N});var c={};r.r(c),r.d(c,{base32:()=>T,base32hex:()=>$,base32hexpad:()=>B,base32hexpadupper:()=>U,base32hexupper:()=>D,base32pad:()=>R,base32padupper:()=>L,base32upper:()=>j,base32z:()=>W});var l={};r.r(l),r.d(l,{base36:()=>z,base36upper:()=>H});var u={};r.r(u),r.d(u,{base58btc:()=>F,base58flickr:()=>q});var h={};r.r(h),r.d(h,{base64:()=>V,base64pad:()=>G,base64url:()=>K,base64urlpad:()=>Z});var d={};r.r(d),r.d(d,{base256emoji:()=>X});var p={};r.r(p),r.d(p,{sha256:()=>xe,sha512:()=>Ce});var f={};r.r(f),r.d(f,{identity:()=>Ee});var m={};r.r(m),r.d(m,{code:()=>Ie,decode:()=>Oe,encode:()=>Pe,name:()=>_e});var g={};r.r(g),r.d(g,{code:()=>Ne,decode:()=>je,encode:()=>Te,name:()=>Me});const w=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw new TypeError(o+" is ambiguous");r[s]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function h(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*l+1>>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h<i)&&-1!==d;d--,h++)u+=a*s[d]>>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var p=o-i;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(n+(o-p)),m=n;p!==o;)f[m++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,p=s-1;(0!==h||d<n)&&-1!==p;p--,d++)h+=256*l[p]>>>0,l[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var f=s-n;f!==s&&0===l[f];)f++;for(var m=c.repeat(r);f<s;++f)m+=e.charAt(l[f]);return m},decodeUnsafe:h,decode:function(e){var r=h(e);if(r)return r;throw new Error(`Non-${t} character`)}}},b=(new Uint8Array(0),e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class v{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class y{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return C(this,e)}}class x{constructor(e){this.decoders=e}or(e){return C(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const C=(e,t)=>new x({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class A{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new v(e,t,r),this.decoder=new y(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const E=({name:e,prefix:t,encode:r,decode:n})=>new A(e,t,r,n),_=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=w(r,t);return E({prefix:e,name:t,encode:n,decode:e=>b(i(e))})},I=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>E({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",s=0,a=0;for(let n=0;n<e.length;++n)for(a=a<<8|e[n],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o})(e,n,r),decode:t=>((e,t,r,n)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*r/8|0);let a=0,c=0,l=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${n} character`);c=c<<r|o,a+=r,a>=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,n,r,e)}),P=E({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),O=I({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),k=I({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),S=_({prefix:"9",name:"base10",alphabet:"0123456789"}),M=I({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),N=I({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),T=I({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),j=I({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),R=I({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),L=I({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),$=I({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),D=I({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),B=I({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),U=I({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),W=I({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),z=_({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),H=_({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),F=_({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),q=_({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),V=I({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),G=I({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),K=I({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Z=I({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Q=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Y=Q.reduce(((e,t,r)=>(e[r]=t,e)),[]),J=Q.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]),X=E({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+Y[t]),"")},decode:function(e){const t=[];for(const r of e){const e=J[r.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var ee=128,te=-128,re=Math.pow(2,31),ne=Math.pow(2,7),ie=Math.pow(2,14),oe=Math.pow(2,21),se=Math.pow(2,28),ae=Math.pow(2,35),ce=Math.pow(2,42),le=Math.pow(2,49),ue=Math.pow(2,56),he=Math.pow(2,63);const de=function e(t,r,n){r=r||[];for(var i=n=n||0;t>=re;)r[n++]=255&t|ee,t/=128;for(;t&te;)r[n++]=255&t|ee,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},pe=function(e){return e<ne?1:e<ie?2:e<oe?3:e<se?4:e<ae?5:e<ce?6:e<le?7:e<ue?8:e<he?9:10},fe=(e,t,r=0)=>(de(e,t,r),t),me=e=>pe(e),ge=(e,t)=>{const r=t.byteLength,n=me(e),i=n+me(r),o=new Uint8Array(i+r);return fe(e,o,0),fe(r,o,n),o.set(t,i),new we(e,r,t,o)};class we{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const be=({name:e,code:t,encode:r})=>new ve(e,t,r);class ve{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ge(this.code,t):t.then((e=>ge(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ye=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),xe=be({name:"sha2-256",code:18,encode:ye("SHA-256")}),Ce=be({name:"sha2-512",code:19,encode:ye("SHA-512")}),Ae=b,Ee={code:0,name:"identity",encode:Ae,digest:e=>ge(0,Ae(e))},_e="raw",Ie=85,Pe=e=>b(e),Oe=e=>b(e),ke=new TextEncoder,Se=new TextDecoder,Me="json",Ne=512,Te=e=>ke.encode(JSON.stringify(e)),je=e=>JSON.parse(Se.decode(e));Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom"),Symbol.for("@ipld/js-cid/CID");const Re={...n,...i,...o,...s,...a,...c,...l,...u,...h,...d};var Le=r(3160);function $e(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const De=$e("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),Be=$e("ascii","a",(e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(e=>{e=e.substring(1);const t=(0,Le.E)(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),Ue={utf8:De,"utf-8":De,hex:Re.base16,latin1:Be,ascii:Be,binary:Be,...Re}},6828:(e,t,r)=>{"use strict";r.d(t,{sj:()=>h,CO:()=>p,Ld:()=>d}),Symbol();const n=Symbol(),i=Object.getPrototypeOf,o=new WeakMap,s=(e,t=!0)=>{o.set(e,t)},a=e=>"object"==typeof e&&null!==e,c=new WeakMap,l=new WeakSet,[u]=((e=Object.is,t=((e,t)=>new Proxy(e,t)),r=(e=>a(e)&&!l.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)),u=(e=>e.configurable&&e.enumerable&&e.writable),h=(e=>{switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e}}),d=new WeakMap,p=((e,t,r=h)=>{const n=d.get(e);if((null==n?void 0:n[0])===t)return n[1];const i=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return s(i,!0),d.set(e,[t,i]),Reflect.ownKeys(e).forEach((t=>{if(Object.getOwnPropertyDescriptor(i,t))return;const n=Reflect.get(e,t),o={value:n,enumerable:!0,configurable:!0};if(l.has(n))s(n,!1);else if(n instanceof Promise)delete o.value,o.get=()=>r(n);else if(c.has(n)){const[e,t]=c.get(n);o.value=p(e,t(),r)}Object.defineProperty(i,t,o)})),Object.preventExtensions(i)}),f=new WeakMap,m=[1,1],g=(s=>{if(!a(s))throw new Error("object required");const h=f.get(s);if(h)return h;let d=m[0];const w=new Set,b=(e,t=++m[0])=>{d!==t&&(d=t,w.forEach((r=>r(e,t))))};let v=m[1];const y=e=>(t,r)=>{const n=[...t];n[1]=[e,...n[1]],b(n,r)},x=new Map,C=e=>{var t;const r=x.get(e);r&&(x.delete(e),null==(t=r[1])||t.call(r))},A=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),E=(t,s,u,h,d)=>{if(t&&(e(s,h)||f.has(h)&&e(s,f.get(h))))return;var p;C(u),a(h)&&(h=(e=>e&&(o.has(e)?o.get(e):i(e)===Object.prototype||i(e)===Array.prototype))(p=h)&&p[n]||null||h);let m=h;if(h instanceof Promise)h.then((e=>{h.status="fulfilled",h.value=e,b(["resolve",[u],e])})).catch((e=>{h.status="rejected",h.reason=e,b(["reject",[u],e])}));else{!c.has(h)&&r(h)&&(m=g(h));const e=!l.has(m)&&c.get(m);e&&((e,t)=>{if(x.has(e))throw new Error("prop listener already exists");if(w.size){const r=t[3](y(e));x.set(e,[t,r])}else x.set(e,[t])})(u,e)}d(m),b(["set",[u],h,s])},_=t(A,{deleteProperty(e,t){const r=Reflect.get(e,t);C(t);const n=Reflect.deleteProperty(e,t);return n&&b(["delete",[t],r]),n},set(e,t,r,n){const i=Reflect.has(e,t),o=Reflect.get(e,t,n);return E(i,o,t,r,(r=>{Reflect.set(e,t,r,n)})),!0},defineProperty(e,t,r){if(u(r)){const n=Reflect.getOwnPropertyDescriptor(e,t);if(!n||u(n))return E(!!n&&"value"in n,null==n?void 0:n.value,t,r.value,(n=>{Reflect.defineProperty(e,t,{...r,value:n})})),!0}return Reflect.defineProperty(e,t,r)}});f.set(s,_);const I=[A,(e=++m[1])=>(v===e||w.size||(v=e,x.forEach((([t])=>{const r=t[1](e);r>d&&(d=r)}))),d),p,e=>(w.add(e),1===w.size&&x.forEach((([e,t],r)=>{if(t)throw new Error("remove already exists");const n=e[3](y(r));x.set(r,[e,n])})),()=>{w.delete(e),0===w.size&&x.forEach((([e,t],r)=>{t&&(t(),x.set(r,[e]))}))})];return c.set(_,I),Reflect.ownKeys(s).forEach((e=>{const t=Object.getOwnPropertyDescriptor(s,e);"value"in t&&(_[e]=s[e],delete t.value,delete t.writable),Object.defineProperty(A,e,t)})),_}))=>[g,c,l,e,t,r,u,h,d,p,f,m])();function h(e={}){return u(e)}function d(e,t,r){const n=c.get(e);let i;n||console.warn("Please use proxy object");const o=[],s=n[3];let a=!1;const l=s((e=>{o.push(e),r?t(o.splice(0)):i||(i=Promise.resolve().then((()=>{i=void 0,a&&t(o.splice(0))})))}));return a=!0,()=>{a=!1,l()}}function p(e,t){const r=c.get(e);r||console.warn("Please use proxy object");const[n,i,o]=r;return o(n,i(),t)}},1431:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}r.d(t,{T:()=>n})},5291:(e,t,r)=>{"use strict";r.d(t,{R:()=>b});var n=r(1431),i=r(1920);const o="0x82ad56cb";var s=r(9977),a=r(1973),c=r(6647),l=r(1826),u=r(6606),h=r(1786),d=r(6872),p=r(968),f=r(1019),m=r(3822),g=r(8583),w=r(3134);async function b(e,t){const{account:b,batch:v=Boolean(e.batch?.multicall),blockNumber:y,blockTag:x="latest",accessList:C,data:A,gas:E,gasPrice:_,maxFeePerGas:I,maxPriorityFeePerGas:P,nonce:O,to:k,value:S,...M}=t,N=b?(0,n.T)(b):void 0;try{(0,w.F)(t);const r=(y?(0,d.eC)(y):void 0)||x,n=e.chain?.formatters?.transactionRequest?.format||m.t,s=n({...(0,f.K)(M,{format:n}),from:N?.address,accessList:C,data:A,gas:E,gasPrice:_,maxFeePerGas:I,maxPriorityFeePerGas:P,nonce:O,to:k,value:S});if(v&&function({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(o)||!r||Object.values(n).filter((e=>void 0!==e)).length>0)}({request:s}))try{return await async function(e,t){const{batchSize:r=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:o,blockTag:s="latest",data:p,multicallAddress:f,to:m}=t;let w=f;if(!w){if(!e.chain)throw new a.pZ;w=(0,h.LI)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const b=(o?(0,d.eC)(o):void 0)||s,{schedule:v}=(0,g.S)({id:`${e.uid}.${b}`,wait:n,shouldSplitBatch(e){const t=e.reduce(((e,{data:t})=>e+(t.length-2)),0);return t>2*r},fn:async t=>{const r=t.map((e=>({allowFailure:!0,callData:e.data,target:e.to}))),n=(0,u.R)({abi:i.F8,args:[r],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[{data:n,to:w},b]});return(0,l.k)({abi:i.F8,args:[r],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:y,success:x}]=await v({data:p,to:m});if(!x)throw new c.VQ({data:y});return"0x"===y?{data:void 0}:{data:y}}(e,{...s,blockNumber:y,blockTag:x})}catch(e){if(!(e instanceof a.pZ||e instanceof a.mm))throw e}const p=await e.request({method:"eth_call",params:r?[s,r]:[s]});return"0x"===p?{data:void 0}:{data:p}}catch(n){const i=function(e){if(!(e instanceof s.G))return;const t=e.walk();return"object"==typeof t.data?t.data.data:t.data}(n),{offchainLookup:o,offchainLookupSignature:a}=await Promise.resolve().then(r.bind(r,6663));if(i?.slice(0,10)===a&&k)return{data:await o(e,{data:i,to:k})};throw function(e,{docsPath:t,...r}){let n=e;return(0,p.B)(e)&&(n=(0,p.k)(e,r)),new c.cg(n,{docsPath:t,...r})}(n,{...t,account:N,chain:e.chain})}}},1920:(e,t,r)=>{"use strict";r.d(t,{$o:()=>l,F8:()=>n,X$:()=>c,du:()=>s,k3:()=>o,nZ:()=>a});const n=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],o=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],s=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],a=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],l=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},5554:(e,t,r)=>{"use strict";r.d(t,{$:()=>n,Up:()=>i,hZ:()=>o});const n={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},8617:(e,t,r)=>{"use strict";r.d(t,{Bd:()=>o,Zn:()=>i,ez:()=>n});const n={gwei:9,wei:18},i={ether:-9,wei:9},o={ether:-18,gwei:-9}},5555:(e,t,r)=>{"use strict";r.d(t,{CI:()=>A,FM:()=>f,Gy:()=>x,KY:()=>v,M4:()=>h,MX:()=>b,SM:()=>y,cO:()=>a,dh:()=>C,fM:()=>s,fs:()=>d,gr:()=>u,hn:()=>E,lC:()=>m,mv:()=>g,wM:()=>_,wb:()=>l,xB:()=>c,xL:()=>w,yP:()=>p});var n=r(1494),i=r(1756),o=r(9977);class s extends o.G{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class a extends o.G{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class c extends o.G{constructor({data:e,params:t,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.h)(t,{includeName:!0})})`,`Data:   ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class l extends o.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class u extends o.G{constructor({expectedLength:e,givenLength:t,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class h extends o.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class d extends o.G{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class p extends o.G{constructor(e,{docsPath:t}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class f extends o.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class m extends o.G{constructor(e,{docsPath:t}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class g extends o.G{constructor(e,{docsPath:t}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class w extends o.G{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class b extends o.G{constructor(e,{docsPath:t}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class v extends o.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class y extends o.G{constructor({abiItem:e,data:t,params:r,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join("\n"),{metaMessages:[`Params: (${(0,n.h)(r,{includeName:!0})})`,`Data:   ${t} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=i}}class x extends o.G{constructor({abiItem:e,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.t)(e,{includeName:!0})}".`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class C extends o.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class A extends o.G{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class E extends o.G{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class _ extends o.G{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},2960:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r(9977);class i extends n.G{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},9977:(e,t,r)=>{"use strict";r.d(t,{G:()=>i});var n=r(3678);class i extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,n.bo)()});const r=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof i&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: https://viem.sh${o}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=o,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return o(this,e)}}function o(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e?o(e.cause,t):t?null:e}},1973:(e,t,r)=>{"use strict";r.d(t,{Bk:()=>s,Yl:()=>o,hJ:()=>c,mm:()=>i,pZ:()=>a});var n=r(9977);class i extends n.G{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class o extends n.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class s extends n.G{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class a extends n.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class c extends n.G{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}},6647:(e,t,r)=>{"use strict";r.d(t,{cg:()=>g,uq:()=>w,Lu:()=>b,Dk:()=>v,VQ:()=>y});var n=r(1431),i=r(5554),o=r(1856),s=r(1494),a=r(1344);function c({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map(((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,a.P)(t[r]):t[r]}`)).join(", ")})`}var l=r(8604),u=r(6665),h=r(6283),d=r(5555),p=r(9977),f=r(4574),m=r(3678);class g extends p.G{constructor(e,{account:t,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:p,value:m}){const g=t?(0,n.T)(t):void 0,w=(0,f.xr)({from:g?.address,to:p,value:void 0!==m&&`${(0,u.d)(m)} ${i?.nativeCurrency.symbol||"ETH"}`,data:o,gas:s,gasPrice:void 0!==a&&`${(0,h.o)(a)} gwei`,maxFeePerGas:void 0!==c&&`${(0,h.o)(c)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,h.o)(l)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",w].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class w extends p.G{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:a}){const u=(0,l.m)({abi:t,args:r,name:o}),h=u?c({abiItem:u,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=u?(0,s.t)(u,{includeName:!0}):void 0,p=(0,f.xr)({address:n&&(0,m.CR)(n),function:d,args:h&&"()"!==h&&`${[...Array(o?.length??0).keys()].map((()=>" ")).join("")}${h}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",p].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=o,this.sender=a}}class b extends p.G{constructor({abi:e,data:t,functionName:r,message:n}){let a,l,u,h,p;if(t&&"0x"!==t)try{l=(0,o.p)({abi:e,data:t});const{abiItem:r,errorName:n,args:a}=l;if("Error"===n)h=a[0];else if("Panic"===n){const[e]=a;h=i.$[e]}else{const e=r?(0,s.t)(r,{includeName:!0}):void 0,t=r&&a?c({abiItem:r,args:a,includeFunctionName:!1,includeName:!1}):void 0;u=[e?`Error: ${e}`:"",t&&"()"!==t?`       ${[...Array(n?.length??0).keys()].map((()=>" ")).join("")}${t}`:""]}}catch(e){a=e}else n&&(h=n);a instanceof d.yP&&(p=a.signature,u=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(h&&"execution reverted"!==h||p?[`The contract function "${r}" reverted with the following ${p?"signature":"reason"}:`,h||p].join("\n"):`The contract function "${r}" reverted.`,{cause:a,metaMessages:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=l,this.reason=h,this.signature=p}}class v extends p.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class y extends p.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},8309:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,m:()=>i});var n=r(9977);class i extends n.G{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class o extends n.G{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}},9466:(e,t,r)=>{"use strict";r.d(t,{Cd:()=>o,J5:()=>i,M6:()=>s});var n=r(9977);class i extends n.G{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class o extends n.G{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class s extends n.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},6054:(e,t,r)=>{"use strict";r.d(t,{C_:()=>h,G$:()=>a,Hh:()=>s,M_:()=>o,WF:()=>d,ZI:()=>c,cj:()=>g,cs:()=>m,dR:()=>p,pZ:()=>f,se:()=>u,vU:()=>l});var n=r(6283),i=r(9977);class o extends i.G{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class s extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class l extends i.G{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class h extends i.G{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class d extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.o)(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.message}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},8822:(e,t,r)=>{"use strict";r.d(t,{Gg:()=>s,W5:()=>l,bs:()=>c,c9:()=>a});var n=r(1344),i=r(9977),o=r(3678);class s extends i.G{constructor({body:e,details:t,headers:r,status:i,url:s}){super("HTTP request failed.",{details:t,metaMessages:[i&&`Status: ${i}`,`URL: ${(0,o.Gr)(s)}`,e&&`Request body: ${(0,n.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=r,this.status=i,this.url=s}}class a extends i.G{constructor({body:e,details:t,url:r}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${(0,o.Gr)(r)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class c extends i.G{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,o.Gr)(r)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class l extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,o.Gr)(t)}`,`Request body: ${(0,n.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},2455:(e,t,r)=>{"use strict";r.d(t,{B:()=>c,GD:()=>b,I0:()=>A,KB:()=>m,LX:()=>l,Og:()=>p,PE:()=>y,Pv:()=>w,Ts:()=>x,XS:()=>h,ab:()=>v,gS:()=>g,ir:()=>_,nY:()=>u,pT:()=>f,s7:()=>a,u5:()=>C,x3:()=>E,yR:()=>d});var n=r(9977),i=r(8822);class o extends n.G{constructor(e,{code:t,docsPath:r,metaMessages:n,shortMessage:o}){super(o,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof i.bs?e.code:t??-1}}class s extends o{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class a extends o{constructor(e){super(e,{code:a.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends o{constructor(e){super(e,{code:c.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class l extends o{constructor(e){super(e,{code:l.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class u extends o{constructor(e){super(e,{code:u.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class h extends o{constructor(e){super(e,{code:h.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends o{constructor(e){super(e,{code:d.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class p extends o{constructor(e){super(e,{code:p.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class f extends o{constructor(e){super(e,{code:f.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends o{constructor(e){super(e,{code:m.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends o{constructor(e){super(e,{code:g.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class w extends o{constructor(e){super(e,{code:w.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends o{constructor(e){super(e,{code:b.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends s{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class y extends s{constructor(e){super(e,{code:y.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends s{constructor(e){super(e,{code:x.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class C extends s{constructor(e){super(e,{code:C.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class A extends s{constructor(e){super(e,{code:A.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class E extends s{constructor(e){super(e,{code:E.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class _ extends o{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},4574:(e,t,r)=>{"use strict";r.d(t,{Bh:()=>d,JC:()=>u,Yb:()=>p,j3:()=>l,mc:()=>f,mk:()=>h,vl:()=>c,xY:()=>a,xr:()=>s});var n=r(6665),i=r(6283),o=r(9977);function s(e){const t=Object.entries(e).map((([e,t])=>void 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>`  ${`${e}:`.padEnd(r+1)}  ${t}`)).join("\n")}class a extends o.G{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class c extends o.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class l extends o.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class u extends o.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class h extends o.G{constructor(e,{account:t,docsPath:r,chain:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:p,value:f}){const m=s({chain:o&&`${o?.name} (id: ${o?.id})`,from:t?.address,to:p,value:void 0!==f&&`${(0,n.d)(f)} ${o?.nativeCurrency.symbol||"ETH"}`,data:a,gas:c,gasPrice:void 0!==l&&`${(0,i.o)(l)} gwei`,maxFeePerGas:void 0!==u&&`${(0,i.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==h&&`${(0,i.o)(h)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class d extends o.G{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let o="Transaction";r&&void 0!==i&&(o=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(o=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(o=`Transaction at block number "${t}" at index "${i}"`),n&&(o=`Transaction with hash "${n}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class p extends o.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class f extends o.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},3678:(e,t,r)=>{"use strict";r.d(t,{CR:()=>n,Gr:()=>i,bo:()=>o});const n=e=>e,i=e=>e,o=()=>"viem@1.5.3"},558:(e,t,r)=>{"use strict";r.d(t,{r:()=>u});var n=r(5555),i=r(2221),o=r(1756),s=r(3283),a=r(6873),c=r(169),l=r(2546);function u(e,t){if("0x"===t&&e.length>0)throw new n.wb;if((0,o.d)(t)&&(0,o.d)(t)<32)throw new n.xB({data:t,params:e,size:(0,o.d)(t)});return function({data:e,params:t}){const r=[];let i=0;for(let s=0;s<t.length;s++){if(i>=(0,o.d)(e))throw new n.xB({data:e,params:t,size:(0,o.d)(e)});const a=t[s],{consumed:c,value:l}=h({data:e,param:a,position:i});r.push(l),i+=c}return r}({data:t,params:e})}function h({data:e,param:t,position:r}){const o=(0,l.S)(t.type);if(o){const[n,i]=o;return function(e,{param:t,length:r,position:n}){if(!r){const r=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0})),i=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0}));let o=0;const a=[];for(let n=0;n<i;++n){const n=h({data:(0,s.tP)(e,r+32),param:t,position:o});o+=n.consumed,a.push(n.value)}return{value:a,consumed:32}}if(d(t)){const i=(0,l.S)(t.type),o=!i?.[0];let a=0;const u=[];for(let i=0;i<r;++i){const r=(0,c.ly)((0,s.tP)(e,n,n+32,{strict:!0})),l=h({data:(0,s.tP)(e,r),param:t,position:o?a:32*i});a+=l.consumed,u.push(l.value)}return{value:u,consumed:32}}let i=0;const o=[];for(let s=0;s<r;++s){const r=h({data:e,param:t,position:n+i});i+=r.consumed,o.push(r.value)}return{value:o,consumed:i}}(e,{length:n,param:{...t,type:i},position:r})}if("tuple"===t.type)return function(e,{param:t,position:r}){const n=0===t.components.length||t.components.some((({name:e})=>!e)),i=n?[]:{};let o=0;if(d(t)){const a=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0}));for(let r=0;r<t.components.length;++r){const c=t.components[r],l=h({data:(0,s.tP)(e,a),param:c,position:o});o+=l.consumed,i[n?r:c?.name]=l.value}return{consumed:32,value:i}}for(let s=0;s<t.components.length;++s){const a=t.components[s],c=h({data:e,param:a,position:r+o});o+=c.consumed,i[n?s:a?.name]=c.value}return{consumed:o,value:i}}(e,{param:t,position:r});if("string"===t.type)return function(e,{position:t}){const r=(0,c.ly)((0,s.tP)(e,t,t+32,{strict:!0})),n=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0}));if(0===n)return{consumed:32,value:""};return{consumed:32,value:(0,c.rR)((0,a.f)((0,s.tP)(e,r+32,r+32+n,{strict:!0})))}}(e,{position:r});if(t.type.startsWith("bytes"))return function(e,{param:t,position:r}){const[n,i]=t.type.split("bytes");if(!i){const t=(0,c.ly)((0,s.tP)(e,r,r+32,{strict:!0})),n=(0,c.ly)((0,s.tP)(e,t,t+32,{strict:!0}));return 0===n?{consumed:32,value:"0x"}:{consumed:32,value:(0,s.tP)(e,t+32,t+32+n,{strict:!0})}}return{consumed:32,value:(0,s.tP)(e,r,r+parseInt(i),{strict:!0})}}(e,{param:t,position:r});const u=(0,s.tP)(e,r,r+32,{strict:!0});if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,{param:t}){const r=t.type.startsWith("int");return{consumed:32,value:parseInt(t.type.split("int")[1]||"256")>48?(0,c.y_)(e,{signed:r}):(0,c.ly)(e,{signed:r})}}(u,{param:t});if("address"===t.type)return function(e){return{consumed:32,value:(0,i.x)((0,s.tP)(e,-20))}}(u);if("bool"===t.type)return function(e){return{consumed:32,value:(0,c.XA)(e)}}(u);throw new n.CI(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function d(e){const{type:t}=e;if("string"===t)return!0;if("bytes"===t)return!0;if(t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(d);const r=(0,l.S)(e.type);return!(!r||!d({...e,type:r[1]}))}},1856:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var n=r(5554),i=r(5555),o=r(3283),s=r(507),a=r(558),c=r(1494);function l({abi:e,data:t}){const r=(0,o.tP)(t,0,4);if("0x"===r)throw new i.wb;const l=[...e||[],n.Up,n.hZ].find((e=>"error"===e.type&&r===(0,s.o)((0,c.t)(e))));if(!l)throw new i.yP(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,a.r)(l.inputs,(0,o.tP)(t,4)):void 0,errorName:l.name}}},1826:(e,t,r)=>{"use strict";r.d(t,{k:()=>a});var n=r(5555),i=r(558),o=r(8604);const s="/docs/contract/decodeFunctionResult";function a({abi:e,args:t,functionName:r,data:a}){let c=e[0];if(r&&(c=(0,o.m)({abi:e,args:t,name:r}),!c))throw new n.xL(r,{docsPath:s});if("function"!==c.type)throw new n.xL(void 0,{docsPath:s});if(!c.outputs)throw new n.MX(c.name,{docsPath:s});const l=(0,i.r)(c.outputs,a);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},2546:(e,t,r)=>{"use strict";r.d(t,{E:()=>h,S:()=>f});var n=r(5555),i=r(2960),o=r(7451),s=r(9040),a=r(8795),c=r(1756),l=r(3283),u=r(6872);function h(e,t){if(e.length!==t.length)throw new n.fs({expectedLength:e.length,givenLength:t.length});const r=function({params:e,values:t}){const r=[];for(let n=0;n<e.length;n++)r.push(d({param:e[n],value:t[n]}));return r}({params:e,values:t}),i=p(r);return 0===i.length?"0x":i}function d({param:e,value:t}){const r=f(e.type);if(r){const[i,o]=r;return function(e,{length:t,param:r}){const i=null===t;if(!Array.isArray(e))throw new n.hn(e);if(!i&&e.length!==t)throw new n.gr({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let o=!1;const a=[];for(let t=0;t<e.length;t++){const n=d({param:r,value:e[t]});n.dynamic&&(o=!0),a.push(n)}if(i||o){const e=p(a);if(i){const t=(0,u.eC)(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?(0,s.zo)([t,e]):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,s.zo)(a.map((({encoded:e})=>e)))}}(t,{length:i,param:{...e,type:o}})}if("tuple"===e.type)return function(e,{param:t}){let r=!1;const n=[];for(let i=0;i<t.components.length;i++){const o=t.components[i],s=d({param:o,value:e[Array.isArray(e)?i:o.name]});n.push(s),s.dynamic&&(r=!0)}return{dynamic:r,encoded:r?p(n):(0,s.zo)(n.map((({encoded:e})=>e)))}}(t,{param:e});if("address"===e.type)return function(e){if(!(0,o.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,a.gc)(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){return{dynamic:!1,encoded:(0,a.gc)((0,u.C4)(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int"))return function(e,{signed:t}){return{dynamic:!1,encoded:(0,u.eC)(e,{size:32,signed:t})}}(t,{signed:e.type.startsWith("int")});if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,r]=t.type.split("bytes"),i=(0,c.d)(e);if(!r){let t=e;return i%32!=0&&(t=(0,a.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,s.zo)([(0,a.gc)((0,u.eC)(i,{size:32})),t])}}if(i!==parseInt(r))throw new n.M4({expectedSize:parseInt(r),value:e});return{dynamic:!1,encoded:(0,a.gc)(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=(0,u.$G)(e),r=Math.ceil((0,c.d)(t)/32),n=[];for(let e=0;e<r;e++)n.push((0,a.gc)((0,l.tP)(t,32*e,32*(e+1)),{dir:"right"}));return{dynamic:!0,encoded:(0,s.zo)([(0,a.gc)((0,u.eC)((0,c.d)(t),{size:32})),...n])}}(t);throw new n.dh(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function p(e){let t=0;for(let r=0;r<e.length;r++){const{dynamic:n,encoded:i}=e[r];t+=n?32:(0,c.d)(i)}const r=[],n=[];let i=0;for(let o=0;o<e.length;o++){const{dynamic:s,encoded:a}=e[o];s?(r.push((0,u.eC)(t+i,{size:32})),n.push(a),i+=(0,c.d)(a)):r.push(a)}return(0,s.zo)([...r,...n])}function f(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},6606:(e,t,r)=>{"use strict";r.d(t,{R:()=>l});var n=r(5555),i=r(9040),o=r(507),s=r(2546),a=r(1494),c=r(8604);function l({abi:e,args:t,functionName:r}){let l=e[0];if(r&&(l=(0,c.m)({abi:e,args:t,name:r}),!l))throw new n.xL(r,{docsPath:"/docs/contract/encodeFunctionData"});if("function"!==l.type)throw new n.xL(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const u=(0,a.t)(l),h=(0,o.o)(u),d="inputs"in l&&l.inputs?(0,s.E)(l.inputs,t??[]):void 0;return(0,i.SM)([h,d??"0x"])}},1494:(e,t,r)=>{"use strict";r.d(t,{h:()=>o,t:()=>i});var n=r(5555);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.wM(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`}function o(e,{includeName:t=!1}={}){return e?e.map((e=>function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${o(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t}))).join(t?", ":","):""}},8604:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=r(7451);function i({abi:e,args:t=[],name:r}){const n=e.filter((e=>"name"in e&&e.name===r));if(0!==n.length){if(1===n.length)return n[0];for(const e of n)if("inputs"in e)if(t&&0!==t.length){if(e.inputs&&0!==e.inputs.length&&e.inputs.length===t.length&&t.every(((t,r)=>{const n="inputs"in e&&e.inputs[r];return!!n&&o(t,n)})))return e}else if(!e.inputs||0===e.inputs.length)return e;return n[0]}}function o(e,t){const r=typeof e,i=t.type;switch(i){case"address":return(0,n.U)(e);case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:return"tuple"===i&&"components"in t?Object.values(t.components).every(((t,r)=>o(Object.values(e)[r],t))):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i)?"number"===r||"bigint"===r:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i)?"string"===r||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i)&&Array.isArray(e)&&e.every((e=>o(e,{...t,type:i.replace(/(\[[0-9]{0,}\])$/,"")})))}}},2221:(e,t,r)=>{"use strict";r.d(t,{K:()=>c,x:()=>a});var n=r(2960),i=r(1327),o=r(9277),s=r(7451);function a(e,t){const r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,o.w)((0,i.qX)(r),"bytes"),s=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&n[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());return`0x${s.join("")}`}function c(e,t){if(!(0,s.U)(e))throw new n.b({address:e});return a(e,t)}},7451:(e,t,r)=>{"use strict";r.d(t,{U:()=>i});const n=/^0x[a-fA-F0-9]{40}$/;function i(e){return n.test(e)}},6663:(e,t,r)=>{"use strict";r.d(t,{offchainLookup:()=>v,offchainLookupSignature:()=>w});var n=r(5291),i=r(1344),o=r(9977),s=r(3678);class a extends o.G{constructor({callbackSelector:e,cause:t,data:r,extraData:n,sender:i,urls:o}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",o&&["  Gateway URL(s):",...o.map((e=>`    ${(0,s.Gr)(e)}`))],`  Sender: ${i}`,`  Data: ${r}`,`  Callback selector: ${e}`,`  Extra data: ${n}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class c extends o.G{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,s.Gr)(t)}`,`Response: ${(0,i.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class l extends o.G{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}var u=r(8822),h=r(1856),d=r(2546),p=r(2960),f=r(7451),m=r(9040),g=r(5493);const w="0x556f1830",b={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function v(e,{blockNumber:t,blockTag:r,data:o,to:s}){const{args:w}=(0,h.p)({data:o,abi:[b]}),[v,y,x,C,A]=w;try{if(!function(e,t){if(!(0,f.U)(e))throw new p.b({address:e});if(!(0,f.U)(t))throw new p.b({address:t});return e.toLowerCase()===t.toLowerCase()}(s,v))throw new l({sender:v,to:s});const o=await async function({data:e,sender:t,urls:r}){let n=new Error("An unknown error occurred.");for(let o=0;o<r.length;o++){const s=r[o],a=s.includes("{sender}")||s.includes("{data}")?"GET":"POST",l="POST"===a?{data:e,sender:t}:void 0;try{const r=await fetch(s.replace("{sender}",t).replace("{data}",e),{body:JSON.stringify(l),method:a});let o;if(o=r.headers.get("Content-Type")?.startsWith("application/json")?(await r.json()).data:await r.text(),!r.ok){n=new u.Gg({body:l,details:(0,i.P)(o.error)||r.statusText,headers:r.headers,status:r.status,url:s});continue}if(!(0,g.v)(o)){n=new c({result:o,url:s});continue}return o}catch(e){n=new u.Gg({body:l,details:e.message,url:s})}}throw n}({data:x,sender:v,urls:y}),{data:a}=await(0,n.R)(e,{blockNumber:t,blockTag:r,data:(0,m.zo)([C,(0,d.E)([{type:"bytes"},{type:"bytes"}],[o,A])]),to:s});return a}catch(e){throw new a({callbackSelector:C,cause:e,data:o,extraData:A,sender:v,urls:y})}}},1786:(e,t,r)=>{"use strict";r.d(t,{LI:()=>s,ax:()=>o,qg:()=>i});var n=r(1973);function i({chain:e,currentChainId:t}){if(!e)throw new n.Bk;if(t!==e.id)throw new n.Yl({chain:e,currentChainId:t})}function o(e,t){return{...e,formatters:t?.formatters,serializers:t?.serializers}}function s({blockNumber:e,chain:t,contract:r}){const i=t?.contracts?.[r];if(!i)throw new n.mm({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.mm({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}},9040:(e,t,r)=>{"use strict";function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(const r of e)t+=r.length;const r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}(e)}function i(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}r.d(t,{SM:()=>i,zo:()=>n})},5493:(e,t,r)=>{"use strict";function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}r.d(t,{v:()=>n})},8795:(e,t,r)=>{"use strict";r.d(t,{gc:()=>o,vk:()=>i});var n=r(8309);function i(e,{dir:t,size:r=32}={}){return"string"==typeof e?o(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.$({size:e.length,targetSize:r,type:"bytes"});const i=new Uint8Array(r);for(let n=0;n<r;n++){const o="right"===t;i[o?n:r-n-1]=e[o?n:e.length-n-1]}return i}(e,{dir:t,size:r})}function o(e,{dir:t,size:r=32}={}){if(null===r)return e;const i=e.replace("0x","");if(i.length>2*r)throw new n.$({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},1756:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(5493);function i(e){return(0,n.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},3283:(e,t,r)=>{"use strict";r.d(t,{tP:()=>s});var n=r(8309),i=r(5493),o=r(1756);function s(e,t,r,{strict:n}={}){return(0,i.v)(e,{strict:!1})?function(e,t,r,{strict:n}={}){a(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(r??e.length))}`;return n&&c(i,t,r),i}(e,t,r,{strict:n}):function(e,t,r,{strict:n}={}){a(e,t);const i=e.slice(t,r);return n&&c(i,t,r),i}(e,t,r,{strict:n})}function a(e,t){if("number"==typeof t&&t>0&&t>(0,o.d)(e)-1)throw new n.m({offset:t,position:"start",size:(0,o.d)(e)})}function c(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,o.d)(e)!==r-t)throw new n.m({offset:r,position:"end",size:(0,o.d)(e)})}},6873:(e,t,r)=>{"use strict";function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e<r.length-1&&"0"===r["left"===t?e:r.length-e-1].toString();e++)n++;return r="left"===t?r.slice(n):r.slice(0,r.length-n),"string"==typeof e?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}r.d(t,{f:()=>n})},169:(e,t,r)=>{"use strict";r.d(t,{XA:()=>l,Yf:()=>a,ly:()=>u,rR:()=>h,y_:()=>c});var n=r(9466),i=r(1756),o=r(6873),s=r(1327);function a(e,{size:t}){if((0,i.d)(e)>t)throw new n.M6({givenSize:(0,i.d)(e),maxSize:t})}function c(e,t={}){const{signed:r}=t;t.size&&a(e,{size:t.size});const n=BigInt(e);if(!r)return n;const i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function l(e,t={}){let r=e;if(t.size&&(a(r,{size:t.size}),r=(0,o.f)(r)),"0x00"===(0,o.f)(r))return!1;if("0x01"===(0,o.f)(r))return!0;throw new n.Cd(r)}function u(e,t={}){return Number(c(e,t))}function h(e,t={}){let r=(0,s.nr)(e);return t.size&&(a(r,{size:t.size}),r=(0,o.f)(r,{dir:"right"})),(new TextDecoder).decode(r)}},1327:(e,t,r)=>{"use strict";r.d(t,{O0:()=>l,nr:()=>u,qX:()=>h});var n=r(9977),i=r(5493),o=r(8795),s=r(169),a=r(6872);const c=new TextEncoder;function l(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){return u((0,a.eC)(e,t))}(e,t):"boolean"==typeof e?function(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,o.vk)(r,{size:t.size})):r}(e,t):(0,i.v)(e)?u(e,t):h(e,t)}function u(e,t={}){let r=e;t.size&&((0,s.Yf)(r,{size:t.size}),r=(0,o.vk)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);const a=new Uint8Array(i.length/2);for(let e=0;e<a.length;e++){const t=2*e,r=i.slice(t,t+2),o=Number.parseInt(r,16);if(Number.isNaN(o)||o<0)throw new n.G(`Invalid byte sequence ("${r}" in "${i}").`);a[e]=o}return a}function h(e,t={}){const r=c.encode(e);return"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,o.vk)(r,{dir:"right",size:t.size})):r}},6872:(e,t,r)=>{"use strict";r.d(t,{$G:()=>d,C4:()=>c,NC:()=>a,ci:()=>l,eC:()=>u});var n=r(9466),i=r(8795),o=r(169);const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?u(e,t):"string"==typeof e?d(e,t):"boolean"==typeof e?c(e,t):l(e,t)}function c(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?((0,o.Yf)(r,{size:t.size}),(0,i.vk)(r,{size:t.size})):r}function l(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=s[e[t]];const n=`0x${r}`;return"number"==typeof t.size?((0,o.Yf)(n,{size:t.size}),(0,i.vk)(n,{dir:"right",size:t.size})):n}function u(e,t={}){const{signed:r,size:o}=t,s=BigInt(e);let a;o?a=r?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(a=BigInt(Number.MAX_SAFE_INTEGER));const c="bigint"==typeof a&&r?-a-1n:0;if(a&&s>a||s<c){const t="bigint"==typeof e?"n":"";throw new n.J5({max:a?`${a}${t}`:void 0,min:`${c}${t}`,signed:r,size:o,value:`${e}${t}`})}const l=`0x${(r&&s<0?(1n<<BigInt(8*o))+BigInt(s):s).toString(16)}`;return o?(0,i.vk)(l,{size:o}):l}const h=new TextEncoder;function d(e,t={}){return l(h.encode(e),t)}},968:(e,t,r)=>{"use strict";r.d(t,{B:()=>s,k:()=>a});var n=r(6054),i=r(8822),o=r(2455);function s(e){return e instanceof o.KB||e instanceof o.yR||e instanceof i.bs&&e.code===n.M_.code}function a(e,t){const r=e.details.toLowerCase();return n.Hh.nodeMessage.test(r)?new n.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):n.G$.nodeMessage.test(r)?new n.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):n.ZI.nodeMessage.test(r)?new n.ZI({cause:e,nonce:t?.nonce}):n.vU.nodeMessage.test(r)?new n.vU({cause:e,nonce:t?.nonce}):n.se.nodeMessage.test(r)?new n.se({cause:e,nonce:t?.nonce}):n.C_.nodeMessage.test(r)?new n.C_({cause:e}):n.WF.nodeMessage.test(r)?new n.WF({cause:e,gas:t?.gas}):n.dR.nodeMessage.test(r)?new n.dR({cause:e,gas:t?.gas}):n.pZ.nodeMessage.test(r)?new n.pZ({cause:e}):n.cs.nodeMessage.test(r)?new n.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):r.match(n.M_.nodeMessage)||"code"in e.cause&&e.cause?.code===n.M_.code?new n.M_({cause:e,message:e.cause.details||e.details}):new n.cj({cause:e.cause.cause})}},1019:(e,t,r)=>{"use strict";function n(e,{format:t}){return t?Object.keys(t({})).reduce(((t,r)=>(e?.hasOwnProperty(r)&&(t[r]=e[r]),t)),{}):{}}r.d(t,{K:()=>n})},5491:(e,t,r)=>{"use strict";function n(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{const i=t(e);if(r)for(const e of r)delete i[e];return{...i,...n(e)}},type:e})}r.d(t,{$:()=>n})},3822:(e,t,r)=>{"use strict";r.d(t,{i:()=>o,t:()=>i});var n=r(6872);function i(e){return{...e,gas:void 0!==e.gas?(0,n.eC)(e.gas):void 0,gasPrice:void 0!==e.gasPrice?(0,n.eC)(e.gasPrice):void 0,maxFeePerGas:void 0!==e.maxFeePerGas?(0,n.eC)(e.maxFeePerGas):void 0,maxPriorityFeePerGas:void 0!==e.maxPriorityFeePerGas?(0,n.eC)(e.maxPriorityFeePerGas):void 0,nonce:void 0!==e.nonce?(0,n.eC)(e.nonce):void 0,value:void 0!==e.value?(0,n.eC)(e.value):void 0}}const o=(0,r(5491).$)("transactionRequest",i)},507:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(3283),i=r(3693);const o=e=>"string"==typeof e?(0,n.tP)((0,i.F)(e),0,4):(0,n.tP)((0,i.J)(e),0,4)},3693:(e,t,r)=>{"use strict";r.d(t,{J:()=>u,F:()=>l});var n=r(1494);const i=/((function|event)\s)?(.*)(\((.*)\))/;function o(e){const t=e.match(i),r=t?.[2]||void 0,n=t?.[3];return{type:r,name:n,params:t?.[5]||void 0}}var s=r(1327),a=r(9277);const c=e=>(0,a.w)((0,s.O0)(e));function l(e){const t=function(e){return o(e).name}(e),r=function(e){const t=o(e).params,r=t?.split(",").map((e=>e.trim().split(" ")));return r?.map((e=>({type:e[0],name:"indexed"===e[1]?e[2]:e[1],..."indexed"===e[1]?{indexed:!0}:{}})))}(e)||[];return c(`${t}(${r.map((({type:e})=>e)).join(",")})`)}function u(e){return c((0,n.t)(e))}},9277:(e,t,r)=>{"use strict";function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}r.d(t,{w:()=>L});const o={number:n,bool:function(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)},bytes:i,hash:function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)},exists:function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}},s=BigInt(2**32-1),a=BigInt(32);function c(e,t=!1){return t?{h:Number(e&s),l:Number(e>>a&s)}:{h:0|Number(e>>a&s),l:0|Number(e&s)}}const l=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:s}=c(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]},u=(e,t,r)=>e<<r|t>>>32-r,h=(e,t,r)=>t<<r|e>>>32-r,d=(e,t,r)=>t<<r-32|e>>>64-r,p=(e,t,r)=>e<<r-32|t>>>64-r;if("object"==typeof globalThis&&"crypto"in globalThis&&globalThis.crypto,68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function f(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));class m{clone(){return this._cloneInto()}}const[g,w,b]=[[],[],[]],v=BigInt(0),y=BigInt(1),x=BigInt(2),C=BigInt(7),A=BigInt(256),E=BigInt(113);for(let e=0,t=y,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],g.push(2*(5*n+r)),w.push((e+1)*(e+2)/2%64);let i=v;for(let e=0;e<7;e++)t=(t<<y^(t>>C)*E)%A,t&x&&(i^=y<<(y<<BigInt(e))-y);b.push(i)}const[_,I]=l(b,!0),P=(e,t,r)=>r>32?d(e,t,r):u(e,t,r),O=(e,t,r)=>r>32?p(e,t,r):h(e,t,r);class k extends m{constructor(e,t,r,n=!1,i=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,o.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=P(o,s,1)^r[n],c=O(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=w[r],o=P(t,i,n),s=O(t,i,n),a=g[r];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=_[n],e[1]^=I[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){o.exists(this);const{blockLen:t,state:r}=this,n=(e=f(e)).length;for(let i=0;i<n;){const o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){o.exists(this,!1),o.bytes(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return o.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(o.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new k(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}const S=(e,t,r)=>function(e){const t=t=>e().update(f(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new k(t,e,r))),M=(S(6,144,28),S(6,136,32),S(6,104,48),S(6,72,64),S(1,144,28),S(1,136,32)),N=(S(1,104,48),S(1,72,64),(e,t,r)=>function(e){const t=(t,r)=>e(r).update(f(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(((n={})=>new k(t,e,void 0===n.dkLen?r:n.dkLen,!0))));N(31,168,16),N(31,136,32);var T=r(5493),j=r(1327),R=r(6872);function L(e,t){const r=t||"hex",n=M((0,T.v)(e,{strict:!1})?(0,j.O0)(e):e);return"bytes"===r?n:(0,R.NC)(n)}},8583:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});const n=new Map;function i({fn:e,id:t,shouldSplitBatch:r,wait:i=0}){const o=async()=>{const t=a();s();const r=t.map((({args:e})=>e));0!==r.length&&e(r).then((e=>{t.forEach((({pendingPromise:t},r)=>t.resolve?.([e[r],e])))})).catch((e=>{t.forEach((({pendingPromise:t})=>t.reject?.(e)))}))},s=()=>n.delete(t),a=()=>n.get(t)||[],c=e=>n.set(t,[...a(),e]);return{flush:s,async schedule(e){const t={},n=new Promise(((e,r)=>{t.resolve=e,t.reject=r})),s=r?.([...a().map((({args:e})=>e)),e]);return s&&o(),a().length>0?(c({args:e,pendingPromise:t}),n):(c({args:e,pendingPromise:t}),setTimeout(o,i),n)}}}},1344:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});const n=(e,t,r)=>JSON.stringify(e,((e,r)=>{const n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n}),r)},3134:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(1431),i=r(2960),o=r(6054),s=r(4574),a=r(7451);function c(e){const{account:t,gasPrice:r,maxFeePerGas:c,maxPriorityFeePerGas:l,to:u}=e,h=t?(0,n.T)(t):void 0;if(h&&!(0,a.U)(h.address))throw new i.b({address:h.address});if(u&&!(0,a.U)(u))throw new i.b({address:u});if(void 0!==r&&(void 0!==c||void 0!==l))throw new s.xY;if(c&&c>2n**256n-1n)throw new o.Hh({maxFeePerGas:c});if(l&&c&&l>c)throw new o.cs({maxFeePerGas:c,maxPriorityFeePerGas:l})}},6665:(e,t,r)=>{"use strict";r.d(t,{d:()=>o});var n=r(8617),i=r(263);function o(e,t="wei"){return(0,i.b)(e,n.ez[t])}},6283:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var n=r(8617),i=r(263);function o(e,t="wei"){return(0,i.b)(e,n.Zn[t])}},263:(e,t,r)=>{"use strict";function n(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[i,o]=[r.slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}r.d(t,{b:()=>n})}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=r(6729),t={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"]},public:{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"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},n={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"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},i=r(1786),o=r(169),s=r(6872);r(5491);const a={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function c(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,o.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,o.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?a[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}function l(e){const t=e.transactions?.map((e=>"string"==typeof e?e:c(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}function u(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}const h={"0x0":"reverted","0x1":"success"};function d(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>u(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,o.ly)(e.transactionIndex):null,status:e.status?h[e.status]:null,type:e.type?a[e.type]||e.type:null}}var p=r(3822),f=r(2960),m=r(9977),g=(r(1973),r(6054),r(7451)),w=r(9040),b=r(6873),v=r(1327),y=r(4574);const x=(0,i.ax)(t),C=(0,i.ax)(n);var A=Object.defineProperty,E=(e,t,r)=>(((e,t,r)=>{t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),_=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},I=(e,t,r)=>(_(e,t,"read from private field"),r?r.call(e):t.get(e)),P=(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)},O=(e,t,r,n)=>(_(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),k=(e,t,r)=>(_(e,t,"access private method"),r),S=class extends e{constructor({chains:e=[C,x],options:t}){super(),E(this,"chains"),E(this,"options"),E(this,"storage"),this.chains=e,this.options=t}getBlockExplorerUrls(e){const{default:t,...r}=e.blockExplorers??{};if(t)return[t.url,...Object.values(r).map((e=>e.url))]}isChainUnsupported(e){return!this.chains.some((t=>t.id===e))}setStorage(e){this.storage=e}},M=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured for connector "${t}".`),E(this,"name","ChainNotConfiguredForConnectorError")}},N=class extends Error{constructor(){super(...arguments),E(this,"name","ConnectorNotFoundError"),E(this,"message","Connector not found")}};function T(e){return"string"==typeof e?Number.parseInt(e,"0x"===e.trim().substring(0,2)?16:10):"bigint"==typeof e?Number(e):e}var j=r(2221),R=r(2455),L=r(1431);const $=256;let D,B=$;function U(e=11){if(!D||B+e>2*$){D="",B=0;for(let e=0;e<$;e++)D+=(256+256*Math.random()|0).toString(16).substring(1)}return D.substring(B,B+++e)}function W(e){const{batch:t,cacheTime:r=e.pollingInterval??4e3,key:n="base",name:i="Base Client",pollingInterval:o=4e3,type:s="base"}=e,a=e.chain,c=e.account?(0,L.T)(e.account):void 0,{config:l,request:u,value:h}=e.transport({chain:a,pollingInterval:o}),d={account:c,batch:t,cacheTime:r,chain:a,key:n,name:i,pollingInterval:o,request:u,transport:{...l,...h},type:s,uid:U()};return Object.assign(d,{extend:function e(t){return r=>{const n=r(t);for(const e in d)delete n[e];const i={...t,...n};return Object.assign(i,{extend:e(i)})}}(d)})}async function z(e){const t=await e.request({method:"eth_chainId"});return(0,o.ly)(t)}var H=r(5555),F=r(2546);const q="/docs/contract/encodeDeployData";function V({abi:e,args:t,bytecode:r}){if(!t||0===t.length)return r;const n=e.find((e=>"type"in e&&"constructor"===e.type));if(!n)throw new H.fM({docsPath:q});if(!("inputs"in n))throw new H.cO({docsPath:q});if(!n.inputs||0===n.inputs.length)throw new H.cO({docsPath:q});const i=(0,F.E)(n.inputs,t);return(0,w.SM)([r,i])}class G extends m.G{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join("\n"),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}var K=r(968),Z=r(1019),Q=r(3134),Y=r(6665),J=r(6283);class X extends m.G{constructor(e,{account:t,docsPath:r,chain:n,data:i,gas:o,gasPrice:s,maxFeePerGas:a,maxPriorityFeePerGas:c,nonce:l,to:u,value:h}){const d=(0,y.xr)({from:t?.address,to:u,value:void 0!==h&&`${(0,Y.d)(h)} ${n?.nativeCurrency.symbol||"ETH"}`,data:i,gas:o,gasPrice:void 0!==s&&`${(0,J.o)(s)} gwei`,maxFeePerGas:void 0!==a&&`${(0,J.o)(a)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,J.o)(c)} gwei`,nonce:l});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",d].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}async function ee(e,t){const r=t.account??e.account;if(!r)throw new G({docsPath:"/docs/actions/public/estimateGas"});const n=(0,L.T)(r);try{const{accessList:r,blockNumber:i,blockTag:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:f,value:m,...g}="local"===n.type?await se(e,t):t,w=(i?(0,s.eC)(i):void 0)||o;(0,Q.F)(t);const b=e.chain?.formatters?.transactionRequest?.format||p.t,v=b({...(0,Z.K)(g,{format:b}),from:n.address,accessList:r,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:h,nonce:d,to:f,value:m}),y=await e.request({method:"eth_estimateGas",params:w?[v,w]:[v]});return BigInt(y)}catch(r){throw function(e,{docsPath:t,...r}){let n=e;return(0,K.B)(e)&&(n=(0,K.k)(e,r)),new X(n,{docsPath:t,...r})}(r,{...t,account:n,chain:e.chain})}}class te extends m.G{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}async function re(e,{blockHash:t,blockNumber:r,blockTag:n,includeTransactions:i}={}){const o=n??"latest",a=i??!1,c=void 0!==r?(0,s.eC)(r):void 0;let u=null;if(u=t?await e.request({method:"eth_getBlockByHash",params:[t,a]}):await e.request({method:"eth_getBlockByNumber",params:[c||o,a]}),!u)throw new te({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||l)(u)}async function ne(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function ie(e,{address:t,blockTag:r="latest",blockNumber:n}){const i=await e.request({method:"eth_getTransactionCount",params:[t,n?(0,s.eC)(n):r]});return(0,o.ly)(i)}const oe=1500000000n;async function se(e,t){const{account:r,gas:n,gasPrice:i,maxFeePerGas:o,maxPriorityFeePerGas:s,nonce:a}=t;if(!r)throw new G;const c=(0,L.T)(r),l=await re(e,{blockTag:"latest"}),u={...t,from:c.address};if(void 0===a&&(u.nonce=await ie(e,{address:c.address,blockTag:"pending"})),"bigint"==typeof l.baseFeePerGas){if(void 0!==i)throw new m.G("Chain does not support legacy `gasPrice`.");if(void 0===o)u.maxPriorityFeePerGas=s??oe,u.maxFeePerGas=120n*l.baseFeePerGas/100n+u.maxPriorityFeePerGas;else{if(void 0===s&&o<oe)throw new m.G("`maxFeePerGas` cannot be less than the default `maxPriorityFeePerGas` (1.5 gwei).");u.maxFeePerGas=o,u.maxPriorityFeePerGas=s??oe}}else{if(void 0!==o||void 0!==s)throw new m.G("Chain does not support EIP-1559 fees.");void 0===i&&(u.gasPrice=120n*await ne(e)/100n)}return void 0===n&&(u.gas=await ee(e,{...u,account:{address:c.address,type:"json-rpc"}})),(0,Q.F)(u),u}async function ae(e,t){const{account:r=e.account,chain:n=e.chain,accessList:o,data:s,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:h,to:d,value:f,...m}=t;if(!r)throw new G({docsPath:"/docs/actions/wallet/sendTransaction"});const g=(0,L.T)(r);try{let r;if((0,Q.F)(t),null!==n&&(r=await z(e),(0,i.qg)({currentChainId:r,chain:n})),"local"===g.type){const t=await se(e,{account:g,accessList:o,chain:n,data:s,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:h,to:d,value:f,...m});r||(r=await z(e));const i=n?.serializers?.transaction,p=await g.signTransaction({...t,chainId:r},{serializer:i});return await e.request({method:"eth_sendRawTransaction",params:[p]})}const w=n?.formatters?.transactionRequest?.format||p.t,b=w({...(0,Z.K)(m,{format:w}),accessList:o,data:s,from:g.address,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:h,to:d,value:f});return await e.request({method:"eth_sendTransaction",params:[b]})}catch(e){throw function(e,{docsPath:t,...r}){let n=e;return(0,K.B)(e)&&(n=(0,K.k)(e,r)),new y.mk(n,{docsPath:t,...r})}(e,{...t,account:g,chain:t.chain||void 0})}}var ce=r(5493),le=r(1344),ue=r(1756);const he=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,de=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function pe({domain:e,message:t,primaryType:r,types:n}){const i=n,o=(e,t)=>{for(const r of e){const{name:e,type:n}=r,a=n,c=t[e],l=a.match(de);if(l&&("number"==typeof c||"bigint"==typeof c)){const[e,t,r]=l;(0,s.eC)(c,{signed:"int"===t,size:parseInt(r)/8})}if("address"===a&&"string"==typeof c&&!(0,g.U)(c))throw new f.b({address:c});const u=a.match(he);if(u){const[e,t]=u;if(t&&(0,ue.d)(c)!==parseInt(t))throw new H.KY({expectedSize:parseInt(t),givenSize:(0,ue.d)(c)})}const h=i[a];h&&o(h,c)}};if(i.EIP712Domain&&e&&o(i.EIP712Domain,e),"EIP712Domain"!==r){const e=i[r];o(e,t)}}var fe=r(6606);function me(e){return{addChain:t=>async function(e,{chain:t}){const{id:r,name:n,nativeCurrency:i,rpcUrls:o,blockExplorers:a}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,s.eC)(r),chainName:n,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:a?Object.values(a).map((({url:e})=>e)):void 0}]})}(e,t),deployContract:t=>function(e,{abi:t,args:r,bytecode:n,...i}){return ae(e,{...i,data:V({abi:t,args:r,bytecode:n})})}(e,t),getAddresses:()=>async function(e){return(await e.request({method:"eth_accounts"})).map((e=>(0,j.x)(e)))}(e),getChainId:()=>z(e),getPermissions:()=>async function(e){return await e.request({method:"wallet_getPermissions"})}(e),requestAddresses:()=>async function(e){return(await e.request({method:"eth_requestAccounts"})).map((e=>(0,j.K)(e)))}(e),requestPermissions:t=>async function(e,t){return e.request({method:"wallet_requestPermissions",params:[t]})}(e,t),sendTransaction:t=>ae(e,t),signMessage:t=>async function(e,{account:t=e.account,message:r}){if(!t)throw new G({docsPath:"/docs/actions/wallet/signMessage"});const n=(0,L.T)(t);if("local"===n.type)return n.signMessage({message:r});const i="string"==typeof r?(0,s.$G)(r):r.raw instanceof Uint8Array?(0,s.NC)(r.raw):r.raw;return e.request({method:"personal_sign",params:[i,n.address]})}(e,t),signTypedData:t=>async function(e,{account:t=e.account,domain:r,message:n,primaryType:i,types:o}){if(!t)throw new G({docsPath:"/docs/actions/wallet/signTypedData"});const s=(0,L.T)(t),a={EIP712Domain:["string"==typeof r?.name&&{name:"name",type:"string"},r?.version&&{name:"version",type:"string"},"number"==typeof r?.chainId&&{name:"chainId",type:"uint256"},r?.verifyingContract&&{name:"verifyingContract",type:"address"},r?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...o};if(pe({domain:r,message:n,primaryType:i,types:a}),"local"===s.type)return s.signTypedData({domain:r,primaryType:i,types:a,message:n});const c=(0,le.P)({domain:r??{},primaryType:i,types:a,message:n},((e,t)=>(0,ce.v)(t)?t.toLowerCase():t));return e.request({method:"eth_signTypedData_v4",params:[s.address,c]})}(e,t),switchChain:t=>async function(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.eC)(t)}]})}(e,t),watchAsset:t=>async function(e,t){return await e.request({method:"wallet_watchAsset",params:t})}(e,t),writeContract:t=>async function(e,{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}){const a=(0,fe.R)({abi:t,args:n,functionName:o});return await ae(e,{data:`${a}${i?i.replace("0x",""):""}`,to:r,...s})}(e,t)}}function ge(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return W({...e,key:t,name:r,transport:e=>n({...e,retryCount:0}),type:"walletClient"}).extend(me)}var we=r(8822);async function be(e){return new Promise((t=>setTimeout(t,e)))}function ve(e,{delay:t=100,retryCount:r=2,shouldRetry:n=(()=>!0)}={}){return new Promise(((i,o)=>{const s=async({count:a=0}={})=>{try{const t=await e();i(t)}catch(e){if(a<r&&await n({count:a,error:e}))return(async({error:e})=>{const r="function"==typeof t?t({count:a,error:e}):t;r&&await be(r),s({count:a+1})})({error:e});o(e)}};s()}))}const ye=e=>"code"in e?-1!==e.code&&-32004!==e.code&&-32005!==e.code&&-32042!==e.code&&-32603!==e.code:!!(e instanceof we.Gg&&e.status)&&403!==e.status&&408!==e.status&&413!==e.status&&429!==e.status&&500!==e.status&&502!==e.status&&503!==e.status&&504!==e.status;function xe(e,{retryDelay:t=150,retryCount:r=3}={}){return async n=>ve((async()=>{try{return await e(n)}catch(e){const t=e;switch(t.code){case R.s7.code:throw new R.s7(t);case R.B.code:throw new R.B(t);case R.LX.code:throw new R.LX(t);case R.nY.code:throw new R.nY(t);case R.XS.code:throw new R.XS(t);case R.yR.code:throw new R.yR(t);case R.Og.code:throw new R.Og(t);case R.pT.code:throw new R.pT(t);case R.KB.code:throw new R.KB(t);case R.gS.code:throw new R.gS(t);case R.Pv.code:throw new R.Pv(t);case R.GD.code:throw new R.GD(t);case R.ab.code:throw new R.ab(t);case R.PE.code:throw new R.PE(t);case R.Ts.code:throw new R.Ts(t);case R.u5.code:throw new R.u5(t);case R.I0.code:throw new R.I0(t);case R.x3.code:throw new R.x3(t);default:if(e instanceof m.G)throw e;throw new R.ir(t)}}}),{delay:({count:e,error:r})=>{if(r&&r instanceof we.Gg){const e=r?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<<e)*t},retryCount:r,shouldRetry:({error:e})=>!ye(e)})}function Ce({key:e,name:t,request:r,retryCount:n=3,retryDelay:i=150,timeout:o,type:s},a){return{config:{key:e,name:t,request:r,retryCount:n,retryDelay:i,timeout:o,type:s},request:xe(r,{retryCount:n,retryDelay:i}),value:a}}function Ae(e,t={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=t;return({retryCount:o})=>Ce({key:r,name:n,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:i,type:"custom"})}var Ee,_e=class extends S{constructor({chains:e,options:t}={}){const r={shimDisconnect:!0,getProvider(){if("undefined"==typeof window)return;const e=window.ethereum;return e?.providers?e.providers[0]:e},...t};super({chains:e,options:r}),E(this,"id","injected"),E(this,"name"),E(this,"ready"),P(this,Ee,void 0),E(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),E(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,j.K)(e[0])})})),E(this,"onChainChanged",(e=>{const t=T(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})})),E(this,"onDisconnect",(async e=>{1013===e.code&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}));const n=r.getProvider();if("string"==typeof r.name)this.name=r.name;else if(n){const e=function(e){if(!e)return"Injected";const t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){const r=new Set;let n=1;for(const i of e.providers){let e=t(i);e||(e=`Unknown Wallet #${n}`,n+=1),r.add(e)}const i=[...r];return i.length?i:i[0]??"Injected"}return t(e)??"Injected"}(n);r.name?this.name=r.name(e):this.name="string"==typeof e?e:e[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:e}={}){try{const t=await this.getProvider();if(!t)throw new N;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const r=await t.request({method:"eth_requestAccounts"}),n=(0,j.K)(r[0]);let i=await this.getChainId(),o=this.isChainUnsupported(i);return e&&i!==e&&(i=(await this.switchChain(e)).id,o=this.isChainUnsupported(i)),this.options.shimDisconnect&&this.storage?.setItem(this.shimDisconnectKey,!0),{account:n,chain:{id:i,unsupported:o}}}catch(e){if(this.isUserRejectedRequestError(e))throw new R.ab(e);if(-32002===e.code)throw new R.pT(e);throw e}}async disconnect(){const e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&this.storage?.removeItem(this.shimDisconnectKey))}async getAccount(){const e=await this.getProvider();if(!e)throw new N;const t=await e.request({method:"eth_accounts"});return(0,j.K)(t[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new N;return e.request({method:"eth_chainId"}).then(T)}async getProvider(){const e=this.options.getProvider();return e&&O(this,Ee,e),I(this,Ee)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return ge({account:r,chain:n,transport:Ae(t)})}async isAuthorized(){try{if(this.options.shimDisconnect&&!this.storage?.getItem(this.shimDisconnectKey))return!1;if(!await this.getProvider())throw new N;return!!await this.getAccount()}catch{return!1}}async switchChain(e){const t=await this.getProvider();if(!t)throw new N;const r=(0,s.eC)(e);try{return await Promise.all([t.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise((t=>this.on("change",(({chain:r})=>{r?.id===e&&t()}))))]),this.chains.find((t=>t.id===e))??{id:e,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(n){const i=this.chains.find((t=>t.id===e));if(!i)throw new M({chainId:e,connectorId:this.id});if(4902===n.code||4902===n?.data?.originalError?.code)try{if(await t.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:i.name,nativeCurrency:i.nativeCurrency,rpcUrls:[i.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(i)}]}),await this.getChainId()!==e)throw new R.ab(new Error("User rejected switch after adding network."));return i}catch(e){throw new R.ab(e)}if(this.isUserRejectedRequestError(n))throw new R.ab(n);throw new R.x3(n)}}async watchAsset({address:e,decimals:t=18,image:r,symbol:n}){const i=await this.getProvider();if(!i)throw new N;return i.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:r,symbol:n}}})}isUserRejectedRequestError(e){return 4001===e.code}};Ee=new WeakMap;var Ie=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Pe=(e,t,r)=>(Ie(e,t,"read from private field"),r?r.call(e):t.get(e)),Oe=(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)},ke=(e,t,r,n)=>(Ie(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Se=r(1920),Me=r(1826),Ne=r(5554),Te=r(6647);function je(e,t){if(!(e instanceof m.G))return!1;const r=e.walk((e=>e instanceof Te.Lu));return r instanceof Te.Lu&&("ResolverNotFound"===r.data?.errorName||"ResolverWildcardNotSupported"===r.data?.errorName||!!r.reason?.includes("Wildcard on non-extended resolvers is not supported")||"reverse"===t&&r.reason===Ne.$[50])}var Re=r(9277);function Le(e){if(66!==e.length)return null;if(0!==e.indexOf("["))return null;if(65!==e.indexOf("]"))return null;const t=`0x${e.slice(1,65)}`;return(0,ce.v)(t)?t:null}function $e(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,s.ci)(t);const r=e.split(".");for(let e=r.length-1;e>=0;e-=1){const n=Le(r[e]),i=n?(0,v.O0)(n):(0,Re.w)((0,v.qX)(r[e]),"bytes");t=(0,Re.w)((0,w.zo)([t,i]),"bytes")}return(0,s.ci)(t)}function De(e){const t=new Uint8Array(32).fill(0);return e?Le(e)||(0,Re.w)((0,v.qX)(e)):(0,s.ci)(t)}function Be(e){const t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);const r=new Uint8Array((0,v.qX)(t).byteLength+2);let n=0;const i=t.split(".");for(let e=0;e<i.length;e++){let t=(0,v.qX)(i[e]);t.byteLength>255&&(t=(0,v.qX)(`[${De(i[e]).slice(2)}]`)),r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}const Ue=3;function We(e,{abi:t,address:r,args:n,docsPath:i,functionName:o,sender:s}){const{code:a,data:c,message:l,shortMessage:u}=e instanceof Te.VQ?e:e instanceof m.G?e.walk((e=>"data"in e))||e.walk():{};let h=e;return e instanceof H.wb?h=new Te.Dk({functionName:o}):a===Ue&&(c||l||u)&&(h=new Te.Lu({abi:t,data:"object"==typeof c?c.data:c,functionName:o,message:u??l})),new Te.uq(h,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s})}var ze=r(5291);async function He(e,{abi:t,address:r,args:n,functionName:i,...o}){const s=(0,fe.R)({abi:t,args:n,functionName:i});try{const{data:a}=await(0,ze.R)(e,{data:s,to:r,...o});return(0,Me.k)({abi:t,args:n,functionName:i,data:a||"0x"})}catch(e){throw We(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}class Fe extends m.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class qe extends m.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class Ve extends m.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class Ge extends m.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Ke=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,Ze=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,Qe=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Ye=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;function Je(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Xe({uri:e,gatewayUrls:t}){const r=Qe.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=Je(t?.ipfs,"https://ipfs.io"),i=Je(t?.arweave,"https://arweave.net"),o=e.match(Ke),{protocol:s,subpath:a,target:c,subtarget:l=""}=o?.groups||{},u="ipns:/"===s||"ipns/"===a,h="ipfs:/"===s||"ipfs/"===a||Ze.test(e);if(e.startsWith("http")&&!u&&!h){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((u||h)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(Ye,"");if(d.startsWith("<svg")&&(d=`data:image/svg+xml;base64,${btoa(d)}`),d.startsWith("data:")||d.startsWith("{"))return{uri:d,isOnChain:!0,isEncoded:!1};throw new Ve({uri:e})}function et(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new Fe({data:e});return e.image||e.image_url||e.image_data}async function tt({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=Xe({uri:t,gatewayUrls:e});if(n)return r;const i=await async function(e){try{const t=await fetch(e,{method:"HEAD"});if(200===t.status){const e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){return("object"!=typeof t||void 0===t.response)&&!!globalThis.hasOwnProperty("Image")&&new Promise((t=>{const r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e}))}}(r);if(i)return r;throw new Ve({uri:t})}async function rt(e,{blockNumber:t,blockTag:r,name:n,key:o,universalResolverAddress:a}){let c=a;if(!c){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=(0,i.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const i=await He(e,{address:c,abi:Se.k3,functionName:"resolve",args:[(0,s.NC)(Be(n)),(0,fe.R)({abi:Se.nZ,functionName:"text",args:[$e(n),o]})],blockNumber:t,blockTag:r});if("0x"===i[0])return null;const a=(0,Me.k)({abi:Se.nZ,functionName:"text",data:i[0]});return""===a?null:a}catch(e){if(je(e,"resolve"))return null;throw e}}function nt(e,{method:t}){const r={};return"fallback"===e.transport.type&&e.transport.onResponse?.((({method:e,response:n,status:i,transport:o})=>{"success"===i&&t===e&&(r[n]=o.request)})),t=>r[t]||e.request}class it extends m.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var ot=r(3693);const st=e=>"string"==typeof e?(0,ot.F)(e):(0,ot.J)(e);var at=r(1494),ct=r(8604);function lt({abi:e,eventName:t,args:r}){let n=e[0];if(t&&(n=(0,ct.m)({abi:e,args:r,name:t}),!n))throw new H.mv(t,{docsPath:"/docs/contract/encodeEventTopics"});if("event"!==n.type)throw new H.mv(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=(0,at.t)(n),o=st(i);let s=[];if(r&&"inputs"in n){const e=n.inputs?.filter((e=>"indexed"in e&&e.indexed)),t=Array.isArray(r)?r:Object.values(r).length>0?e?.map((e=>r[e.name]))??[]:[];t.length>0&&(s=e?.map(((e,r)=>Array.isArray(t[r])?t[r].map(((n,i)=>ut({param:e,value:t[r][i]}))):t[r]?ut({param:e,value:t[r]}):null))??[])}return[o,...s]}function ut({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,Re.w)((0,v.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new it(e.type);return(0,F.E)([e],[t])}async function ht(e,{address:t,abi:r,args:n,eventName:i,fromBlock:o,strict:a,toBlock:c}){const l=nt(e,{method:"eth_newFilter"}),u=i?lt({abi:r,args:n,eventName:i}):void 0,h=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof o?(0,s.eC)(o):o,toBlock:"bigint"==typeof c?(0,s.eC)(c):c,topics:u}]});return{abi:r,args:n,eventName:i,id:h,request:l(h),strict:a,type:"event"}}async function dt(e,{address:t,args:r,event:n,events:i,fromBlock:o,strict:a,toBlock:c}={}){const l=i??(n?[n]:void 0),u=nt(e,{method:"eth_newFilter"});let h=[];l&&(h=[l.flatMap((e=>lt({abi:[e],eventName:e.name,args:r})))],n&&(h=h[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof o?(0,s.eC)(o):o,toBlock:"bigint"==typeof c?(0,s.eC)(c):c,...h.length?{topics:h}:{}}]});return{abi:l,args:r,eventName:n?n.name:void 0,fromBlock:o,id:d,request:u(d),strict:a,toBlock:c,type:"event"}}async function pt(e){const t=nt(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}const ft=new Map,mt=new Map;const gt=e=>`blockNumber.${e}`;async function wt(e,{cacheTime:t=e.cacheTime,maxAge:r}={}){const n=await async function(e,{cacheKey:t,cacheTime:r=1/0}){const n=function(e){const t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,ft),n=t(e,mt);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}(t),i=n.response.get();if(i&&r>0&&(new Date).getTime()-i.created.getTime()<r)return i.data;let o=n.promise.get();o||(o=e(),n.promise.set(o));try{const e=await o;return n.response.set({created:new Date,data:e}),e}finally{n.promise.clear()}}((()=>e.request({method:"eth_blockNumber"})),{cacheKey:gt(e.uid),cacheTime:r??t});return BigInt(n)}var bt=r(558);const vt="/docs/contract/decodeEventLog";function yt({abi:e,data:t,strict:r,topics:n}){const i=r??!0,[o,...s]=n;if(!o)throw new H.FM({docsPath:vt});const a=e.find((e=>"event"===e.type&&o===st((0,at.t)(e))));if(!a||!("name"in a)||"event"!==a.type)throw new H.lC(o,{docsPath:vt});const{name:c,inputs:l}=a,u=l?.some((e=>!("name"in e&&e.name)));let h=u?[]:{};const d=l.filter((e=>"indexed"in e&&e.indexed));if(s.length>0)for(let e=0;e<d.length;e++){const t=d[e],r=s[e];if(!r)throw new H.Gy({abiItem:a,param:t});h[t.name||e]=xt({param:t,value:r})}const p=l.filter((e=>!("indexed"in e&&e.indexed)));if(p.length>0)if(t&&"0x"!==t)try{const e=(0,bt.r)(p,t);if(e)if(u)h=[...h,...e];else for(let t=0;t<p.length;t++)h[p[t].name]=e[t]}catch(e){if(i){if(e instanceof H.xB)throw new H.SM({abiItem:a,data:e.data,params:e.params,size:e.size});throw e}}else if(i)throw new H.SM({abiItem:a,data:"0x",params:p,size:0});return{eventName:c,args:Object.values(h).length>0?h:void 0}}function xt({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,bt.r)([e],t)||[])[0]}async function Ct(e,{filter:t}){const r="strict"in t&&t.strict;return(await t.request({method:"eth_getFilterChanges",params:[t.id]})).map((e=>{if("string"==typeof e)return e;try{const{eventName:n,args:i}="abi"in t&&t.abi?yt({abi:t.abi,data:e.data,topics:e.topics,strict:r}):{eventName:void 0,args:void 0};return u(e,{args:i,eventName:n})}catch(r){let n,i;if(r instanceof H.SM||r instanceof H.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,i=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return u(e,{args:i?[]:{},eventName:n})}})).filter(Boolean)}async function At(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:o,events:a,args:c,strict:l}={}){const h=l??!1,d=a??(o?[o]:void 0);let p,f=[];return d&&(f=[d.flatMap((e=>lt({abi:[e],eventName:e.name,args:c})))],o&&(f=f[0])),p=r?await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:"bigint"==typeof n?(0,s.eC)(n):n,toBlock:"bigint"==typeof i?(0,s.eC)(i):i}]}),p.map((e=>{try{const{eventName:t,args:r}=d?yt({abi:d,data:e.data,topics:e.topics,strict:h}):{eventName:void 0,args:void 0};return u(e,{args:r,eventName:t})}catch(t){let r,n;if(t instanceof H.SM||t instanceof H.Gy){if(h)return;r=t.abiItem.name,n=t.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return u(e,{args:n?[]:{},eventName:r})}})).filter(Boolean)}async function Et(e,{blockHash:t,blockNumber:r,blockTag:n,hash:i,index:o}){const a=n||"latest",l=void 0!==r?(0,s.eC)(r):void 0;let u=null;if(i?u=await e.request({method:"eth_getTransactionByHash",params:[i]}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,s.eC)(o)]}):(l||a)&&(u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||a,(0,s.eC)(o)]})),!u)throw new y.Bh({blockHash:t,blockNumber:r,blockTag:a,hash:i,index:o});return(e.chain?.formatters?.transaction?.format||c)(u)}async function _t(e,{hash:t}){const r=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!r)throw new y.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||d)(r)}async function It(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const Pt="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";async function Ot(e,{address:t,hash:r,signature:n,...i}){const o=(0,ce.v)(n)?n:(0,s.NC)(n);try{const{data:n}=await(0,ze.R)(e,{data:V({abi:Se.$o,args:[t,r,o],bytecode:Pt}),...i});return a=n??"0x0",c="0x1",function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}((0,ce.v)(a)?(0,v.O0)(a):a,(0,ce.v)(c)?(0,v.O0)(c):c)}catch(e){if(e instanceof Te.cg)return!1;throw e}var a,c}function kt({domain:e,message:t,primaryType:r,types:n}){const i=void 0===e?{}:e,o={EIP712Domain:["string"==typeof i?.name&&{name:"name",type:"string"},i?.version&&{name:"version",type:"string"},"number"==typeof i?.chainId&&{name:"chainId",type:"uint256"},i?.verifyingContract&&{name:"verifyingContract",type:"address"},i?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...n};pe({domain:i,message:t,primaryType:r,types:o});const s=["0x1901"];return i&&s.push(function({domain:e,types:t}){return St({data:e,primaryType:"EIP712Domain",types:t})}({domain:i,types:o})),"EIP712Domain"!==r&&s.push(St({data:t,primaryType:r,types:o})),(0,Re.w)((0,w.zo)(s))}function St({data:e,primaryType:t,types:r}){const n=Mt({data:e,primaryType:t,types:r});return(0,Re.w)(n)}function Mt({data:e,primaryType:t,types:r}){const n=[{type:"bytes32"}],i=[Nt({primaryType:t,types:r})];for(const o of r[t]){const[t,s]=jt({types:r,name:o.name,type:o.type,value:e[o.name]});n.push(t),i.push(s)}return(0,F.E)(n,i)}function Nt({primaryType:e,types:t}){const r=(0,s.NC)(function({primaryType:e,types:t}){let r="";const n=Tt({primaryType:e,types:t});n.delete(e);const i=[e,...Array.from(n).sort()];for(const e of i)r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`;return r}({primaryType:e,types:t}));return(0,Re.w)(r)}function Tt({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),i=n?.[0];if(r.has(i)||void 0===t[i])return r;r.add(i);for(const e of t[i])Tt({primaryType:e.type,types:t},r);return r}function jt({types:e,name:t,type:r,value:n}){if(void 0!==e[r])return[{type:"bytes32"},(0,Re.w)(Mt({data:n,primaryType:r,types:e}))];if("bytes"===r)return n="0x"+((n.length%2?"0":"")+n.slice(2)),[{type:"bytes32"},(0,Re.w)(n)];if("string"===r)return[{type:"bytes32"},(0,Re.w)((0,s.NC)(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),o=n.map((r=>jt({name:t,type:i,types:e,value:r})));return[{type:"bytes32"},(0,Re.w)((0,F.E)(o.map((([e])=>e)),o.map((([,e])=>e))))]}return[{type:r},n]}BigInt(0),BigInt(1),BigInt(2),Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const Rt=new Map,Lt=new Map;let $t=0;function Dt(e,t,r){const n=++$t,i=()=>Rt.get(e)||[],o=()=>{const t=Lt.get(e);1===i().length&&t&&t(),(()=>{const t=i();Rt.set(e,t.filter((e=>e.id!==n)))})()},s=i();if(Rt.set(e,[...s,{id:n,fns:t}]),s&&s.length>0)return o;const a={};for(const e in t)a[e]=(...t)=>{const r=i();0!==r.length&&r.forEach((r=>r.fns[e]?.(...t)))};const c=r(a);return"function"==typeof c&&Lt.set(e,c),o}function Bt(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let i=!0;const o=()=>i=!1;return(async()=>{let s;t&&(s=await e({unpoll:o}));const a=await(r?.(s))??n;await be(a);const c=async()=>{i&&(await e({unpoll:o}),await be(n),c())};c()})(),o}function Ut(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:s,pollingInterval:a=e.pollingInterval}){let c;return(void 0!==s?s:"webSocket"!==e.transport.type)?Dt((0,le.P)(["watchBlockNumber",e.uid,t,r,a]),{onBlockNumber:n,onError:i},(n=>Bt((async()=>{try{const t=await wt(e,{cacheTime:0});if(c){if(t===c)return;if(t-c>1&&r)for(let e=c+1n;e<t;e++)n.onBlockNumber(e,c),c=e}(!c||t>c)&&(n.onBlockNumber(t,c),c=t)}catch(e){n.onError?.(e)}}),{emitOnBegin:t,interval:a}))):(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:s}=await e.transport.subscribe({params:["newHeads"],onData(e){if(!t)return;const r=(0,o.y_)(e.result?.number);n(r,c),c=r},onError(e){i?.(e)}});r=s,t||r()}catch(e){i?.(e)}})(),r})()}function Wt(e){return{call:t=>(0,ze.R)(e,t),createBlockFilter:()=>async function(e){const t=nt(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}(e),createContractEventFilter:t=>ht(e,t),createEventFilter:t=>dt(e,t),createPendingTransactionFilter:()=>pt(e),estimateContractGas:t=>async function(e,{abi:t,address:r,args:n,functionName:i,...o}){const s=(0,fe.R)({abi:t,args:n,functionName:i});try{return await ee(e,{data:s,to:r,...o})}catch(e){const s=o.account?(0,L.T)(o.account):void 0;throw We(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:s?.address})}}(e,t),estimateGas:t=>ee(e,t),getBalance:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest"}){const i=r?(0,s.eC)(r):void 0,o=await e.request({method:"eth_getBalance",params:[t,i||n]});return BigInt(o)}(e,t),getBlock:t=>re(e,t),getBlockNumber:t=>wt(e,t),getBlockTransactionCount:t=>async function(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const i=void 0!==r?(0,s.eC)(r):void 0;let a;return a=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),(0,o.ly)(a)}(e,t),getBytecode:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest"}){const i=void 0!==r?(0,s.eC)(r):void 0,o=await e.request({method:"eth_getCode",params:[t,i||n]});if("0x"!==o)return o}(e,t),getChainId:()=>z(e),getEnsAddress:t=>async function(e,{blockNumber:t,blockTag:r,coinType:n,name:o,universalResolverAddress:a}){let c=a;if(!c){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=(0,i.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const i=(0,fe.R)({abi:Se.X$,functionName:"addr",...null!=n?{args:[$e(o),BigInt(n)]}:{args:[$e(o)]}}),a=await He(e,{address:c,abi:Se.k3,functionName:"resolve",args:[(0,s.NC)(Be(o)),i],blockNumber:t,blockTag:r});if("0x"===a[0])return null;const l=(0,b.f)((0,Me.k)({abi:Se.X$,args:null!=n?[$e(o),BigInt(n)]:void 0,functionName:"addr",data:a[0]}));return"0x"===l||"0x00"===(0,b.f)(l)?null:l}catch(e){if(je(e,"resolve"))return null;throw e}}(e,t),getEnsAvatar:t=>async function(e,{blockNumber:t,blockTag:r,gatewayUrls:n,name:i,universalResolverAddress:o}){const s=await rt(e,{blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:o});if(!s)return null;try{return await async function(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?async function(e,{gatewayUrls:t,record:r}){const n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=t.split("/"),[o,s]=r.split(":"),[a,c]=n.split(":");if(!o||"eip155"!==o.toLowerCase())throw new qe({reason:"Only EIP-155 supported"});if(!s)throw new qe({reason:"Chain ID not found"});if(!c)throw new qe({reason:"Contract address not found"});if(!i)throw new qe({reason:"Token ID not found"});if(!a)throw new qe({reason:"ERC namespace not found"});return{chainID:parseInt(s),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}(r),i=await async function(e,{nft:t}){if("erc721"===t.namespace)return He(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return He(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new Ge({namespace:t.namespace})}(e,{nft:n}),{uri:o,isOnChain:s,isEncoded:a}=Xe({uri:i,gatewayUrls:t});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const e=a?atob(o.replace("data:application/json;base64,","")):o;return tt({uri:et(JSON.parse(e)),gatewayUrls:t})}let c=n.tokenID;return"erc1155"===n.namespace&&(c=c.replace("0x","").padStart(64,"0")),async function({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then((e=>e.json()));return await tt({gatewayUrls:e,uri:et(r)})}catch{throw new Ve({uri:t})}}({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,c)})}(e,{gatewayUrls:t,record:r}):tt({uri:r,gatewayUrls:t})}(e,{record:s,gatewayUrls:n})}catch{return null}}(e,t),getEnsName:t=>async function(e,{address:t,blockNumber:r,blockTag:n,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,i.LI)({blockNumber:r,chain:e.chain,contract:"ensUniversalResolver"})}const c=`${t.toLowerCase().substring(2)}.addr.reverse`;try{return(await He(e,{address:a,abi:Se.du,functionName:"reverse",args:[(0,s.NC)(Be(c))],blockNumber:r,blockTag:n}))[0]}catch(e){if(je(e,"reverse"))return null;throw e}}(e,t),getEnsResolver:t=>async function(e,{blockNumber:t,blockTag:r,name:n,universalResolverAddress:o}){let a=o;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=(0,i.LI)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[c]=await He(e,{address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,s.NC)(Be(n))],blockNumber:t,blockTag:r});return c}(e,t),getEnsText:t=>rt(e,t),getFeeHistory:t=>async function(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const o=r?(0,s.eC)(r):void 0;return{baseFeePerGas:(a=await e.request({method:"eth_feeHistory",params:[(0,s.eC)(t),o||n,i]})).baseFeePerGas.map((e=>BigInt(e))),gasUsedRatio:a.gasUsedRatio,oldestBlock:BigInt(a.oldestBlock),reward:a.reward?.map((e=>e.map((e=>BigInt(e)))))};var a}(e,t),getFilterChanges:e=>Ct(0,e),getFilterLogs:e=>async function(e,{filter:t}){const r=t.strict??!1;return(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map((e=>{try{const{eventName:n,args:i}="abi"in t&&t.abi?yt({abi:t.abi,data:e.data,topics:e.topics,strict:r}):{eventName:void 0,args:void 0};return u(e,{args:i,eventName:n})}catch(r){let n,i;if(r instanceof H.SM||r instanceof H.Gy){if("strict"in t&&t.strict)return;n=r.abiItem.name,i=r.abiItem.inputs?.some((e=>!("name"in e&&e.name)))}return u(e,{args:i?[]:{},eventName:n})}})).filter(Boolean)}(0,e),getGasPrice:()=>ne(e),getLogs:t=>At(e,t),getStorageAt:t=>async function(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){const o=void 0!==r?(0,s.eC)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,o||n]})}(e,t),getTransaction:t=>Et(e,t),getTransactionConfirmations:t=>async function(e,{hash:t,transactionReceipt:r}){const[n,i]=await Promise.all([wt(e),t?Et(e,{hash:t}):void 0]),o=r?.blockNumber||i?.blockNumber;return o?n-o+1n:0n}(e,t),getTransactionCount:t=>ie(e,t),getTransactionReceipt:t=>_t(e,t),multicall:t=>async function(e,t){const{allowFailure:r=!0,batchSize:n,blockNumber:o,blockTag:s,contracts:a,multicallAddress:c}=t,l=n??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),u=a;let h=c;if(!h){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");h=(0,i.LI)({blockNumber:o,chain:e.chain,contract:"multicall3"})}const d=[[]];let p=0,f=0;for(let e=0;e<u.length;e++){const{abi:t,address:n,args:i,functionName:o}=u[e];try{const e=(0,fe.R)({abi:t,args:i,functionName:o});f+=e.length,l>0&&f>l&&(p++,f=(e.length-2)/2,d[p]=[]),d[p]=[...d[p],{allowFailure:!0,callData:e,target:n}]}catch(e){const s=We(e,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:o});if(!r)throw s;d[p]=[...d[p],{allowFailure:!0,callData:"0x",target:n}]}}return(await Promise.all(d.map((t=>He(e,{abi:Se.F8,address:h,args:[t],blockNumber:o,blockTag:s,functionName:"aggregate3"}))))).flat().map((({returnData:e,success:t},n)=>{const i=d.flat(),{callData:o}=i[n],{abi:s,address:a,functionName:c,args:l}=u[n];try{if("0x"===o)throw new H.wb;if(!t)throw new Te.VQ({data:e});const n=(0,Me.k)({abi:s,args:l,data:e,functionName:c});return r?{result:n,status:"success"}:n}catch(e){const t=We(e,{abi:s,address:a,args:l,docsPath:"/docs/contract/multicall",functionName:c});if(!r)throw t;return{error:t,result:void 0,status:"failure"}}}))}(e,t),readContract:t=>He(e,t),simulateContract:t=>async function(e,{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}){const a=s.account?(0,L.T)(s.account):void 0,c=(0,fe.R)({abi:t,args:n,functionName:o});try{const{data:a}=await(0,ze.R)(e,{batch:!1,data:`${c}${i?i.replace("0x",""):""}`,to:r,...s});return{result:(0,Me.k)({abi:t,args:n,functionName:o,data:a||"0x"}),request:{abi:t,address:r,args:n,dataSuffix:i,functionName:o,...s}}}catch(e){throw We(e,{abi:t,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:o,sender:a?.address})}}(e,t),verifyMessage:t=>async function(e,{address:t,message:r,signature:n,...i}){const o=function(e,t){const r="string"==typeof e?(0,v.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,v.O0)(e.raw),n=(0,v.qX)(`Ethereum Signed Message:\n${r.length}`);return(0,Re.w)((0,w.zo)([n,r]),void 0)}(r);return Ot(e,{address:t,hash:o,signature:n,...i})}(e,t),verifyTypedData:t=>async function(e,{address:t,signature:r,message:n,primaryType:i,types:o,domain:s,...a}){return Ot(e,{address:t,hash:kt({message:n,primaryType:i,types:o,domain:s}),signature:r,...a})}(e,t),uninstallFilter:e=>It(0,e),waitForTransactionReceipt:t=>async function(e,{confirmations:t=1,hash:r,onReplaced:n,pollingInterval:i=e.pollingInterval,timeout:o}){const s=(0,le.P)(["waitForTransactionReceipt",e.uid,r]);let a,c,l,u=!1;return new Promise(((h,d)=>{o&&setTimeout((()=>d(new y.mc({hash:r}))),o);const p=Dt(s,{onReplaced:n,resolve:h,reject:d},(n=>{const o=Ut(e,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(i){if(u)return;let s=i;const h=e=>{o(),e(),p()};try{if(l){if(s-l.blockNumber+1n<t)return;return void h((()=>n.resolve(l)))}if(a||(u=!0,await ve((async()=>{a=await Et(e,{hash:r}),a.blockNumber&&(s=a.blockNumber)}),{delay:({count:e})=>200*~~(1<<e),retryCount:6}),u=!1),l=await _t(e,{hash:r}),t>0&&s-l.blockNumber+1n<t)return;h((()=>n.resolve(l)))}catch(r){if(a&&(r instanceof y.Bh||r instanceof y.Yb)){c=a;const r=(await re(e,{blockNumber:s,includeTransactions:!0})).transactions.find((({from:e,nonce:t})=>e===c.from&&t===c.nonce));if(!r)return;if(l=await _t(e,{hash:r.hash}),s-l.blockNumber+1n<t)return;let i="replaced";r.to===c.to&&r.value===c.value?i="repriced":r.from===r.to&&0n===r.value&&(i="cancelled"),h((()=>{n.onReplaced?.({reason:i,replacedTransaction:c,transaction:r,transactionReceipt:l}),n.resolve(l)}))}else h((()=>n.reject(r)))}}})}))}))}(e,t),watchBlocks:t=>function(e,{blockTag:t="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:o,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){const u=void 0!==a?a:"webSocket"!==e.transport.type,h=s??!1;let d;return u?Dt((0,le.P)(["watchBlocks",e.uid,r,n,h,c]),{onBlock:i,onError:o},(i=>Bt((async()=>{try{const n=await re(e,{blockTag:t,includeTransactions:h});if(n.number&&d?.number){if(n.number===d.number)return;if(n.number-d.number>1&&r)for(let t=d?.number+1n;t<n.number;t++){const r=await re(e,{blockNumber:t,includeTransactions:h});i.onBlock(r,d),d=r}}(!d?.number||"pending"===t&&!n?.number||n.number&&n.number>d.number)&&(i.onBlock(n,d),d=n)}catch(e){i.onError?.(e)}}),{emitOnBegin:n,interval:c}))):(()=>{let t=!0,r=()=>t=!1;return(async()=>{try{const{unsubscribe:n}=await e.transport.subscribe({params:["newHeads"],onData(r){if(!t)return;const n=(e.chain?.formatters?.block?.format||l)(r.result);i(n,d),d=n},onError(e){o?.(e)}});r=n,t||r()}catch(e){o?.(e)}})(),r})()}(e,t),watchBlockNumber:t=>Ut(e,t),watchContractEvent:t=>function(e,{abi:t,address:r,args:n,batch:i=!0,eventName:o,onError:s,onLogs:a,pollingInterval:c=e.pollingInterval,strict:l}){const u=(0,le.P)(["watchContractEvent",r,n,i,e.uid,o,c]),h=l??!1;return Dt(u,{onLogs:a,onError:s},(s=>{let a,l,u=!1;const d=Bt((async()=>{if(u)try{let c;if(l)c=await Ct(0,{filter:l});else{const i=await wt(e);c=a&&a!==i?await At(e,{address:r,args:n,fromBlock:a+1n,toBlock:i,event:(0,ct.m)({abi:t,name:o})}):[],a=i}if(0===c.length)return;i?s.onLogs(c):c.forEach((e=>s.onLogs([e])))}catch(e){l&&e instanceof R.yR&&(u=!1),s.onError?.(e)}else{try{l=await ht(e,{abi:t,address:r,args:n,eventName:o,strict:h})}catch{}u=!0}}),{emitOnBegin:!0,interval:c});return async()=>{l&&await It(0,{filter:l}),d()}}))}(e,t),watchEvent:t=>function(e,{address:t,args:r,batch:n=!0,event:i,events:o,onError:s,onLogs:a,pollingInterval:c=e.pollingInterval,strict:l}){const u=(0,le.P)(["watchEvent",t,r,n,e.uid,i,c]),h=l??!1;return Dt(u,{onLogs:a,onError:s},(s=>{let a,l,u=!1;const d=Bt((async()=>{if(u)try{let c;if(l)c=await Ct(0,{filter:l});else{const n=await wt(e);c=a&&a!==n?await At(e,{address:t,args:r,event:i,events:o,fromBlock:a+1n,toBlock:n}):[],a=n}if(0===c.length)return;n?s.onLogs(c):c.forEach((e=>s.onLogs([e])))}catch(e){l&&e instanceof R.yR&&(u=!1),s.onError?.(e)}else{try{l=await dt(e,{address:t,args:r,event:i,events:o,strict:h})}catch{}u=!0}}),{emitOnBegin:!0,interval:c});return async()=>{l&&await It(0,{filter:l}),d()}}))}(e,t),watchPendingTransactions:t=>function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:o=e.pollingInterval}){return(void 0!==i?i:"webSocket"!==e.transport.type)?Dt((0,le.P)(["watchPendingTransactions",e.uid,t,o]),{onTransactions:n,onError:r},(r=>{let n;const i=Bt((async()=>{try{if(!n)try{return void(n=await pt(e))}catch(e){throw i(),e}const o=await Ct(0,{filter:n});if(0===o.length)return;t?r.onTransactions(o):o.forEach((e=>r.onTransactions([e])))}catch(e){r.onError?.(e)}}),{emitOnBegin:!0,interval:o});return async()=>{n&&await It(0,{filter:n}),i()}})):(()=>{let t=!0,i=()=>t=!1;return(async()=>{try{const{unsubscribe:o}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!t)return;const r=e.result;n([r])},onError(e){r?.(e)}});i=o,t||i()}catch(e){r?.(e)}})(),i})()}(e,t)}}function zt(e){const{key:t="public",name:r="Public Client"}=e;return W({...e,key:t,name:r,type:"publicClient"}).extend(Wt)}function Ht(e,t={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,retryCount:o,retryDelay:s}=t;return({chain:t,pollingInterval:a=4e3,timeout:c})=>{let l=e,u=()=>{};const h=Ce({key:r,name:n,async request({method:e,params:r}){const n=async(i=0)=>{const o=l[i]({chain:t,retryCount:0,timeout:c});try{const t=await o.request({method:e,params:r});return u({method:e,params:r,response:t,transport:o,status:"success"}),t}catch(t){if(u({error:t,method:e,params:r,transport:o,status:"error"}),ye(t))throw t;if(i===l.length-1)throw t;return n(i+1)}};return n()},retryCount:o,retryDelay:s,type:"fallback"},{onResponse:e=>u=e,transports:l.map((e=>e({chain:t,retryCount:0})))});if(i){const e="object"==typeof i?i:{};!function({chain:e,interval:t=4e3,onTransports:r,sampleCount:n=10,timeout:i=1e3,transports:o,weights:s={}}){const{stability:a=.7,latency:c=.3}=s,l=[],u=async()=>{const s=await Promise.all(o.map((async t=>{const r=t({chain:e,retryCount:0,timeout:i}),n=Date.now();let o,s;try{await r.request({method:"net_listening"}),s=1}catch{s=0}finally{o=Date.now()}return{latency:o-n,success:s}})));l.push(s),l.length>n&&l.shift();const h=Math.max(...l.map((e=>Math.max(...e.map((({latency:e})=>e)))))),d=o.map(((e,t)=>{const r=l.map((e=>e[t].latency)),n=1-r.reduce(((e,t)=>e+t),0)/r.length/h,i=l.map((e=>e[t].success)),o=i.reduce(((e,t)=>e+t),0)/i.length;return 0===o?[0,t]:[c*n+a*o,t]})).sort(((e,t)=>t[0]-e[0]));r(d.map((([,e])=>o[e]))),await be(t),u()};u()}({chain:t,interval:e.interval??a,onTransports:e=>l=e,sampleCount:e.sampleCount,timeout:e.timeout,transports:l,weights:e.weights})}return h}}class Ft extends m.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var qt=r(8583);function Vt(e,{errorInstance:t,timeout:r,signal:n}){return new Promise(((i,o)=>{(async()=>{let s;try{const a=new AbortController;r>0&&(s=setTimeout((()=>{n?a.abort():o(t)}),r)),i(await e({signal:a?.signal}))}catch(e){"AbortError"===e.name&&o(t),o(e)}finally{clearTimeout(s)}})()}))}let Gt=0;const Kt=new Map;async function Zt(e){const t=new URL(e),n=t.toString();let i=Kt.get(n);if(i)return i;const{schedule:o}=(0,qt.S)({id:n,fn:async()=>{let e=await Promise.resolve().then(r.bind(r,6792));e=e.default?.constructor?e.default:e.WebSocket;const o=new e(t),s=new Map,a=new Map,c=({data:e})=>{const t=JSON.parse(e),r="eth_subscription"===t.method,n=r?t.params.subscription:t.id,i=r?a:s,o=i.get(n);o&&o({data:e}),r||i.delete(n)},l=()=>{Kt.delete(n),o.removeEventListener("close",l),o.removeEventListener("message",c)};return o.addEventListener("close",l),o.addEventListener("message",c),o.readyState===e.CONNECTING&&await new Promise(((e,t)=>{o&&(o.onopen=e,o.onerror=t)})),i=Object.assign(o,{requests:s,subscriptions:a}),Kt.set(n,i),[i]}}),[s,[a]]=await o();return a}const Qt={http:async function(e,{body:t,fetchOptions:r={},timeout:n=1e4}){const{headers:i,method:o,signal:s}=r;try{const a=await Vt((async({signal:a})=>await fetch(e,{...r,body:Array.isArray(t)?(0,le.P)(t.map((e=>({jsonrpc:"2.0",id:Gt++,...e})))):(0,le.P)({jsonrpc:"2.0",id:Gt++,...t}),headers:{...i,"Content-Type":"application/json"},method:o||"POST",signal:s||(n>0?a:void 0)})),{errorInstance:new we.W5({body:t,url:e}),timeout:n,signal:!0});let c;if(c=a.headers.get("Content-Type")?.startsWith("application/json")?await a.json():await a.text(),!a.ok)throw new we.Gg({body:t,details:(0,le.P)(c.error)||a.statusText,headers:a.headers,status:a.status,url:e});return c}catch(r){if(r instanceof we.Gg)throw r;if(r instanceof we.W5)throw r;throw new we.Gg({body:t,details:r.message,url:e})}},webSocket:function(e,{body:t,onResponse:r}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new we.c9({body:t,url:e.url,details:"Socket is closed."});const n=Gt++,i=({data:o})=>{const s=JSON.parse(o);"number"==typeof s.id&&n!==s.id||(r?.(s),"eth_subscribe"===t.method&&"string"==typeof s.result&&e.subscriptions.set(s.result,i),"eth_unsubscribe"===t.method&&e.subscriptions.delete(t.params?.[0]))};return e.requests.set(n,i),e.send(JSON.stringify({jsonrpc:"2.0",...t,id:n})),e},webSocketAsync:async function(e,{body:t,timeout:r=1e4}){return Vt((()=>new Promise((r=>Qt.webSocket(e,{body:t,onResponse:r})))),{errorInstance:new we.W5({body:t,url:e.url}),timeout:r})}};var Yt=r(8617);function Jt(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;const i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(n=r.getItem(e))?n:null;return o instanceof Promise?o.then(i):i(o)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}const Xt=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then:e=>Xt(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>Xt(t)(e)}}},er=e=>{let t;const r=new Set,n=(e,n)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=n?n:"object"!=typeof i)?i:Object.assign({},t,i),r.forEach((r=>r(t,e)))}},i=()=>t,o={setState:n,getState:i,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,i,o),o};var tr=r(263);function rr(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(const[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(const r of e)if(!t.has(r))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function nr(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e<n;e++)o.push(i+=r());let s=r(),a=t;t+=s;let c=0,l=0;function u(){return 0==c&&(l=l<<8|e[t++],c=8),l>>--c&1}const h=2**31,d=h>>>1,p=h-1;let f=0;for(let e=0;e<31;e++)f=f<<1|u();let m=[],g=0,w=h;for(;;){let e=Math.floor(((f-g+1)*i-1)/w),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;m.push(t);let s=g+Math.floor(w*o[t]/i),a=g+Math.floor(w*o[t+1]/i)-1;for(;0==((s^a)&d);)f=f<<1&p|u(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&536870912;)f=f&d|f<<1&p>>>1|u(),s=s<<1^d,a=(a^d)<<1|d|1;g=s,w=1+a-s}let b=n-4;return m.map((t=>{switch(t-b){case 3:return b+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return b+256+(e[a++]<<8|e[a++]);case 1:return b+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,a=0;i<r;i++)a=a<<6|t[e.charCodeAt(i)],s+=6,s>=8&&(n[o++]=a>>(s-=8));return n}(e)))}function ir(e){return 1&e?~e>>1:e>>1}function or(e,t){let r=Array(e);for(let n=0,i=0;n<e;n++)r[n]=i+=ir(t());return r}function sr(e,t=0){let r=[];for(;;){let n=e(),i=e();if(!i)break;t+=n;for(let e=0;e<i;e++)r.push(t+e);t+=i+1}return r}function ar(e){return lr((()=>{let t=sr(e);if(t.length)return t}))}function cr(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(hr(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(dr(r,e))}return t.flat()}function lr(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function ur(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;i<t;i++)or(e,r).forEach(((e,t)=>n[t].push(e)));return n}function hr(e,t){let r=1+t(),n=t(),i=lr(t);return ur(i.length,1+e,t).flatMap(((e,t)=>{let[o,...s]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))}))}function dr(e,t){return ur(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}var pr=nr("AEgSbwjEDVYByQKaAQsBOQDpATQAngDUAHsAoABoANQAagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXAA0ADgAWAA8AFAAVBFsF1QEXE0o3xAXUALIArkABaACmAgPGAK6AMDAwMAE/qAYK7P4HQAblMgVYBVkAPSw5Afa3EgfJwgAPA8meNALGCjACjqIChtk/j2+KAsXMAoPzASDgCgDyrgFCAi6OCkCQAOQA4woWABjVuskNDD6eBBx4AP4COhi+D+wKBirqBgSCaA0cBy4ArABqku+mnIAAXAaUJAbqABwAPAyUFvyp/Mo8INAIvCoDshQ8APcubKQAon4ZABgEJtgXAR4AuhnOBPsKIE04CZgJiR8cVlpM5INDABQADQAWAA9sVQAiAA8ASO8W2T30OVnKluYvChEeX05ZPe0AFAANABYAD2wgXUCYAMPsABwAOgzGFryp/AHauQVcBeMC0KACxLEKTR2kZhR0Gm5M9gC8DmgC4gAMLjSKF8qSAoF8ARMcAL4OaALiAAwuAUlQJpJMCwMt/AUpCthqGK4B2EQAciwSeAIyFiIDKCi6OGwAOuIB9iYAyA7MtgEcZIIAsgYABgCK1EoFHNZsGACoKNIBogAAAAAAKy4DnABoAQoaPu43dQQZGACrAcgCIgDgLBJ0OvRQsTOiKDVJBfsoBVoFWbC5BWo7XkITO1hCmHuUZmCh+QwUA8YIJvJ4JASkTAJUVAJ2HKwoAZCkpjZcA0YYBIRiCgDSBqxAMCQHKgI6XgBsAWIgcgCEHhoAlgFKuAAoahgBsMYDOC4iRFQBcFoGZgJmAPJKGAMqAgYASkIArABeAHQALLYGCPTwGo6AAAAKIgAqALQcSAHSAdwIDDKXeYHpAAsAEgA1AD4AOTR3etTBEGAQXQJNCkxtOxUMAq0PpwvmERYM0irM09kANKoH7ANUB+wDVANUB+wH7ANUB+wDVANUA1QDVBwL8BvUwRBgD0kEbgWPBYwE1wiEJkoRggcpCNNUDnQfHEgDRgD9IyZJHTuUMwwlQ0wNTQQH/TZDbKh9OQNIMaxU9pCjA8wyUDltAh5yEqEAKw90HTW2Tn96SHGhCkxPr7WASWNOaAK/Oqk/+QoiCZRvvHdPBj4QGCeiEPQMMAGyATgN6kvVBO4GOATGH3oZFg/KlZkIoi3aDOom4C6egFcj8iqABepL8TzaC0pRZQ9WC2IJ4DpggUsDHgEKIogK2g02CGoQ8ArGaA3iEUIHNgPSSZcAogb+Cw4dMhWyJg1iqQsGOXQG+BrzC4wmrBMmevkF0BoeBkoBJhr8AMwu5IWtWi5cGU9cBgALIiPEFKVQHQ0iQLR4RRoYBxIlpgKOQ21KhFEzHpAh8zw6DWMuEFF5B/I8AhlMC348m0aoRQsRzz6KPUUiRkwpBDJ8LCwniAnMD4IMtnxvAVYJHgmuDG4TLhEUN8IINgcWKpchJxIIHkaSYJcE9JwD8BPOAwgFPAk+BxADshwqEysVJgUKgSHUAvA20i6wAoxWfQEUBcgPIh/cEE1H3Q7mCJgCYgOAJegAKhUeABQimAhAYABcj9VTAi7ICMRqaSNxA2QU5F4RcAeODlQHpBwwFbwc3nDFXgiGBSigrAlYAXIJlgFcBOAIBjVYjJ0gPmdQi1UYmCBeQTxd+QIuDGIVnES6h3UCiA9oEhgBMgFwBzYM/gJ0EeoRaBCSCOiGATWyM/U6IgRMIYAgDgokA0xsywskJvYM9WYBoBJfAwk0OnfrZ6hgsyEX+gcWMsJBXSHuC49PygyZGr4YP1QrGeEHvAPwGvAn50FUBfwDoAAQOkoz6wS6C2YIiAk8AEYOoBQH1BhnCm6MzQEuiAG0lgNUjoACbIwGNAcIAGQIhAV24gAaAqQIoAACAMwDVAA2AqoHmgAWAII+AToDJCwBHuICjAOQCC7IAZIsAfAmBBjADBIA9DRuRwLDrgKAZ2afBdpVAosCRjIBSiIEAktETgOsbt4A2ABIBhDcRAESqEfIF+BAAdxsKADEAPgAAjIHAj4BygHwagC0AVwLLgmfsLIBSuYmAIAAEmgB1AKGANoAMgB87gFQAEoFVvYF0AJMRgEOLhUoVF4BuAMcATABCgB2BsiKosYEHARqB9ACEBgV3gLvKweyAyLcE8pCwgK921IAMhMKNQqkCqNgWF0wAy5vPU0ACx+lPsQ/SwVOO1A7VTtQO1U7UDtVO1A7VTtQO1UDlLzfvN8KaV9CYegMow3RRMU6RhPYYE5gLxPFLbQUvhXLJVMZOhq5JwIl4VUGDwEt0GYtCCk0che5ADwpZYM+Y4MeLQpIHORTjlT1LRgArkufM6wNqRsSRD0FRHXqYicWCwofAmR+AmI/WEqsWDcdAqH0AmiVAmYGAp+BOBgIAmY4AmYjBGsEfAN/EAN+jzkDOXQUOX86ICACbBoCMjM4BwJtxAJtq+yHMGRCKAFkANsA3gBHAgeVDIoA+wi/AAqyAncsAnafPAJ5SEACeLcaWdhFq0bwAnw8AnrFAn0GAnztR/1IemAhACgSSVVKWBIUSskC0P4C0MlLJAOITAOH40TCkS8C8p5dAAMDq0vLTCoiAMxNSU2sAos8AorVvhgEGkBkArQCjjQCjlk9lH4CjtYCjll1UbFTMgdS0VSCApP4ApMJAOYAGVUbVaxVzQMsGCmSgzLeeGNFODYCl5wC769YHqUAViIClowClnmZAKZZqVoGfkoAOAKWsgKWS1xBXM4CmcgCmWFcx10EFgKcmDm/OpoCnBMCn5gCnrWHABoMLicMAp3uAp6PALI6YTFh7AKe0AKgawGmAp6cHAKeS6JjxWQkIigCJ6wCJnsCoPgCoEnUAqYsAqXLAqf8AHoCp+9oeWiuAABGahlqzgKs4AKsqwKtZAKs/wJXGgJV2QKx3tQDH0tslAKyugoCsuUUbN1tYG1FXAMlygK2WTg8bo0DKUICuFsCuUQSArkndHAzcN4CvRYDLa8DMg4CvoVx/wMzbgK+F3Mfc0wCw8gCwwFzf3RIMkJ03QM8pAM8lwM9vALFeQLGRALGDYYCyGZOAshBAslMAskrAmSaAt3PeHZeeKt5IkvNAxigZv8CYfEZ8JUhewhej164DgLPaALPaSxIUM/wEJwAw6oCz3ABJucDTg9+SAIC3CQC24cC0kwDUlkDU1wA/gNViYCGPMgT6l1CcoLLg4oC2sQC2duEDYRGpzkDhqIALANkC4ZuVvYAUgLfYgLetXB0AuIs7REB8y0kAfSYAfLPhALr8ALpbXYC6vYC6uEA9kQBtgLuhgLrmZanlwAC7jwDhd2YdnDdcZ4C8wAAZgOOE5mQAvcQA5FrA5KEAveVAvnWAvhjmhmaqLg0mxsDnYAC/vcBGAA2nxmfsAMFigOmZwOm1gDOwgMGZ6GFogIGAwxGAQwBHAdqBl62ZAIAuARovA6IHrAKABRyNgAgAzASSgOGfAFgJB4AjOwAHgDmoAScjgi0BhygwgCoBRK86h4+PxZ5BWk4P0EsQiJCtV9yEl+9AJbGBTMAkE0am7o7J2AzErrQDjAYxxiKyfcFWAVZBVgFWQVkBVkFWAVZBVgFWQVYBVkFWAVZRxYI2IZoAwMDCmVe6iwEygOyBjC8vAC8BKi8AOhBKhazBUc+aj5xQkBCt192OF/pAFgSM6wAjP/MbMv9puhGez4nJAUsFyg3Nn5u32vB8hnDLGoBbNdvMRgFYAVrycLJuQjQSlwBAQEKfV5+jL8AND+CAAQW0gbmriQGAIzEDAMCDgDlZh4+JSBLQrJCvUI5JF8oYDcoOSQJwj4KRT9EPnk+gj5xPnICikK9SkM8X8xPUGtOCy1sVTBrDG8gX+E0OxwJaJwKYyQsPR4nQqxCvSzMAsv9X8oPIC8KCQoAACN+nt9rOy5LGMmsya0JZsLMzQphQWAP5hCkEgCTjh5GQiYbqm06zjkKND9EPnFCQBwICx5NSG1cLS5a4rwTCn7uHixCQBxeCUsKDzRVREM4BTtEnC0KghwuQkAb9glUIyQZMTIBBo9i8F8KcmTKYAxgLiRvAERgGjoDHB9gtAcDbBFmT2BOEgIAZOhgFmCWYH5gtGBMYJJpFhgGtg/cVqq8WwtDF6wBvCzOwgMgFgEdBB8BegJtMDGWU4EBiwq5SBsA5SR0jwvLDqdN6wGcAoidUAVBYAD4AD4LATUXWHsMpg0lILuwSABQDTUAFhO4NVUC0wxLZhEcANlPBnYECx9bADIAtwKbKAsWcKwzOaAaAVwBhwn9A9ruEAarBksGugAey1aqWwq7YhOKCy1ADrwBvAEjA0hbKSkpIR8gIi0TJwciDY4AVQJvWJFKlgJvIA9ySAHUdRDPUiEaqrFN6wcSBU1gAPgAPgsBewAHJW0LiAymOTEuyLBXDgwAYL0MAGRKaFAiIhzAADIAtwKbKC08D88CkRh8ULxYyXRzjtilnA72mhU+G+0S2hIHDxwByAk7EJQGESwNNwwAPAC0zwEDAKUA4gCbizAAFQBcG8cvbXcrDsIRAzwlRNTiHR8MG34CfATCC6vxbQA4Oi4Opzkuz6IdB7wKABA7Ls8SGgB9rNsdD7wbSBzOoncfAT4qYB0C7KAJBE3z5R9mDL0M+wg9Cj8ABcELPgJMDbwIvQ09CT0KvS7PoisOvAaYAhwPjBriBBwLvBY8AKELPBC8BRihe90AO2wMPQACpwm9BRzR9QYFB2/LBnwAB7wSXBISvQECAOsCAAB1FVwHFswV/HAXvBg8AC68AuyovAAevAJWISuAAAG8AALkFT0VvCvso7zJqDwEAp8nTAACXADn3hm8CaVcD7/FAPUafAiiBQv/cQDfvKe8GNwavKOMeXMG/KmchAASvAcbDAADlABtvAcAC7ynPAIaPLsIopzLDvwHwak8AOF8L7dtvwNJAAPsABW8AAb8AAm8AGmMABq8AA68Axi8jmoV/AABXAAObAAuTB8ABrwAF7wIIgANSwC6vCcAA7wADpwq7ACyWwAcHAAbvAAB7AqiAAXHCxYV3AAHnABCvAEDAGm8AAt8AB28AAi8CaIABcsAbqAZ1gCSCCIABcsAATwAB9wAHZwIIgAGmwAJfAAbLABtHADmvIEACFwACDwAFLwAaPwJIgAGywDjjAAJPAuiDsX7YAAHPABunUBJAEgACrwFAAM8AAmuAzgABxwAGXwAAgym/AAKHAAKPAAJ/KfsBrwACRwAAwwAEDwBABQ8ABFsAA+MAA3sAA28ABkMBxYcABU8AG6cFrQBvAC7ABM8BABpLAsA4UwAAjwABFMAF3wFHAAG0QAYvB8BfClTADpGALAJBw4McwApK3EBpQYIXwJtJA0ACghwTG1gK4oggRVjLjcDogq1AALZABcC/ARvAXdzSFMVIgNQAhY/AS0GBHRHvnxTe0EAKgAyAvwAVAvcAHyRLQEsAHfmDhIzRwJLAFgGAAJRAQiLzQB5PAQhpgBbANcWAJZpOCCMAM5ssgDQ1RcJw3Z0HBlXHgrSAYmRrCNUVE5JEz3DivoAgB04QSos4RKYUABzASosMSlDGhADMVYE+MbvAExm3QBrAnICQBF7Osh4LzXWBhETIAUVCK6v/xPNACYAAQIbAIYAiQCONgDjALQA1QCdPQC7AKsApgChAOcAnwDTAJwA4AEBAPwAwAB6AFsAywDNAPwA1wDrAIkAogEqAOMA2ADVBAIIKzTT09PTtb/bzM/NQjEWAUsBVS5GAVMBYgFhAVQBRUpCRGcMAUwUBgkEMzcMBwAgDSQmKCs3OTk8PDw9Pg0/HVBQUFBSUlFSKFNUVlVVHFxgYF9hYCNlZ29ucXFxcXFxc3Nzc3Nzc3Nzc3N1dXZ1dFsAPesAQgCTAHEAKwBf8QCHAFAAUAAwAm/oAIT+8fEAXQCM6wCYAEgAWwBd+PipAH4AfgBiAE8AqgAdAK8AfAI5AjwA9QDgAPcA9wDhAPgA4gDiAOEA3wAoAnQBSgE5ATcBTQE3ATcBNwEyATEBMQExARUBURAAKgkBAEwYCxcEFhcPAIcAjwCfAEoAYxkCKgBvAGgAkAMOAyArAxpCP0gqAIoCSADAAlACnQC5Ao8CjwKPAo8CjwKPAoQCjwKPAo8CjwKPAo8CjgKOApECmQKQAo8CjwKNAo0CjQKNAosCjgJuAc0CkAKYAo8CjwKOF3oMAPcGA5gCWgIzGAFNETYC2xILLBQBRzgUTpIBdKU9AWJaAP4DOkgA/wCSKh4ZkGsAKmEAagAvAIoDlcyM8K+FWwa7LA/DEgKe1nUrCwQkWwGzAN5/gYB/gX+Cg4N/hIeFf4aJh4GIg4mDin+Lf4x/jYuOf49/kIORf5J/k3+Uf5WElomXg5h/AIMloQCEBDwEOQQ7BD4EPARCBD8EOgRABEIEQQQ9BD8EQgCkA4gAylIA0AINAPdbAPcBGgD3APUA9QD2APXVhSRmvwD3APUA9QD2APUdAIpbAPcAigEaAPcAigLtAPcAitWFJGa/HQD4WwEaAPcA9wD1APUA9gD1APgA9QD1APYA9dWFJGa/HQCKWwEaAPcAigD3AIoC7QD3AIrVhSRmvx0CRAE3AksBOgJMwgOfAu0Dn9WFJGa/HQCKWwEaA58AigOfAIoC7QOfAIrVhSRmvx0EMQCKBDIAigeOMm4hLQCKAT9vBCQA/gDHWwMAVVv/FDMDAIoDPtkASgMAigMAl2dBtv/TrfLzakaPh3aztmIuZQrR3ER2n5Yo+qNR2jK/aP/V04UK1njIJXLgkab9PjOxyJDVbIN3R/FZLoZVl2kYFQIZ7V6LpRqGDt9OdDohnJKp5yX/HLj0voPpLrneDaN11t5W3sSM4ALscgSw8fyWLVkKa/cNcQmjYOgTLZUgOLi2F05g4TR0RfgZ4PBdntxdV3qvdxQt8DeaMMgjJMgwUxYN3tUNpUNx21AvwADDAIa0+raTWaoBXmShAl5AThpMi282o+WzOKMlxjHj7a+DI6AM6VI9w+xyh3Eyg/1XvPmbqjeg2MGXugHt8wW03DQMRTd5iqqOhjLvyOCcKtViGwAHVLyl86KqvxVX7MxSW8HLq6KCrLpB8SspAOHO9IuOwCh9poLoMEha9CHCxlRAXJNDobducWjqhFHqCkzjTM2V9CHslwq4iU19IxqhIFZMve15lDTiMVZIPdADXGxTqzSTv0dDWyk1ht430yvaYCy9qY0MQ3cC5c1uw4mHcTGkMHTAGC99TkNXFAiLQgw9ZWhwKJjGCe+J5FIaMpYhhyUnEgfrF3zEtzn40DdgCIJUJfZ0mo3eXsDwneJ8AYCr7Vx2eHFnt2H6ZEyAHs9JoQ4Lzh5zBoGOGwAz37NOPuqSNmZf51hBEovtpm2T1wI79OBWDyvCFYkONqAKGVYgIL0F+uxTcMLSPtFbiNDbBPFgip8MGDmLLHbSyGXdCMO6f7teiW9EEmorZ+75KzanZwvUySgjoUQBTfHlOIerJs6Y9wLlgDw18AB1ne0tZRNgGjcrqHbtubSUooEpy4hWpDzTSrmvqw0H9AoXQLolMt9eOM+l9RitBB1OBnrdC1XL4yLFyXqZSgZhv7FnnDEXLUeffb4nVDqYTLY6X7gHVaK4ZZlepja2Oe6OhLDI/Ve5SQTCmJdH3HJeb14cw99XsBQAlDy5s5kil2sGezZA3tFok2IsNja7QuFgM30Hff3NGSsSVFYZLOcTBOvlPx8vLhjJrSI7xrNMA/BOzpBIJrdR1+v+zw4RZ7ry6aq4/tFfvPQxQCPDsXlcRvIZYl+E5g3kJ+zLMZon0yElBvEOQTh6SaAdIO6BwdqJqfvgU+e8Y65FQhdiHkZMVt9/39N2jGd26J6cNjq8cQIyp6RonRPgVn2fl89uRDcQ27GacaN0MPrcNyRlbUWelKfDfyrNVVGBG5sjd3jXzTx06ywyzuWn5jbvEfPPCTbpClkgEu9oPLKICxU5HuDe3jA1XnvU85IYYhaEtOU1YVWYhEFsa4/TQj3rHdsU2da2eVbF8YjSI0m619/8bLMZu3xildwqM7zf1cjn4Whx0PSYXcY5bR7wEQfGC7CTOXwZdmsdTO8q3uGm7Rh/RfCWwpzBHCAaVfjxgibL5vUeL0pH6bzDmI9yCXKC/okkmbc28OJvI87L/bjFzpq0DHepw4kT1Od+fL7cyuFaRgfaUWB2++TCFvz11J0leEtrGkpccfX9z2LY39sph4PBHCjNOOkd0ybUm+ZzS8GkFbqMpq8uiX2yHpa0jllTLfGTDBMYR6FT5FWLLDPMkYxt1Q0eyMvxJWztDjy0m6VvZPvamrFXjHmPpU6WxrZqH6WW//I37RwvqPQhPz8I3RPuXAk1C94ZprQWm9iGM/KgiGDO6SV9sjp+Jmk4TBajMNJ5zzWZ1k1jrteQQBp9C2dOvmbIeeEME8y573Q8TgGe+ZCzutM45gYLBzYm2LNvgq2kebAbMpHRDSyh6dQ27GbsAAdCqQVVXWC1C+zpwBM2Lr4eqtobmmu1vJEDlIQR1iN8CUWpztq50z7FFQBn3SKViX6wSqzVQCoYvAjByjeSa+h1PRnYWvBinTDB9cHt4eqDsPS4jcD3FwXJKT0RQsl8EvslI2SFaz2OtmYLFV8FwgvWroZ3fKmh7btewX9tfL2upXsrsqpLJzpzNGyNlnuZyetg7DIOxQTMBR7dqlrTlZ6FWi1g4j1NSjA2j1Yd7fzTH6k9LxCyUCneAKYCU581bnvKih6KJTeTeCX4Zhme/QIz7w2o+AdSgtLAkdrLS9nfweYEqrMLsrGGSWXtgWamAWp6+x6GM/Z8jNw3BqPNQ39hrzYLECn3tPvh/LqKbRSCiDGauDKBBj/kGbpnM1Bb/my8hv4NWStclkwjfl57y4oNDgw1JAG9VOti3QVVoSziMEsSdfEjaCPIDb7SgpLXykQsM+nbqbt97I0mIlzWv0uqFobLMAq8Rd9pszUBKxFhBPwOjf//gVOz2r7URJ2OnpviCXv9iz3a4X/YLBYbXoYwxBv/Kq0a5s4utQHzoTerJ7PmFW/no/ZAsid/hRIV82tD+Qabh5F1ssIM8Ri3chu0PuPD3sSJRMjDoxLAbwUbroiPAz/V52e8s3DIixxlO7OrvhMj3qfzA0kKxzwicr5wJmZwJxTXgrwYsqhRvpgC2Nfdyd+TYYxJSZgk+gk2g9KyHSlwQVAyPtWWgvVGyVBqsU2LpDlLNosSAtolC1uBKt5pQZLhAxTjeGCWIC/HVpagc5rRwkgpCHKEsjA8d+scp8aiMewwQBhp5dYTV5t/Nvl+HbDMu8F3S0psPyZb1bSnqlHPFUnMQeQqSqwDBT23fJO9gO3aVaa1icrXU0PKwlMM5K+iL3ATcVq2fFWKk0irCTF4LDVDG4gUpkyplq6efcZS+WDR1woApjD18x+2JQR9oOXzuA7uy4b+/91WsJd/tSd1QcAH8PVPXApieA37B7YXPhDPH1azP3PKR+HfHmOoDYLeuKsIi/ssSsdYs62qJo14Hw1P2N/6zpr8F3FTWmJ4ysAVcl84Iv/tl///Z8FaAWbBQbyMNDZjrZ2JwdRjtd1jOeNumSodFtr4/Zf45iRJf/8HSW+KIB/+GlKu8Rv1BPLr/4duoL+kFPRqrstEr41gfJupoJRf4hcYDWX93FOcfEBiIivxtjtV8g7mvOReiamYWKE7vfPbv3v2L9Kwq3cIDFGLyhyfOGuf/9vA5muH6Pjg7B4SUj2ydDXra9fSBI+DrsNHA6l51wfHssJb+11TfNk7B8OleUe3Y+ZmHboMFHdv7FFP2cfISFyeAQR0sk/Xv62HBTdW4HmnGSLFk/cqyWVVFJkdIIa+4hos3JRHcqLoRKM5h2Qtk1RZtzISMtlXTfTqIc77YsCCgQD0r61jtxskCctwJOtjE/pL8wC4LBD4AZFjh2wzzFCrT/PNqW0/DeBbkfMfzVm9yy06WiF+1mTdNNEAytVtohBKg3brWd2VQa+aF+cQ0mW5CvbwOlWCT07liX226PjiVLwFCRs/Ax2/u+ZNPjrNFIWIPf5GjHyUKp60OeXe9F01f7IaPf/SDTvyDAf7LSWWejtiZcsqtWZjrdn6A2MqBwnSeKhrZOlUMmgMionmiCIvXqKZfmhGZ1MwD3uMF4n9KJcfWLA3cL5pq48tm5NDYNh3SS/TKUtmFSlQR89MR4+kxcqJgpGbhm9gXneDELkyqAN5nitmIzTscKeJRXqd64RiaOALR2d295NWwbjHRNG2AU5oR9OS2oJg/5CY6BFPc1JvD2Mxdhp2/MZdI8dLePxiP4KRIp8VXmqfg+jqd/RNG7GNuq1U2SiI4735Bdc0MVFx6mH5UOWEa5HuhYykd6t4M1gYLVS8m1B+9bUqi5DziQq7qT8d94cxB6AB4WqMCOF/zPPtRSZUUaMSsvHOWxGASufywTX8ogy6HgUf9p+Z30wUEosl8qgmwm6o2AV6nO9HKQjRHpN6SUegI5pvR61RLnUJ1lqCtmfcsRQutEizVpAaPXN7xMp5UQ5OSZK6tniCK9CpyMd7LjR6+MxfoMEDPpWdf2p2m5N3KO4QMxf+V7vGdYjemQczQ+m2MGIkFNYDMf0Yop2eSx81sP36WHUczqEhKysp2iJSYAvfgJjinKwToPvRKb+HBi+7cJ96S5ngfLOXaHAFRLkulo4TnXTFO51gX0TCCo4ZUHdbpdgkMEwUZAPjh6M+hA8DzycbtxAgH3uD6i0nN1aTiIuQ4BYCE9dEHHwAmINU+4YEWx4EC3OZwFGfYZMPLScVlb+BAAJeARUh+gdWA3/gRqCrf1jecgqeFf1MdzrrP4SVlGm5mMihSP+zYYksAB7O+SBPwNQqSNMiLnkviY/klwgcRmvqtCqeWeA0gjuir4CMZqmw/ntP6M+l0pdN8/P9xI53aP7x/zavJbbKOz8VzO/nXxIr1tjparMnqd6iWdByHKw4lF4p/u57Yv07WeZPDnRl7wgmDVZZ44fQsjdYO/gmXQ+940PRGst8UMQApFC4OOV22e4N+lVOPyFLAOj4t8R3PFw/FjbSWy0ELuAFReNkee8ORcBOT2NPDcs7OfpUmzvn/F9Czk9o9naMyVYy/j8I5qVFmQDFcptBp65J/+sJA3w/j6y/eqUkKxTsf0CZjtNdRSBEmJ2tmfgmJbqpcsSagk+Ul9qdyV+NnqFBIJZFCB1XwPvWGDBOjVUmpWGHsWA5uDuMgLUNKZ4vlq5qfzY1LnRhCc/mh5/EX+hzuGdDy5aYYx4BAdwTTeZHcZpl3X0YyuxZFWNE6wFNppYs3LcFJePOyfKZ8KYb7dmRyvDOcORLPH0sytC6mH1US3JVj6paYM1GEr+CUmyHRnabHPqLlh6Kl0/BWd3ebziDfvpRQpPoR7N+LkUeYWtQ6Rn5v5+NtNeBPs2+DKDlzEVR5aYbTVPrZekJsZ9UC9qtVcP99thVIt1GREnN8zXP8mBfzS+wKYym8fcW6KqrE702Zco+hFQAEIR7qimo7dd7wO8B7R+QZPTuCWm1UAwblDTyURSbd85P4Pz+wBpQyGPeEpsEvxxIZkKsyfSOUcfE3UqzMFwZKYijb7sOkzpou+tC4bPXey5GI1GUAg9c3vLwIwAhcdPHRsYvpAfzkZHWY20vWxxJO0lvKfj6sG2g/pJ1vd/X2EBZkyEjLN4nUZOpOO7MewyHCrxQK8d5aF7rCeQlFX+XksK6l6z971BPuJqwdjj68ULOj9ZTDdOLopMdOLL0PFSS792SXE/EC9EDnIXZGYhr52aQb+9b2zEdBSnpkxAdBUkwJDqGCpZk/HkRidjdp0zKv/Cm52EenmfeKX6HkLUJgMbTTxxIZkIeL/6xuAaAAHbA7mONVduTHNX/UJj1nJEaI7f3HlUyiqKn7VfBE+bdb4HWln1HPJx001Ulq1tOxFf8WZEARvq5Da1+pE7fPVxLntGACz3nkoLsKcPdUqdCwwiyWkmXTd5+bv3j7HaReRt3ESn783Ew3SWsvkEjKtbocNksbrLmV+GVZn1+Uneo35MT1/4r8fngQX5/ptORfgmWfF6KSB/ssJmUSijXxQqUpzkANEkSkYgYj560OOjJr6uqckFuO15TRNgABEwNDjus1V3q2huLPYERMCLXUNmJJpbMrUQsSO7Qnxta55TvPWL6gWmMOvFknqETzqzFVO8SVkovEdYatypLGmDy9VWfgAc0KyIChiOhbd7UlbAeVLPZyEDp4POXKBwN/KP5pT6Cyqs6yaI00vXMn1ubk9OWT9Q/O2t/C25qlnO/zO0xcBzpMBCAB8vsdsh3U8fnPX1XlPEWfaYJxKVaTUgfCESWl4CCkIyjE6iQ5JFcwU6S4/IH0/Agacp8d5Gzq2+GzPnJ7+sqk40mfFQpKrDbAKwLlr3ONEati2k/ycLMSUu7V/7BBkDlNyXoN9tvqXCbbMc4SSQXgC/DBUY9QjtrCtQ+susEomCq8xcNJNNMWCH31GtlTw2BdCXkJBjT+/QNWlBWwQ5SWCh1LdQ99QVii/DyTxjSR6rmdap3l3L3aiplQpPYlrzNm9er88fXd2+ao+YdUNjtqmxiVxmyYPzJxl67OokDcTezEGqldkGgPbRdXA+fGcuZVkembZByo7J1dMnkGNjwwCny+FNcVcWvWYL9mg8oF7jACVWI3bA64EXpdM8bSIEVIAs5JJH+LHXgnCsgcMGPZyAAVBncvbLiexzg9YozcytjPXVlAbQAC7Tc4S0C8QN4LlAGjj4pQAVWrwkaDoUYGxxvkCWKRRHkdzJB5zpREleBDL1oDKEvAqmkDibVC4kTqF89YO6laUjgtJPebBfzr16tg4t10GmN1sJ5vezk2sUOq8blCn5mPZyT3ltaDcddKupQjqusNM9wtFVD0ABzv17fZDn7GPT1nkCtdcgYejcK1qOcTGtPxnCX1rErEjVWCnEJv5HaOAUjgpiKQjUKkQi64D5g2COgwas8FcgIl0Pw95H9dWxE3QG0VbMNffh6BPlAojLDf4es2/5Xfq7hw5NGcON2g8Qsy2UQm94KddKyy3kdJxWgpNaEc15xcylbLC3vnT26u8qS90qc2MU8LdOJc5VPF5KnSpXIhnj1eJJ/jszjZ01oR6JDFJRoeTPO/wh4IPFbdG9KljuSzeuI92p8JF/bpgDE8wG86/W2EBKgPrmzdLijxssQn8mM44ky/KLGOJcrSwXIpZa/Z3v7W6HCRk7ewds99LTsUW1LbeJytw8Q/BFZVZyfO9BUHOCe2suuEkO8DU4fLX0IQSQ2TdOkKXDtPf3sNV9tYhYFueuPRhfQlEEy+aYM/MCz7diDNmFSswYYlZZPmKr2Q5AxLsSVEqqBtn6hVl1BCFOFExnqnIsmyY/NA8jXnDaNzr7Zv3hu+I1Mf/PJjk0gALN2G8ABzdf9FNvWHvZHhv6xIoDCXf964MxG92vGZtx/LYU5PeZqgly8tT5tGeQGeJzMMsJc5p+a5Rn2PtEhiRzo/5Owjy1n0Lzx3ev8GHQmeWb8vagG6O5Qk5nrZuQTiKODI4UqL0LLAusS2Ve7j1Ivdxquu1BR9Rc4QkOiUPwQXJv6du2E8i5pDhVoQpUhyMWGUT2O2YODIhjAfI71gxep5r5zAY7GBUZpy51hAw0pcCCrhOmU8Wp6ujQTdZQsCjtq6SHX8QAMNiPCIIkoxhHEZPgsBcOlP4aErJZPhF7qvx6gHrn8hEwPwYbx8YmT/n7lbcmTip1v8kgsrIjFTAlvLY4Nuil0KDmgz3svYs0ZJ3O3Is/vSx4xpxF1e2VAtZE8dJxGYEIhCSuPvCjP54l/NSNDnwlKvAW8mG+AQkgp7a87Igh26uKMFGD0PoPHTSvoWxiHuk+su8XkQiHIjeYKl/RdcOHpxhQH3zHCNE3aARm83Bl6zGxU/vMltlVPQhubcqhW4RYkl6uXk5JdP/QpzaKFpw2M8zvysv2qj7xaQECuu2akM0Cssj/uB9+wDR7uA6XOnLNaoczalHoMj33eiiu+DRaFsUmlmUZuh9bjDY4INMNSSAivSh03uJvny4Gj+D+neudoa7iJi7c4VFlZ/J5gUR82308zSNAt/ZroBXDWw0fV3eVPAn3aX0mtJabF6RsUZmL+Ehn+wn51/4QipMjD+6y64t7bjL6bjENan2prQ4h7++hBJ9NXvX8CUocJqMC937IasLzm5K0qwXeFMAimMHkEIQIQI2LrQ9sLBfXuyp66zWvlsh74GPv7Xpabj993pRNNDuFud5oIcn/92isbADXdpRPbjmbCNOrwRbxGZx2XmYNGMiV5kjF4IKyxCBvKier9U4uVoheCdmk83rp5G0PihAm2fAtczI4b9BWqX+nrZTrJX5kSwQddi93NQrXG+Cl3eBGNkM77VBsMpEolhXex1MVvMkZN9fG59GGbciH11FEXaY1MxrArovaSjE/lUUqBg2cZBNmiWbvzCHCPJ4RVGFK2dTbObM1m+gJyEX53fa7u3+TZpm74mNEzWbkVL4vjNwfL9uzRCu1cgbrNx5Yv5dDruNrIOgwIk+UZWwJfdbu/WHul6PMmRflVCIzd7B37Pgm/Up/NuCiQW7RXyafevN3AL6ycciCc4ZPlTRzEu+aURGlUBOJbUEsheX7PPyrrhdUt5JAG12EEEZpY/N3Vhbl5uLAfT0CbC2XmpnryFkxZmBTs5prvEeuf0bn73i3O82WTiQtJWEPLsBXnQmdnKhB06NbbhLtlTZYJMxDMJpFeajSNRDB2v61BMUHqXggUwRJ19m6p5zl51v11q34T74lTXdJURuV6+bg2D6qpfGnLy7KGLuLZngobM4pIouz4+n0/UzFKxDgLM4h+fUwKZozQ9UGrHjcif51Ruonz7oIVZ56xWtZS8z7u5zay6J2LD4gCYh2RXoBRLDKsUlZ80R8kmoxlJiL8aZCy2wCAonnucFxCLT1HKoMhbPKt34D97EXPPh0joO93iJVF1Uruew61Qoy3ZUVNX9uIJDt9AQWKLLo+mSzmTibyLHq0D6hhzpvgUgI6ekyVEL3FD+Fi5R3A8MRHPXspN1VyKkfRlC+OGiNgPC4NREZpFETgVmdXrQ2TxChuS3aY+Ndc7CiYv5+CmzfiqeZrWIQJW/C4RvjbGUoJFf1K6ZdR2xL/bG4kVq1+I4jQWX+26YUijpp+lpN7o5c6ZodXJCF56UkFGsqz44sIg8jrdWvbjRCxi2Bk0iyM3a7ecAV93zB6h1Ei38c0s6+8nrbkopArccGP8vntQe1bFeEh2nJIFOHX/k3/UHb5PtKGpnzbkmnRETMX+9X/QduLZWw/feklW/kH/JnzToJe9Kgu9Hct1UGbH5BPCLo4OOtQnZonW0xnyCcdtKyPQ/sbLiSTYJdSx4sJqWLMnfn6fIqPB3WAgk00J+fCOkomPHqtS67pf0mFmKoItYZUlJu6BihSZ8qve8+/X+LX1MhQXF95AshfUleCtmdn6l6QFXzLg2sgLn1oyVFuZecv7fzsIHzoRlAGp0gwYDOn1S4qabWvB5xUaE+Svw4KmjWtxdnuQbI32dw87D4N95u8qQRJTSQg0wLxOLkxSrPMLEn1UIhNKjAa9VLs3WLaXGrtCIt8bKY2AQP/ZdyRU6zT/E8qP2ltyBE2CCZPgWgEYDoJJO4n92y61ylNaSFXKohJhLjkfvYWm592539sIpmBNLlDo1bExFBfmHJJ0lFEiC/fj8v42OoMC9Mo3whIoWvyHfq6Uacqq55mzFf/EGC+NP/gHjhd6urc6R0hES27VXux7UY8CGKPohplWIZtTrFSaPWslCWy78E22Pw8fvReSUZx/txqLtHrFqg1DY/Eus6Iq1heZdrdcqE0/c971Bz1HW/XNXHsXpUIbI4kHdOfCc6T5zHZzvzQJB0ggMFL6IGPAilU9bj/ASdPk6fNvNtZqPuwEDhMBtBnhCexo6D6VAGIOPvJPPV523Y8R8a9vCqZbswSZKzOT1291BsUbmUWehtbb1fdRX9hiJKXvwr1QX6GjnZMgyMvnwOo2Dr24amr7FqEAbVeJAjRNOceM2EQ1Mna9fInqPJ5mh5X8CzT1aDOv08An0blz0fF5Gq4mS2cwq5glwIOlY5nznE8X4j/UdZ3FJsVIXte1JH0A7iibuPfazStM5O/Vo3KXIpXBeGORV0M9XDXFvsYZUHGvFCUubWzTw248EHE0cpQM2zNg6rjavreq3NHCAWsoZ7wvVy7l5gvtKRmIj1MnvfWEm0yFnGcuOq192350a5WefpfKCcX3Sn+AgHU+qnpstNtddbdVebagJU390lq9ko4aI9rqdaWXYG8tv5O/ZQHSqDRYHC6zfH10l5z++opso7aOSaIczlQ13iAzXvLdEu0V7kwNUZ1c8Y8aq7SeIEe5p902FlNkW8DnwHyueHchbK8vVFJfmr9mz7P8nUSccl1ULaoWMRSI1ls32kvlK0h46h3J25Yd9AzfcJbp9qYF/SEt3H5j69mMdcsNxZcAzT/A89ov3tglTX54y/EwjMfuoDoxPwLJDm5I7q6F9Kp469yNy1zSxz0N4HbRRBj9xFFuogvBspv7DXUNIsGxTINEQfmctb42XImWAODgARNo7dfcTqFKq6aTfivmvunLmzP9f8yLsJvXD3JbcPcDGNriMAcjzeDTNr65t8YB5tsnFDFLa0Uwmd2OvUdkLMX9TsAUYUfooSv47sw5J88j7CpahRjjO3/UhOXjTS39W5YZAel2KTbQd1h7INOw9P23GW7GDAe4agIUFHP48MZr7ubq0efFmmtwYMyk7D0r1oeG/CGOODgb9Ur+JMHxkwzPbtCX2ZnENQuI0RN5SyTIZuoY4XS9Rd/tPe3vNAZGSHM/YYwqs9xkkENx0O+eC2YVW1cwOJ3ckE890nbQeHLKlW15L0P0W2VliyYrfNr0nrIYddoRyGaCtj4OYd2MT7ebApqZOAQIaSHJM4mphhfjNjtnjg6YRyx9qM2FT3xOiYIMqXPFWdzhSgFF8ItocqVV09CmIoO8k6U/oJB7++wSX/YksxfPXHyjSgAGZOj1aKEq9fSvXBqtp2wu8/FxEf5AxapAD06pPGuLVUYLdgEzHR8wqRGYEwiUO9MyYbgswstuLYhwYFpSVKOdzAihZ9LuHtD598EGhINU9xc9xhL+QgTLAstmPIvvm2xyRw/WTUPXkP3ZHu6GyPmj5xFH9/QGpkglKXRVUBgVmLOJx8uZO2AstxQYocZH2JhORlxawj66BAXUEs7K/gPxINIRAFyK3WLuyq9oBTF9wEbnmCot82WjIg7CPNwYK3KrZMrKAz5yFszg4wCVLJVnIL8+OYA0xRDH8cHQjQUiQ2i1mr/be32k/3Xej9sdf3iuGvZHyLFSJvPSqz/wltnxumTJYKZsrWXtx/Rmu39jjV9lFaJttfFn57/No2h/unsJmMHbrnZ8csxkp5HQ4xR1s0HH+t3Iz82a3iQWTUDGq/+l2W3TUYLE8zNdL8Y+5oXaIH/Y2UUcX67cXeN4WvENZjz4+8q7vjhowOI3rSjFhGZ6KzwmU7+5nFV+kGWAZ5z2UWvzq0TK0pk1hPwAN4jbw//1CApRvIaIjhSGhioY6TUmsToek9cF9XjJdHvLPcyyCV3lbR5Jiz/ts46ay2F820VjTXvllElwrGzKcNSyvQlWDXdwrUINXmHorAM3fE19ngLZmgeUaCJLsSITf2VcfAOuWwX7mTPdP8Zb/04KqRniufCpwnDUk7sP0RX6cud/sanFMagnzKInSRVey0YzlVSOtA/AjrofmSH6RYbJQ8b4NDeTkIGc6247+Mnbez/qhJ9GAv9fGNFercPnnrf285Qgs+UqThLRgflcAKFuqWhLzZaR4QqvSwa3xe0LPkqj9xJWub195r7NrrR0e78FR+0mRBNMPsraqZctAUVAJfYKehTDV1MGGQSeDsOK9J3sbUuKRIS/WilX/64CBms9jCZocBlsBSZaIAjWm/SUZ8daWL2a/cJFyUOFqE3Epc2RWbtjNyPwOGpWtzu32kUooUqsJud7IV4E8rstUBXM7tGEtBx99x60g1duhyvxeKJSl8s5E34HTMmADT0836aEdg5Dv9rVyCz8i2REOmiz6wtIVFN0HsjAoN37SrY0bV1Ms8CRUILhvZvvRaDzoVCaSI0u8EPuTe4b7OPowgRGODl22UBBmHSTUY8e4DyL+Bc7bngo+2T8HtNvzyATSL5iJZgFPKpmUyZv54vVL90+/RQGATUmNKnrIvcJMYON9fl83naW5sf6hRkbbTC9RUEE6XADwjgA46wWfUQ+QWZl0J4PVTWAln/YfAz/SV3q3J9+yCYDleruoN5uoc/wT2f4YONGTb6zTGq3V+3JqzmCOjwebKln+fExVLN7sqtqfMnsKVXWbb2Ai5m3D/fCTgX7oKYzTZvj+m28XnDqPbXuP4MyWdmPezcesdrh7rCzA7BWdObiuyDEKjjzBbQ0qnuwjliz+b+j7aPMKlkXyIznV3tGzAfYwIbzGGt098oh4eq3ruDjdgHtjxfFCjHrjjRbHajoz/YOY4raojPFQ910GIlBV7hq47UDgpyajBxQUmD8NctiLV1rTSLAEsQDLTeRKcmPBMVMFF0SPBBhZ5oXoxtD3lMhuAQXmA+57OcciczVW9e9zwSIAHS+FJmvfXMJGF1dMBsIUMaPjvgaVqUc3p32qVCMQYFEiRLzlVSOGMCmv/HJIxAHe3mL/XnoZ1IkWLeRZfgyByjnDbbeRK5KL7bYHSVJZ9UFq+yCiNKeRUaYjgbC3hVUvfJAhy/QNl/JqLKVvGMk9ZcfyGidNeo/VTxK9vUpodzfQI9Z2eAre4nmrkzgxKSnT5IJ1D69oHuUS5hp7pK9IAWuNrAOtOH0mAuwCrY8mXAtVXUeaNK3OXr6PRvmWg4VQqFSy+a1GZfFYgdsJELG8N0kvqmzvwZ02Plf5fH9QTy6br0oY/IDsEA+GBf9pEVWCIuBCjsup3LDSDqI+5+0IKSUFr7A96A2f0FbcU9fqljdqvsd8sG55KcKloHIFZem2Wb6pCLXybnVSB0sjCXzdS8IKvE");const fr=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),mr=4;function gr(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function wr(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n<t;)r.push(String.fromCodePoint(...e.slice(n,n+=4096)));return r.join("")}var br=nr("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");function vr(e){return e>>24&255}function yr(e){return 16777215&e}const xr=new Map(ar(br).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),Cr=new Set(sr(br)),Ar=new Map,Er=new Map;for(let[e,t]of cr(br)){if(!Cr.has(e)&&2==t.length){let[r,n]=t,i=Er.get(r);i||(i=new Map,Er.set(r,i)),i.set(n,e)}Ar.set(e,t.reverse())}const _r=44032,Ir=4352,Pr=4449,Or=4519,kr=28,Sr=21*kr,Mr=_r+19*Sr,Nr=Ir+19,Tr=Pr+21,jr=Or+kr;function Rr(e){return e>=_r&&e<Mr}function Lr(e,t){if(e>=Ir&&e<Nr&&t>=Pr&&t<Tr)return _r+(e-Ir)*Sr+(t-Pr)*kr;if(Rr(e)&&t>Or&&t<jr&&(e-_r)%kr==0)return e+(t-Or);{let r=Er.get(e);return r&&(r=r.get(t),r)?r:-1}}function $r(e){let t=[],r=[],n=!1;function i(e){let r=xr.get(e);r&&(n=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(Rr(n)){let e=n-_r,t=e%Sr/kr|0,r=e%kr;i(Ir+(e/Sr|0)),i(Pr+t),r>0&&i(Or+r)}else{let e=Ar.get(n);e?r.push(...e):i(n)}if(!r.length)break;n=r.pop()}if(n&&t.length>1){let e=vr(t[0]);for(let r=1;r<t.length;r++){let n=vr(t[r]);if(0==n||e<=n){e=n;continue}let i=r-1;for(;;){let r=t[i+1];if(t[i+1]=t[i],t[i]=r,!i)break;if(e=vr(t[--i]),e<=n)break}e=vr(t[r])}}return t}function Dr(e){return $r(e).map(yr)}function Br(e){return function(e){let t=[],r=[],n=-1,i=0;for(let o of e){let e=vr(o),s=yr(o);if(-1==n)0==e?n=s:t.push(s);else if(i>0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=s):r.push(s),i=e;else{let o=Lr(n,s);o>=0?n=o:0==i&&0==e?(t.push(n),n=s):(r.push(s),i=e)}}return n>=0&&t.push(n,...r),t}($r(e))}const Ur=65039,Wr=".",zr=1,Hr=45;function Fr(){return new Set(sr(pr))}const qr=new Map(cr(pr)),Vr=Fr(),Gr=Fr(),Kr=new Set(sr(pr).map((function(e){return this[e]}),[...Gr])),Zr=Fr(),Qr=(Fr(),ar(pr));function Yr(){return new Set([sr(pr).map((e=>Qr[e])),sr(pr)].flat(2))}const Jr=pr(),Xr=lr((e=>{let t=lr(pr).map((e=>e+96));if(t.length){let r=e>=Jr;t[0]-=32,t=wr(t),r&&(t=`Restricted[${t}]`);let n=Yr(),i=Yr(),o=[...n,...i].sort(((e,t)=>e-t));return{N:t,P:n,M:!pr(),R:r,V:new Set(o)}}})),en=Fr(),tn=new Map;[...en,...Fr()].sort(((e,t)=>e-t)).map(((e,t,r)=>{let n=pr(),i=r[t]=n?r[t-n]:{V:[],M:new Map};i.V.push(e),en.has(e)||tn.set(e,i)}));for(let{V:e,M:t}of new Set(tn.values())){let r=[];for(let t of e){let e=Xr.filter((e=>e.V.has(t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),e.forEach((e=>n.G.add(e)))}let n=r.flatMap((({G:e})=>[...e]));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}let rn=new Set,nn=new Set;for(let e of Xr)for(let t of e.V)(rn.has(t)?nn:rn).add(t);for(let e of rn)tn.has(e)||nn.has(e)||tn.set(e,zr);const on=new Set([...rn,...Dr(rn)]),sn=sr(pr),an=function e(t){let r=lr((()=>{let t=sr(pr).map((e=>sn[e]));if(t.length)return e(t)})).sort(((e,t)=>t.Q.size-e.Q.size)),n=pr(),i=n%3;n=n/3|0;let o=1&n;return n>>=1,{B:r,V:i,F:o,S:1&n,C:2&n,Q:new Set(t)}}([]);class cn extends Array{get is_emoji(){return!0}}function ln(e,t=gr){let r=[];var n;n=e[0],Gr.has(n)&&r.push("◌");let i=0,o=e.length;for(let n=0;n<o;n++){let o=e[n];pn(o)&&(r.push(wr(e.slice(i,n))),r.push(t(o)),i=n+1)}return r.push(wr(e.slice(i,o))),r.join("")}function un(e){return(pn(e)?"":`${hn(ln([e]))} `)+gr(e)}function hn(e){return`"${e}"‎`}function dn(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}function pn(e){return Zr.has(e)}function fn(e,t){let r=0;return e.split(Wr).map((e=>{let n,i=function(e){let t=[];for(let r=0,n=e.length;r<n;){let n=e.codePointAt(r);r+=n<65536?1:2,t.push(n)}return t}(e),o={input:i,offset:r};r+=i.length+1;try{let e,r=o.tokens=function(e,t){let r=[],n=[];for(e=e.slice().reverse();e.length;){let i=bn(e);if(i)n.length&&(r.push(t(n)),n=[]),r.push(i);else{let t=e.pop();if(on.has(t))n.push(t);else{let e=qr.get(t);if(e)n.push(...e);else if(!Vr.has(t))throw mn(t)}}}return n.length&&r.push(t(n)),r}(i,Br),s=r.length;if(!s)throw new Error("empty label");{let i=r[0],a=s>1||i.is_emoji;if(!a&&i.every((e=>e<128)))n=i,dn(n),function(e){if(e.length>=4&&e[2]==Hr&&e[3]==Hr)throw new Error("invalid label extension")}(n),e="ASCII";else if(a&&(o.emoji=!0,i=r.flatMap((e=>e.is_emoji?[]:e))),n=r.flatMap((e=>!t&&e.is_emoji?e.filter((e=>e!=Ur)):e)),dn(n),i.length){if(Gr.has(n[0]))throw wn("leading combining mark");for(let e=1;e<s;e++){let t=r[e];if(!t.is_emoji&&Gr.has(t[0]))throw wn(`emoji + combining mark: "${wr(r[e-1])} + ${ln([t[0]])}"`)}!function(e){let t=e[0],r=fr.get(t);if(r)throw wn(`leading ${r}`);let n=e.length,i=-1;for(let o=1;o<n;o++){t=e[o];let n=fr.get(t);if(n){if(i==o)throw wn(`${r} + ${n}`);i=o+1,r=n}}if(i==n)throw wn(`trailing ${r}`)}(n);let t=[...new Set(i)],[o]=function(e){let t=Xr;for(let r of e){let e=t.filter((e=>e.V.has(r)));if(!e.length)throw t===Xr?mn(r):gn(t[0],r);if(t=e,1==e.length)break}return t}(t);!function(e,t){let{V:r,M:n}=e;for(let n of t)if(!r.has(n))throw gn(e,n);if(n){let e=Dr(t);for(let t=1,r=e.length;t<r;t++)if(Kr.has(e[t])){let n=t+1;for(let i;n<r&&Kr.has(i=e[n]);n++)for(let r=t;r<n;r++)if(e[r]==i)throw new Error(`non-spacing marks: repeated ${un(i)}`);if(n-t>mr)throw new Error(`non-spacing marks: too many ${hn(ln(e.slice(t-1,n)))} (${n-t}/${mr})`);t=n}}}(o,i),function(e,t){let r,n=[];for(let e of t){let t=tn.get(e);if(t===zr)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):[...n],!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>t.V.has(e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(o,t),e=o.N}else e="Emoji"}o.type=e}catch(e){o.error=e}return o.output=n,o}))}function mn(e){return new Error(`disallowed character: ${un(e)}`)}function gn(e,t){let r=un(t),n=Xr.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function wn(e){return new Error(`illegal placement: ${e}`)}function bn(e,t){let r,n,i=an,o=[],s=e.length;for(t&&(t.length=0);s;){let a=e[--s];if(i=i.B.find((e=>e.Q.has(a))),!i)break;if(i.S)n=a;else if(i.C&&a===n)break;o.push(a),i.F&&(o.push(Ur),s>0&&e[s-1]==Ur&&s--),i.V&&(r=vn(o,i),t&&t.push(...e.slice(s).reverse()),e.length=s)}return r}function vn(e,t){let r=cn.from(e);return 2==t.V&&r.splice(1,1),r}function yn(e){return function(e){return(t=fn(e)).map((({input:e,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==t.length?n:`Invalid label ${hn(ln(e))}: ${n}`)}return wr(n)})).join(Wr);var t}(e)}var xn=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured${t?` for connector "${t}"`:""}.`),this.name="ChainNotConfigured"}},Cn=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},An=class extends Error{constructor(){super(...arguments),this.name="ConfigChainsNotFound",this.message="No chains were found on the wagmi config. Some functions that require a chain may not work."}},En=class extends Error{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}},_n=(e,{find:t,replace:r})=>e&&t(e)?r(e):"object"!=typeof e?e:Array.isArray(e)?e.map((e=>_n(e,{find:t,replace:r}))):e instanceof Object?Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:_n(i,{find:t,replace:r})})),{}):e;function In(e){const t=JSON.parse(e);return _n(t,{find:e=>"string"==typeof e&&e.startsWith("#bigint."),replace:e=>BigInt(e.replace("#bigint.",""))})}function Pn(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(Yt.Bd[e])}function On(e,t){return e.slice(0,t).join(".")||"."}function kn(e,t){const{length:r}=e;for(let n=0;n<r;++n)if(e[n]===t)return n+1;return 0}function Sn(e,t,r,n){return JSON.stringify(e,function(e,t){const r="function"==typeof t,n=[],i=[];return function(o,s){if("object"==typeof s)if(n.length){const e=kn(n,this);0===e?n[n.length]=this:(n.splice(e),i.splice(e)),i[i.length]=o;const a=kn(n,s);if(0!==a)return r?t.call(this,o,s,On(i,a)):`[ref=${On(i,a)}]`}else n[0]=s,i[0]=o;return e.call(this,o,s)}}(((e,r)=>{const n="bigint"==typeof r?`#bigint.${r.toString()}`:r;return t?.(e,n)||n}),n),r??void 0)}var Mn={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function Nn({deserialize:e=In,key:t="wagmi",serialize:r=Sn,storage:n}){return{...n,getItem:(r,i=null)=>{const o=n.getItem(`${t}.${r}`);try{return o?e(o):i}catch(e){return console.warn(e),i}},setItem:(e,i)=>{if(null===i)n.removeItem(`${t}.${e}`);else try{n.setItem(`${t}.${e}`,r(i))}catch(e){console.error(e)}},removeItem:e=>n.removeItem(`${t}.${e}`)}}var Tn,jn,Rn,Ln,$n,Dn="store";function Bn(){if(!$n)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return $n}async function Un({chainId:e,connector:t}){const r=Bn(),n=r.connector;if(n&&t.id===n.id)throw new Cn;try{r.setState((e=>({...e,status:"connecting"})));const n=await t.connect({chainId:e});return r.setLastUsedConnector(t.id),r.setState((e=>({...e,connector:t,chains:t?.chains,data:n,status:"connected"}))),r.storage.setItem("connected",!0),{...n,connector:t}}catch(e){throw r.setState((e=>({...e,status:e.connector?"connected":"disconnected"}))),e}}async function Wn(){const e=Bn();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}Tn=new WeakMap,jn=new WeakMap,Rn=new WeakSet,Ln=function(){const e=e=>{this.setState((t=>({...t,data:{...t.data,...e}})))},t=()=>{this.clearState()},r=e=>{this.setState((t=>({...t,error:e})))};this.store.subscribe((({connector:e})=>e),((n,i)=>{i?.off?.("change",e),i?.off?.("disconnect",t),i?.off?.("error",r),n&&(n.on?.("change",e),n.on?.("disconnect",t),n.on?.("error",r))}));const{publicClient:n,webSocketPublicClient:i}=this.args;("function"==typeof n||"function"==typeof i)&&this.store.subscribe((({data:e})=>e?.chain?.id),(e=>{this.setState((t=>({...t,publicClient:this.getPublicClient({chainId:e}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:e})})))}))};var zn=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],Hn=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function Fn({chainId:e}={}){const t=Bn();return e&&t.getPublicClient({chainId:e})||t.publicClient}async function qn({contracts:e,blockNumber:t,blockTag:r,...n}){const{allowFailure:i=!0}=n;try{const n=Fn(),o=e.reduce(((e,t,r)=>{const i=t.chainId??n.chain.id;return{...e,[i]:[...e[i]||[],{contract:t,index:r}]}}),{}),s=()=>Object.entries(o).map((([e,n])=>async function({chainId:e,contracts:t,blockNumber:r,blockTag:n,...i}){const o=Fn({chainId:e});if(!o.chains)throw new An;if(e&&o.chain.id!==e)throw new xn({chainId:e});return o.multicall({allowFailure:i.allowFailure??!0,blockNumber:r,blockTag:n,contracts:t})}({allowFailure:i,chainId:parseInt(e),contracts:n.map((({contract:e})=>e)),blockNumber:t,blockTag:r}))),a=(await Promise.all(s())).flat(),c=Object.values(o).flatMap((e=>e.map((({index:e})=>e))));return a.reduce(((e,t,r)=>(e&&(e[c[r]]=t),e)),[])}catch(n){if(n instanceof Te.uq)throw n;const o=()=>e.map((e=>async function({address:e,account:t,chainId:r,abi:n,args:i,functionName:o,blockNumber:s,blockTag:a}){return Fn({chainId:r}).readContract({abi:n,address:e,account:t,functionName:o,args:i,blockNumber:s,blockTag:a})}({...e,blockNumber:t,blockTag:r})));return i?(await Promise.allSettled(o())).map((e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"})):await Promise.all(o())}}async function Vn({address:e,chainId:t,formatUnits:r,token:n}){const i=Bn(),s=Fn({chainId:t});if(n){const i=async({abi:i})=>{const o={abi:i,address:n,chainId:t},[s,a,c]=await qn({allowFailure:!1,contracts:[{...o,functionName:"balanceOf",args:[e]},{...o,functionName:"decimals"},{...o,functionName:"symbol"}]});return{decimals:a,formatted:(0,tr.b)(s??"0",Pn(r??a)),symbol:c,value:s}};try{return await i({abi:zn})}catch(e){if(e instanceof Te.uq){const{symbol:e,...t}=await i({abi:Hn});return{symbol:(0,o.rR)((0,b.f)(e,{dir:"right"})),...t}}throw e}}const a=[...i.publicClient.chains||[],...i.chains??[]],c=await s.getBalance({address:e}),l=a.find((e=>e.id===s.chain.id));return{decimals:l?.nativeCurrency.decimals??18,formatted:(0,tr.b)(c??"0",Pn(r??18)),symbol:l?.nativeCurrency.symbol??"ETH",value:c}}function Gn(){const{data:e,connector:t,status:r}=Bn();switch(r){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function Kn(){const e=Bn(),t=e.data?.chain?.id,r=e.chains??[],n=[...e.publicClient?.chains||[],...r].find((e=>e.id===t))??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...n,...e.data?.chain,id:t}:void 0,chains:r}}async function Zn({chainId:e}){const{connector:t}=Bn();if(!t)throw new N;if(!t.switchChain)throw new En({connector:t});return t.switchChain(e)}function Qn(e,{selector:t=(e=>e)}={}){return Bn().subscribe((({data:e,connector:r,status:n})=>t({address:e?.account,connector:r,status:n})),(()=>e(Gn())),{equalityFn:rr})}function Yn(e,{selector:t=(e=>e)}={}){return Bn().subscribe((({data:e,chains:r})=>t({chainId:e?.chain?.id,chains:r})),(()=>e(Kn())),{equalityFn:rr})}async function Jn({name:e,chainId:t}){const r=Fn({chainId:t});return await r.getEnsAvatar({name:yn(e)})}async function Xn({address:e,chainId:t}){return Fn({chainId:t}).getEnsName({address:(0,j.K)(e)})}var ei,ti,ri,ni,ii,oi,si,ai,ci,li,ui,hi,di,pi,fi,mi,gi,wi,bi,vi,yi=r(9795),xi="eip155",Ci="requestedChains",Ai="wallet_addEthereumChain",Ei=class extends S{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),P(this,ri),P(this,ii),P(this,si),P(this,ci),P(this,ui),P(this,di),P(this,fi),P(this,gi),P(this,bi),E(this,"id","walletConnect"),E(this,"name","WalletConnect"),E(this,"ready",!0),P(this,ei,void 0),P(this,ti,void 0),E(this,"onAccountsChanged",(e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,j.K)(e[0])})})),E(this,"onChainChanged",(e=>{const t=Number(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})})),E(this,"onDisconnect",(()=>{k(this,di,pi).call(this,[]),this.emit("disconnect")})),E(this,"onDisplayUri",(e=>{this.emit("message",{type:"display_uri",data:e})})),E(this,"onConnect",(()=>{this.emit("connect",{})})),k(this,ri,ni).call(this)}async connect({chainId:e,pairingTopic:t}={}){try{let r=e;if(!r){const e=this.storage?.getItem("store"),t=e?.state?.data?.chain?.id;r=t&&!this.isChainUnsupported(t)?t:this.chains[0]?.id}if(!r)throw new Error("No chains found on connector.");const n=await this.getProvider();k(this,ci,li).call(this);const i=k(this,si,ai).call(this);if(n.session&&i&&await n.disconnect(),!n.session||i){const e=this.chains.filter((e=>e.id!==r)).map((e=>e.id));this.emit("message",{type:"connecting"}),await n.connect({pairingTopic:t,chains:[r],optionalChains:e.length?e:void 0}),k(this,di,pi).call(this,this.chains.map((({id:e})=>e)))}const o=await n.enable(),s=(0,j.K)(o[0]),a=await this.getChainId();return{account:s,chain:{id:a,unsupported:this.isChainUnsupported(a)}}}catch(e){if(/user rejected/i.test(e?.message))throw new R.ab(e);throw e}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{k(this,ui,hi).call(this),k(this,di,pi).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return(0,j.K)(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return I(this,ei)||await k(this,ri,ni).call(this),e&&await this.switchChain(e),I(this,ei)}async getWalletClient({chainId:e}={}){const[t,r]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),n=this.chains.find((t=>t.id===e));if(!t)throw new Error("provider is required.");return ge({account:r,chain:n,transport:Ae(t)})}async isAuthorized(){try{const[e,t]=await Promise.all([this.getAccount(),this.getProvider()]),r=k(this,si,ai).call(this);if(!e)return!1;if(r&&t.session){try{await t.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){const t=this.chains.find((t=>t.id===e));if(!t)throw new R.x3(new Error("chain not found on connector."));try{const r=await this.getProvider(),n=k(this,gi,wi).call(this),i=k(this,bi,vi).call(this);if(!n.includes(e)&&i.includes(Ai)){await r.request({method:Ai,params:[{chainId:(0,s.eC)(t.id),blockExplorerUrls:[t.blockExplorers?.default?.url],chainName:t.name,nativeCurrency:t.nativeCurrency,rpcUrls:[...t.rpcUrls.default.http]}]});const n=k(this,fi,mi).call(this);n.push(e),k(this,di,pi).call(this,n)}return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.eC)(e)}]}),t}catch(e){if(/user rejected request/i.test("string"==typeof e?e:e?.message))throw new R.ab(e);throw new R.x3(e)}}};ei=new WeakMap,ti=new WeakMap,ri=new WeakSet,ni=async function(){return I(this,ti)||"undefined"==typeof window||O(this,ti,k(this,ii,oi).call(this)),I(this,ti)},ii=new WeakSet,oi=async function(){const{EthereumProvider:e,OPTIONAL_EVENTS:t,OPTIONAL_METHODS:n}=await Promise.resolve().then(r.bind(r,7979)),[i,...o]=this.chains.map((({id:e})=>e));if(i){const{projectId:r,showQrModal:s=!0,qrModalOptions:a,metadata:c,relayUrl:l}=this.options;O(this,ei,await e.init({showQrModal:s,qrModalOptions:a,projectId:r,optionalMethods:n,optionalEvents:t,chains:[i],optionalChains:o.length?o:void 0,rpcMap:Object.fromEntries(this.chains.map((e=>[e.id,e.rpcUrls.default.http[0]]))),metadata:c,relayUrl:l}))}},si=new WeakSet,ai=function(){if(k(this,bi,vi).call(this).includes(Ai))return!1;if(!this.options.isNewChainsStale)return!1;const e=k(this,fi,mi).call(this),t=this.chains.map((({id:e})=>e)),r=k(this,gi,wi).call(this);return!(r.length&&!r.some((e=>t.includes(e)))||t.every((t=>e.includes(t))))},ci=new WeakSet,li=function(){I(this,ei)&&(k(this,ui,hi).call(this),I(this,ei).on("accountsChanged",this.onAccountsChanged),I(this,ei).on("chainChanged",this.onChainChanged),I(this,ei).on("disconnect",this.onDisconnect),I(this,ei).on("session_delete",this.onDisconnect),I(this,ei).on("display_uri",this.onDisplayUri),I(this,ei).on("connect",this.onConnect))},ui=new WeakSet,hi=function(){I(this,ei)&&(I(this,ei).removeListener("accountsChanged",this.onAccountsChanged),I(this,ei).removeListener("chainChanged",this.onChainChanged),I(this,ei).removeListener("disconnect",this.onDisconnect),I(this,ei).removeListener("session_delete",this.onDisconnect),I(this,ei).removeListener("display_uri",this.onDisplayUri),I(this,ei).removeListener("connect",this.onConnect))},di=new WeakSet,pi=function(e){this.storage?.setItem(Ci,e)},fi=new WeakSet,mi=function(){return this.storage?.getItem(Ci)??[]},gi=new WeakSet,wi=function(){if(!I(this,ei))return[];const e=I(this,ei).session?.namespaces;if(!e)return[];const t=(0,yi.fK)(e),r=t[xi]?.chains?.map((e=>parseInt(e.split(":")[1]||"")));return r??[]},bi=new WeakSet,vi=function(){if(!I(this,ei))return[];const e=I(this,ei).session?.namespaces;if(!e)return[];const t=(0,yi.fK)(e),r=t[xi]?.methods;return r??[]};var _i=r(1475);window.EthereumClient=class{constructor(e,t){this.wagmi={},this.chains=[],this.namespace="eip155",this.disconnect=Wn,this.getAccount=Gn,this.watchAccount=Qn,this.fetchBalance=Vn,this.getNetwork=Kn,this.watchNetwork=Yn,this.switchNetwork=Zn,this.fetchEnsName=Xn,this.fetchEnsAvatar=Jn,this.wagmi=e,this.chains=t}getWalletConnectConnector(){const e=this.wagmi.connectors.find((e=>"walletConnect"===e.id));if(!e)throw new Error("WalletConnectConnector is required");return e}async connectWalletConnectProvider(e,t){return await e.getProvider(),new Promise((r=>{e.once("message",(e=>{"display_uri"===e.type&&(t(e.data),r())}))}))}getConnectorById(e){const t=this.wagmi.connectors.find((t=>t.id===e));if(!t)throw new Error(`Connector for id ${e} was not found`);return t}getConnectors(){return this.wagmi.connectors.filter((e=>!e.id.includes("walletConnect")))}async connectWalletConnect(e,t){const r=this.getWalletConnectConnector(),n={connector:r};return t&&(n.chainId=t),Promise.all([Un(n),this.connectWalletConnectProvider(r,e)])}async connectConnector(e,t){const r={connector:this.getConnectorById(e)};return t&&(r.chainId=t),await Un(r)}isInjectedProviderInstalled(){return typeof window.ethereum<"u"}safeCheckInjectedProvider(e){var t;try{const r=String(e);return Boolean(null==(t=window.ethereum)?void 0:t[r])}catch(e){return console.error(e),!1}}async getConnectedChainIds(){var e,t,r;const n=null==(t=null==(e=(await this.getWalletConnectConnector().getProvider()).signer)?void 0:e.session)?void 0:t.namespaces,i=null==(r=n?.[this.namespace])?void 0:r.methods;if(null!=i&&i.includes("wallet_addEthereumChain"))return"ALL";if(n){const e=[];return Object.keys(n).forEach((t=>{t.includes(this.namespace)&&e.push(...n[t].accounts)})),e?.map((e=>e.split(":")[1]))}return"ALL"}},window.w3mConnectors=function({chains:e,projectId:t}){return[new Ei({chains:e,options:{projectId:t,showQrModal:!1}}),new _e({chains:e,options:{shimDisconnect:!0}})]},window.w3mProvider=function({projectId:e}){return function({rpc:e}){return function(t){const r=e(t);return r&&""!==r.http?{chain:{...t,rpcUrls:{...t.rpcUrls,default:{http:[r.http]}}},rpcUrls:{http:[r.http],webSocket:r.webSocket?[r.webSocket]:void 0}}:null}}({rpc:t=>{var r;return[1,3,4,5,10,42,56,69,97,100,137,280,324,420,42161,42220,43114,80001,421611,421613,1313161554,1313161555].includes(t.id)?{http:`https://rpc.walletconnect.com/v1/?chainId=eip155:${t.id}&projectId=${e}`}:{http:t.rpcUrls.default.http[0],webSocket:null==(r=t.rpcUrls.default.webSocket)?void 0:r[0]}}})},window.chains={mainnet:{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"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},arbitrum:{id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}},avalanche:{id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}},bsc:{id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]},public:{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}}},celo:{id:42220,name:"Celo",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1},aurora:{id:1313161554,name:"Aurora",network:"aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{infura:{http:["https://aurora-mainnet.infura.io/v3"]},default:{http:["https://mainnet.aurora.dev"]},public:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{etherscan:{name:"Aurorascan",url:"https://aurorascan.dev"},default:{name:"Aurorascan",url:"https://aurorascan.dev"}}},fantom:{id:250,name:"Fantom",network:"fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]},public:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://ftmscan.com"},default:{name:"FTMScan",url:"https://ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}},gnosis:{id:100,name:"Gnosis",network:"gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"]},public:{http:["https://rpc.gnosischain.com"]}},blockExplorers:{etherscan:{name:"Gnosisscan",url:"https://gnosisscan.io"},default:{name:"Gnosis Chain Explorer",url:"https://blockscout.com/xdai/mainnet"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}},moonbeam:{id:1284,name:"Moonbeam",network:"moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{public:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]},default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1},moonriver:{id:1285,name:"Moonriver",network:"moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{public:{http:["https://moonriver.public.blastapi.io"],webSocket:["wss://moonriver.public.blastapi.io"]},default:{http:["https://moonriver.public.blastapi.io"],webSocket:["wss://moonriver.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonriver.moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1},optimism:{id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},polygon:{id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}},polygonZkEvm:{id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}},zkSync:{id:324,name:"zkSync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]},public:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}}},base:{id:8453,network:"base",name:"Base",nativeCurrency:{name:"Base",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{blockscout:{name:"Basescout",url:"https://base.blockscout.com"},default:{name:"Basescan",url:"https://basescan.org"},etherscan:{name:"Basescan",url:"https://basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022}}}},window.configureChains=function(e,t,{batch:r={multicall:{wait:32}},pollingInterval:n=4e3,rank:i,retryCount:o,retryDelay:s,stallTimeout:a}={}){if(!e.length)throw new Error("must have at least one chain");let c=[];const l={},u={};for(const r of e){let e=!1;for(const n of t){const t=n(r);t&&(e=!0,c.some((({id:e})=>e===r.id))||(c=[...c,t.chain]),l[r.id]=[...l[r.id]||[],...t.rpcUrls.http],t.rpcUrls.webSocket&&(u[r.id]=[...u[r.id]||[],...t.rpcUrls.webSocket]))}if(!e)throw new Error([`Could not find valid provider configuration for chain "${r.name}".\n`,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join("\n"))}return{chains:c,publicClient:({chainId:t})=>{const u=c.find((e=>e.id===t))??e[0],h=l[u.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${u.id}"`);const d=zt({batch:r,chain:u,transport:Ht(h.map((e=>function(e,t={}){const{batch:r,fetchOptions:n,key:i="http",name:o="HTTP JSON-RPC",retryDelay:s}=t;return({chain:a,retryCount:c,timeout:l})=>{const{batchSize:u=1e3,wait:h=0}="object"==typeof r?r:{},d=t.retryCount??c,p=l??t.timeout??1e4,f=e||a?.rpcUrls.default.http[0];if(!f)throw new Ft;return Ce({key:i,name:o,async request({method:t,params:i}){const o={method:t,params:i},{schedule:s}=(0,qt.S)({id:`${e}`,wait:h,shouldSplitBatch:e=>e.length>u,fn:e=>Qt.http(f,{body:e,fetchOptions:n,timeout:p})}),[{error:a,result:c}]=await(async e=>r?s(e):[await Qt.http(f,{body:e,fetchOptions:n,timeout:p})])(o);if(a)throw new we.bs({body:o,error:a,url:f});return c},retryCount:d,retryDelay:s,timeout:p,type:"http"},{url:e})}}(e,{timeout:a}))),{rank:i,retryCount:o,retryDelay:s}),pollingInterval:n});return Object.assign(d,{chains:c})},webSocketPublicClient:({chainId:t})=>{const l=c.find((e=>e.id===t))??e[0],h=u[l.id];if(!h||!h[0])return;const d=zt({batch:r,chain:l,transport:Ht(h.map((e=>function(e,t={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:i}=t;return({chain:o,retryCount:s,timeout:a})=>{const c=t.retryCount??s,l=a??t.timeout??1e4,u=e||o?.rpcUrls.default.webSocket?.[0];if(!u)throw new Ft;return Ce({key:r,name:n,async request({method:e,params:t}){const r={method:e,params:t},n=await Zt(u),{error:i,result:o}=await Qt.webSocketAsync(n,{body:r,timeout:l});if(i)throw new we.bs({body:r,error:i,url:u});return o},retryCount:c,retryDelay:i,timeout:l,type:"webSocket"},{getSocket:()=>Zt(u),async subscribe({params:e,onData:t,onError:r}){const n=await Zt(u),{result:i}=await new Promise(((i,o)=>Qt.webSocket(n,{body:{method:"eth_subscribe",params:e},onResponse(e){if(e.error)return o(e.error),void r?.(e.error);"number"!=typeof e.id?"eth_subscription"===e.method&&t(e.params):i(e)}})));return{subscriptionId:i,unsubscribe:async()=>new Promise((e=>Qt.webSocket(n,{body:{method:"eth_unsubscribe",params:[i]},onResponse:e})))}}})}}(e,{timeout:a}))),{rank:i,retryCount:o,retryDelay:s}),pollingInterval:n});return Object.assign(d,{chains:c})}}},window.createConfig=function(e){const t=new class{constructor({autoConnect:e=!1,connectors:t=[new _e],publicClient:r,storage:n=Nn({storage:"undefined"!=typeof window?window.localStorage:Mn}),logger:i={warn:console.warn},webSocketPublicClient:o}){Oe(this,Rn),this.publicClients=new Map,this.webSocketPublicClients=new Map,Oe(this,Tn,void 0),Oe(this,jn,void 0),this.args={autoConnect:e,connectors:t,logger:i,publicClient:r,storage:n,webSocketPublicClient:o};let s,a="disconnected";if(e)try{const e=n.getItem(Dn),t=e?.state?.data;a=t?.account?"reconnecting":"connecting",s=t?.chain?.id}catch(e){}const c="function"==typeof t?t():t;var l,u,h,d;c.forEach((e=>e.setStorage(n))),this.store=(d=((e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(r,n,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let l;try{l=o.getStorage()}catch(e){}if(!l)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)}),n,i);const u=Xt(o.serialize),h=()=>{const e=o.partialize({...n()});let t;const r=u({state:e,version:o.version}).then((e=>l.setItem(o.name,e))).catch((e=>{t=e}));if(t)throw t;return r},d=i.setState;i.setState=(e,t)=>{d(e,t),h()};const p=e(((...e)=>{r(...e),h()}),n,i);let f;const m=()=>{var e;if(!l)return;s=!1,a.forEach((e=>e(n())));const t=(null==(e=o.onRehydrateStorage)?void 0:e.call(o,n()))||void 0;return Xt(l.getItem.bind(l))(o.name).then((e=>{if(e)return o.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.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 f=o.merge(e,null!=(t=n())?t:p),r(f,!0),h()})).then((()=>{null==t||t(f,void 0),s=!0,c.forEach((e=>e(f)))})).catch((e=>{null==t||t(void 0,e)}))};return i.persist={setOptions:e=>{o={...o,...e},e.getStorage&&(l=e.getStorage())},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},m(),f||p})(e,t)):((e,t)=>(r,n,i)=>{let o={storage:Jt((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,c=new Set;let l=o.storage;if(!l)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...e)}),n,i);const u=()=>{const e=o.partialize({...n()});return l.setItem(o.name,{state:e,version:o.version})},h=i.setState;i.setState=(e,t)=>{h(e,t),u()};const d=e(((...e)=>{r(...e),u()}),n,i);let p;const f=()=>{var e,t;if(!l)return;s=!1,a.forEach((e=>{var t;return e(null!=(t=n())?t:d)}));const i=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=n())?e:d))||void 0;return Xt(l.getItem.bind(l))(o.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return e.state;if(o.migrate)return o.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 p=o.merge(e,null!=(t=n())?t:d),r(p,!0),u()})).then((()=>{null==i||i(p,void 0),p=n(),s=!0,c.forEach((e=>e(p)))})).catch((e=>{null==i||i(void 0,e)}))};return i.persist={setOptions:e=>{o={...o,...e},e.storage&&(l=e.storage)},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>f(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},o.skipHydration||f(),p||d})(e,t))((()=>({connectors:c,publicClient:this.getPublicClient({chainId:s}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:s})})),{name:Dn,storage:n,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}),(h=(e,t,r)=>{const n=r.subscribe;return r.subscribe=(e,t,i)=>{let o=e;if(t){const n=(null==i?void 0:i.equalityFn)||Object.is;let s=e(r.getState());o=r=>{const i=e(r);if(!n(s,i)){const e=s;t(s=i,e)}},(null==i?void 0:i.fireImmediately)&&t(s,s)}return n(o)},d(e,t,r)})?er(h):er),this.storage=n,ke(this,jn,n?.getItem("wallet")),(this,l=Rn,u=Ln,Ie(this,l,"access private method"),u).call(this),e&&"undefined"!=typeof window&&setTimeout((async()=>await this.autoConnect()),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const t="function"==typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState((e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"})))}async destroy(){this.connector&&await(this.connector.disconnect?.()),ke(this,Tn,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(Pe(this,Tn))return;ke(this,Tn,!0),this.setState((e=>({...e,status:e.data?.account?"reconnecting":"connecting"})));const e=Pe(this,jn)?[...this.connectors].sort((e=>e.id===Pe(this,jn)?-1:1)):this.connectors;let t=!1;for(const r of e){if(!r.ready||!r.isAuthorized)continue;if(!await r.isAuthorized())continue;const e=await r.connect();this.setState((t=>({...t,connector:r,chains:r?.chains,data:e,status:"connected"}))),t=!0;break}return t||this.setState((e=>({...e,data:void 0,status:"disconnected"}))),ke(this,Tn,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const t="function"==typeof e?e():e;t.forEach((e=>e.setStorage(this.args.storage))),this.setState((e=>({...e,connectors:t})))}getPublicClient({chainId:e}={}){let t=this.publicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.publicClients.get(e??-1),t)return t;const{publicClient:r}=this.args;return t="function"==typeof r?r({chainId:e}):r,this.publicClients.set(e??-1,t),t}setPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState((e=>({...e,publicClient:this.getPublicClient({chainId:t})})))}getWebSocketPublicClient({chainId:e}={}){let t=this.webSocketPublicClients.get(-1);if(t&&t?.chain.id===e)return t;if(t=this.webSocketPublicClients.get(e??-1),t)return t;const{webSocketPublicClient:r}=this.args;return t="function"==typeof r?r({chainId:e}):r,t&&this.webSocketPublicClients.set(e??-1,t),t}setWebSocketPublicClient(e){const t=this.data?.chain?.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState((e=>({...e,webSocketPublicClient:this.getWebSocketPublicClient({chainId:t})})))}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}}(e);return $n=t,t},window.Web3ModalV2=class{constructor(e,t){this.openModal=_i.jb.open,this.closeModal=_i.jb.close,this.subscribeModal=_i.jb.subscribe,this.setTheme=_i.ThemeCtrl.setThemeConfig,this.setDefaultChain=_i.OptionsCtrl.setSelectedChain,this.subscribeEvents=_i.uA.subscribe,_i.ThemeCtrl.setThemeConfig(e),_i.Id.setEthereumClient(t),_i.ConfigCtrl.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(r.bind(r,8416));const e=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",e),_i.OptionsCtrl.setIsUiLoaded(!0)}}}})()})();