1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{31050:function(r,i,c){"use strict";i.Xx=i._w=i.aP=i.KS=i.jQ=void 0,c(31416);let l=c(93350);function gf(r){let i=new Float64Array(16);if(r)for(let c=0;c<r.length;c++)i[c]=r[c];return i}c(17309),i.jQ=64,i.KS=64,i.aP=32;let E=new Uint8Array(32);E[0]=9;let S=gf(),P=gf([1]),C=(gf([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),gf([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222])),R=gf([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),A=gf([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]);function set25519(r,i){for(let c=0;c<16;c++)r[c]=0|i[c]}function car25519(r){let i=1;for(let c=0;c<16;c++){let l=r[c]+i+65535;i=Math.floor(l/65536),r[c]=l-65536*i}r[0]+=i-1+37*(i-1)}function sel25519(r,i,c){let l=~(c-1);for(let c=0;c<16;c++){let E=l&(r[c]^i[c]);r[c]^=E,i[c]^=E}}function pack25519(r,i){let c=gf(),l=gf();for(let r=0;r<16;r++)l[r]=i[r];car25519(l),car25519(l),car25519(l);for(let r=0;r<2;r++){c[0]=l[0]-65517;for(let r=1;r<15;r++)c[r]=l[r]-65535-(c[r-1]>>16&1),c[r-1]&=65535;c[15]=l[15]-32767-(c[14]>>16&1);let r=c[15]>>16&1;c[14]&=65535,sel25519(l,c,1-r)}for(let i=0;i<16;i++)r[2*i]=255&l[i],r[2*i+1]=l[i]>>8}gf([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function add(r,i,c){for(let l=0;l<16;l++)r[l]=i[l]+c[l]}function sub(r,i,c){for(let l=0;l<16;l++)r[l]=i[l]-c[l]}function mul(r,i,c){let l,E,S=0,P=0,C=0,R=0,A=0,T=0,q=0,M=0,$=0,U=0,F=0,J=0,Q=0,X=0,ee=0,et=0,eo=0,ec=0,el=0,eh=0,ep=0,ef=0,ed=0,eg=0,ey=0,e_=0,em=0,eb=0,ew=0,eI=0,eE=0,ex=c[0],eS=c[1],eP=c[2],eO=c[3],eC=c[4],eR=c[5],eA=c[6],ej=c[7],eN=c[8],eL=c[9],eT=c[10],ez=c[11],eD=c[12],ek=c[13],eM=c[14],e$=c[15];S+=(l=i[0])*ex,P+=l*eS,C+=l*eP,R+=l*eO,A+=l*eC,T+=l*eR,q+=l*eA,M+=l*ej,$+=l*eN,U+=l*eL,F+=l*eT,J+=l*ez,Q+=l*eD,X+=l*ek,ee+=l*eM,et+=l*e$,P+=(l=i[1])*ex,C+=l*eS,R+=l*eP,A+=l*eO,T+=l*eC,q+=l*eR,M+=l*eA,$+=l*ej,U+=l*eN,F+=l*eL,J+=l*eT,Q+=l*ez,X+=l*eD,ee+=l*ek,et+=l*eM,eo+=l*e$,C+=(l=i[2])*ex,R+=l*eS,A+=l*eP,T+=l*eO,q+=l*eC,M+=l*eR,$+=l*eA,U+=l*ej,F+=l*eN,J+=l*eL,Q+=l*eT,X+=l*ez,ee+=l*eD,et+=l*ek,eo+=l*eM,ec+=l*e$,R+=(l=i[3])*ex,A+=l*eS,T+=l*eP,q+=l*eO,M+=l*eC,$+=l*eR,U+=l*eA,F+=l*ej,J+=l*eN,Q+=l*eL,X+=l*eT,ee+=l*ez,et+=l*eD,eo+=l*ek,ec+=l*eM,el+=l*e$,A+=(l=i[4])*ex,T+=l*eS,q+=l*eP,M+=l*eO,$+=l*eC,U+=l*eR,F+=l*eA,J+=l*ej,Q+=l*eN,X+=l*eL,ee+=l*eT,et+=l*ez,eo+=l*eD,ec+=l*ek,el+=l*eM,eh+=l*e$,T+=(l=i[5])*ex,q+=l*eS,M+=l*eP,$+=l*eO,U+=l*eC,F+=l*eR,J+=l*eA,Q+=l*ej,X+=l*eN,ee+=l*eL,et+=l*eT,eo+=l*ez,ec+=l*eD,el+=l*ek,eh+=l*eM,ep+=l*e$,q+=(l=i[6])*ex,M+=l*eS,$+=l*eP,U+=l*eO,F+=l*eC,J+=l*eR,Q+=l*eA,X+=l*ej,ee+=l*eN,et+=l*eL,eo+=l*eT,ec+=l*ez,el+=l*eD,eh+=l*ek,ep+=l*eM,ef+=l*e$,M+=(l=i[7])*ex,$+=l*eS,U+=l*eP,F+=l*eO,J+=l*eC,Q+=l*eR,X+=l*eA,ee+=l*ej,et+=l*eN,eo+=l*eL,ec+=l*eT,el+=l*ez,eh+=l*eD,ep+=l*ek,ef+=l*eM,ed+=l*e$,$+=(l=i[8])*ex,U+=l*eS,F+=l*eP,J+=l*eO,Q+=l*eC,X+=l*eR,ee+=l*eA,et+=l*ej,eo+=l*eN,ec+=l*eL,el+=l*eT,eh+=l*ez,ep+=l*eD,ef+=l*ek,ed+=l*eM,eg+=l*e$,U+=(l=i[9])*ex,F+=l*eS,J+=l*eP,Q+=l*eO,X+=l*eC,ee+=l*eR,et+=l*eA,eo+=l*ej,ec+=l*eN,el+=l*eL,eh+=l*eT,ep+=l*ez,ef+=l*eD,ed+=l*ek,eg+=l*eM,ey+=l*e$,F+=(l=i[10])*ex,J+=l*eS,Q+=l*eP,X+=l*eO,ee+=l*eC,et+=l*eR,eo+=l*eA,ec+=l*ej,el+=l*eN,eh+=l*eL,ep+=l*eT,ef+=l*ez,ed+=l*eD,eg+=l*ek,ey+=l*eM,e_+=l*e$,J+=(l=i[11])*ex,Q+=l*eS,X+=l*eP,ee+=l*eO,et+=l*eC,eo+=l*eR,ec+=l*eA,el+=l*ej,eh+=l*eN,ep+=l*eL,ef+=l*eT,ed+=l*ez,eg+=l*eD,ey+=l*ek,e_+=l*eM,em+=l*e$,Q+=(l=i[12])*ex,X+=l*eS,ee+=l*eP,et+=l*eO,eo+=l*eC,ec+=l*eR,el+=l*eA,eh+=l*ej,ep+=l*eN,ef+=l*eL,ed+=l*eT,eg+=l*ez,ey+=l*eD,e_+=l*ek,em+=l*eM,eb+=l*e$,X+=(l=i[13])*ex,ee+=l*eS,et+=l*eP,eo+=l*eO,ec+=l*eC,el+=l*eR,eh+=l*eA,ep+=l*ej,ef+=l*eN,ed+=l*eL,eg+=l*eT,ey+=l*ez,e_+=l*eD,em+=l*ek,eb+=l*eM,ew+=l*e$,ee+=(l=i[14])*ex,et+=l*eS,eo+=l*eP,ec+=l*eO,el+=l*eC,eh+=l*eR,ep+=l*eA,ef+=l*ej,ed+=l*eN,eg+=l*eL,ey+=l*eT,e_+=l*ez,em+=l*eD,eb+=l*ek,ew+=l*eM,eI+=l*e$,et+=(l=i[15])*ex,eo+=l*eS,ec+=l*eP,el+=l*eO,eh+=l*eC,ep+=l*eR,ef+=l*eA,ed+=l*ej,eg+=l*eN,ey+=l*eL,e_+=l*eT,em+=l*ez,eb+=l*eD,ew+=l*ek,eI+=l*eM,eE+=l*e$,S+=38*eo,P+=38*ec,C+=38*el,R+=38*eh,A+=38*ep,T+=38*ef,q+=38*ed,M+=38*eg,$+=38*ey,U+=38*e_,F+=38*em,J+=38*eb,Q+=38*ew,X+=38*eI,ee+=38*eE,E=Math.floor((l=S+(E=1)+6
15535)/65536),S=l-65536*E,E=Math.floor((l=P+E+65535)/65536),P=l-65536*E,E=Math.floor((l=C+E+65535)/65536),C=l-65536*E,E=Math.floor((l=R+E+65535)/65536),R=l-65536*E,E=Math.floor((l=A+E+65535)/65536),A=l-65536*E,E=Math.floor((l=T+E+65535)/65536),T=l-65536*E,E=Math.floor((l=q+E+65535)/65536),q=l-65536*E,E=Math.floor((l=M+E+65535)/65536),M=l-65536*E,E=Math.floor((l=$+E+65535)/65536),$=l-65536*E,E=Math.floor((l=U+E+65535)/65536),U=l-65536*E,E=Math.floor((l=F+E+65535)/65536),F=l-65536*E,E=Math.floor((l=J+E+65535)/65536),J=l-65536*E,E=Math.floor((l=Q+E+65535)/65536),Q=l-65536*E,E=Math.floor((l=X+E+65535)/65536),X=l-65536*E,E=Math.floor((l=ee+E+65535)/65536),ee=l-65536*E,E=Math.floor((l=et+E+65535)/65536),et=l-65536*E,S+=E-1+37*(E-1),E=Math.floor((l=S+(E=1)+65535)/65536),S=l-65536*E,E=Math.floor((l=P+E+65535)/65536),P=l-65536*E,E=Math.floor((l=C+E+65535)/65536),C=l-65536*E,E=Math.floor((l=R+E+65535)/65536),R=l-65536*E,E=Math.floor((l=A+E+65535)/65536),A=l-65536*E,E=Math.floor((l=T+E+65535)/65536),T=l-65536*E,E=Math.floor((l=q+E+65535)/65536),q=l-65536*E,E=Math.floor((l=M+E+65535)/65536),M=l-65536*E,E=Math.floor((l=$+E+65535)/65536),$=l-65536*E,E=Math.floor((l=U+E+65535)/65536),U=l-65536*E,E=Math.floor((l=F+E+65535)/65536),F=l-65536*E,E=Math.floor((l=J+E+65535)/65536),J=l-65536*E,E=Math.floor((l=Q+E+65535)/65536),Q=l-65536*E,E=Math.floor((l=X+E+65535)/65536),X=l-65536*E,E=Math.floor((l=ee+E+65535)/65536),ee=l-65536*E,E=Math.floor((l=et+E+65535)/65536),et=l-65536*E,S+=E-1+37*(E-1),r[0]=S,r[1]=P,r[2]=C,r[3]=R,r[4]=A,r[5]=T,r[6]=q,r[7]=M,r[8]=$,r[9]=U,r[10]=F,r[11]=J,r[12]=Q,r[13]=X,r[14]=ee,r[15]=et}function edadd(r,i){let c=gf(),l=gf(),E=gf(),S=gf(),P=gf(),R=gf(),A=gf(),T=gf(),q=gf();sub(c,r[1],r[0]),sub(q,i[1],i[0]),mul(c,c,q),add(l,r[0],r[1]),add(q,i[0],i[1]),mul(l,l,q),mul(E,r[3],i[3]),mul(E,E,C),mul(S,r[2],i[2]),add(S,S,S),sub(P,l,c),sub(R,S,E),add(A,S,E),add(T,l,c),mul(r[0],P,R),mul(r[1],T,A),mul(r[2],A,R),mul(r[3],P,T)}function cswap(r,i,c){for(let l=0;l<4;l++)sel25519(r[l],i[l],c)}function pack(r,i){let c=gf(),l=gf(),E=gf();(function(r,i){let c;let l=gf();for(c=0;c<16;c++)l[c]=i[c];for(c=253;c>=0;c--)mul(l,l,l),2!==c&&4!==c&&mul(l,l,i);for(c=0;c<16;c++)r[c]=l[c]})(E,i[2]),mul(c,i[0],E),mul(l,i[1],E),pack25519(r,l),r[31]^=function(r){let i=new Uint8Array(32);return pack25519(i,r),1&i[0]}(c)<<7}function scalarbase(r,i){let c=[gf(),gf(),gf(),gf()];set25519(c[0],R),set25519(c[1],A),set25519(c[2],P),mul(c[3],R,A),function(r,i,c){set25519(r[0],S),set25519(r[1],P),set25519(r[2],P),set25519(r[3],S);for(let l=255;l>=0;--l){let E=c[l/8|0]>>(7&l)&1;cswap(r,i,E),edadd(i,r),edadd(r,r),cswap(r,i,E)}}(r,c,i)}i._w=function(r){if(r.length!==i.aP)throw Error(`ed25519: seed must be ${i.aP} bytes`);let c=(0,l.hash)(r);c[0]&=248,c[31]&=127,c[31]|=64;let E=new Uint8Array(32),S=[gf(),gf(),gf(),gf()];scalarbase(S,c),pack(E,S);let P=new Uint8Array(64);return P.set(r),P.set(E,32),{publicKey:E,secretKey:P}};let T=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 modL(r,i){let c,l,E,S;for(l=63;l>=32;--l){for(c=0,E=l-32,S=l-12;E<S;++E)i[E]+=c-16*i[l]*T[E-(l-32)],c=Math.floor((i[E]+128)/256),i[E]-=256*c;i[E]+=c,i[l]=0}for(E=0,c=0;E<32;E++)i[E]+=c-(i[31]>>4)*T[E],c=i[E]>>8,i[E]&=255;for(E=0;E<32;E++)i[E]-=c*T[E];for(l=0;l<32;l++)i[l+1]+=i[l]>>8,r[l]=255&i[l]}function reduce(r){let i=new Float64Array(64);for(let c=0;c<64;c++)i[c]=r[c];for(let i=0;i<64;i++)r[i]=0;modL(r,i)}i.Xx=function(r,i){let c=new Float64Array(64),E=[gf(),gf(),gf(),gf()],S=(0,l.hash)(r.subarray(0,32));S[0]&=248,S[31]&=127,S[31]|=64;let P=new Uint8Array(64);P.set(S.subarray(32),32);let C=new l.SHA512;C.update(P.subarray(32)),C.update(i);let R=C.digest();C.clean(),reduce(R),scalarbase(E,R),pack(P,E),C.reset(),C.update(P.subarray(0,32)),C.update(r.subarray(32)),C.update(i);let A=C.digest();reduce(A);for(let r=0;r<32;r++)c[r]=R[r];for(let r=0;r<32;r++)for(let i=0;i<32;i++)c[r+i]+=A[r]*S[i];return modL(P.subarray(32),c),P}},93350:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var l=c(98099),E=c(17309);i.DIGEST_LENGTH=64,i.BLOCK_SIZE=128;var S=function(){function SHA512(){this.digestLength=i.DIGEST_LENGTH,this.blockSize=i.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 SHA512.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},SHA512.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},SHA512.prototype.clean=function(){E.wipe(this._buffer),E.wipe(this._tempHi),E.wipe(this._tempLo),this.reset()},SHA512.prototype.update=function(r,c){if(void 0===c&&(c=r.length),this._finished)throw Error("SHA512: can't update because hash was finished.");var l=0;if(this._bytesHashed+=c,this._bufferLength>0){for(;this._bufferLength<i.BLOCK_SIZE&&c>0;)this._buffer[this._bufferLength++]=r[l++],c--;this._bufferLength===this.blockSize&&(hashBlocks(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(l=hashBlocks(this._tempHi,this._tempLo,this._stateHi,this._stateLo,r,l,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=r[l++],c--;return this},SHA512.prototype.finish=function(r){if(!this._finished){var i=this._bytesHashed,c=this._bufferLength,E=i%128<112?128:256;this._buffer[c]=128;for(var S=c+1;S<E-8;S++)this._buffer[S]=0;l.writeUint32BE(i/536870912|0,this._buffer,E-8),l.writeUint32BE(i<<3,this._buffer,E-4),hashBlocks(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,E),this._finished=!0}for(var S=0;S<this.digestLength/8;
1S++)l.writeUint32BE(this._stateHi[S],r,8*S),l.writeUint32BE(this._stateLo[S],r,8*S+4);return this},SHA512.prototype.digest=function(){var r=new Uint8Array(this.digestLength);return this.finish(r),r},SHA512.prototype.saveState=function(){if(this._finished)throw 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}},SHA512.prototype.restoreState=function(r){return this._stateHi.set(r.stateHi),this._stateLo.set(r.stateLo),this._bufferLength=r.bufferLength,r.buffer&&this._buffer.set(r.buffer),this._bytesHashed=r.bytesHashed,this._finished=!1,this},SHA512.prototype.cleanSavedState=function(r){E.wipe(r.stateHi),E.wipe(r.stateLo),r.buffer&&E.wipe(r.buffer),r.bufferLength=0,r.bytesHashed=0},SHA512}();i.SHA512=S;var P=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,
11126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function hashBlocks(r,i,c,E,S,C,R){for(var A,T,q,M,$,U,F,J,Q=c[0],X=c[1],ee=c[2],et=c[3],eo=c[4],ec=c[5],el=c[6],eh=c[7],ep=E[0],ef=E[1],ed=E[2],eg=E[3],ey=E[4],e_=E[5],em=E[6],eb=E[7];R>=128;){for(var ew=0;ew<16;ew++){var eI=8*ew+C;r[ew]=l.readUint32BE(S,eI),i[ew]=l.readUint32BE(S,eI+4)}for(var ew=0;ew<80;ew++){var eE=Q,ex=X,eS=ee,eP=et,eO=eo,eC=ec,eR=el,eA=eh,ej=ep,eN=ef,eL=ed,eT=eg,ez=ey,eD=e_,ek=em,eM=eb;if(A=eh,$=65535&(T=eb),U=T>>>16,F=65535&A,J=A>>>16,A=(eo>>>14|ey<<18)^(eo>>>18|ey<<14)^(ey>>>9|eo<<23),$+=65535&(T=(ey>>>14|eo<<18)^(ey>>>18|eo<<14)^(eo>>>9|ey<<23)),U+=T>>>16,F+=65535&A,J+=A>>>16,A=eo&ec^~eo&el,$+=65535&(T=ey&e_^~ey&em),U+=T>>>16,F+=65535&A,J+=A>>>16,A=P[2*ew],$+=65535&(T=P[2*ew+1]),U+=T>>>16,F+=65535&A,J+=A>>>16,A=r[ew%16],$+=65535&(T=i[ew%16]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,q=65535&F|J<<16,M=65535&$|U<<16,A=q,$=65535&(T=M),U=T>>>16,F=65535&A,J=A>>>16,A=(Q>>>28|ep<<4)^(ep>>>2|Q<<30)^(ep>>>7|Q<<25),$+=65535&(T=(ep>>>28|Q<<4)^(Q>>>2|ep<<30)^(Q>>>7|ep<<25)),U+=T>>>16,F+=65535&A,J+=A>>>16,A=Q&X^Q&ee^X&ee,$+=65535&(T=ep&ef^ep&ed^ef&ed),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,eA=65535&F|J<<16,eM=65535&$|U<<16,A=eP,$=65535&(T=eT),U=T>>>16,F=65535&A,J=A>>>16,A=q,$+=65535&(T=M),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,eP=65535&F|J<<16,eT=65535&$|U<<16,X=eE,ee=ex,et=eS,eo=eP,ec=eO,el=eC,eh=eR,Q=eA,ef=ej,ed=eN,eg=eL,ey=eT,e_=ez,em=eD,eb=ek,ep=eM,ew%16==15)for(var eI=0;eI<16;eI++)A=r[eI],$=65535&(T=i[eI]),U=T>>>16,F=65535&A,J=A>>>16,A=r[(eI+9)%16],$+=65535&(T=i[(eI+9)%16]),U+=T>>>16,F+=65535&A,J+=A>>>16,A=((q=r[(eI+1)%16])>>>1|(M=i[(eI+1)%16])<<31)^(q>>>8|M<<24)^q>>>7,$+=65535&(T=(M>>>1|q<<31)^(M>>>8|q<<24)^(M>>>7|q<<25)),U+=T>>>16,F+=65535&A,J+=A>>>16,A=((q=r[(eI+14)%16])>>>19|(M=i[(eI+14)%16])<<13)^(M>>>29|q<<3)^q>>>6,$+=65535&(T=(M>>>19|q<<13)^(q>>>29|M<<3)^(M>>>6|q<<26)),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,r[eI]=65535&F|J<<16,i[eI]=65535&$|U<<16}A=Q,$=65535&(T=ep),U=T>>>16,F=65535&A,J=A>>>16,A=c[0],$+=65535&(T=E[0]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[0]=Q=65535&F|J<<16,E[0]=ep=65535&$|U<<16,A=X,$=65535&(T=ef),U=T>>>16,F=65535&A,J=A>>>16,A=c[1],$+=65535&(T=E[1]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[1]=X=65535&F|J<<16,E[1]=ef=65535&$|U<<16,A=ee,$=65535&(T=ed),U=T>>>16,F=65535&A,J=A>>>16,A=c[2],$+=65535&(T=E[2]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[2]=ee=65535&F|J<<16,E[2]=ed=65535&$|U<<16,A=et,$=65535&(T=eg),U=T>>>16,F=65535&A,J=A>>>16,A=c[3],$+=65535&(T=E[3]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[3]=et=65535&F|J<<16,E[3]=eg=65535&$|U<<16,A=eo,$=65535&(T=ey),U=T>>>16,F=65535&A,J=A>>>16,A=c[4],$+=65535&(T=E[4]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[4]=eo=65535&F|J<<16,E[4]=ey=65535&$|U<<16,A=ec,$=65535&(T=e_),U=T>>>16,F=65535&A,J=A>>>16,A=c[5],$+=65535&(T=E[5]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[5]=ec=65535&F|J<<16,E[5]=e_=65535&$|U<<16,A=el,$=65535&(T=em),U=T>>>16,F=65535&A,J=A>>>16,A=c[6],$+=65535&(T=E[6]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[6]=el=65535&F|J<<16,E[6]=em=65535&$|U<<16,A=eh,$=65535&(T=eb),U=T>>>16,F=65535&A,J=A>>>16,A=c[7],$+=65535&(T=E[7]),U+=T>>>16,F+=65535&A,J+=A>>>16,U+=$>>>16,F+=U>>>16,J+=F>>>16,c[7]=eh=65535&F|J<<16,E[7]=eb=65535&$|U<<16,C+=128,R-=128}return C}i.hash=function(r){var i=new S;i.update(r);var c=i.digest();return i.clean(),c}},70490:function(r,i,c){"use strict";let l;c.d(i,{EthereumProvider:function(){return rH}});var E=c(17187),S=c.n(E),P=c(50778);let C=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,R=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,A=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function jsonParseTransform(r,i){if("__proto__"===r||"constructor"===r&&i&&"object"==typeof i&&"prototype"in i){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`);return}return i}function destr(r,i={}){if("string"!=typeof r)return r;let c=r.trim();if('"'===r[0]&&r.endsWith('"')&&!r.includes("\\"))return c.slice(1,-1);if(c.length<=9){let r=c.toLowerCase();if("true"===r)return!0;
1if("false"===r)return!1;if("undefined"===r)return;if("null"===r)return null;if("nan"===r)return Number.NaN;if("infinity"===r)return Number.POSITIVE_INFINITY;if("-infinity"===r)return Number.NEGATIVE_INFINITY}if(!A.test(r)){if(i.strict)throw SyntaxError("[destr] Invalid JSON");return r}try{if(C.test(r)||R.test(r)){if(i.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(r,jsonParseTransform)}return JSON.parse(r)}catch(c){if(i.strict)throw c;return r}}var T=c(48764).Buffer;function asyncCall(r,...i){try{var c;return(c=r(...i))&&"function"==typeof c.then?c:Promise.resolve(c)}catch(r){return Promise.reject(r)}}function stringify(r){if(function(r){let i=typeof r;return null===r||"object"!==i&&"function"!==i}(r))return String(r);if(function(r){let i=Object.getPrototypeOf(r);return!i||i.isPrototypeOf(Object)}(r)||Array.isArray(r))return JSON.stringify(r);if("function"==typeof r.toJSON)return stringify(r.toJSON());throw Error("[unstorage] Cannot stringify value!")}let q="base64:";function normalizeKey(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function unstorage_8581f561_normalizeBaseKey(r){return(r=normalizeKey(r))?r+":":""}let memory=()=>{let r=new Map;return{name:"memory",options:{},hasItem:i=>r.has(i),getItem:i=>r.get(i)??null,getItemRaw:i=>r.get(i)??null,setItem(i,c){r.set(i,c)},setItemRaw(i,c){r.set(i,c)},removeItem(i){r.delete(i)},getKeys:()=>Array.from(r.keys()),clear(){r.clear()},dispose(){r.clear()}}};function watch(r,i,c){return r.watch?r.watch((r,l)=>i(r,c+l)):()=>{}}async function dispose(r){"function"==typeof r.dispose&&await asyncCall(r.dispose)}function promisifyRequest(r){return new Promise((i,c)=>{r.oncomplete=r.onsuccess=()=>i(r.result),r.onabort=r.onerror=()=>c(r.error)})}function createStore(r,i){let c=indexedDB.open(r);c.onupgradeneeded=()=>c.result.createObjectStore(i);let l=promisifyRequest(c);return(r,c)=>l.then(l=>c(l.transaction(i,r).objectStore(i)))}function defaultGetStore(){return l||(l=createStore("keyval-store","keyval")),l}function get(r,i=defaultGetStore()){return i("readonly",i=>promisifyRequest(i.get(r)))}var M=c(85094),z=(r={})=>{let i;let c=r.base&&r.base.length>0?`${r.base}:`:"",e=r=>c+r;return r.dbName&&r.storeName&&(i=createStore(r.dbName,r.storeName)),{name:"idb-keyval",options:r,hasItem:async r=>!(typeof await get(e(r),i)>"u"),getItem:async r=>await get(e(r),i)??null,setItem:(r,c)=>(function(r,i,c=defaultGetStore()){return c("readwrite",c=>(c.put(i,r),promisifyRequest(c.transaction)))})(e(r),c,i),removeItem:r=>(function(r,i=defaultGetStore()){return i("readwrite",i=>(i.delete(r),promisifyRequest(i.transaction)))})(e(r),i),getKeys:()=>(function(r=defaultGetStore()){return r("readonly",r=>{var i;if(r.getAllKeys)return promisifyRequest(r.getAllKeys());let c=[];return(i=r=>c.push(r.key),r.openCursor().onsuccess=function(){this.result&&(i(this.result),this.result.continue())},promisifyRequest(r.transaction)).then(()=>c)})})(i),clear:()=>(function(r=defaultGetStore()){return r("readwrite",r=>(r.clear(),promisifyRequest(r.transaction)))})(i)}};let _=class _{constructor(){this.indexedDb=function(r={}){let i={mounts:{"":r.driver||memory()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},getMount=r=>{for(let c of i.mountpoints)if(r.startsWith(c))return{base:c,relativeKey:r.slice(c.length),driver:i.mounts[c]};return{base:"",relativeKey:r,driver:i.mounts[""]}},getMounts=(r,c)=>i.mountpoints.filter(i=>i.startsWith(r)||c&&r.startsWith(i)).map(c=>({relativeBase:r.length>c.length?r.slice(c.length):void 0,mountpoint:c,driver:i.mounts[c]})),onChange=(r,c)=>{if(i.watching)for(let l of(c=normalizeKey(c),i.watchListeners))l(r,c)},startWatch=async()=>{if(!i.watching)for(let r in i.watching=!0,i.mounts)i.unwatch[r]=await watch(i.mounts[r],onChange,r)},stopWatch=async()=>{if(i.watching){for(let r in i.unwatch)await i.unwatch[r]();i.unwatch={},i.watching=!1}},runBatch=(r,i,c)=>{let l=new Map,getBatch=r=>{let i=l.get(r.base);return i||(i={driver:r.driver,base:r.base,items:[]},l.set(r.base,i)),i};for(let c of r){let r="string"==typeof c,l=normalizeKey(r?c:c.key),E=r?void 0:c.value,S=r||!c.options?i:{...i,...c.options},P=getMount(l);getBatch(P).items.push({key:l,value:E,relativeKey:P.relativeKey,options:S})}return Promise.all([...l.values()].map(r=>c(r))).then(r=>r.flat())},c={hasItem(r,i={}){r=normalizeKey(r);let{relativeKey:c,driver:l}=getMount(r);return asyncCall(l.hasItem,c,i)},getItem(r,i={}){r=normalizeKey(r);let{relativeKey:c,driver:l}=getMount(r);return asyncCall(l.getItem,c,i).then(r=>destr(r))},getItems:(r,i)=>runBatch(r,i,r=>r.driver.getItems?asyncCall(r.driver.getItems,r.items.map(r=>({key:r.relativeKey,options:r.options})),i).then(i=>i.map(i=>({key:function(...r){return normalizeKey(r.join(":"))}(r.base,i.key),value:destr(i.value)}))):Promise.all(r.items.map(i=>asyncCall(r.driver.getItem,i.relativeKey,i.options).then(r=>({key:i.key,value:destr(r)}))))),getItemRaw(r,i={}){r=normalizeKey(r);let{relativeKey:c,driver:l}=getMount(r);return l.getItemRaw?asyncCall(l.getItemRaw,c,i):asyncCall(l.getItem,c,i).then(r=>"string"==typeof r&&r.startsWith(q)?T.from(r.slice(q.length),"base64"):r)},async setItem(r,i,l={}){if(void 0===i)return c.removeItem(r);r=normalizeKey(r);let{relativeKey:E,driver:S}=getMount(r);
1S.setItem&&(await asyncCall(S.setItem,E,stringify(i),l),S.watch||onChange("update",r))},async setItems(r,i){await runBatch(r,i,async r=>{if(r.driver.setItems)return asyncCall(r.driver.setItems,r.items.map(r=>({key:r.relativeKey,value:stringify(r.value),options:r.options})),i);r.driver.setItem&&await Promise.all(r.items.map(i=>asyncCall(r.driver.setItem,i.relativeKey,stringify(i.value),i.options)))})},async setItemRaw(r,i,l={}){if(void 0===i)return c.removeItem(r,l);r=normalizeKey(r);let{relativeKey:E,driver:S}=getMount(r);if(S.setItemRaw)await asyncCall(S.setItemRaw,E,i,l);else{if(!S.setItem)return;await asyncCall(S.setItem,E,function(r){if("string"==typeof r)return r;let i=T.from(r).toString("base64");return q+i}(i),l)}S.watch||onChange("update",r)},async removeItem(r,i={}){"boolean"==typeof i&&(i={removeMeta:i}),r=normalizeKey(r);let{relativeKey:c,driver:l}=getMount(r);l.removeItem&&(await asyncCall(l.removeItem,c,i),(i.removeMeta||i.removeMata)&&await asyncCall(l.removeItem,c+"$",i),l.watch||onChange("remove",r))},async getMeta(r,i={}){"boolean"==typeof i&&(i={nativeOnly:i}),r=normalizeKey(r);let{relativeKey:c,driver:l}=getMount(r),E=Object.create(null);if(l.getMeta&&Object.assign(E,await asyncCall(l.getMeta,c,i)),!i.nativeOnly){let r=await asyncCall(l.getItem,c+"$",i).then(r=>destr(r));r&&"object"==typeof r&&("string"==typeof r.atime&&(r.atime=new Date(r.atime)),"string"==typeof r.mtime&&(r.mtime=new Date(r.mtime)),Object.assign(E,r))}return E},setMeta(r,i,c={}){return this.setItem(r+"$",i,c)},removeMeta(r,i={}){return this.removeItem(r+"$",i)},async getKeys(r,i={}){r=unstorage_8581f561_normalizeBaseKey(r);let c=getMounts(r,!0),l=[],E=[];for(let r of c){let c=await asyncCall(r.driver.getKeys,r.relativeBase,i),S=c.map(i=>r.mountpoint+normalizeKey(i)).filter(r=>!l.some(i=>r.startsWith(i)));E.push(...S),l=[r.mountpoint,...l.filter(i=>!i.startsWith(r.mountpoint))]}return r?E.filter(i=>i.startsWith(r)&&!i.endsWith("$")):E.filter(r=>!r.endsWith("$"))},async clear(r,i={}){r=unstorage_8581f561_normalizeBaseKey(r),await Promise.all(getMounts(r,!1).map(async r=>{if(r.driver.clear)return asyncCall(r.driver.clear,r.relativeBase,i);if(r.driver.removeItem){let c=await r.driver.getKeys(r.relativeBase||"",i);return Promise.all(c.map(c=>r.driver.removeItem(c,i)))}}))},async dispose(){await Promise.all(Object.values(i.mounts).map(r=>dispose(r)))},watch:async r=>(await startWatch(),i.watchListeners.push(r),async()=>{i.watchListeners=i.watchListeners.filter(i=>i!==r),0===i.watchListeners.length&&await stopWatch()}),async unwatch(){i.watchListeners=[],await stopWatch()},mount(r,l){if((r=unstorage_8581f561_normalizeBaseKey(r))&&i.mounts[r])throw Error(`already mounted at ${r}`);return r&&(i.mountpoints.push(r),i.mountpoints.sort((r,i)=>i.length-r.length)),i.mounts[r]=l,i.watching&&Promise.resolve(watch(l,onChange,r)).then(c=>{i.unwatch[r]=c}).catch(console.error),c},async unmount(r,c=!0){(r=unstorage_8581f561_normalizeBaseKey(r))&&i.mounts[r]&&(i.watching&&r in i.unwatch&&(i.unwatch[r](),delete i.unwatch[r]),c&&await dispose(i.mounts[r]),i.mountpoints=i.mountpoints.filter(i=>i!==r),delete i.mounts[r])},getMount(r=""){r=normalizeKey(r)+":";let i=getMount(r);return{driver:i.driver,base:i.base}},getMounts(r="",i={}){r=normalizeKey(r);let c=getMounts(r,i.parents);return c.map(r=>({driver:r.driver,base:r.mountpoint}))}};return c}({driver:z({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(r=>[r.key,r.value])}async getItem(r){let i=await this.indexedDb.getItem(r);if(null!==i)return i}async setItem(r,i){await this.indexedDb.setItem(r,(0,M.u)(i))}async removeItem(r){await this.indexedDb.removeItem(r)}};var $="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof c.g?c.g:"u">typeof self?self:{},U={exports:{}};function k(r){var i;return[r[0],(0,M.D)(null!=(i=r[1])?i:"")]}!function(){function t(){}t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,i){this[r]=String(i)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){let r=this;Object.keys(r).forEach(function(i){r[i]=void 0,delete r[i]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),"u">typeof $&&$.localStorage?U.exports=$.localStorage:"u">typeof window&&window.localStorage?U.exports=window.localStorage:U.exports=new t}();let K=class K{constructor(){this.localStorage=U.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(k)}async getItem(r){let i=this.localStorage.getItem(r);if(null!==i)return(0,M.D)(i)}async setItem(r,i){this.localStorage.setItem(r,(0,M.u)(i))}async removeItem(r){this.localStorage.removeItem(r)}};let O=async(r,i,c)=>{let l="wc_storage_version",E=await i.getItem(l);if(E&&E>=1){c(i);return}let S=await r.getKeys();if(!S.length){c(i);return}let P=[];for(;S.length;){let c=S.shift();if(!c)continue;let l=c.toLowerCase();if(l.includes("wc@")||l.includes("walletconnect")||l.includes("wc_")||l.includes("wallet_connect")){let l=await r.getItem(c);await i.setItem(c,l),P.push(c)}}await i.setItem(l,1),c(i),j(r,P)},j=async(r,i)=>
1{i.length&&i.forEach(async i=>{await r.removeItem(i)})};let h=class h{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};let r=new K;this.storage=r;try{let i=new _;O(r,i,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(r){return await this.initialize(),this.storage.getItem(r)}async setItem(r,i){return await this.initialize(),this.storage.setItem(r,i)}async removeItem(r){return await this.initialize(),this.storage.removeItem(r)}async initialize(){this.initialized||await new Promise(r=>{let i=setInterval(()=>{this.initialized&&(clearInterval(i),r())},20)})}};var F=c(90772),J=c(9107),Q=c(38200);let n=class n extends Q.q{constructor(r){super(),this.opts=r,this.protocol="wc",this.version=2}};let index_es_h=class index_es_h extends Q.q{constructor(r,i){super(),this.core=r,this.logger=i,this.records=new Map}};let a=class a{constructor(r,i){this.logger=r,this.core=i}};let u=class u extends Q.q{constructor(r,i){super(),this.relayer=r,this.logger=i}};let g=class g extends Q.q{constructor(r){super()}};let p=class p{constructor(r,i,c,l){this.core=r,this.logger=i,this.name=c}};let d=class d extends Q.q{constructor(r,i){super(),this.relayer=r,this.logger=i}};let index_es_E=class index_es_E extends Q.q{constructor(r,i){super(),this.core=r,this.logger=i}};let index_es_y=class index_es_y{constructor(r,i){this.projectId=r,this.logger=i}};let v=class v{constructor(r,i){this.projectId=r,this.logger=i}};let b=class b{constructor(r){this.opts=r,this.protocol="wc",this.version=2}};let w=class w{constructor(r){this.client=r}};var X=c(31050),ee=c(31416),et=c(66736);let eo="base64url",ec="base58btc";var el=c(20605),eh=c(92263),ep=c(52217);function encodeJSON(r){return(0,eh.B)((0,ep.m)((0,M.u)(r),"utf8"),eo)}function encodeIss(r){let i=(0,ep.m)("K36",ec),c="z"+(0,eh.B)((0,el.z)([i,r]),ec);return["did","key",c].join(":")}function generateKeyPair(r=(0,ee.randomBytes)(32)){return X._w(r)}async function signJWT(r,i,c,l,E=(0,et.fromMiliseconds)(Date.now())){var S,P,C;let R={alg:"EdDSA",typ:"JWT"},A=encodeIss(l.publicKey),T={iss:A,sub:r,aud:i,iat:E,exp:E+c},q=(S={header:R,payload:T},(0,ep.m)([encodeJSON(S.header),encodeJSON(S.payload)].join("."),"utf8")),M=X.Xx(l.secretKey,q);return[encodeJSON((P={header:R,payload:T,signature:M}).header),encodeJSON(P.payload),(C=P.signature,(0,eh.B)(C,eo))].join(".")}c(43014);var ef=c(37466),ed=c(46160),eg=c(56186);let index_es_b=()=>"u">typeof WebSocket||"u">typeof c.g&&"u">typeof c.g.WebSocket||"u">typeof window&&"u">typeof window.WebSocket||"u">typeof self&&"u">typeof self.WebSocket,index_es_a=r=>r.split("?")[0],ey="u">typeof WebSocket?WebSocket:"u">typeof c.g&&"u">typeof c.g.WebSocket?c.g.WebSocket:"u">typeof window&&"u">typeof window.WebSocket?window.WebSocket:"u">typeof self&&"u">typeof self.WebSocket?self.WebSocket:c(72030);let f=class f{constructor(r){if(this.url=r,this.events=new E.EventEmitter,this.registering=!1,!(0,eg.isWsUrl)(r))throw Error(`Provided URL is not compatible with WebSocket connection: ${r}`);this.url=r}get connected(){return"u">typeof this.socket}get connecting(){return this.registering}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async open(r=this.url){await this.register(r)}async close(){return new Promise((r,i)=>{if(typeof this.socket>"u"){i(Error("Connection already closed"));return}this.socket.onclose=i=>{this.onClose(i),r()},this.socket.close()})}async send(r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send((0,M.u)(r))}catch(i){this.onError(r.id,i)}}register(r=this.url){if(!(0,eg.isWsUrl)(r))throw Error(`Provided URL is not compatible with WebSocket connection: ${r}`);if(this.registering){let r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((r,i)=>{this.events.once("register_error",r=>{this.resetMaxListeners(),i(r)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(Error("WebSocket connection is missing or invalid"));r(this.socket)})})}return this.url=r,this.registering=!0,new Promise((i,c)=>{let l=new URLSearchParams(r).get("origin"),E=(0,eg.isReactNative)()?{headers:{origin:l}}:{rejectUnauthorized:!(0,eg.isLocalhostUrl)(r)},S=new ey(r,[],E);index_es_b()?S.onerror=r=>{c(this.emitError(r.error))}:S.on("error",r=>{c(this.emitError(r))}),S.onopen=()=>{this.onOpen(S),i(S)}})}onOpen(r){r.onmessage=r=>this.onPayload(r),r.onclose=r=>this.onClose(r),this.socket=r,this.registering=!1,this.events.emit("open")}onClose(r){this.socket=void 0,this.registering=!1,this.events.emit("close",r)}onPayload(r){if(typeof r.data>"u")return;let i="string"==typeof r.data?(0,M.D)(r.data):r.data;this.events.emit("payload",i)}onError(r,i){let c=this.parseError(i),l=c.message||c.toString(),E=(0,eg.formatJsonRpcError)(r,l);this.events.emit("payload",E)}parseError(r,i=this.url){return(0,eg.parseConnectionError)(r,index_es_a(i),"WS")}
1resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(r){let i=this.parseError(Error(r?.message||`WebSocket connection failed for host: ${index_es_a(this.url)}`));return this.events.emit("register_error",i),i}};var e_=c(72307),em=c.n(e_),eb=c(63144),ew=c.n(eb),eI=c(83454),Xi=function(r,i){if(r.length>=255)throw TypeError("Alphabet too long");for(var c=new Uint8Array(256),l=0;l<c.length;l++)c[l]=255;for(var E=0;E<r.length;E++){var S=r.charAt(E),P=S.charCodeAt(0);if(255!==c[P])throw TypeError(S+" is ambiguous");c[P]=E}var C=r.length,R=r.charAt(0),A=Math.log(C)/Math.log(256),T=Math.log(256)/Math.log(C);function y(r){if("string"!=typeof r)throw TypeError("Expected String");if(0===r.length)return new Uint8Array;var i=0;if(" "!==r[0]){for(var l=0,E=0;r[i]===R;)l++,i++;for(var S=(r.length-i)*A+1>>>0,P=new Uint8Array(S);r[i];){var T=c[r.charCodeAt(i)];if(255===T)return;for(var q=0,M=S-1;(0!==T||q<E)&&-1!==M;M--,q++)T+=C*P[M]>>>0,P[M]=T%256>>>0,T=T/256>>>0;if(0!==T)throw Error("Non-zero carry");E=q,i++}if(" "!==r[i]){for(var $=S-E;$!==S&&0===P[$];)$++;for(var U=new Uint8Array(l+(S-$)),F=l;$!==S;)U[F++]=P[$++];return U}}}return{encode:function(i){if(i instanceof Uint8Array||(ArrayBuffer.isView(i)?i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength):Array.isArray(i)&&(i=Uint8Array.from(i))),!(i instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===i.length)return"";for(var c=0,l=0,E=0,S=i.length;E!==S&&0===i[E];)E++,c++;for(var P=(S-E)*T+1>>>0,A=new Uint8Array(P);E!==S;){for(var q=i[E],M=0,$=P-1;(0!==q||M<l)&&-1!==$;$--,M++)q+=256*A[$]>>>0,A[$]=q%C>>>0,q=q/C>>>0;if(0!==q)throw Error("Non-zero carry");l=M,E++}for(var U=P-l;U!==P&&0===A[U];)U++;for(var F=R.repeat(c);U<P;++U)F+=r.charAt(A[U]);return F},decodeUnsafe:y,decode:function(r){var c=y(r);if(c)return c;throw Error(`Non-${i} character`)}}};let Ne=r=>{if(r instanceof Uint8Array&&"Uint8Array"===r.constructor.name)return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw Error("Unknown type, must be binary type")},Wi=r=>new TextEncoder().encode(r),Qi=r=>new TextDecoder().decode(r);let Zi=class Zi{constructor(r,i,c){this.name=r,this.prefix=i,this.baseEncode=c}encode(r){if(r instanceof Uint8Array)return`${this.prefix}${this.baseEncode(r)}`;throw Error("Unknown type, must be binary type")}};let es=class es{constructor(r,i,c){if(this.name=r,this.prefix=i,void 0===i.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=i.codePointAt(0),this.baseDecode=c}decode(r){if("string"==typeof r){if(r.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(r)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(r.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(r){return Ue(this,r)}};let ts=class ts{constructor(r){this.decoders=r}or(r){return Ue(this,r)}decode(r){let i=r[0],c=this.decoders[i];if(c)return c.decode(r);throw RangeError(`Unable to decode multibase string ${JSON.stringify(r)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};let Ue=(r,i)=>new ts({...r.decoders||{[r.prefix]:r},...i.decoders||{[i.prefix]:i}});let is=class is{constructor(r,i,c,l){this.name=r,this.prefix=i,this.baseEncode=c,this.baseDecode=l,this.encoder=new Zi(r,i,c),this.decoder=new es(r,i,l)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}};let W=({name:r,prefix:i,encode:c,decode:l})=>new is(r,i,c,l),B=({prefix:r,name:i,alphabet:c})=>{let{encode:l,decode:E}=Xi(c,i);return W({prefix:r,name:i,encode:l,decode:r=>Ne(E(r))})},ss=(r,i,c,l)=>{let E={};for(let r=0;r<i.length;++r)E[i[r]]=r;let S=r.length;for(;"="===r[S-1];)--S;let P=new Uint8Array(S*c/8|0),C=0,R=0,A=0;for(let i=0;i<S;++i){let S=E[r[i]];if(void 0===S)throw SyntaxError(`Non-${l} character`);R=R<<c|S,(C+=c)>=8&&(C-=8,P[A++]=255&R>>C)}if(C>=c||255&R<<8-C)throw SyntaxError("Unexpected end of data");return P},rs=(r,i,c)=>{let l="="===i[i.length-1],E=(1<<c)-1,S="",P=0,C=0;for(let l=0;l<r.length;++l)for(C=C<<8|r[l],P+=8;P>c;)P-=c,S+=i[E&C>>P];
1if(P&&(S+=i[E&C<<c-P]),l)for(;S.length*c&7;)S+="=";return S},index_es_g=({name:r,prefix:i,bitsPerChar:c,alphabet:l})=>W({prefix:i,name:r,encode:r=>rs(r,l,c),decode:i=>ss(i,l,c,r)}),eE=W({prefix:"\x00",name:"identity",encode:r=>Qi(r),decode:r=>Wi(r)});var ex=Object.freeze({__proto__:null,identity:eE});let eS=index_es_g({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var eP=Object.freeze({__proto__:null,base2:eS});let eO=index_es_g({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var eC=Object.freeze({__proto__:null,base8:eO});let eR=B({prefix:"9",name:"base10",alphabet:"0123456789"});var eA=Object.freeze({__proto__:null,base10:eR});let ej=index_es_g({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),eN=index_es_g({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var eL=Object.freeze({__proto__:null,base16:ej,base16upper:eN});let eT=index_es_g({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ez=index_es_g({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),eD=index_es_g({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ek=index_es_g({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),eM=index_es_g({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),e$=index_es_g({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),eH=index_es_g({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),eU=index_es_g({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),eK=index_es_g({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var eV=Object.freeze({__proto__:null,base32:eT,base32upper:ez,base32pad:eD,base32padupper:ek,base32hex:eM,base32hexupper:e$,base32hexpad:eH,base32hexpadupper:eU,base32z:eK});let eB=B({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),eG=B({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var eW=Object.freeze({__proto__:null,base36:eB,base36upper:eG});let eZ=B({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),eF=B({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var eJ=Object.freeze({__proto__:null,base58btc:eZ,base58flickr:eF});let eY=index_es_g({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),eQ=index_es_g({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),eX=index_es_g({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),e0=index_es_g({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var e1=Object.freeze({__proto__:null,base64:eY,base64pad:eQ,base64url:eX,base64urlpad:e0});let e5=Array.from("\uD83D\uDE80\uD83E\uDE90â\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09â\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02â¤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09âº\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9Eââ¨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2Dâ£\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33â\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13ââ
\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6â\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90â¹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20â\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2Bâ½\uD83E\uDD19â\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81â¡\uD83C\uDF1E\uD83C\uDF88ââ\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2Câ\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74â¶â¡â\uD83D\uDC8E\uD83D\uDCB8â¬\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7Aâ \uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37â\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51â\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),e6=e5.reduce((r,i,c)=>(r[c]=i,r),[]),e2=e5.reduce((r,i,c)=>(r[i.codePointAt(0)]=c,r),[]),e3=W({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(r){return r.reduce((r,i)=>r+=e6[i],"")},decode:function(r){let i=[];for(let c of r){let r=e2[c.codePointAt(0)];if(void 0===r)throw Error(`Non-base256emoji character: ${c}`);i.push(r)}return new Uint8Array(i)}});var e4=Object.freeze({__proto__:null,base256emoji:e3});function $e(r,i,c){i=i||[],c=c||0;for(var l=c;r>=2147483648;)i[c++]=255&r|128,r/=128;for(;-128&r;)i[c++]=255&r|128,r>>>=7;return i[c]=0|r,$e.bytes=c-l+1,i}function he(r,i){var c,l=0,i=i||0,E=0,S=i,P=r.length;do{if(S>=P)throw he.bytes=0,RangeError("Could not decode varint");c=r[S++],l+=E<28?(127&c)<<E:(127&c)*Math.pow(2,E),E+=7}while(c>=128);return he.bytes=S-i,l}var e7={encode:$e,decode:he,encodingLength:function(r){return r<128?1:r<16384?2:r<2097152?3:r<268435456?4:r<34359738368?5:r<4398046511104?6:r<562949953421312?7:r<72057594037927940?8:r<0x7fffffffffffffff?9:10}};let Ke=(r,i,c=0)=>(e7.encode(r,i,c),i),Be=r=>e7.encodingLength(r),ce=(r,i)=>{let c=i.byteLength,l=Be(r),E=l+Be(c),S=new Uint8Array(E+c);return Ke(r,S,0),Ke(c,S,l),S.set(i,E),new or(r,c,i,S)};
1let or=class or{constructor(r,i,c,l){this.code=r,this.size=i,this.digest=c,this.bytes=l}};let Ve=({name:r,code:i,encode:c})=>new ar(r,i,c);let ar=class ar{constructor(r,i,c){this.name=r,this.code=i,this.encode=c}digest(r){if(r instanceof Uint8Array){let i=this.encode(r);return i instanceof Uint8Array?ce(this.code,i):i.then(r=>ce(this.code,r))}throw Error("Unknown type, must be binary type")}};let je=r=>async i=>new Uint8Array(await crypto.subtle.digest(r,i)),e8=Ve({name:"sha2-256",code:18,encode:je("SHA-256")}),e9=Ve({name:"sha2-512",code:19,encode:je("SHA-512")});var tn=Object.freeze({__proto__:null,sha256:e8,sha512:e9}),ta=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:Ne,digest:r=>ce(0,Ne(r))}});new TextEncoder,new TextDecoder;let to={...ex,...eP,...eC,...eA,...eL,...eV,...eW,...eJ,...e1,...e4};function He(r){return null!=globalThis.Buffer?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function Je(r,i,c,l){return{name:r,prefix:i,encoder:{name:r,prefix:i,encode:c},decoder:{decode:l}}}({...tn,...ta});let tc=Je("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>
1new TextEncoder().encode(r.substring(1))),tl=Je("ascii","a",r=>{let i="a";for(let c=0;c<r.length;c++)i+=String.fromCharCode(r[c]);return i},r=>{r=r.substring(1);let i=function(r=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?He(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}(r.length);for(let c=0;c<r.length;c++)i[c]=r.charCodeAt(c);return i}),th={utf8:tc,"utf-8":tc,hex:to.base16,latin1:tl,ascii:tl,binary:tl,...to},tp="core",tf=`wc@2:${tp}:`,td={logger:"error"},tg={database:":memory:"},ty="client_ed25519_seed",t_=et.ONE_DAY,tm=et.SIX_HOURS,tb="wss://relay.walletconnect.com",tw="wss://relay.walletconnect.org",tI={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",publish:"relayer_publish"},tE={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},tx=et.ONE_SECOND,tS={created:"subscription_created",deleted:"subscription_deleted",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},tP=1e3*et.FIVE_SECONDS,tO={wc_pairingDelete:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:et.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:et.ONE_DAY,prompt:!1,tag:0},res:{ttl:et.ONE_DAY,prompt:!1,tag:0}}},tC={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},tR={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},tA={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},tj="verify-api",tN="https://verify.walletconnect.com",tL="https://verify.walletconnect.org",tT=[tN,tL];let Pt=class Pt{constructor(r,i){this.core=r,this.logger=i,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=tf,this.init=async()=>{if(!this.initialized){let r=await this.getKeyChain();"u">typeof r&&(this.keychain=r),this.initialized=!0}},this.has=r=>(this.isInitialized(),this.keychain.has(r)),this.set=async(r,i)=>{this.isInitialized(),this.keychain.set(r,i),await this.persist()},this.get=r=>{this.isInitialized();let i=this.keychain.get(r);if(typeof i>"u"){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`${this.name}: ${r}`);throw Error(i)}return i},this.del=async r=>{this.isInitialized(),this.keychain.delete(r),await this.persist()},this.core=r,this.logger=(0,J.generateChildLogger)(i,this.name)}get context(){return(0,J.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(r){await this.core.storage.setItem(this.storageKey,(0,P.KC)(r))}async getKeyChain(){let r=await this.core.storage.getItem(this.storageKey);return"u">typeof r?(0,P.IP)(r):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}};let xt=class xt{constructor(r,i,c){this.core=r,this.logger=i,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=r=>(this.isInitialized(),this.keychain.has(r)),this.getClientId=async()=>{this.isInitialized();let r=await this.getClientSeed(),i=generateKeyPair(r);return encodeIss(i.publicKey)},this.generateKeyPair=()=>{this.isInitialized();let r=(0,P.Au)();return this.setPrivateKey(r.publicKey,r.privateKey)},this.signJWT=async r=>{this.isInitialized();let i=await this.getClientSeed(),c=generateKeyPair(i),l=(0,P.jd)();return await signJWT(l,r,t_,c)},this.generateSharedKey=(r,i,c)=>{this.isInitialized();let l=this.getPrivateKey(r),E=(0,P.m$)(l,i);return this.setSymKey(E,c)},this.setSymKey=async(r,i)=>{this.isInitialized();let c=i||(0,P.Ym)(r);return await this.keychain.set(c,r),c},this.deleteKeyPair=async r=>{this.isInitialized(),await this.keychain.del(r)},this.deleteSymKey=async r=>{this.isInitialized(),await this.keychain.del(r)},this.encode=async(r,i,c)=>{this.isInitialized();let l=(0,P.EN)(c),E=(0,M.u)(i);if((0,P.Q8)(l)){let i=l.senderPublicKey,c=l.receiverPublicKey;r=await this.generateSharedKey(i,c)}let S=this.getSymKey(r),{type:C,senderPublicKey:R}=l;return(0,P.HI)({type:C,symKey:S,message:E,senderPublicKey:R})},this.decode=async(r,i,c)=>{this.isInitialized();let l=(0,P.Ll)(i,c);if((0,P.Q8)(l)){let i=l.receiverPublicKey,c=l.senderPublicKey;r=await this.generateSharedKey(i,c)}try{let c=this.getSymKey(r),l=(0,P.pe)({symKey:c,encoded:i});return(0,M.D)(l)}catch(i){this.logger.error(`Failed to decode message from topic: '${r}', clientId: '${await this.getClientId()}'`),this.logger.error(i)}},this.getPayloadType=r=>{let i=(0,P.vB)(r);return(0,P.WG)(i.type)},this.getPayloadSenderPublicKey=r=>{let i=(0,P.vB)(r);return i.senderPublicKey?(0,ef.BB)(i.senderPublicKey,P.AW):void 0},this.core=r,this.logger=(0,J.generateChildLogger)(i,this.name),this.keychain=c||new Pt(this.core,this.logger)}get context(){return(0,J.getLoggerContext)(this.logger)}async setPrivateKey(r,i){return await this.keychain.set(r,i),r}getPrivateKey(r){return this.keychain.get(r)}async getClientSeed(){let r="";try{r=this.keychain.get(ty)}catch{r=(0,P.jd)(),await this.keychain.set(ty,r)}return function(r,i="utf8"){let c=th[i];if(!c)throw Error(`Unsupported encoding "${i}"`);return("utf8"===i||"utf-8"===i)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?He(globalThis.Buffer.from(r,"utf-8")):c.decoder.decode(`${c.prefix}${r}`)}(r,"base16")}getSymKey(r){return this.keychain.get(r)}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}};let Ot=class Ot extends a{constructor(r,i){super(r,i),this.logger=r,this.core=i,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=tf,this.init=async()=>
1{if(!this.initialized){this.logger.trace("Initialized");try{let r=await this.getRelayerMessages();"u">typeof r&&(this.messages=r),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}finally{this.initialized=!0}}},this.set=async(r,i)=>{this.isInitialized();let c=(0,P.rj)(i),l=this.messages.get(r);return typeof l>"u"&&(l={}),"u">typeof l[c]||(l[c]=i,this.messages.set(r,l),await this.persist()),c},this.get=r=>{this.isInitialized();let i=this.messages.get(r);return typeof i>"u"&&(i={}),i},this.has=(r,i)=>{this.isInitialized();let c=this.get(r),l=(0,P.rj)(i);return"u">typeof c[l]},this.del=async r=>{this.isInitialized(),this.messages.delete(r),await this.persist()},this.logger=(0,J.generateChildLogger)(r,this.name),this.core=i}get context(){return(0,J.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(r){await this.core.storage.setItem(this.storageKey,(0,P.KC)(r))}async getRelayerMessages(){let r=await this.core.storage.getItem(this.storageKey);return"u">typeof r?(0,P.IP)(r):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}};let vr=class vr extends u{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.events=new E.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,et.toMiliseconds)(et.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(r,i,c)=>{var l;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:c}});try{let E=c?.ttl||tm,S=(0,P._H)(c),C=c?.prompt||!1,R=c?.tag||0,A=c?.id||(0,eg.getBigIntRpcId)().toString(),T={topic:r,message:i,opts:{ttl:E,relay:S,prompt:C,tag:R,id:A}},q=setTimeout(()=>this.queue.set(A,T),this.publishTimeout);try{await await (0,P.hF)(this.rpcPublish(r,i,E,S,C,R,A),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(A),this.relayer.events.emit(tI.publish,T)}catch(r){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,null!=(l=c?.internal)&&l.throwOnFailedPublish)throw this.removeRequestFromQueue(A),r;return}finally{clearTimeout(q)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:c}})}catch(r){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(r),r}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.relayer=r,this.logger=(0,J.generateChildLogger)(i,this.name),this.registerEventListeners()}get context(){return(0,J.getLoggerContext)(this.logger)}rpcPublish(r,i,c,l,E,S,C){var R,A,T,q;let M={method:(0,P.cO)(l.protocol).publish,params:{topic:r,message:i,ttl:c,prompt:E,tag:S},id:C};return(0,P.o8)(null==(R=M.params)?void 0:R.prompt)&&(null==(A=M.params)||delete A.prompt),(0,P.o8)(null==(T=M.params)?void 0:T.tag)&&(null==(q=M.params)||delete q.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:M}),this.relayer.request(M)}removeRequestFromQueue(r){this.queue.delete(r)}checkQueue(){this.queue.forEach(async r=>{let{topic:i,message:c,opts:l}=r;await this.publish(i,c,l)})}registerEventListeners(){this.relayer.core.heartbeat.on(F.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(tI.connection_stalled);return}this.checkQueue()}),this.relayer.on(tI.message_ack,r=>{this.removeRequestFromQueue(r.id.toString())})}};let Ir=class Ir{constructor(){this.map=new Map,this.set=(r,i)=>{let c=this.get(r);this.exists(r,i)||this.map.set(r,[...c,i])},this.get=r=>this.map.get(r)||[],this.exists=(r,i)=>this.get(r).includes(i),this.delete=(r,i)=>{if(typeof i>"u"){this.map.delete(r);return}if(!this.map.has(r))return;let c=this.get(r);if(!this.exists(r,i))return;let l=c.filter(r=>r!==i);if(!l.length){this.map.delete(r);return}this.map.set(r,l)},this.clear=()=>{this.map.clear()}}
1get topics(){return Array.from(this.map.keys())}};var tz=Object.defineProperty,tq=Object.defineProperties,tD=Object.getOwnPropertyDescriptors,tk=Object.getOwnPropertySymbols,tM=Object.prototype.hasOwnProperty,t$=Object.prototype.propertyIsEnumerable,zt=(r,i,c)=>i in r?tz(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,index_es_j=(r,i)=>{for(var c in i||(i={}))tM.call(i,c)&&zt(r,c,i[c]);if(tk)for(var c of tk(i))t$.call(i,c)&&zt(r,c,i[c]);return r},De=(r,i)=>tq(r,tD(i));let Nt=class Nt extends d{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.subscriptions=new Map,this.topicMap=new Ir,this.events=new E.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=tf,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(r,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}});try{let c=(0,P._H)(i),l={topic:r,relay:c};this.pending.set(r,l);let E=await this.rpcSubscribe(r,c);return this.onSubscribe(E,l),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}}),E}catch(r){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(r),r}},this.unsubscribe=async(r,i)=>{await this.restartToComplete(),this.isInitialized(),"u">typeof i?.id?await this.unsubscribeById(r,i.id,i):await this.unsubscribeByTopic(r,i)},this.isSubscribed=async r=>!!this.topics.includes(r)||await new Promise((i,c)=>{let l=new et.Watch;l.start(this.pendingSubscriptionWatchLabel);let E=setInterval(()=>{!this.pending.has(r)&&this.topics.includes(r)&&(clearInterval(E),l.stop(this.pendingSubscriptionWatchLabel),i(!0)),l.elapsed(this.pendingSubscriptionWatchLabel)>=tP&&(clearInterval(E),l.stop(this.pendingSubscriptionWatchLabel),c(Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=r,this.logger=(0,J.generateChildLogger)(i,this.name),this.clientId=""}get context(){return(0,J.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+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(r,i){let c=!1;try{c=this.getSubscription(r).topic===i}catch{}return c}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(r,i){let c=this.topicMap.get(r);await Promise.all(c.map(async c=>await this.unsubscribeById(r,c,i)))}async unsubscribeById(r,i,c){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:c}});try{let l=(0,P._H)(c);await this.rpcUnsubscribe(r,i,l);let E=(0,P.D6)("USER_DISCONNECTED",`${this.name}, ${r}`);await this.onUnsubscribe(r,i,E),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:c}})}catch(r){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(r),r}}async rpcSubscribe(r,i){let c={method:(0,P.cO)(i.protocol).subscribe,params:{topic:r}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:c});try{await await (0,P.hF)(this.relayer.request(c),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(tI.connection_stalled)}return(0,P.rj)(r+this.clientId)}async rpcBatchSubscribe(r){if(!r.length)return;let i=r[0].relay,c={method:(0,P.cO)(i.protocol).batchSubscribe,params:{topics:r.map(r=>r.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:c});try{return await await (0,P.hF)(this.relayer.request(c),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(tI.connection_stalled)}}rpcUnsubscribe(r,i,c){let l={method:(0,P.cO)(c.protocol).unsubscribe,params:{topic:r,id:i}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:l}),this.relayer.request(l)}onSubscribe(r,i){this.setSubscription(r,De(index_es_j({},i),{id:r})),this.pending.delete(i.topic)}onBatchSubscribe(r){r.length&&r.forEach(r=>{this.setSubscription(r.id,index_es_j({}
1,r)),this.pending.delete(r.topic)})}async onUnsubscribe(r,i,c){this.events.removeAllListeners(i),this.hasSubscription(i,r)&&this.deleteSubscription(i,c),await this.relayer.messages.del(r)}async setRelayerSubscriptions(r){await this.relayer.core.storage.setItem(this.storageKey,r)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(r,i){this.subscriptions.has(r)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:r,subscription:i}),this.addSubscription(r,i))}addSubscription(r,i){this.subscriptions.set(r,index_es_j({},i)),this.topicMap.set(i.topic,r),this.events.emit(tS.created,i)}getSubscription(r){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:r});let i=this.subscriptions.get(r);if(!i){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`${this.name}: ${r}`);throw Error(i)}return i}deleteSubscription(r,i){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:r,reason:i});let c=this.getSubscription(r);this.subscriptions.delete(r),this.topicMap.delete(c.topic,r),this.events.emit(tS.deleted,De(index_es_j({},c),{reason:i}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(tS.sync)}async reset(){if(this.cached.length){let r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let i=0;i<r;i++){let r=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(r)}}this.events.emit(tS.resubscribed)}async restore(){try{let r=await this.getRelayerSubscriptions();if(typeof r>"u"||!r.length)return;if(this.subscriptions.size){let{message:r}=(0,P.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),Error(r)}this.cached=r,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(r){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(r)}}async batchSubscribe(r){if(!r.length)return;let i=await this.rpcBatchSubscribe(r);(0,P.qt)(i)&&this.onBatchSubscribe(i.map((i,c)=>De(index_es_j({},r[c]),{id:i})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;let r=[];this.pending.forEach(i=>{r.push(i)}),await this.batchSubscribe(r)}registerEventListeners(){this.relayer.core.heartbeat.on(F.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(tI.connect,async()=>{await this.onConnect()}),this.relayer.on(tI.disconnect,()=>{this.onDisconnect()}),this.events.on(tS.created,async r=>{let i=tS.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()}),this.events.on(tS.deleted,async r=>{let i=tS.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()})}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}async restartToComplete(){this.restartInProgress&&await new Promise(r=>{let i=setInterval(()=>{this.restartInProgress||(clearInterval(i),r())},this.pollingInterval)})}};var tH=Object.defineProperty,tU=Object.getOwnPropertySymbols,tK=Object.prototype.hasOwnProperty,tV=Object.prototype.propertyIsEnumerable,Lt=(r,i,c)=>i in r?tH(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,Ar=(r,i)=>{for(var c in i||(i={}))tK.call(i,c)&&Lt(r,c,i[c]);if(tU)for(var c of tU(i))tV.call(i,c)&&Lt(r,c,i[c]);return r};let Ft=class Ft extends g{constructor(r){super(r),this.protocol="wc",this.version=2,this.events=new E.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 r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(r){throw this.logger.debug("Failed to Publish Request"),this.logger.error(r),r}},this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(tI.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(tI.error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(tE.payload,this.onPayloadHandler),this.provider.on(tE.connect,this.onConnectHandler),this.provider.on(tE.disconnect,this.onDisconnectHandler),this.provider.on(tE.error,this.onProviderErrorHandler)},this.core=r.core,this.logger="u">typeof r.logger&&"string"!=typeof r.logger?(0,J.generateChildLogger)(r.logger,this.name):(0,J.pino)((0,J.getDefaultLoggerOptions)({level:r.logger||"error"})),this.messages=new Ot(this.logger,r.core),this.subscriber=new Nt(this,this.logger),this.publisher=new vr(this,this.logger),this.relayUrl=r?.relayUrl||tb,this.projectId=r.projectId,this.bundleId=(0,P.X_)(),this.provider={}}
1async 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 ${tw}...`),await this.restartTransport(tw)}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,J.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(r,i,c){this.isInitialized(),await this.publisher.publish(r,i,c),await this.recordMessageEvent({topic:r,message:i,publishedAt:Date.now()})}async subscribe(r,i){var c;let l;this.isInitialized();let E=(null==(c=this.subscriber.topicMap.get(r))?void 0:c[0])||"";if(E)return E;let o=i=>{i.topic===r&&(this.subscriber.off(tS.created,o),l())};return await Promise.all([new Promise(r=>{l=r,this.subscriber.on(tS.created,o)}),new Promise(async c=>{E=await this.subscriber.subscribe(r,i),c()})]),E}async unsubscribe(r,i){this.isInitialized(),await this.subscriber.unsubscribe(r,i)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await (0,P.hF)(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(r){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){r&&r!==this.relayUrl&&(this.relayUrl=r,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(r=>{if(!this.initialized)return r();this.subscriber.once(tS.resubscribed,()=>{r()})}),new Promise(async(r,i)=>{try{await (0,P.hF)(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(r){i(r);return}r()})])}catch(r){if(this.logger.error(r),!this.isConnectionStalled(r.message))throw r;this.provider.events.emit(tE.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(r){await this.confirmOnlineStateOrThrow(),this.connectionAttemptInProgress||(this.relayUrl=r||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await (0,P.Gg)())throw Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(r){return this.staleConnectionErrors.some(i=>r.includes(i))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let r=await this.core.crypto.signJWT(this.relayUrl);this.provider=new ed.r(new f((0,P.$0)({sdkVersion:"2.11.0",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:r,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(r){let{topic:i,message:c}=r;await this.messages.set(i,c)}async shouldIgnoreMessageEvent(r){let{topic:i,message:c}=r;if(!c||0===c.length)return this.logger.debug(`Ignoring invalid/empty message: ${c}`),!0;if(!await this.subscriber.isSubscribed(i))return this.logger.debug(`Ignoring message for non-subscribed topic ${i}`),!0;let l=this.messages.has(i,c);return l&&this.logger.debug(`Ignoring duplicate message: ${c}`),l}async onProviderPayload(r){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:r}),(0,eg.isJsonRpcRequest)(r)){if(!r.method.endsWith("_subscription"))return;let i=r.params,{topic:c,message:l,publishedAt:E}=i.data,S={topic:c,message:l,publishedAt:E};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Ar({type:"event",event:i.id},S)),this.events.emit(i.id,S),await this.acknowledgePayload(r),await this.onMessageEvent(S)}
1else(0,eg.isJsonRpcResponse)(r)&&this.events.emit(tI.message_ack,r)}async onMessageEvent(r){await this.shouldIgnoreMessageEvent(r)||(this.events.emit(tI.message,r),await this.recordMessageEvent(r))}async acknowledgePayload(r){let i=(0,eg.formatJsonRpcResult)(r.id,!0);await this.provider.connection.send(i)}unregisterProviderListeners(){this.provider.off(tE.payload,this.onPayloadHandler),this.provider.off(tE.connect,this.onConnectHandler),this.provider.off(tE.disconnect,this.onDisconnectHandler),this.provider.off(tE.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(tI.connection_stalled,()=>{this.restartTransport().catch(r=>this.logger.error(r))});let r=await (0,P.Gg)();(0,P.uw)(async i=>{this.initialized&&r!==i&&(r=i,i?await this.restartTransport().catch(r=>this.logger.error(r)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(r=>this.logger.error(r))))})}onProviderDisconnect(){this.events.emit(tI.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(r=>this.logger.error(r))},(0,et.toMiliseconds)(tx)))}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(r=>{let i=setInterval(()=>{this.connected&&(clearInterval(i),r())},this.connectionStatusPollingInterval)});await this.restartTransport()}}};var tB=Object.defineProperty,tG=Object.getOwnPropertySymbols,tW=Object.prototype.hasOwnProperty,tZ=Object.prototype.propertyIsEnumerable,Mt=(r,i,c)=>i in r?tB(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,kt=(r,i)=>{for(var c in i||(i={}))tW.call(i,c)&&Mt(r,c,i[c]);if(tG)for(var c of tG(i))tZ.call(i,c)&&Mt(r,c,i[c]);return r};let Kt=class Kt extends p{constructor(r,i,c,l=tf,E){super(r,i,c,l),this.core=r,this.logger=i,this.name=c,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=tf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>{this.getKey&&null!==r&&!(0,P.o8)(r)?this.map.set(this.getKey(r),r):(0,P.xW)(r)?this.map.set(r.id,r):(0,P.h1)(r)&&this.map.set(r.topic,r)}),this.cached=[],this.initialized=!0)},this.set=async(r,i)=>{this.isInitialized(),this.map.has(r)?await this.update(r,i):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:r,value:i}),this.map.set(r,i),await this.persist())},this.get=r=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:r}),this.getData(r)),this.getAll=r=>(this.isInitialized(),r?this.values.filter(i=>Object.keys(r).every(c=>em()(i[c],r[c]))):this.values),this.update=async(r,i)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:r,update:i});let c=kt(kt({},this.getData(r)),i);this.map.set(r,c),await this.persist()},this.delete=async(r,i)=>{this.isInitialized(),this.map.has(r)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:r,reason:i}),this.map.delete(r),await this.persist())},this.logger=(0,J.generateChildLogger)(i,this.name),this.storagePrefix=l,this.getKey=E}get context(){return(0,J.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+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(r){await this.core.storage.setItem(this.storageKey,r)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(r){let i=this.map.get(r);if(!i){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(i),Error(i)}return i}async persist(){await this.setDataStore(this.values)}
1async restore(){try{let r=await this.getDataStore();if(typeof r>"u"||!r.length)return;if(this.map.size){let{message:r}=(0,P.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),Error(r)}this.cached=r,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(r){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(r)}}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}};let Bt=class Bt{constructor(r,i){this.core=r,this.logger=i,this.name="pairing",this.version="0.3",this.events=new(S()),this.initialized=!1,this.storagePrefix=tf,this.ignoredPayloadTypes=[P.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:r})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...r])]},this.create=async()=>{this.isInitialized();let r=(0,P.jd)(),i=await this.core.crypto.setSymKey(r),c=(0,P.gn)(et.FIVE_MINUTES),l={protocol:"irn"},E=(0,P.Bv)({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:r,relay:l});return await this.pairings.set(i,{topic:i,expiry:c,relay:l,active:!1}),await this.core.relayer.subscribe(i),this.core.expirer.set(i,c),{topic:i,uri:E}},this.pair=async r=>{this.isInitialized(),this.isValidPair(r);let{topic:i,symKey:c,relay:l}=(0,P.he)(r.uri);if(this.pairings.keys.includes(i)&&this.pairings.get(i).active)throw Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);let E=(0,P.gn)(et.FIVE_MINUTES),S={topic:i,relay:l,expiry:E,active:!1};return await this.pairings.set(i,S),this.core.expirer.set(i,E),r.activatePairing&&await this.activate({topic:i}),this.events.emit(tC.create,S),this.core.crypto.keychain.has(i)||(await this.core.crypto.setSymKey(c,i),await this.core.relayer.subscribe(i,{relay:l})),S},this.activate=async({topic:r})=>{this.isInitialized();let i=(0,P.gn)(et.THIRTY_DAYS);await this.pairings.update(r,{active:!0,expiry:i}),this.core.expirer.set(r,i)},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);let{topic:i}=r;if(this.pairings.keys.includes(i)){let r=await this.sendRequest(i,"wc_pairingPing",{}),{done:c,resolve:l,reject:E}=(0,P.H1)();this.events.once((0,P.E0)("pairing_ping",r),({error:r})=>{r?E(r):l()}),await c()}},this.updateExpiry=async({topic:r,expiry:i})=>{this.isInitialized(),await this.pairings.update(r,{expiry:i})},this.updateMetadata=async({topic:r,metadata:i})=>{this.isInitialized(),await this.pairings.update(r,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);let{topic:i}=r;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",(0,P.D6)("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(r,i,c)=>{let l=(0,eg.formatJsonRpcRequest)(i,c),E=await this.core.crypto.encode(r,l),S=tO[i].req;return this.core.history.set(r,l),this.core.relayer.publish(r,E,S),l.id},this.sendResult=async(r,i,c)=>{let l=(0,eg.formatJsonRpcResult)(r,c),E=await this.core.crypto.encode(i,l),S=await this.core.history.get(i,r),P=tO[S.request.method].res;await this.core.relayer.publish(i,E,P),await this.core.history.resolve(l)},this.sendError=async(r,i,c)=>{let l=(0,eg.formatJsonRpcError)(r,c),E=await this.core.crypto.encode(i,l),S=await this.core.history.get(i,r),P=tO[S.request.method]?tO[S.request.method].res:tO.unregistered_method.res;await this.core.relayer.publish(i,E,P),await this.core.history.resolve(l)},this.deletePairing=async(r,i)=>{await this.core.relayer.unsubscribe(r),await Promise.all([this.pairings.delete(r,(0,P.D6)("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(r),i?Promise.resolve():this.core.expirer.del(r)])},this.cleanup=async()=>{let r=this.pairings.getAll().filter(r=>(0,P.Bw)(r.expiry));await Promise.all(r.map(r=>this.deletePairing(r.topic)))},this.onRelayEventRequest=r=>{let{topic:i,payload:c}=r;switch(c.method){case"wc_pairingPing":return this.onPairingPingRequest(i,c);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,c);default:return this.onUnknownRpcMethodRequest(i,c)}},this.onRelayEventResponse=async r=>{let{topic:i,payload:c}=r,l=(await this.core.history.get(i,c.id)).request.method;return"wc_pairingPing"===l?this.onPairingPingResponse(i,c):this.onUnknownRpcMethodResponse(l)},this.onPairingPingRequest=async(r,i)=>{let{id:c}=i;try{this.isValidPing({topic:r}),await this.sendResult(c,r,!0),this.events.emit(tC.ping,{id:c,topic:r})}catch(i){await this.sendError(c,r,i),this.logger.error(i)}},this.onPairingPingResponse=(r,i)=>{let{id:c}=i;setTimeout(()=>
1{(0,eg.isJsonRpcResult)(i)?this.events.emit((0,P.E0)("pairing_ping",c),{}):(0,eg.isJsonRpcError)(i)&&this.events.emit((0,P.E0)("pairing_ping",c),{error:i.error})},500)},this.onPairingDeleteRequest=async(r,i)=>{let{id:c}=i;try{this.isValidDisconnect({topic:r}),await this.deletePairing(r),this.events.emit(tC.delete,{id:c,topic:r})}catch(i){await this.sendError(c,r,i),this.logger.error(i)}},this.onUnknownRpcMethodRequest=async(r,i)=>{let{id:c,method:l}=i;try{if(this.registeredMethods.includes(l))return;let i=(0,P.D6)("WC_METHOD_UNSUPPORTED",l);await this.sendError(c,r,i),this.logger.error(i)}catch(i){await this.sendError(c,r,i),this.logger.error(i)}},this.onUnknownRpcMethodResponse=r=>{this.registeredMethods.includes(r)||this.logger.error((0,P.D6)("WC_METHOD_UNSUPPORTED",r))},this.isValidPair=r=>{var i;if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`pair() params: ${r}`);throw Error(i)}if(!(0,P.jv)(r.uri)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`pair() uri: ${r.uri}`);throw Error(i)}let c=(0,P.he)(r.uri);if(!(null!=(i=c?.relay)&&i.protocol)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID","pair() uri#relay-protocol");throw Error(r)}if(!(null!=c&&c.symKey)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID","pair() uri#symKey");throw Error(r)}},this.isValidPing=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`ping() params: ${r}`);throw Error(i)}let{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidDisconnect=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw Error(i)}let{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async r=>{if(!(0,P.M_)(r,!1)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw Error(i)}if(!this.pairings.keys.includes(r)){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw Error(i)}if((0,P.Bw)(this.pairings.get(r).expiry)){await this.deletePairing(r);let{message:i}=(0,P.Z7)("EXPIRED",`pairing topic: ${r}`);throw Error(i)}},this.core=r,this.logger=(0,J.generateChildLogger)(i,this.name),this.pairings=new Kt(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,J.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}registerRelayerEvents(){this.core.relayer.on(tI.message,async r=>{let{topic:i,message:c}=r;if(!this.pairings.keys.includes(i)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(c)))return;let l=await this.core.crypto.decode(i,c);try{(0,eg.isJsonRpcRequest)(l)?(this.core.history.set(i,l),this.onRelayEventRequest({topic:i,payload:l})):(0,eg.isJsonRpcResponse)(l)&&(await this.core.history.resolve(l),await this.onRelayEventResponse({topic:i,payload:l}),this.core.history.delete(i,l.id))}catch(r){this.logger.error(r)}})}registerExpirerEvents(){this.core.expirer.on(tA.expired,async r=>{let{topic:i}=(0,P.iP)(r.target);i&&this.pairings.keys.includes(i)&&(await this.deletePairing(i,!0),this.events.emit(tC.expire,{topic:i}))})}};let Vt=class Vt extends index_es_h{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.records=new Map,this.events=new E.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=tf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.records.set(r.id,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(r,i,c)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:r,request:i,chainId:c}),this.records.has(i.id))return;let l={id:i.id,topic:r,request:{method:i.method,params:i.params||null},chainId:c,expiry:(0,P.gn)(et.THIRTY_DAYS)};this.records.set(l.id,l),this.events.emit(tR.created,l)},this.resolve=async r=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:r}),!this.records.has(r.id))return;let i=await this.getRecord(r.id);typeof i.response>
1"u"&&(i.response=(0,eg.isJsonRpcError)(r)?{error:r.error}:{result:r.result},this.records.set(i.id,i),this.events.emit(tR.updated,i))},this.get=async(r,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:r,id:i}),await this.getRecord(i)),this.delete=(r,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(c=>{c.topic!==r||"u">typeof i&&c.id!==i||(this.records.delete(c.id),this.events.emit(tR.deleted,c))})},this.exists=async(r,i)=>(this.isInitialized(),!!this.records.has(i)&&(await this.getRecord(i)).topic===r),this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=(0,J.generateChildLogger)(i,this.name)}get context(){return(0,J.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+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(){let r=[];return this.values.forEach(i=>{if("u">typeof i.response)return;let c={topic:i.topic,request:(0,eg.formatJsonRpcRequest)(i.request.method,i.request.params,i.id),chainId:i.chainId};return r.push(c)}),r}async setJsonRpcRecords(r){await this.core.storage.setItem(this.storageKey,r)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(r){this.isInitialized();let i=this.records.get(r);if(!i){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`${this.name}: ${r}`);throw Error(i)}return i}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(tR.sync)}async restore(){try{let r=await this.getJsonRpcRecords();if(typeof r>"u"||!r.length)return;if(this.records.size){let{message:r}=(0,P.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),Error(r)}this.cached=r,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}}registerEventListeners(){this.events.on(tR.created,r=>{let i=tR.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(tR.updated,r=>{let i=tR.updated;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(tR.deleted,r=>{let i=tR.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.core.heartbeat.on(F.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(r=>{(0,et.toMiliseconds)(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.delete(r.topic,r.id))})}catch(r){this.logger.warn(r)}}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}};let jt=class jt extends index_es_E{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.expirations=new Map,this.events=new E.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=tf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.expirations.set(r.target,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=r=>{try{let i=this.formatTarget(r);return"u">typeof this.getExpiration(i)}catch{return!1}},this.set=(r,i)=>{this.isInitialized();let c=this.formatTarget(r),l={target:c,expiry:i};this.expirations.set(c,l),this.checkExpiry(c,l),this.events.emit(tA.created,{target:c,expiration:l})},this.get=r=>{this.isInitialized();let i=this.formatTarget(r);return this.getExpiration(i)},this.del=r=>{if(this.isInitialized(),this.has(r)){let i=this.formatTarget(r),c=this.getExpiration(i);this.expirations.delete(i),this.events.emit(tA.deleted,{target:i,expiration:c})}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=(0,J.generateChildLogger)(i,this.name)}get context(){return(0,J.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+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(r){if("string"==typeof r)return(0,P.Z4)(r);if("number"==typeof r)return(0,P.Gq)(r);let{message:i}=(0,P.Z7)("UNKNOWN_TYPE",`Target type: ${typeof r}`);throw Error(i)}async setExpirations(r){await this.core.storage.setItem(this.storageKey,r)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(tA.sync)}
1async restore(){try{let r=await this.getExpirations();if(typeof r>"u"||!r.length)return;if(this.expirations.size){let{message:r}=(0,P.Z7)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),Error(r)}this.cached=r,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(r){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(r)}}getExpiration(r){let i=this.expirations.get(r);if(!i){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(i),Error(i)}return i}checkExpiry(r,i){let{expiry:c}=i;(0,et.toMiliseconds)(c)-Date.now()<=0&&this.expire(r,i)}expire(r,i){this.expirations.delete(r),this.events.emit(tA.expired,{target:r,expiration:i})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((r,i)=>this.checkExpiry(i,r))}registerEventListeners(){this.core.heartbeat.on(F.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(tA.created,r=>{let i=tA.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(tA.expired,r=>{let i=tA.expired;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(tA.deleted,r=>{let i=tA.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()})}isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}}};let qt=class qt extends index_es_y{constructor(r,i){super(r,i),this.projectId=r,this.logger=i,this.name=tj,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async r=>{if(this.verifyDisabled||(0,P.b$)()||!(0,P.jU)())return;let i=this.getVerifyUrl(r?.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r)}if(!this.initialized){this.removeIframe(),this.verifyUrl=tL;try{await this.createIframe()}catch(r){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(r),this.verifyDisabled=!0}}},this.register=async r=>{this.initialized?this.sendPost(r.attestationId):(this.addToQueue(r.attestationId),await this.init())},this.resolve=async r=>{let i;if(this.isDevEnv)return"";let c=this.getVerifyUrl(r?.verifyUrl);try{i=await this.fetchAttestation(r.attestationId,c)}catch(l){this.logger.info(`failed to resolve attestation: ${r.attestationId} from url: ${c}`),this.logger.info(l),i=await this.fetchAttestation(r.attestationId,tL)}return i},this.fetchAttestation=async(r,i)=>{this.logger.info(`resolving attestation: ${r} from url: ${i}`);let c=this.startAbortTimer(2*et.ONE_SECOND),l=await fetch(`${i}/attestation/${r}`,{signal:this.abortController.signal});return clearTimeout(c),200===l.status?await l.json():void 0},this.addToQueue=r=>{this.queue.push(r)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(r=>this.sendPost(r)),this.queue=[])},this.sendPost=r=>{var i;try{if(!this.iframe)return;null==(i=this.iframe.contentWindow)||i.postMessage(r,"*"),this.logger.info(`postMessage sent: ${r} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let r;let s=i=>{"verify_ready"===i.data&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",s),r())};await Promise.race([new Promise(i=>{if(document.getElementById(tj))return i();window.addEventListener("message",s);let c=document.createElement("iframe");c.id=tj,c.src=`${this.verifyUrl}/${this.projectId}`,c.style.display="none",document.body.append(c),this.iframe=c,r=i}),new Promise((r,i)=>setTimeout(()=>{window.removeEventListener("message",s),i("verify iframe load timeout")},(0,et.toMiliseconds)(et.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=r=>{let i=r||tN;return tT.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${tN}`),i=tN),i},this.logger=(0,J.generateChildLogger)(i,this.name),this.verifyUrl=tN,this.abortController=new AbortController,this.isDevEnv=(0,P.UG)()&&eI.env.IS_VITEST}get context(){return(0,J.getLoggerContext)(this.logger)}startAbortTimer(r){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,et.toMiliseconds)(r))}};let Gt=class Gt extends v{constructor(r,i){super(r,i),this.projectId=r,this.logger=i,this.context="echo",this.registerDeviceToken=async r=>{let{clientId:i,token:c,notificationType:l,enableEncrypted:E=!1}
1=r,S=`https://echo.walletconnect.com/${this.projectId}/clients`;await ew()(S,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:l,token:c,always_raw:E})})},this.logger=(0,J.generateChildLogger)(i,this.context)}};var tF=Object.defineProperty,tJ=Object.getOwnPropertySymbols,tY=Object.prototype.hasOwnProperty,tQ=Object.prototype.propertyIsEnumerable,Ht=(r,i,c)=>i in r?tF(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,Jt=(r,i)=>{for(var c in i||(i={}))tY.call(i,c)&&Ht(r,c,i[c]);if(tJ)for(var c of tJ(i))tQ.call(i,c)&&Ht(r,c,i[c]);return r};let te=class te extends n{constructor(r){super(r),this.protocol="wc",this.version=2,this.name=tp,this.events=new E.EventEmitter,this.initialized=!1,this.on=(r,i)=>this.events.on(r,i),this.once=(r,i)=>this.events.once(r,i),this.off=(r,i)=>this.events.off(r,i),this.removeListener=(r,i)=>this.events.removeListener(r,i),this.projectId=r?.projectId,this.relayUrl=r?.relayUrl||tb,this.customStoragePrefix=null!=r&&r.customStoragePrefix?`:${r.customStoragePrefix}`:"";let i="u">typeof r?.logger&&"string"!=typeof r?.logger?r.logger:(0,J.pino)((0,J.getDefaultLoggerOptions)({level:r?.logger||td.logger}));this.logger=(0,J.generateChildLogger)(i,this.name),this.heartbeat=new F.HeartBeat,this.crypto=new xt(this,this.logger,r?.keychain),this.history=new Vt(this,this.logger),this.expirer=new jt(this,this.logger),this.storage=null!=r&&r.storage?r.storage:new h(Jt(Jt({},tg),r?.storageOptions)),this.relayer=new Ft({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Bt(this,this.logger),this.verify=new qt(this.projectId||"",this.logger),this.echoClient=new Gt(this.projectId||"",this.logger)}static async init(r){let i=new te(r);await i.initialize();let c=await i.crypto.getClientId();return await i.storage.setItem("WALLETCONNECT_CLIENT_ID",c),i}get context(){return(0,J.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(r){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,r),this.logger.error(r.message),r}}};let tX="client",t0=`wc@2:${tX}:`,t1={name:tX,logger:"error"},t5="WALLETCONNECT_DEEPLINK_CHOICE",t6="Proposal expired",t2=et.SEVEN_DAYS,t3={wc_sessionPropose:{req:{ttl:et.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1104},res:{ttl:et.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1106},res:{ttl:et.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:et.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:et.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:et.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1112},res:{ttl:et.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1115}}},t4={min:et.FIVE_MINUTES,max:et.SEVEN_DAYS},t7={idle:"IDLE",active:"ACTIVE"},t8=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var t9=Object.defineProperty,re=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,ra=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,rc=Object.prototype.propertyIsEnumerable,index_es_de=(r,i,c)=>i in r?t9(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,dist_index_es_g=(r,i)=>{for(var c in i||(i={}))ro.call(i,c)&&index_es_de(r,c,i[c]);if(ra)for(var c of ra(i))rc.call(i,c)&&index_es_de(r,c,i[c]);return r},dist_index_es_b=(r,i)=>re(r,rt(i));let index_es_ds=class index_es_ds extends w{constructor(r){super(r),this.name="engine",this.events=new(S()),this.initialized=!1,this.ignoredPayloadTypes=[P.rV],this.requestQueue={state:t7.idle,queue:[]},this.sessionRequestQueue={state:t7.idle,queue:[]},this.requestQueueDelay=et.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(t3)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,et.toMiliseconds)(this.requestQueueDelay)))},this.connect=async r=>{await this.isInitialized();let i=dist_index_es_b(dist_index_es_g({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(i);let{pairingTopic:c,requiredNamespaces:l,optionalNamespaces:E,sessionProperties:S,relays:C}=i,R=c,A,T=!1;if(R&&(T=this.client.core.pairing.pairings.get(R).active),!R||!T){let{topic:r,uri:i}=await this.client.core.pairing.create();R=r,A=i}let q=await this.client.core.crypto.generateKeyPair(),M=dist_index_es_g({requiredNamespaces:l,optionalNamespaces:E,relays:C??[{protocol:"irn"}],proposer:{publicKey:q,metadata:this.client.metadata}},S&&{sessionProperties:S}),{reject:$,resolve:U,done:F}=(0,P.H1)(et.FIVE_MINUTES,t6);if(this.events.once((0,P.E0)("session_connect"),async({error:r,session:i})=>{if(r)$(r);else if(i){i.self.publicKey=q;let r=dist_index_es_b(dist_index_es_g({},i),{requiredNamespaces:i.requiredNamespaces,optionalNamespaces:i.optionalNamespaces});await this.client.session.set(i.topic,r),await this.setExpiry(i.topic,i.expiry),R&&await this.client.core.pairing.updateMetadata({topic:R,metadata:i.peer.metadata}),U(r)}}),!R){let{message:r}=(0,P.Z7)("NO_MATCHING_KEY",`connect() pairing topic: ${R}`);throw Error(r)}let J=await this.sendRequest({topic:R,method:"wc_sessionPropose",params:M}),Q=(0,P.gn)(et.FIVE_MINUTES);
1return await this.setProposal(J,dist_index_es_g({id:J,expiry:Q},M)),{uri:A,approval:F}},this.pair=async r=>(await this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{await this.isInitialized(),await this.isValidApprove(r);let{id:i,relayProtocol:c,namespaces:l,sessionProperties:E}=r,S=this.client.proposal.get(i),{pairingTopic:C,proposer:R,requiredNamespaces:A,optionalNamespaces:T}=S;C=C||"",(0,P.L5)(A)||(A=(0,P.fc)(l,"approve()"));let q=await this.client.core.crypto.generateKeyPair(),M=R.publicKey,$=await this.client.core.crypto.generateSharedKey(q,M);C&&i&&(await this.client.core.pairing.updateMetadata({topic:C,metadata:R.metadata}),await this.sendResult({id:i,topic:C,result:{relay:{protocol:c??"irn"},responderPublicKey:q}}),await this.client.proposal.delete(i,(0,P.D6)("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:C}));let U=dist_index_es_g({relay:{protocol:c??"irn"},namespaces:l,requiredNamespaces:A,optionalNamespaces:T,pairingTopic:C,controller:{publicKey:q,metadata:this.client.metadata},expiry:(0,P.gn)(t2)},E&&{sessionProperties:E});await this.client.core.relayer.subscribe($),await this.sendRequest({topic:$,method:"wc_sessionSettle",params:U,throwOnFailedPublish:!0});let F=dist_index_es_b(dist_index_es_g({},U),{topic:$,pairingTopic:C,acknowledged:!1,self:U.controller,peer:{publicKey:R.publicKey,metadata:R.metadata},controller:q});return await this.client.session.set($,F),await this.setExpiry($,(0,P.gn)(t2)),{topic:$,acknowledged:()=>new Promise(r=>setTimeout(()=>r(this.client.session.get($)),500))}},this.reject=async r=>{await this.isInitialized(),await this.isValidReject(r);let{id:i,reason:c}=r,{pairingTopic:l}=this.client.proposal.get(i);l&&(await this.sendError(i,l,c),await this.client.proposal.delete(i,(0,P.D6)("USER_DISCONNECTED")))},this.update=async r=>{await this.isInitialized(),await this.isValidUpdate(r);let{topic:i,namespaces:c}=r,l=await this.sendRequest({topic:i,method:"wc_sessionUpdate",params:{namespaces:c}}),{done:E,resolve:S,reject:C}=(0,P.H1)();return this.events.once((0,P.E0)("session_update",l),({error:r})=>{r?C(r):S()}),await this.client.session.update(i,{namespaces:c}),{acknowledged:E}},this.extend=async r=>{await this.isInitialized(),await this.isValidExtend(r);let{topic:i}=r,c=await this.sendRequest({topic:i,method:"wc_sessionExtend",params:{}}),{done:l,resolve:E,reject:S}=(0,P.H1)();return this.events.once((0,P.E0)("session_extend",c),({error:r})=>{r?S(r):E()}),await this.setExpiry(i,(0,P.gn)(t2)),{acknowledged:l}},this.request=async r=>{await this.isInitialized(),await this.isValidRequest(r);let{chainId:i,request:c,topic:l,expiry:E}=r,S=(0,eg.payloadId)(),{done:C,resolve:R,reject:A}=(0,P.H1)(E,"Request expired. Please try again.");return this.events.once((0,P.E0)("session_request",S),({error:r,result:i})=>{r?A(r):R(i)}),await Promise.all([new Promise(async r=>{await this.sendRequest({clientRpcId:S,topic:l,method:"wc_sessionRequest",params:{request:c,chainId:i},expiry:E,throwOnFailedPublish:!0}).catch(r=>A(r)),this.client.events.emit("session_request_sent",{topic:l,request:c,chainId:i,id:S}),r()}),new Promise(async r=>{let i=await (0,P.bW)(this.client.core.storage,t5);(0,P.Hh)({id:S,topic:l,wcDeepLink:i}),r()}),C()]).then(r=>r[2])},this.respond=async r=>{await this.isInitialized(),await this.isValidRespond(r);let{topic:i,response:c}=r,{id:l}=c;(0,eg.isJsonRpcResult)(c)?await this.sendResult({id:l,topic:i,result:c.result,throwOnFailedPublish:!0}):(0,eg.isJsonRpcError)(c)&&await this.sendError(l,i,c.error),this.cleanupAfterResponse(r)},this.ping=async r=>{await this.isInitialized(),await this.isValidPing(r);let{topic:i}=r;if(this.client.session.keys.includes(i)){let r=await this.sendRequest({topic:i,method:"wc_sessionPing",params:{}}),{done:c,resolve:l,reject:E}=(0,P.H1)();this.events.once((0,P.E0)("session_ping",r),({error:r})=>{r?E(r):l()}),await c()}else this.client.core.pairing.pairings.keys.includes(i)&&await this.client.core.pairing.ping({topic:i})},this.emit=async r=>{await this.isInitialized(),await this.isValidEmit(r);let{topic:i,event:c,chainId:l}=r;await this.sendRequest({topic:i,method:"wc_sessionEvent",params:{event:c,chainId:l}})},this.disconnect=async r=>{await this.isInitialized(),await this.isValidDisconnect(r);let{topic:i}=r;this.client.session.keys.includes(i)?(await this.sendRequest({topic:i,method:"wc_sessionDelete",params:(0,P.D6)("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(i)):await this.client.core.pairing.disconnect({topic:i})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(i=>(0,P.Ih)(i,r))),this.getPendingSessionRequests=()=>
1(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async r=>{if(r.pairingTopic)try{let i=this.client.core.pairing.pairings.get(r.pairingTopic),c=this.client.core.pairing.pairings.getAll().filter(c=>{var l,E;return(null==(l=c.peerMetadata)?void 0:l.url)&&(null==(E=c.peerMetadata)?void 0:E.url)===r.peer.metadata.url&&c.topic&&c.topic!==i.topic});if(0===c.length)return;this.client.logger.info(`Cleaning up ${c.length} duplicate pairing(s)`),await Promise.all(c.map(r=>this.client.core.pairing.disconnect({topic:r.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(r){this.client.logger.error(r)}},this.deleteSession=async(r,i)=>{let{self:c}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),this.client.session.delete(r,(0,P.D6)("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),i||this.client.core.expirer.del(r),this.client.core.storage.removeItem(t5).catch(r=>this.client.logger.warn(r)),this.getPendingSessionRequests().forEach(i=>{i.topic===r&&this.deletePendingSessionRequest(i.id,(0,P.D6)("USER_DISCONNECTED"))})},this.deleteProposal=async(r,i)=>{await Promise.all([this.client.proposal.delete(r,(0,P.D6)("USER_DISCONNECTED")),i?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,i,c=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,i),c?Promise.resolve():this.client.core.expirer.del(r)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(i=>i.id!==r),c&&(this.sessionRequestQueue.state=t7.idle)},this.setExpiry=async(r,i)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:i}),this.client.core.expirer.set(r,i)},this.setProposal=async(r,i)=>{await this.client.proposal.set(r,i),this.client.core.expirer.set(r,i.expiry)},this.setPendingSessionRequest=async r=>{let i=t3.wc_sessionRequest.req.ttl,{id:c,topic:l,params:E,verifyContext:S}=r;await this.client.pendingRequest.set(c,{id:c,topic:l,params:E,verifyContext:S}),i&&this.client.core.expirer.set(c,(0,P.gn)(i))},this.sendRequest=async r=>{let{topic:i,method:c,params:l,expiry:E,relayRpcId:S,clientRpcId:C,throwOnFailedPublish:R}=r,A=(0,eg.formatJsonRpcRequest)(c,l,C);if((0,P.jU)()&&t8.includes(c)){let r=(0,P.rj)(JSON.stringify(A));this.client.core.verify.register({attestationId:r})}let T=await this.client.core.crypto.encode(i,A),q=t3[c].req;return E&&(q.ttl=E),S&&(q.id=S),this.client.core.history.set(i,A),R?(q.internal=dist_index_es_b(dist_index_es_g({},q.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,T,q)):this.client.core.relayer.publish(i,T,q).catch(r=>this.client.logger.error(r)),A.id},this.sendResult=async r=>{let{id:i,topic:c,result:l,throwOnFailedPublish:E}=r,S=(0,eg.formatJsonRpcResult)(i,l),P=await this.client.core.crypto.encode(c,S),C=await this.client.core.history.get(c,i),R=t3[C.request.method].res;E?(R.internal=dist_index_es_b(dist_index_es_g({},R.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(c,P,R)):this.client.core.relayer.publish(c,P,R).catch(r=>this.client.logger.error(r)),await this.client.core.history.resolve(S)},this.sendError=async(r,i,c)=>{let l=(0,eg.formatJsonRpcError)(r,c),E=await this.client.core.crypto.encode(i,l),S=await this.client.core.history.get(i,r),P=t3[S.request.method].res;this.client.core.relayer.publish(i,E,P),await this.client.core.history.resolve(l)},this.cleanup=async()=>{let r=[],i=[];this.client.session.getAll().forEach(i=>{(0,P.Bw)(i.expiry)&&r.push(i.topic)}),this.client.proposal.getAll().forEach(r=>{(0,P.Bw)(r.expiry)&&i.push(r.id)}),await Promise.all([...r.map(r=>this.deleteSession(r)),...i.map(r=>this.deleteProposal(r))])},this.onRelayEventRequest=async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===t7.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=t7.active;let r=this.requestQueue.queue.shift();if(r)try{this.processRequest(r),await new Promise(r=>setTimeout(r,300))}catch(r){this.client.logger.warn(r)}}this.requestQueue.state=t7.idle},this.processRequest=r=>{let{topic:i,payload:c}=r,l=c.method;switch(l){case"wc_sessionPropose":return this.onSessionProposeRequest
1(i,c);case"wc_sessionSettle":return this.onSessionSettleRequest(i,c);case"wc_sessionUpdate":return this.onSessionUpdateRequest(i,c);case"wc_sessionExtend":return this.onSessionExtendRequest(i,c);case"wc_sessionPing":return this.onSessionPingRequest(i,c);case"wc_sessionDelete":return this.onSessionDeleteRequest(i,c);case"wc_sessionRequest":return this.onSessionRequest(i,c);case"wc_sessionEvent":return this.onSessionEventRequest(i,c);default:return this.client.logger.info(`Unsupported request method ${l}`)}},this.onRelayEventResponse=async r=>{let{topic:i,payload:c}=r,l=(await this.client.core.history.get(i,c.id)).request.method;switch(l){case"wc_sessionPropose":return this.onSessionProposeResponse(i,c);case"wc_sessionSettle":return this.onSessionSettleResponse(i,c);case"wc_sessionUpdate":return this.onSessionUpdateResponse(i,c);case"wc_sessionExtend":return this.onSessionExtendResponse(i,c);case"wc_sessionPing":return this.onSessionPingResponse(i,c);case"wc_sessionRequest":return this.onSessionRequestResponse(i,c);default:return this.client.logger.info(`Unsupported response method ${l}`)}},this.onRelayEventUnknownPayload=r=>{let{topic:i}=r,{message:c}=(0,P.Z7)("MISSING_OR_INVALID",`Decoded payload on topic ${i} is not identifiable as a JSON-RPC request or a response.`);throw Error(c)},this.onSessionProposeRequest=async(r,i)=>{let{params:c,id:l}=i;try{this.isValidConnect(dist_index_es_g({},i.params));let E=(0,P.gn)(et.FIVE_MINUTES),S=dist_index_es_g({id:l,pairingTopic:r,expiry:E},c);await this.setProposal(l,S);let C=(0,P.rj)(JSON.stringify(i)),R=await this.getVerifyContext(C,S.proposer.metadata);this.client.events.emit("session_proposal",{id:l,params:S,verifyContext:R})}catch(i){await this.sendError(l,r,i),this.client.logger.error(i)}},this.onSessionProposeResponse=async(r,i)=>{let{id:c}=i;if((0,eg.isJsonRpcResult)(i)){let{result:l}=i;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:l});let E=this.client.proposal.get(c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:E});let S=E.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:S});let P=l.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:P});let C=await this.client.core.crypto.generateSharedKey(S,P);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:C});let R=await this.client.core.relayer.subscribe(C);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:R}),await this.client.core.pairing.activate({topic:r})}else(0,eg.isJsonRpcError)(i)&&(await this.client.proposal.delete(c,(0,P.D6)("USER_DISCONNECTED")),this.events.emit((0,P.E0)("session_connect"),{error:i.error}))},this.onSessionSettleRequest=async(r,i)=>{let{id:c,params:l}=i;try{this.isValidSessionSettleRequest(l);let{relay:c,controller:E,expiry:S,namespaces:C,requiredNamespaces:R,optionalNamespaces:A,sessionProperties:T,pairingTopic:q}=i.params,M=dist_index_es_g({topic:r,relay:c,expiry:S,namespaces:C,acknowledged:!0,pairingTopic:q,requiredNamespaces:R,optionalNamespaces:A,controller:E.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:E.publicKey,metadata:E.metadata}},T&&{sessionProperties:T});await this.sendResult({id:i.id,topic:r,result:!0}),this.events.emit((0,P.E0)("session_connect"),{session:M}),this.cleanupDuplicatePairings(M)}catch(i){await this.sendError(c,r,i),this.client.logger.error(i)}},this.onSessionSettleResponse=async(r,i)=>{let{id:c}=i;(0,eg.isJsonRpcResult)(i)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit((0,P.E0)("session_approve",c),{})):(0,eg.isJsonRpcError)(i)&&(await this.client.session.delete(r,(0,P.D6)("USER_DISCONNECTED")),this.events.emit((0,P.E0)("session_approve",c),{error:i.error}))},this.onSessionUpdateRequest=async(r,i)=>{let{params:c,id:l}=i;try{let i=`${r}_session_update`,E=P.O6.get(i);if(E&&this.isRequestOutOfSync(E,l)){this.client.logger.info(`Discarding out of sync request - ${l}`);return}this.isValidUpdate(dist_index_es_g({topic:r},c)),await this.client.session.update(r,{namespaces:c.namespaces}),await this.sendResult({id:l,topic:r,result:!0}),this.client.events.emit("session_update",{id:l,topic:r,params:c}),P.O6.set(i,l)}catch(i){await this.sendError(l,r,i),this.client.logger.error(i)}},this.isRequestOutOfSync=(r,i)=>parseInt(i.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,i)=>{let{id:c}=i;
1(0,eg.isJsonRpcResult)(i)?this.events.emit((0,P.E0)("session_update",c),{}):(0,eg.isJsonRpcError)(i)&&this.events.emit((0,P.E0)("session_update",c),{error:i.error})},this.onSessionExtendRequest=async(r,i)=>{let{id:c}=i;try{this.isValidExtend({topic:r}),await this.setExpiry(r,(0,P.gn)(t2)),await this.sendResult({id:c,topic:r,result:!0}),this.client.events.emit("session_extend",{id:c,topic:r})}catch(i){await this.sendError(c,r,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(r,i)=>{let{id:c}=i;(0,eg.isJsonRpcResult)(i)?this.events.emit((0,P.E0)("session_extend",c),{}):(0,eg.isJsonRpcError)(i)&&this.events.emit((0,P.E0)("session_extend",c),{error:i.error})},this.onSessionPingRequest=async(r,i)=>{let{id:c}=i;try{this.isValidPing({topic:r}),await this.sendResult({id:c,topic:r,result:!0}),this.client.events.emit("session_ping",{id:c,topic:r})}catch(i){await this.sendError(c,r,i),this.client.logger.error(i)}},this.onSessionPingResponse=(r,i)=>{let{id:c}=i;setTimeout(()=>{(0,eg.isJsonRpcResult)(i)?this.events.emit((0,P.E0)("session_ping",c),{}):(0,eg.isJsonRpcError)(i)&&this.events.emit((0,P.E0)("session_ping",c),{error:i.error})},500)},this.onSessionDeleteRequest=async(r,i)=>{let{id:c}=i;try{this.isValidDisconnect({topic:r,reason:i.params}),await Promise.all([new Promise(i=>{this.client.core.relayer.once(tI.publish,async()=>{i(await this.deleteSession(r))})}),this.sendResult({id:c,topic:r,result:!0})]),this.client.events.emit("session_delete",{id:c,topic:r})}catch(r){this.client.logger.error(r)}},this.onSessionRequest=async(r,i)=>{let{id:c,params:l}=i;try{this.isValidRequest(dist_index_es_g({topic:r},l));let i=(0,P.rj)(JSON.stringify((0,eg.formatJsonRpcRequest)("wc_sessionRequest",l,c))),E=this.client.session.get(r),S=await this.getVerifyContext(i,E.peer.metadata),C={id:c,topic:r,params:l,verifyContext:S};await this.setPendingSessionRequest(C),this.addSessionRequestToSessionRequestQueue(C),this.processSessionRequestQueue()}catch(i){await this.sendError(c,r,i),this.client.logger.error(i)}},this.onSessionRequestResponse=(r,i)=>{let{id:c}=i;(0,eg.isJsonRpcResult)(i)?this.events.emit((0,P.E0)("session_request",c),{result:i.result}):(0,eg.isJsonRpcError)(i)&&this.events.emit((0,P.E0)("session_request",c),{error:i.error})},this.onSessionEventRequest=async(r,i)=>{let{id:c,params:l}=i;try{let i=`${r}_session_event_${l.event.name}`,E=P.O6.get(i);if(E&&this.isRequestOutOfSync(E,c)){this.client.logger.info(`Discarding out of sync request - ${c}`);return}this.isValidEmit(dist_index_es_g({topic:r},l)),this.client.events.emit("session_event",{id:c,topic:r,params:l}),P.O6.set(i,c)}catch(i){await this.sendError(c,r,i),this.client.logger.error(i)}},this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=t7.idle,this.processSessionRequestQueue()},(0,et.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===t7.active){this.client.logger.info("session request queue is already active.");return}let r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=t7.active,this.client.events.emit("session_request",r)}catch(r){this.client.logger.error(r)}},this.onPairingCreated=r=>{if(r.active)return;let i=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);
1i&&this.onSessionProposeRequest(r.topic,(0,eg.formatJsonRpcRequest)("wc_sessionPropose",{requiredNamespaces:i.requiredNamespaces,optionalNamespaces:i.optionalNamespaces,relays:i.relays,proposer:i.proposer,sessionProperties:i.sessionProperties},i.id))},this.isValidConnect=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw Error(i)}let{pairingTopic:i,requiredNamespaces:c,optionalNamespaces:l,sessionProperties:E,relays:S}=r;if((0,P.o8)(i)||await this.isValidPairingTopic(i),!(0,P.PM)(S,!0)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`connect() relays: ${S}`);throw Error(r)}(0,P.o8)(c)||0===(0,P.L5)(c)||this.validateNamespaces(c,"requiredNamespaces"),(0,P.o8)(l)||0===(0,P.L5)(l)||this.validateNamespaces(l,"optionalNamespaces"),(0,P.o8)(E)||this.validateSessionProps(E,"sessionProperties")},this.validateNamespaces=(r,i)=>{let c=(0,P.n)(r,"connect()",i);if(c)throw Error(c.message)},this.isValidApprove=async r=>{if(!(0,P.EJ)(r))throw Error((0,P.Z7)("MISSING_OR_INVALID",`approve() params: ${r}`).message);let{id:i,namespaces:c,relayProtocol:l,sessionProperties:E}=r;await this.isValidProposalId(i);let S=this.client.proposal.get(i),C=(0,P.in)(c,"approve()");if(C)throw Error(C.message);let R=(0,P.rF)(S.requiredNamespaces,c,"approve()");if(R)throw Error(R.message);if(!(0,P.M_)(l,!0)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`approve() relayProtocol: ${l}`);throw Error(r)}(0,P.o8)(E)||this.validateSessionProps(E,"sessionProperties")},this.isValidReject=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`reject() params: ${r}`);throw Error(i)}let{id:i,reason:c}=r;if(await this.isValidProposalId(i),!(0,P.$t)(c)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(c)}`);throw Error(r)}},this.isValidSessionSettleRequest=r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw Error(i)}let{relay:i,controller:c,namespaces:l,expiry:E}=r;if(!(0,P.Z2)(i)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw Error(r)}let S=(0,P.Dd)(c,"onSessionSettleRequest()");if(S)throw Error(S.message);let C=(0,P.in)(l,"onSessionSettleRequest()");if(C)throw Error(C.message);if((0,P.Bw)(E)){let{message:r}=(0,P.Z7)("EXPIRED","onSessionSettleRequest()");throw Error(r)}},this.isValidUpdate=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`update() params: ${r}`);throw Error(i)}let{topic:i,namespaces:c}=r;await this.isValidSessionTopic(i);let l=this.client.session.get(i),E=(0,P.in)(c,"update()");if(E)throw Error(E.message);let S=(0,P.rF)(l.requiredNamespaces,c,"update()");if(S)throw Error(S.message)},this.isValidExtend=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`extend() params: ${r}`);throw Error(i)}let{topic:i}=r;await this.isValidSessionTopic(i)},this.isValidRequest=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`request() params: ${r}`);throw Error(i)}let{topic:i,request:c,chainId:l,expiry:E}=r;await this.isValidSessionTopic(i);let{namespaces:S}=this.client.session.get(i);if(!(0,P.p8)(S,l)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`request() chainId: ${l}`);throw Error(r)}if(!(0,P.hH)(c)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`request() ${JSON.stringify(c)}`);throw Error(r)}if(!(0,P.al)(S,l,c.method)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`request() method: ${c.method}`);throw Error(r)}if(E&&!(0,P.ON)(E,t4)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`request() expiry: ${E}. Expiry must be a number (in seconds) between ${t4.min} and ${t4.max}`);throw Error(r)}},this.isValidRespond=async r=>{var i;if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`respond() params: ${r}`);throw Error(i)}let{topic:c,response:l}=r;try{await this.isValidSessionTopic(c)}catch(c){throw null!=(i=r?.response)&&i.id&&this.cleanupAfterResponse(r),c}if(!(0,P.JT)(l)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(l)}`);throw Error(r)}},this.isValidPing=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`ping() params: ${r}`);throw Error(i)}let{topic:i}=r;await this.isValidSessionOrPairingTopic(i)},this.isValidEmit=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`emit() params: ${r}`);throw Error(i)}let{topic:i,event:c,chainId:l}=r;await this.isValidSessionTopic(i);let{namespaces:E}=this.client.session.get(i);if(!(0,P.p8)(E,l)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`emit() chainId: ${l}`);throw Error(r)}if(!(0,P.nf)(c)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(c)}`);throw Error(r)}if(!(0,P.sI)(E,l,c.name)){let{message:r}=(0,P.Z7)("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(c)}`);throw Error(r)}},this.isValidDisconnect=async r=>{if(!(0,P.EJ)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw Error(i)}let{topic:i}=r;await this.isValidSessionOrPairingTopic(i)},this.getVerifyContext=async(r,i)=>
1{let c={verified:{verifyUrl:i.verifyUrl||tN,validation:"UNKNOWN",origin:i.url||""}};try{let l=await this.client.core.verify.resolve({attestationId:r,verifyUrl:i.verifyUrl});l&&(c.verified.origin=l.origin,c.verified.isScam=l.isScam,c.verified.validation=l.origin===new URL(i.url).origin?"VALID":"INVALID")}catch(r){this.client.logger.info(r)}return this.client.logger.info(`Verify context: ${JSON.stringify(c)}`),c},this.validateSessionProps=(r,i)=>{Object.values(r).forEach(r=>{if(!(0,P.M_)(r,!1)){let{message:c}=(0,P.Z7)("MISSING_OR_INVALID",`${i} must be in Record<string, string> format. Received: ${JSON.stringify(r)}`);throw Error(c)}})}}async isInitialized(){if(!this.initialized){let{message:r}=(0,P.Z7)("NOT_INITIALIZED",this.name);throw Error(r)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(tI.message,async r=>{let{topic:i,message:c}=r;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(c)))return;let l=await this.client.core.crypto.decode(i,c);try{(0,eg.isJsonRpcRequest)(l)?(this.client.core.history.set(i,l),this.onRelayEventRequest({topic:i,payload:l})):(0,eg.isJsonRpcResponse)(l)?(await this.client.core.history.resolve(l),await this.onRelayEventResponse({topic:i,payload:l}),this.client.core.history.delete(i,l.id)):this.onRelayEventUnknownPayload({topic:i,payload:l})}catch(r){this.client.logger.error(r)}})}registerExpirerEvents(){this.client.core.expirer.on(tA.expired,async r=>{let{topic:i,id:c}=(0,P.iP)(r.target);if(c&&this.client.pendingRequest.keys.includes(c))return await this.deletePendingSessionRequest(c,(0,P.Z7)("EXPIRED"),!0);i?this.client.session.keys.includes(i)&&(await this.deleteSession(i,!0),this.client.events.emit("session_expire",{topic:i})):c&&(await this.deleteProposal(c,!0),this.client.events.emit("proposal_expire",{id:c}))})}registerPairingEvents(){this.client.core.pairing.events.on(tC.create,r=>this.onPairingCreated(r))}isValidPairingTopic(r){if(!(0,P.M_)(r,!1)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw Error(i)}if(!this.client.core.pairing.pairings.keys.includes(r)){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw Error(i)}if((0,P.Bw)(this.client.core.pairing.pairings.get(r).expiry)){let{message:i}=(0,P.Z7)("EXPIRED",`pairing topic: ${r}`);throw Error(i)}}async isValidSessionTopic(r){if(!(0,P.M_)(r,!1)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`session topic should be a string: ${r}`);throw Error(i)}if(!this.client.session.keys.includes(r)){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`session topic doesn't exist: ${r}`);throw Error(i)}if((0,P.Bw)(this.client.session.get(r).expiry)){await this.deleteSession(r);let{message:i}=(0,P.Z7)("EXPIRED",`session topic: ${r}`);throw Error(i)}}async isValidSessionOrPairingTopic(r){if(this.client.session.keys.includes(r))await this.isValidSessionTopic(r);else if(this.client.core.pairing.pairings.keys.includes(r))this.isValidPairingTopic(r);else if((0,P.M_)(r,!1)){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${r}`);throw Error(i)}else{let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`session or pairing topic should be a string: ${r}`);throw Error(i)}}async isValidProposalId(r){if(!(0,P.Q0)(r)){let{message:i}=(0,P.Z7)("MISSING_OR_INVALID",`proposal id should be a number: ${r}`);throw Error(i)}if(!this.client.proposal.keys.includes(r)){let{message:i}=(0,P.Z7)("NO_MATCHING_KEY",`proposal id doesn't exist: ${r}`);throw Error(i)}if((0,P.Bw)(this.client.proposal.get(r).expiry)){await this.deleteProposal(r);let{message:i}=(0,P.Z7)("EXPIRED",`proposal id: ${r}`);throw Error(i)}}};let index_es_us=class index_es_us extends Kt{constructor(r,i){super(r,i,"proposal",t0),this.core=r,this.logger=i}};let index_es_ue=class index_es_ue extends Kt{constructor(r,i){super(r,i,"session",t0),this.core=r,this.logger=i}};let index_es_gs=class index_es_gs extends Kt{constructor(r,i){super(r,i,"request",t0,r=>r.id),this.core=r,this.logger=i}};let index_es_Q=class index_es_Q extends b{constructor(r){super(r),this.protocol="wc",this.version=2,this.name=t1.name,this.events=new E.EventEmitter,this.on=(r,i)=>this.events.on(r,i),this.once=(r,i)=>this.events.once(r,i),this.off=(r,i)=>this.events.off(r,i),this.removeListener=(r,i)=>this.events.removeListener(r,i),this.removeAllListeners=r=>this.events.removeAllListeners(r),this.connect=async r=>{try{return await this.engine.connect(r)}catch(r){throw this.logger.error(r.message),r}},this.pair=async r=>{try{return await this.engine.pair(r)}catch(r){throw this.logger.error(r.message),r}},this.approve=async r=>{try{return await this.engine.approve(r)}catch(r){throw this.logger.error(r.message),r}},this.reject=async r=>{try{return await this.engine.reject(r)}catch(r){throw this.logger.error(r.message),r}},this.update=async r=>{try{return await this.engine.update(r)}catch(r){throw this.logger.error(r.message),r}},this.extend=async r=>{try{return await this.engine.extend(r)}catch(r){throw this.logger.error(r.message),r}},this.request=async r=>{try{return await this.engine.request(r)}catch(r){throw this.logger.error(r.message),r}},this.respond=async r=>{try{return await this.engine.respond(r)}catch(r){throw this.logger.error(r.message),r}},this.ping=async r=>{try{return await this.engine.ping(r)}catch(r){throw this.logger.error(r.message),r}},this.emit=async r=>{try{return await this.engine.emit(r)}catch(r){throw this.logger.error(r.message),r}},this.disconnect=async r=>{try{return await this.engine.disconnect(r)}catch(r){throw this.logger.error(r.message),r}},this.find=r=>{try{return this.engine.find(r)}catch(r){throw this.logger.error(r.message),r}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(r){throw this.logger.error(r.message),r}},this.name=r?.name||t1.name,this.metadata=r?.metadata||(0,P.D)();let i="u">typeof r?.logger&&"string"!=typeof r?.logger?r.logger:(0,J.pino)((0,J.getDefaultLoggerOptions)({level:r?.logger||t1.logger}));this.core=r?.core||new te(r),this.logger=(0,J.generateChildLogger)(i,this.name),this.session=new index_es_ue(this.core,this.logger),this.proposal=new index_es_us(this.core,this.logger),this.pendingRequest=new index_es_gs(this.core,this.logger),this.engine=new index_es_ds(this)}static async init(r){let i=new index_es_Q(r);return await i.initialize(),i}get context(){return(0,J.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(r){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(r.message),r}}};var rl=c(96641);let rh="error",rp="wc@2:universal_provider:",rd={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var rg="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof c.g?c.g:"u">typeof self?self:{},ry={exports:{}};/** 2 * @license 3 * Lodash <https://lodash.com/>
4 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 5 * Released under MIT license <https://lodash.com/license> 6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 8 */!function(r,i){(function(){var c,l="Expected a function",E="__lodash_hash_undefined__",S="__lodash_placeholder__",P=1/0,C=0/0,R=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],A="[object Arguments]",T="[object Array]",q="[object Boolean]",M="[object Date]",$="[object Error]",U="[object Function]",F="[object GeneratorFunction]",J="[object Map]",Q="[object Number]",X="[object Object]",ee="[object Promise]",et="[object RegExp]",eo="[object Set]",ec="[object String]",el="[object Symbol]",eh="[object WeakMap]",ep="[object ArrayBuffer]",ef="[object DataView]",ed="[object Float32Array]",eg="[object Float64Array]",ey="[object Int8Array]",e_="[object Int16Array]",em="[object Int32Array]",eb="[object Uint8Array]",ew="[object Uint8ClampedArray]",eI="[object Uint16Array]",eE="[object Uint32Array]",ex=/\b__p \+= '';/g,eS=/\b(__p \+=) '' \+/g,eP=/(__e\(.*?\)|\b__t\)) \+\n'';/g,eO=/&(?:amp|lt|gt|quot|#39);/g,eC=/[&<>"']/g,eR=RegExp(eO.source),eA=RegExp(eC.source),ej=/<%-([\s\S]+?)%>/g,eN=/<%([\s\S]+?)%>/g,eL=/<%=([\s\S]+?)%>/g,eT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ez=/^\w*$/,eD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ek=/[\\^$.*+?()[\]{}|]/g,eM=RegExp(ek.source),e$=/^\s+/,eH=/\s/,eU=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,eK=/\{\n\/\* \[wrapped with (.+)\] \*/,eV=/,? & /,eB=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eG=/[()=,{}\[\]\/\s]/,eW=/\\(\\)?/g,eZ=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,eF=/\w*$/,eJ=/^[-+]0x[0-9a-f]+$/i,eY=/^0b[01]+$/i,eQ=/^\[object .+?Constructor\]$/,eX=/^0o[0-7]+$/i,e0=/^(?:0|[1-9]\d*)$/,e1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 7,569 bytes, line 8
87f]/g,e5=/($^)/,e6=/['\n\r\u2028\u2029\\]/g,e2="\ud800-\udfff",e3="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",e4="\\u2700-\\u27bf",e7="a-z\\xdf-\\xf6\\xf8-\\xff",e8="A-Z\\xc0-\\xd6\\xd8-\\xde",e9="\\ufe0e\\ufe0f",tn="\\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",ta="['â]",to="["+tn+"]",tc="["+e3+"]",tl="["+e7+"]",th="[^"+e2+tn+"\\d+"+e4+e7+e8+"]",tp="\ud83c[\udffb-\udfff]",tf="[^"+e2+"]",td="(?:\ud83c[\udde6-\uddff]){2}",tg="[\ud800-\udbff][\udc00-\udfff]",ty="["+e8+"]",t_="\\u200d",tm="(?:"+tl+"|"+th+")",tb="(?:"+ta+"(?:d|ll|m|re|s|t|ve))?",tw="(?:"+ta+"(?:D|LL|M|RE|S|T|VE))?",tI="(?:"+tc+"|"+tp+")?",tE="["+e9+"]?",tx="(?:"+t_+"(?:"+[tf,td,tg].join("|")+")"+tE+tI+")*",tS=tE+tI+tx,tP="(?:"+["["+e4+"]",td,tg].join("|")+")"+tS,tO="(?:"+[tf+tc+"?",tc,td,tg,"["+e2+"]"].join("|")+")",tC=RegExp(ta,"g"),tR=RegExp(tc,"g"),tA=RegExp(tp+"(?="+tp+")|"+tO+tS,"g"),tj=RegExp([ty+"?"+tl+"+"+tb+"(?="+[to,ty,"$"].join("|")+")","(?:"+ty+"|"+th+")+"+tw+"(?="+[to,ty+tm,"$"].join("|")+")",ty+"?"+tm+"+"+tb,ty+"+"+tw,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",tP].join("|"),"g"),tN=RegExp("["+t_+e2+e3+e9+"]"),tL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tT=["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"],tz=-1,tq={};tq[ed]=tq[eg]=tq[ey]=tq[e_]=tq[em]=tq[eb]=tq[ew]=tq[eI]=tq[eE]=!0,tq[A]=tq[T]=tq[ep]=tq[q]=tq[ef]=tq[M]=tq[$]=tq[U]=tq[J]=tq[Q]=tq[X]=tq[et]=tq[eo]=tq[ec]=tq[eh]=!1;var tD={};tD[A]=tD[T]=tD[ep]=tD[ef]=tD[q]=tD[M]=tD[ed]=tD[eg]=tD[ey]=tD[e_]=tD[em]=tD[J]=tD[Q]=tD[X]=tD[et]=tD[eo]=tD[ec]=tD[el]=tD[eb]=tD[ew]=tD[eI]=tD[eE]=!0,tD[$]=tD[U]=tD[eh]=!1;var tk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tM=parseFloat,t$=parseInt,tH="object"==typeof rg&&rg&&rg.Object===Object&&rg,tU="object"==typeof self&&self&&self.Object===Object&&self,tK=tH||tU||Function("return this")(),tV=i&&!i.nodeType&&i,tB=tV&&r&&!r.nodeType&&r,tG=tB&&tB.exports===tV,tW=tG&&tH.process,tZ=function(){try{return tB&&tB.require&&tB.require("util").types||tW&&tW.binding&&tW.binding("util")}catch{}}(),tF=tZ&&tZ.isArrayBuffer,tJ=tZ&&tZ.isDate,tY=tZ&&tZ.isMap,tQ=tZ&&tZ.isRegExp,tX=tZ&&tZ.isSet,t0=tZ&&tZ.isTypedArray;function cn(r,i,c){switch(c.length){case 0:return r.call(i);case 1:return r.call(i,c[0]);case 2:return r.call(i,c[0],c[1]);case 3:return r.call(i,c[0],c[1],c[2])}return r.apply(i,c)}function Vo(r,i,c,l){for(var E=-1,S=null==r?0:r.length;++E<S;){var P=r[E];i(l,P,c(P),r)}return l}function mn(r,i){for(var c=-1,l=null==r?0:r.length;++c<l&&!1!==i(r[c],c,r););return r}function As(r,i){for(var c=-1,l=null==r?0:r.length;++c<l;)if(!i(r[c],c,r))return!1;return!0}function jn(r,i){for(var c=-1,l=null==r?0:r.length,E=0,S=[];++c<l;){var P=r[c];i(P,c,r)&&(S[E++]=P)}return S}function Ee(r,i){return!!(null==r?0:r.length)&&Tt(r,i,0)>-1}function Dr(r,i,c){for(var l=-1,E=null==r?0:r.length;++l<E;)if(c(i,r[l]))return!0;return!1}function G(r,i){for(var c=-1,l=null==r?0:r.length,E=Array(l);++c<l;)E[c]=i(r[c],c,r);return E}function nt(r,i){for(var c=-1,l=i.length,E=r.length;++c<l;)r[E+c]=i[c];return r}function Hr(r,i,c,l){var E=-1,S=null==r?0:r.length;for(l&&S&&(c=r[++E]);++E<S;)c=i(c,r[E],E,r);return c}function jo(r,i,c,l){var E=null==r?0:r.length;for(l&&E&&(c=r[--E]);E--;)c=i(c,r[E],E,r);return c}function Nr(r,i){for(var c=-1,l=null==r?0:r.length;++c<l;)if(i(r[c],c,r))return!0;return!1}var t1=$r("length");function Cs(r,i,c){var l;return c(r,function(r,c,E){if(i(r,c,E))return l=c,!1}),l}function ye(r,i,c,l){for(var E=r.length,S=c+(l?1:-1);l?S--:++S<E;)if(i(r[S],S,r))return S;return -1}function Tt(r,i,c){return i==i?function(r,i,c){for(var l=c-1,E=r.length;++l<E;)if(r[l]===i)return l;return -1}(r,i,c):ye(r,Is,c)}function rf(r,i,c,l){for(var E=c-1,S=r.length;++E<S;)if(l(r[E],i))return E;return -1}function Is(r){return r!=r}function xs(r,i){var c=null==r?0:r.length;return c?Wr(r,i)/c:C}function $r(r){return function(i){return null==i?c:i[r]}}function Ur(r){return function(i){return null==r?c:r[i]}}function Es(r,i,c,l,E){return E(r,function(r,E,S){c=l?(l=!1,r):i(c,r,E,S)}),c}function Wr(r,i){for(var l,E=-1,S=r.length;++E<S;){var P=i(r[E]);P!==c&&(l=l===c?P:l+P)}return l}function Fr(r,i){for(var c=-1,l=Array(r);++c<r;)l[c]=i(c);return l}function ys(r){return r&&r.slice(0,bs(r)+1).replace(e$,"")}function hn(r){return function(i){return r(i)}}function Mr(r,i){return G(i,function(i){return r[i]})}function jt(r,i){return r.has(i)}function Ss(r,i){for(var c=-1,l=r.length;++c<l&&Tt(i,r[c],0)>-1;);return c}function Os(r,i){for(var c=r.length;c--&&Tt(i,r[c],0)>-1;);return c}var t5=Ur({Ã:"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",Å¿:"s"}),t6=Ur({"&":"&","<":"<",">":">",'"':""","'":"'"});function cf(r){return"\\"+tk[r]}function Lt(r){return tN.test(r)}function qr(r){var i=-1,c=Array(r.size);return r.forEach(function(r,l){c[++i]=[l,r]}),c}function Rs(r,i){return function(c){return r(i(c))}}function tt(r,i){for(var c=-1,l=r.length,E=0,P=[];++c<l;){var C=r[c];(C===i||C===S)&&(r[c]=S,P[E++]=c)}return P}function Se(r){var i=-1,c=Array(r.size);return r.forEach(function(r){c[++i]=r}),c}function Dt(r){return Lt(r)?function(r){for(var i=tA.lastIndex=0;tA.test(r);)++i;return i}(r):t1(r)}function On(r){return Lt(r)?r.match(tA)||[]:r.split("")}function bs(r){for(var i=r.length;i--&&eH.test(r.charAt(i)););return i}var t2=Ur({"&":"&","<":"<",">":">",""":'"',"'":"'"}),t3=function h(r){var i,eH,e2,e3,e4=(r=null==r?tK:t3.defaults(tK.Object(),r,t3.pick(tK,tT))).Array,e7=r.Date,e8=r.Error,e9=r.Function,tn=r.Math,ta=r.Object,to=r.RegExp,tc=r.String,tl=r.TypeError,th=e4.prototype,tp=e9.prototype,tf=ta.prototype,td=r["__core-js_shared__"],tg=tp.toString,ty=tf.hasOwnProperty,t_=0,tm=(i=/[^.]+$/.exec(td&&td.keys&&td.keys.IE_PROTO||""))?"Symbol(sr
8c)_1."+i:"",tb=tf.toString,tw=tg.call(ta),tI=tK._,tE=to("^"+tg.call(ty).replace(ek,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tx=tG?r.Buffer:c,tS=r.Symbol,tP=r.Uint8Array,tO=tx?tx.allocUnsafe:c,tA=Rs(ta.getPrototypeOf,ta),tN=ta.create,tk=tf.propertyIsEnumerable,tH=th.splice,tU=tS?tS.isConcatSpreadable:c,tV=tS?tS.iterator:c,tB=tS?tS.toStringTag:c,tW=function(){try{var r=mt(ta,"defineProperty");return r({},"",{}),r}catch{}}(),tZ=r.clearTimeout!==tK.clearTimeout&&r.clearTimeout,t1=e7&&e7.now!==tK.Date.now&&e7.now,t4=r.setTimeout!==tK.setTimeout&&r.setTimeout,t7=tn.ceil,t8=tn.floor,t9=ta.getOwnPropertySymbols,re=tx?tx.isBuffer:c,rt=r.isFinite,ra=th.join,ro=Rs(ta.keys,ta),rc=tn.max,rl=tn.min,rh=e7.now,rp=r.parseInt,rd=tn.random,rg=th.reverse,ry=mt(r,"DataView"),r_=mt(r,"Map"),rm=mt(r,"Promise"),rb=mt(r,"Set"),rw=mt(r,"WeakMap"),rI=mt(ta,"create"),rE=rw&&new rw,rx={},rS=wt(ry),rP=wt(r_),rO=wt(rm),rC=wt(rb),rR=wt(rw),rA=tS?tS.prototype:c,rj=rA?rA.valueOf:c,rN=rA?rA.toString:c;function a(r){if(Y(r)&&!iN(r)&&!(r instanceof H)){if(r instanceof Pn)return r;if(ty.call(r,"__wrapped__"))return Fu(r)}return new Pn(r)}var rL=function(){function n(){}return function(r){if(!K(r))return{};if(tN)return tN(r);n.prototype=r;var i=new n;return n.prototype=c,i}}();function qe(){}function Pn(r,i){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=c}function H(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function dt(r){var i=-1,c=null==r?0:r.length;for(this.clear();++i<c;){var l=r[i];this.set(l[0],l[1])}}function Bn(r){var i=-1,c=null==r?0:r.length;for(this.clear();++i<c;){var l=r[i];this.set(l[0],l[1])}}function Gn(r){var i=-1,c=null==r?0:r.length;for(this.clear();++i<c;){var l=r[i];this.set(l[0],l[1])}}function gt(r){var i=-1,c=null==r?0:r.length;for(this.__data__=new Gn;++i<c;)this.add(r[i])}function Rn(r){var i=this.__data__=new Bn(r);this.size=i.size}function Fs(r,i){var c=iN(r),l=!c&&ij(r),E=!c&&!l&&iT(r),S=!c&&!l&&!E&&iM(r),P=c||l||E||S,C=P?Fr(r.length,tc):[],R=C.length;for(var A in r)(i||ty.call(r,A))&&!(P&&("length"==A||E&&("offset"==A||"parent"==A)||S&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||Zn(A,R)))&&C.push(A);return C}function Ms(r){var i=r.length;return i?r[ei(0,i-1)]:c}function Yr(r,i,l){(l===c||bn(r[i],l))&&(l!==c||i in r)||zn(r,i,l)}function se(r,i,l){var E=r[i];ty.call(r,i)&&bn(E,l)&&(l!==c||i in r)||zn(r,i,l)}function Be(r,i){for(var c=r.length;c--;)if(bn(r[c][0],i))return c;return -1}function gc(r,i,c,l){return rT(r,function(r,E,S){i(l,r,c(r),S)}),l}function qs(r,i){return r&&Un(i,V(i),r)}function zn(r,i,c){"__proto__"==i&&tW?tW(r,i,{configurable:!0,enumerable:!0,value:c,writable:!0}):r[i]=c}function Zr(r,i){for(var l=-1,E=i.length,S=e4(E),P=null==r;++l<E;)S[l]=P?c:Si(r,i[l]);return S}function vt(r,i,l){return r==r&&(l!==c&&(r=r<=l?r:l),i!==c&&(r=r>=i?r:i)),r}function An(r,i,l,E,S,P){var C,R=1&i,T=2&i,$=4&i;if(l&&(C=S?l(r,E,S,P):l(r)),C!==c)return C;if(!K(r))return r;var ee=iN(r);if(ee){if(eh=r.length,ex=new r.constructor(eh),eh&&"string"==typeof r[0]&&ty.call(r,"index")&&(ex.index=r.index,ex.input=r.input),C=ex,!R)return un(r,C)}else{var eh,ex,eS,eP,eO,eC=rB(r),eR=eC==U||eC==F;if(iT(r))return hu(r,R);if(eC==X||eC==A||eR&&!S){if(C=T||eR?{}:bu(r),!R)return T?(eS=(eO=C)&&Un(r,on(r),eO),Un(r,rV(r),eS)):(eP=qs(C,r),Un(r,rK(r),eP))}else{if(!tD[eC])return S?r:{};C=function(r,i,c){var l,E,S=r.constructor;switch(i){case ep:return fi(r);case q:case M:return new S(+r);case ef:return l=c?fi(r.buffer):r.buffer,new r.constructor(l,r.byteOffset,r.byteLength);case ed:case eg:case ey:case e_:case em:case eb:case ew:case eI:case eE:return lu(r,c);case J:return new S;case Q:case ec:return new S(r);case et:return(E=new r.constructor(r.source,eF.exec(r))).lastIndex=r.lastIndex,E;case eo:return new S;case el:return rj?ta(rj.call(r)):{}}}(r,eC,R)}}P||(P=new Rn);var eA=P.get(r);if(eA)return eA;P.set(r,C),ik(r)?r.forEach(function(c){C.add(An(c,i,l,c,r,P))}):iq(r)&&r.forEach(function(c,E){C.set(E,An(c,i,l,E,r,P))});var ej=$?T?pi:li:T?on:V,eN=ee?c:ej(r);return mn(eN||r,function(c,E){eN&&(c=r[E=c]),se(C,E,An(c,i,l,E,r,P))}),C}function Bs(r,i,l){var E=l.length;if(null==r)return!E;for(r=ta(r);E--;){var S=l[E],P=i[S],C=r[S];if(C===c&&!(S in r)||!P(C))return!1}return!0}function Gs(r,i,E){if("function"!=typeof r)throw new tl(l);return rZ(function(){r.apply(c,E)},i)}function ue(r,i,c,l){var E=-1,S=Ee,P=!0,C=r.length,R=[],A=i.length;if(!C)return R;c&&(i=G(i,hn(c))),l?(S=Dr,P=!1):i.length>=200&&(S=jt,P=!1,i=new gt(i));e:for(;++E<C;){var T=r[E],q=null==c?T:c(T);if(T=l||0!==T?T:0,P&&q==q){for(var M=A;M--;)if(i[M]===q)continue e;R.push(T)}else S(i,q,l)||R.push(T)}return R}a.templateSettings={escape:ej,evaluate:eN,interpolate:eL,variable:"",imports:{_:a}},a.prototype=qe.prototype,a.prototype.constructor=a,Pn.prototype=rL(qe.prototype),Pn.prototype.constructor=Pn,H.prototype=rL(qe.prototype),H.prototype.constructor=H,dt.prototype.clear=function(){this.__data__=rI?rI(null):{},this.size=0},dt.prototype.delete=function(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i},dt.prototype.get=function(r){var i=this.__data__;if(rI){var l=i[r];return l===E?c:l}return ty.call(i,r)?i[r]:c},dt.prototype.has=function(r){var i=this.__data__;return rI?i[r]!==c:ty.call(i,r)},dt.prototype.set=function(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=rI&&i===c?E:i,this},Bn.prototype.clear=function(){this.__data__=[],this.size=0},Bn.prototype.delete=function(r){var i=this.__data__,c=Be(i,r);return!(c<0)&&(c==i.length-1?i.pop():tH.call(i,c,1),--this.size,!0)},Bn.prototype.get=function(r){var i=this.__data__,l=Be(i,r);return l<0?c:i[l][1]},Bn.prototype.has=function(r){return Be(this.__data__,r)>-1},Bn.prototype.set=function(r,i){var c=this.__data__,l=Be(c,r);return l<0?(++this.size,c.push([r,i])):c[l][1]=i,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new dt,map:new(r_||Bn),string:new dt}},Gn.prototype.delete=function(r){var i=nr(this,r).delete(r);return this.size-=i?1:0,i},Gn.prototype.get=function(r){return nr(this,r).get(r)},Gn.prototype.has=function(r){return nr(this,r).has(r)},Gn.prototype.set=function(r,i){var c=nr(this,r),l=c.size;return c.set(r,i),this.size+=c.size==l?0:1,this},gt.prototype.add=gt.prototype.push=function(r){return this.__data__.set(r,E),this},gt.prototype.has=function(r){return this.__data__.has(r)},Rn.prototype.clear=function(){this.__data__=new Bn,this.size=0},Rn.prototype.delete=function(r){var i=this.__data__,c=i.delete(r);return this.size=i.size,c},Rn.prototype.get=function(r){return this.__data__.get(r)},Rn.prototype.has=function(r){return this.__data__.has(r)},Rn.prototype.set=function(r,i){var c=this.__data__;if(c instanceof Bn){var l=c.__data__;if(!r_||l.length<199)return l.push([r,i]),this.size=++c.size,this;c=this.__data__=new Gn(l)}return c.set(r,i),this.size=c.size,this};var rT=vu($n),rz=vu(Xr,!0);function mc(r,i){var c=!0;return rT(r,function(r,l,E){return c=!!i(r,l,E)}),c}function Ge(r,i,l){for(var E=-1,S=r.length;++E<S;){var P=r[E],C=i(P);if(null!=C&&(R===c?C==C&&!pn(C):l(C,R)))var R=C,A=P}return A}function Ks(r,i){var c=[];return rT(r,function(r,l,E){i(r,l,E)&&c.push(r)}),c}function j(r,i,c,l,E){var S=-1,P=r.length;for(c||(c=ah),E||(E=[]);++S<P;){var C=r[S];i>0&&c(C)?i>1?j(C,i-1,c,l,E):nt(E,C):l||(E[E.length]=C)}return E}var rq=_u(),rD=_u(!0);
8function $n(r,i){return r&&rq(r,i,V)}function Xr(r,i){return r&&rD(r,i,V)}function ze(r,i){return jn(i,function(i){return Jn(r[i])})}function _t(r,i){i=st(i,r);for(var l=0,E=i.length;null!=r&&l<E;)r=r[Wn(i[l++])];return l&&l==E?r:c}function Zs(r,i,c){var l=i(r);return iN(r)?l:nt(l,c(r))}function en(r){return null==r?r===c?"[object Undefined]":"[object Null]":tB&&tB in ta(r)?function(r){var i=ty.call(r,tB),l=r[tB];try{r[tB]=c;var E=!0}catch{}var S=tb.call(r);return E&&(i?r[tB]=l:delete r[tB]),S}(r):tb.call(r)}function Qr(r,i){return r>i}function Pc(r,i){return null!=r&&ty.call(r,i)}function Ac(r,i){return null!=r&&i in ta(r)}function Vr(r,i,l){for(var E=l?Dr:Ee,S=r[0].length,P=r.length,C=P,R=e4(P),A=1/0,T=[];C--;){var q=r[C];C&&i&&(q=G(q,hn(i))),A=rl(q.length,A),R[C]=!l&&(i||S>=120&&q.length>=120)?new gt(C&&q):c}q=r[0];var M=-1,$=R[0];e:for(;++M<S&&T.length<A;){var U=q[M],F=i?i(U):U;if(U=l||0!==U?U:0,!($?jt($,F):E(T,F,l))){for(C=P;--C;){var J=R[C];if(!(J?jt(J,F):E(r[C],F,l)))continue e}$&&$.push(F),T.push(U)}}return T}function ae(r,i,l){i=st(i,r);var E=null==(r=Hu(r,i))?r:r[Wn(In(i))];return null==E?c:cn(E,r,l)}function Js(r){return Y(r)&&en(r)==A}function oe(r,i,l,E,S){return r===i||(null!=r&&null!=i&&(Y(r)||Y(i))?function(r,i,l,E,S,P){var C=iN(r),R=iN(i),U=C?T:rB(r),F=R?T:rB(i);U=U==A?X:U,F=F==A?X:F;var ee=U==X,eh=F==X,ed=U==F;if(ed&&iT(r)){if(!iT(i))return!1;C=!0,ee=!1}if(ed&&!ee)return P||(P=new Rn),C||iM(r)?Su(r,i,l,E,S,P):function(r,i,c,l,E,S,P){switch(c){case ef:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)break;r=r.buffer,i=i.buffer;case ep:return!(r.byteLength!=i.byteLength||!S(new tP(r),new tP(i)));case q:case M:case Q:return bn(+r,+i);case $:return r.name==i.name&&r.message==i.message;case et:case ec:return r==i+"";case J:var C=qr;case eo:var R=1&l;if(C||(C=Se),r.size!=i.size&&!R)break;var A=P.get(r);if(A)return A==i;l|=2,P.set(r,i);var T=Su(C(r),C(i),l,E,S,P);return P.delete(r),T;case el:if(rj)return rj.call(r)==rj.call(i)}return!1}(r,i,U,l,E,S,P);if(!(1&l)){var eg=ee&&ty.call(r,"__wrapped__"),ey=eh&&ty.call(i,"__wrapped__");
vendor: 7,962 bytes, line 8
8if(eg||ey){var e_=eg?r.value():r,em=ey?i.value():i;return P||(P=new Rn),S(e_,em,l,E,P)}}return!!ed&&(P||(P=new Rn),function(r,i,l,E,S,P){var C=1&l,R=li(r),A=R.length;if(A!=li(i).length&&!C)return!1;for(var T=A;T--;){var q=R[T];if(!(C?q in i:ty.call(i,q)))return!1}var M=P.get(r),$=P.get(i);if(M&&$)return M==i&&$==r;var U=!0;P.set(r,i),P.set(i,r);for(var F=C;++T<A;){var J=r[q=R[T]],Q=i[q];if(E)var X=C?E(Q,J,q,i,r,P):E(J,Q,q,r,i,P);if(!(X===c?J===Q||S(J,Q,l,E,P):X)){U=!1;break}F||(F="constructor"==q)}if(U&&!F){var ee=r.constructor,et=i.constructor;ee!=et&&"constructor"in r&&"constructor"in i&&!("function"==typeof ee&&ee instanceof ee&&"function"==typeof et&&et instanceof et)&&(U=!1)}return P.delete(r),P.delete(i),U}(r,i,l,E,S,P))}(r,i,l,E,oe,S):r!=r&&i!=i)}function kr(r,i,l,E){var S=l.length,P=S,C=!E;if(null==r)return!P;for(r=ta(r);S--;){var R=l[S];if(C&&R[2]?R[1]!==r[R[0]]:!(R[0]in r))return!1}for(;++S<P;){var A=(R=l[S])[0],T=r[A],q=R[1];if(C&&R[2]){if(T===c&&!(A in r))return!1}else{var M=new Rn;if(E)var $=E(T,q,A,r,i,M);if(!($===c?oe(q,T,3,E,M):$))return!1}}return!0}function Xs(r){return!(!K(r)||tm&&tm in r)&&(Jn(r)?tE:eQ).test(wt(r))}function Qs(r){return"function"==typeof r?r:null==r?fn:"object"==typeof r?iN(r)?js(r[0],r[1]):ks(r):ma(r)}function jr(r){if(!he(r))return ro(r);var i=[];for(var c in ta(r))ty.call(r,c)&&"constructor"!=c&&i.push(c);return i}function ni(r,i){return r<i}function Vs(r,i){var c=-1,l=an(r)?e4(r.length):[];return rT(r,function(r,E,S){l[++c]=i(r,E,S)}),l}function ks(r){var i=gi(r);return 1==i.length&&i[0][2]?Lu(i[0][0],i[0][1]):function(c){return c===r||kr(c,r,i)}}function js(r,i){var l;return _i(r)&&(l=i)==l&&!K(l)?Lu(Wn(r),i):function(l){var E=Si(l,r);return E===c&&E===i?Oi(l,r):oe(i,E,3)}}function Ke(r,i,l,E,S){r!==i&&rq(i,function(P,C){if(S||(S=new Rn),K(P))!function(r,i,l,E,S,P,C){var R=wi(r,l),A=wi(i,l),T=C.get(A);if(T){Yr(r,l,T);return}var q=P?P(R,A,l+"",r,i,C):c,M=q===c;if(M){var $=iN(A),U=!$&&iT(A),F=!$&&!U&&iM(A);q=A,$||U||F?iN(R)?q=R:Z(R)?q=un(R):U?(M=!1,q=hu(A,!0)):F?(M=!1,q=lu(A,!0)):q=[]:pe(A)||ij(A)?(q=R,ij(R)?q=oa(R):(!K(R)||Jn(R))&&(q=bu(A))):M=!1}M&&(C.set(A,q),S(q,A,E,P,C),C.delete(A)),Yr(r,l,q)}(r,i,C,l,Ke,E,S);else{var R=E?E(wi(r,C),P,C+"",r,i,S):c;R===c&&(R=P),Yr(r,C,R)}},on)}function nu(r,i){var l=r.length;if(l)return Zn(i+=i<0?l:0,l)?r[i]:c}function tu(r,i,c){i=i.length?G(i,function(r){return iN(r)?function(i){return _t(i,1===r.length?r[0]:r)}:r}):[fn];var l=-1;return i=G(i,hn(x())),function(r,i){var c=r.length;for(r.sort(i);c--;)r[c]=r[c].value;return r}(Vs(r,function(r,c,E){return{criteria:G(i,function(i){return i(r)}),index:++l,value:r}}),function(r,i){return function(r,i,c){for(var l=-1,E=r.criteria,S=i.criteria,P=E.length,C=c.length;++l<P;){var R=pu(E[l],S[l]);if(R){if(l>=C)return R;return R*("desc"==c[l]?-1:1)}}return r.index-i.index}(r,i,c)})}function eu(r,i,c){for(var l=-1,E=i.length,S={};++l<E;){var P=i[l],C=_t(r,P);c(C,P)&&fe(S,st(P,r),C)}return S}function ti(r,i,c,l){var E=l?rf:Tt,S=-1,P=i.length,C=r;for(r===i&&(i=un(i)),c&&(C=G(r,hn(c)));++S<P;)for(var R=0,A=i[S],T=c?c(A):A;(R=E(C,T,R,l))>-1;)C!==r&&tH.call(C,R,1),tH.call(r,R,1);return r}function ru(r,i){for(var c=r?i.length:0,l=c-1;c--;){var E=i[c];if(c==l||E!==S){var S=E;Zn(E)?tH.call(r,E,1):si(r,E)}}return r}function ei(r,i){return r+t8(rd()*(i-r+1))}function ri(r,i){var c="";if(!r||i<1||i>9007199254740991)return c;do i%2&&(c+=r),(i=t8(i/2))&&(r+=r);while(i);return c}function L(r,i){return rF(Du(r,i,fn),r+"")}function fe(r,i,l,E){if(!K(r))return r;i=st(i,r);for(var S=-1,P=i.length,C=P-1,R=r;null!=R&&++S<P;){var A=Wn(i[S]),T=l;if("__proto__"===A||"constructor"===A||"prototype"===A)break;if(S!=C){var q=R[A];(T=E?E(q,A,R):c)===c&&(T=K(q)?q:Zn(i[S+1])?[]:{})}se(R,A,T),R=R[A]}return r}var rk=rE?function(r,i){return rE.set(r,i),r}:fn,rM=tW?function(r,i){return tW(r,"toString",{configurable:!0,enumerable:!1,value:bi(i),writable:!0})}:fn;function Cn(r,i,c){var l=-1,E=r.length;i<0&&(i=-i>E?0:E+i),(c=c>E?E:c)<0&&(c+=E),E=i>c?0:c-i>>>0,i>>>=0;for(var S=e4(E);++l<E;)S[l]=r[l+i];return S}function Mc(r,i){var c;return rT(r,function(r,l,E){return!(c=i(r,l,E))}),!!c}function Ye(r,i,c){var l=0,E=null==r?l:r.length;if("number"==typeof i&&i==i&&E<=2147483647){for(;l<E;){var S=l+E>>>1,P=r[S];null!==P&&!pn(P)&&(c?P<=i:P<i)?l=S+1:E=S}return E}return ii(r,i,fn,c)}function ii(r,i,l,E){var S=0,P=null==r?0:r.length;if(0===P)return 0;i=l(i);for(var C=i!=i,R=null===i,A=pn(i),T=i===c;S<P;){var q=t8((S+P)/2),M=l(r[q]),$=M!==c,U=null===M,F=M==M,J=pn(M);if(C)var Q=E||F;else Q=T?F&&(E||$):R?F&&$&&(E||!U):A?F&&$&&!U&&(E||!J):!U&&!J&&(E?M<=i:M<i);Q?S=q+1:P=q}return rl(P,4294967294)}function su(r,i){for(var c=-1,l=r.length,E=0,S=[];++c<l;){var P=r[c],C=i?i(P):P;if(!c||!bn(C,R)){var R=C;S[E++]=0===P?0:P}}return S}function uu(r){return"number"==typeof r?r:pn(r)?C:+r}function ln(r){if("string"==typeof r)return r;if(iN(r))return G(r,ln)+"";if(pn(r))return rN?rN.call(r):"";var i=r+"";return"0"==i&&1/r==-P?"-0":i}function it(r,i,c){var l=-1,E=Ee,S=r.length,P=!0,C=[],R=C;if(c)P=!1,E=Dr;else if(S>=200){var A=i?null:rH(r);if(A)return Se(A);P=!1,E=jt,R=new gt}else R=i?[]:C;e:for(;++l<S;){var T=r[l],q=i?i(T):T;if(T=c||0!==T?T:0,P&&q==q){for(var M=R.length;M--;)if(R[M]===q)continue e;i&&R.push(q),C.push(T)}else E(R,q,c)||(R!==C&&R.push(q),C.push(T))}return C}function si(r,i){return i=st(i,r),null==(r=Hu(r,i))||delete r[Wn(In(i))]}function au(r,i,c,l){return fe(r,i,c(_t(r,i)),l)}function Ze(r,i,c,l){for(var E=r.length,S=l?E:-1;(l?S--:++S<E)&&i(r[S],S,r););return c?Cn(r,l?0:S,l?S+1:E):Cn(r,l?S+1:0,l?E:S)}function ou(r,i){var c=r;return c instanceof H&&(c=c.value()),Hr(i,function(r,i){return i.func.apply(i.thisArg,nt([r],i.args))},c)}function ui(r,i,c){var l=r.length;if(l<2)return l?it(r[0]):[];for(var E=-1,S=e4(l);++E<l;)for(var P=r[E],C=-1;++C<l;)C!=E&&(S[E]=ue(S[E]||P,r[C],i,c));return it(j(S,1),i,c)}function fu(r,i,l){for(var E=-1,S=r.length,P=i.length,C={};++E<S;){var R=E<P?i[E]:c;l(C,r[E],R)}return C}function ai(r){return Z(r)?r:[]}function oi(r){return"function"==typeof r?r:fn}function st(r,i){return iN(r)?r:_i(r,i)?[r]:rJ(W(r))}function ut(r,i,l){var E=r.length;return l=l===c?E:l,!i&&l>=E?r:Cn(r,i,l)}var r$=tZ||function(r){return tK.clearTimeout(r)};function hu(r,i){if(i)return r.slice();var c=r.length,l=tO?tO(c):new r.constructor(c);return r.copy(l),l}function fi(r){var i=new r.constructor(r.byteLength);return new tP(i).set(new tP(r)),i}function lu(r,i){var c=i?fi(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.length)}function pu(r,i){if(r!==i){var l=r!==c,E=null===r,S=r==r,P=pn(r),C=i!==c,R=null===i,A=i==i,T=pn(i);if(!R&&!T&&!P&&r>i||P&&C&&A&&!R&&!T||E&&C&&A||!l&&A||!S)return 1;if(!E&&!P&&!T&&r<i||T&&l&&S&&!E&&!P||R&&l&&S||!C&&S||!A)return -1}return 0}function du(r,i,c,l){for(var E=-1,S=r.length,P=c.length,C=-1,R=i.length,A=rc(S-P,0),T=e4(R+A),q=!l;++C<R;)T[C]=i[C];for(;++E<P;)(q||E<S)&&(T[c[E]]=r[E]);for(;A--;)T[C++]=r[E++];return T}function gu(r,i,c,l){for(var E=-1,S=r.length,P=-1,C=c.length,R=-1,A=i.length,T=rc(S-C,0),q=e4(T+A),M=!l;++E<T;)q[E]=r[E];for(var $=E;++R<A;)q[$+R]=i[R];for(;++P<C;)(M||E<S)&&(q[$+c[P]]=r[E++]);return q}function un(r,i){var c=-1,l=r.length;for(i||(i=e4(l));++c<l;)i[c]=r[c];return i}function Un(r,i,l,E){var S=!l;l||(l={});for(var P=-1,C=i.length;++P<C;){var R=i[P],A=E?E(l[R],r[R],R,l,r):c;A===c&&(A=r[R]),S?zn(l,R,A):se(l,R,A)}return l}function Je(r,i){return function(c,l){var E=iN(c)?Vo:gc,S=i?i():{};return E(c,r,x(l,2),S)}}function Ft(r){return L(function(i,l){var E=-1,S=l.length,P=S>1?l[S-1]:c,C=S>2?l[2]:c;for(P=r.length>3&&"function"==typeof P?(S--,P):c,C&&rn(l[0],l[1],C)&&(P=S<3?c:P,S=1),i=ta(i);++E<S;){var R=l[E];R&&r(i,R,E,P)}return i})}function vu(r,i){return function(c,l){if(null==c)return c;if(!an(c))return r(c,l);for(var E=c.length,S=i?E:-1,P=ta(c);(i?S--:++S<E)&&!1!==l(P[S],S,P););return c}}function _u(r){return function(i,c,l){for(var E=-1,S=ta(i),P=l(i),C=P.length;C--;){var R=P[r?C:++E];
vendor: 4,095 bytes, line 8
8if(!1===c(S[R],R,S))break}return i}}function mu(r){return function(i){var l=Lt(i=W(i))?On(i):c,E=l?l[0]:i.charAt(0),S=l?ut(l,1).join(""):i.slice(1);return E[r]()+S}}function Mt(r){return function(i){return Hr(va(ga(i).replace(tC,"")),r,"")}}function ce(r){return function(){var i=arguments;switch(i.length){case 0:return new r;case 1:return new r(i[0]);case 2:return new r(i[0],i[1]);case 3:return new r(i[0],i[1],i[2]);case 4:return new r(i[0],i[1],i[2],i[3]);case 5:return new r(i[0],i[1],i[2],i[3],i[4]);case 6:return new r(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new r(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var c=rL(r.prototype),l=r.apply(c,i);return K(l)?l:c}}function wu(r){return function(i,l,E){var S=ta(i);if(!an(i)){var P=x(l,3);i=V(i),l=function(r){return P(S[r],r,S)}}var C=r(i,l,E);return C>-1?S[P?i[C]:C]:c}}function Pu(r){return Yn(function(i){var E=i.length,S=E,P=Pn.prototype.thru;for(r&&i.reverse();S--;){var C=i[S];if("function"!=typeof C)throw new tl(l);if(P&&!R&&"wrapper"==je(C))var R=new Pn([],!0)}for(S=R?S:E;++S<E;){var A=je(C=i[S]),T="wrapper"==A?rU(C):c;R=T&&mi(T[0])&&424==T[1]&&!T[4].length&&1==T[9]?R[je(T[0])].apply(R,T[3]):1==C.length&&mi(C)?R[A]():R.thru(C)}return function(){var r=arguments,c=r[0];if(R&&1==r.length&&iN(c))return R.plant(c).value();for(var l=0,S=E?i[l].apply(this,r):c;++l<E;)S=i[l].call(this,S);return S}})}function Xe(r,i,l,E,S,P,C,R,A,T){var q=128&i,M=1&i,$=2&i,U=24&i,F=512&i,J=$?c:ce(r);return function y(){for(var Q=arguments.length,X=e4(Q),ee=Q;ee--;)X[ee]=arguments[ee];if(U)var et=qt(y),eo=function(r,i){for(var c=r.length,l=0;c--;)r[c]===i&&++l;return l}(X,et);if(E&&(X=du(X,E,S,U)),P&&(X=gu(X,P,C,U)),Q-=eo,U&&Q<T){var ec=tt(X,et);return Iu(r,i,Xe,y.placeholder,l,X,ec,R,A,T-Q)}var el=M?l:this,eh=$?el[r]:r;return Q=X.length,R?X=function(r,i){for(var l=r.length,E=rl(i.length,l),S=un(r);E--;){var P=i[E];r[E]=Zn(P,l)?S[P]:c}return r}(X,R):F&&Q>1&&X.reverse(),q&&A<Q&&(X.length=A),this&&this!==tK&&this instanceof y&&(eh=J||ce(eh)),eh.apply(el,X)}}function Au(r,i){return function(c,l){var E,S;return E=i(l),S={},$n(c,function(i,c,l){r(S,E(i),c,l)}),S}}function Qe(r,i){return function(l,E){var S;if(l===c&&E===c)return i;if(l!==c&&(S=l),E!==c){if(S===c)return E;"string"==typeof l||"string"==typeof E?(l=ln(l),E=ln(E)):(l=uu(l),E=uu(E)),S=r(l,E)}return S}}function ci(r){return Yn(function(i){return i=G(i,hn(x())),L(function(c){var l=this;return r(i,function(r){return cn(r,l,c)})})})}function Ve(r,i){var l=(i=i===c?" ":ln(i)).length;if(l<2)return l?ri(i,r):i;var E=ri(i,t7(r/Dt(i)));return Lt(i)?ut(On(E),0,r).join(""):E.slice(0,r)}function Cu(r){return function(i,l,E){return E&&"number"!=typeof E&&rn(i,l,E)&&(l=E=c),i=Xn(i),l===c?(l=i,i=0):l=Xn(l),E=E===c?i<l?1:-1:Xn(E),function(r,i,c,l){for(var E=-1,S=rc(t7((i-r)/(c||1)),0),P=e4(S);S--;)P[l?S:++E]=r,r+=c;return P}(i,l,E,r)}}function ke(r){return function(i,c){return"string"==typeof i&&"string"==typeof c||(i=xn(i),c=xn(c)),r(i,c)}}function Iu(r,i,l,E,S,P,C,R,A,T){var q=8&i,M=q?C:c,$=q?c:C,U=q?P:c,F=q?c:P;i|=q?32:64,4&(i&=~(q?64:32))||(i&=-4);var J=[r,i,S,U,M,F,$,R,A,T],Q=l.apply(c,J);return mi(r)&&rW(Q,J),Q.placeholder=E,$u(Q,r,i)}function hi(r){var i=tn[r];return function(r,c){if(r=xn(r),(c=null==c?0:rl(b(c),292))&&rt(r)){var l=(W(r)+"e").split("e");return+((l=(W(i(l[0]+"e"+(+l[1]+c)))+"e").split("e"))[0]+"e"+(+l[1]-c))}return i(r)}}var rH=rb&&1/Se(new rb([,-0]))[1]==P?function(r){return new rb(r)}:Di;function xu(r){return function(i){var c,l,E=rB(i);return E==J?qr(i):E==eo?(c=-1,l=Array(i.size),i.forEach(function(r){l[++c]=[r,r]}),l):G(r(i),function(r){return[r,i[r]]})}}function Kn(r,i,E,P,C,R,A,T){var q=2&i;if(!q&&"function"!=typeof r)throw new tl(l);var M=P?P.length:0;if(M||(i&=-97,P=C=c),A=A===c?A:rc(b(A),0),T=T===c?T:b(T),M-=C?C.length:0,64&i){var $=P,U=C;P=C=c}var F=q?c:rU(r),J=[r,i,E,P,C,$,U,R,A,T];if(F&&function(r,i){var c=r[1],l=i[1],E=c|l,P=E<131,C=128==l&&8==c||128==l&&256==c&&r[7].length<=i[8]||384==l&&i[7].length<=i[8]&&8==c;if(P||C){1&l&&(r[2]=i[2],E|=1&c?0:4);var R=i[3];if(R){var A=r[3];r[3]=A?du(A,R,i[4]):R,r[4]=A?tt(r[3],S):i[4]}
8(R=i[5])&&(A=r[5],r[5]=A?gu(A,R,i[6]):R,r[6]=A?tt(r[5],S):i[6]),(R=i[7])&&(r[7]=R),128&l&&(r[8]=null==r[8]?i[8]:rl(r[8],i[8])),null==r[9]&&(r[9]=i[9]),r[0]=i[0],r[1]=E}}(J,F),r=J[0],i=J[1],E=J[2],P=J[3],C=J[4],(T=J[9]=J[9]===c?q?0:r.length:rc(J[9]-M,0))||!(24&i)||(i&=-25),i&&1!=i)8==i||16==i?(Q=r,X=i,ee=T,et=ce(Q),eb=function s(){for(var r=arguments.length,i=e4(r),l=r,E=qt(s);l--;)i[l]=arguments[l];var S=r<3&&i[0]!==E&&i[r-1]!==E?[]:tt(i,E);return(r-=S.length)<ee?Iu(Q,X,Xe,s.placeholder,c,i,S,c,c,ee-r):cn(this&&this!==tK&&this instanceof s?et:Q,this,i)}):32!=i&&33!=i||C.length?eb=Xe.apply(c,J):(eo=r,ec=i,el=E,eh=P,ep=1&ec,ef=ce(eo),eb=function f(){for(var r=-1,i=arguments.length,c=-1,l=eh.length,E=e4(l+i),S=this&&this!==tK&&this instanceof f?ef:eo;++c<l;)E[c]=eh[c];for(;i--;)E[c++]=arguments[++r];return cn(S,ep?el:this,E)});else var Q,X,ee,et,eo,ec,el,eh,ep,ef,ed,eg,ey,e_,em,eb=(ed=r,eg=i,ey=E,e_=1&eg,em=ce(ed),function o(){return(this&&this!==tK&&this instanceof o?em:ed).apply(e_?ey:this,arguments)});return $u((F?rk:rW)(eb,J),r,i)}function Eu(r,i,l,E){return r===c||bn(r,tf[l])&&!ty.call(E,l)?i:r}function yu(r,i,l,E,S,P){return K(r)&&K(i)&&(P.set(i,r),Ke(r,i,c,yu,P),P.delete(i)),r}function kc(r){return pe(r)?c:r}function Su(r,i,l,E,S,P){var C=1&l,R=r.length,A=i.length;if(R!=A&&!(C&&A>R))return!1;var T=P.get(r),q=P.get(i);if(T&&q)return T==i&&q==r;var M=-1,$=!0,U=2&l?new gt:c;for(P.set(r,i),P.set(i,r);++M<R;){var F=r[M],J=i[M];if(E)var Q=C?E(J,F,M,i,r,P):E(F,J,M,r,i,P);if(Q!==c){if(Q)continue;$=!1;break}if(U){if(!Nr(i,function(r,i){if(!jt(U,i)&&(F===r||S(F,r,l,E,P)))return U.push(i)})){$=!1;break}}else if(!(F===J||S(F,J,l,E,P))){$=!1;break}}return P.delete(r),P.delete(i),$}function Yn(r){return rF(Du(r,c,Bu),r+"")}function li(r){return Zs(r,V,rK)}function pi(r){return Zs(r,on,rV)}var rU=rE?function(r){return rE.get(r)}:Di;function je(r){for(var i=r.name+"",c=rx[i],l=ty.call(rx,i)?c.length:0;l--;){var E=c[l],S=E.func;if(null==S||S==r)return E.name}return i}function qt(r){return(ty.call(a,"placeholder")?a:r).placeholder}function x(){var r=a.iteratee||Ti;return r=r===Ti?Qs:r,arguments.length?r(arguments[0],arguments[1]):r}function nr(r,i){var c,l=r.__data__;return("string"==(c=typeof i)||"number"==c||"symbol"==c||"boolean"==c?"__proto__"!==i:null===i)?l["string"==typeof i?"string":"hash"]:l.map}function gi(r){for(var i=V(r),c=i.length;c--;){var l=i[c],E=r[l];i[c]=[l,E,E==E&&!K(E)]}return i}function mt(r,i){var l=null==r?c:r[i];return Xs(l)?l:c}var rK=t9?function(r){return null==r?[]:jn(t9(r=ta(r)),function(i){return tk.call(r,i)})}:Hi,rV=t9?function(r){for(var i=[];r;)nt(i,rK(r)),r=tA(r);return i}:Hi,rB=en;function Ru(r,i,c){i=st(i,r);for(var l=-1,E=i.length,S=!1;++l<E;){var P=Wn(i[l]);if(!(S=null!=r&&c(r,P)))break;r=r[P]}return S||++l!=E?S:!!(E=null==r?0:r.length)&&ar(E)&&Zn(P,E)&&(iN(r)||ij(r))}function bu(r){return"function"!=typeof r.constructor||he(r)?{}:rL(tA(r))}function ah(r){return iN(r)||ij(r)||!!(tU&&r&&r[tU])}function Zn(r,i){var c=typeof r;return!!(i=i??9007199254740991)&&("number"==c||"symbol"!=c&&e0.test(r))&&r>-1&&r%1==0&&r<i}function rn(r,i,c){if(!K(c))return!1;var l=typeof i;return("number"==l?!!(an(c)&&Zn(i,c.length)):"string"==l&&i in c)&&bn(c[i],r)}function _i(r,i){if(iN(r))return!1;var c=typeof r;return!!("number"==c||"symbol"==c||"boolean"==c||null==r||pn(r))||ez.test(r)||!eT.test(r)||null!=i&&r in ta(i)}function mi(r){var i=je(r),c=a[i];if("function"!=typeof c||!(i in H.prototype))return!1;if(r===c)return!0;var l=rU(c);return!!l&&r===l[0]}(ry&&rB(new ry(new ArrayBuffer(1)))!=ef||r_&&rB(new r_)!=J||rm&&rB(rm.resolve())!=ee||rb&&rB(new rb)!=eo||rw&&rB(new rw)!=eh)&&(rB=function(r){var i=en(r),l=i==X?r.constructor:c,E=l?wt(l):"";if(E)switch(E){case rS:return ef;case rP:return J;case rO:return ee;case rC:return eo;case rR:return eh}return i});var rG=td?Jn:Ni;function he(r){var i=r&&r.constructor;return r===("function"==typeof i&&i.prototype||tf)}function Lu(r,i){return function(l){return null!=l&&l[r]===i&&(i!==c||r in ta(l))}}function Du(r,i,l){return i=rc(i===c?r.length-1:i,0),function(){for(var c=arguments,E=-1,S=rc(c.length-i,0),P=e4(S);++E<S;)P[E]=c[i+E];E=-1;for(var C=e4(i+1);++E<i;)C[E]=c[E];return C[i]=l(P),cn(r,this,C)}}function Hu(r,i){return i.length<2?r:_t(r,Cn(i,0,-1))}function wi(r,i){if(!("constructor"===i&&"function"==typeof r[i])&&"__proto__"!=i)return r[i]}var rW=Uu(rk),rZ=t4||function(r,i){return tK.setTimeout(r,i)},rF=Uu(rM);function $u(r,i,c){var l,E,S=i+"";return rF(r,function(r,i){var c=i.length;if(!c)return r;var l=c-1;return i[l]=(c>1?"& ":"")+i[l],i=i.join(c>2?", ":" "),r.replace(eU,`{ 9/* [wrapped with `+i+`] */ 10`)}(S,(l=(E=S.match(eK))?E[1].split(eV):[],mn(R,function(r){var i="_."+r[0];c&r[1]&&!Ee(l,i)&&l.push(i)}),l.sort())))}function Uu(r){var i=0,l=0;return function(){var E=rh(),S=16-(E-l);if(l=E,S>0){if(++i>=800)return arguments[0]}else i=0;return r.apply(c,arguments)}}function tr(r,i){var l=-1,E=r.length,S=E-1;for(i=i===c?E:i;++l<i;){var P=ei(l,S),C=r[P];r[P]=r[l],r[l]=C}return r.length=i,r}var rJ=(e2=(eH=sr(function(r){var i=[];return 46===r.charCodeAt(0)&&i.push(""),r.replace(eD,function(r,c,l,E){i.push(l?E.replace(eW,"$1"):c||r)}),i},function(r){return 500===e2.size&&e2.clear(),r})).cache,eH);function Wn(r){if("string"==typeof r||pn(r))return r;var i=r+"";return"0"==i&&1/r==-P?"-0":i}function wt(r){if(null!=r){try{return tg.call(r)}catch{}try{return r+""}catch{}}return""}function Fu(r){if(r instanceof H)return r.clone();var i=new Pn(r.__wrapped__,r.__chain__);return i.__actions__=un(r.__actions__),i.__index__=r.__index__,i.__values__=r.__values__,i}
vendor: 7,780 bytes, line 10
10var rY=L(function(r,i){return Z(r)?ue(r,j(i,1,Z,!0)):[]}),rQ=L(function(r,i){var l=In(i);return Z(l)&&(l=c),Z(r)?ue(r,j(i,1,Z,!0),x(l,2)):[]}),rX=L(function(r,i){var l=In(i);return Z(l)&&(l=c),Z(r)?ue(r,j(i,1,Z,!0),c,l):[]});function Mu(r,i,c){var l=null==r?0:r.length;if(!l)return -1;var E=null==c?0:b(c);return E<0&&(E=rc(l+E,0)),ye(r,x(i,3),E)}function qu(r,i,l){var E=null==r?0:r.length;if(!E)return -1;var S=E-1;return l!==c&&(S=b(l),S=l<0?rc(E+S,0):rl(S,E-1)),ye(r,x(i,3),S,!0)}function Bu(r){return(null==r?0:r.length)?j(r,1):[]}function Gu(r){return r&&r.length?r[0]:c}var r0=L(function(r){var i=G(r,ai);return i.length&&i[0]===r[0]?Vr(i):[]}),r1=L(function(r){var i=In(r),l=G(r,ai);return i===In(l)?i=c:l.pop(),l.length&&l[0]===r[0]?Vr(l,x(i,2)):[]}),r5=L(function(r){var i=In(r),l=G(r,ai);return(i="function"==typeof i?i:c)&&l.pop(),l.length&&l[0]===r[0]?Vr(l,c,i):[]});function In(r){var i=null==r?0:r.length;return i?r[i-1]:c}var r6=L(zu);function zu(r,i){return r&&r.length&&i&&i.length?ti(r,i):r}var r2=Yn(function(r,i){var c=null==r?0:r.length,l=Zr(r,i);return ru(r,G(i,function(r){return Zn(r,c)?+r:r}).sort(pu)),l});function Ai(r){return null==r?r:rg.call(r)}var r3=L(function(r){return it(j(r,1,Z,!0))}),r4=L(function(r){var i=In(r);return Z(i)&&(i=c),it(j(r,1,Z,!0),x(i,2))}),r7=L(function(r){var i=In(r);return i="function"==typeof i?i:c,it(j(r,1,Z,!0),c,i)});function Ci(r){if(!(r&&r.length))return[];var i=0;return r=jn(r,function(r){if(Z(r))return i=rc(r.length,i),!0}),Fr(i,function(i){return G(r,$r(i))})}function Ku(r,i){if(!(r&&r.length))return[];var l=Ci(r);return null==i?l:G(l,function(r){return cn(i,c,r)})}var r8=L(function(r,i){return Z(r)?ue(r,i):[]}),r9=L(function(r){return ui(jn(r,Z))}),ie=L(function(r){var i=In(r);return Z(i)&&(i=c),ui(jn(r,Z),x(i,2))}),ir=L(function(r){var i=In(r);return i="function"==typeof i?i:c,ui(jn(r,Z),c,i)}),io=L(Ci),ic=L(function(r){var i=r.length,l=i>1?r[i-1]:c;return l="function"==typeof l?(r.pop(),l):c,Ku(r,l)});function Yu(r){var i=a(r);return i.__chain__=!0,i}function er(r,i){return i(r)}var iu=Yn(function(r){var i=r.length,l=i?r[0]:0,E=this.__wrapped__,s=function(i){return Zr(i,r)};return!(i>1)&&!this.__actions__.length&&E instanceof H&&Zn(l)?((E=E.slice(l,+l+(i?1:0))).__actions__.push({func:er,args:[s],thisArg:c}),new Pn(E,this.__chain__).thru(function(r){return i&&!r.length&&r.push(c),r})):this.thru(s)}),il=Je(function(r,i,c){ty.call(r,c)?++r[c]:zn(r,c,1)}),ih=wu(Mu),ip=wu(qu);function Zu(r,i){return(iN(r)?mn:rT)(r,x(i,3))}function Ju(r,i){return(iN(r)?function(r,i){for(var c=null==r?0:r.length;c--&&!1!==i(r[c],c,r););return r}:rz)(r,x(i,3))}var id=Je(function(r,i,c){ty.call(r,c)?r[c].push(i):zn(r,c,[i])}),ig=L(function(r,i,c){var l=-1,E="function"==typeof i,S=an(r)?e4(r.length):[];return rT(r,function(r){S[++l]=E?cn(i,r,c):ae(r,i,c)}),S}),iy=Je(function(r,i,c){zn(r,c,i)});function rr(r,i){return(iN(r)?G:Vs)(r,x(i,3))}var i_=Je(function(r,i,c){r[c?0:1].push(i)},function(){return[[],[]]}),im=L(function(r,i){if(null==r)return[];var c=i.length;return c>1&&rn(r,i[0],i[1])?i=[]:c>2&&rn(i[0],i[1],i[2])&&(i=[i[0]]),tu(r,j(i,1),[])}),ib=t1||function(){return tK.Date.now()};function Xu(r,i,l){return i=l?c:i,i=r&&null==i?r.length:i,Kn(r,128,c,c,c,c,i)}function Qu(r,i){var E;if("function"!=typeof i)throw new tl(l);return r=b(r),function(){return--r>0&&(E=i.apply(this,arguments)),r<=1&&(i=c),E}}var iw=L(function(r,i,c){var l=1;if(c.length){var E=tt(c,qt(iw));l|=32}return Kn(r,l,i,c,E)}),iI=L(function(r,i,c){var l=3;if(c.length){var E=tt(c,qt(iI));l|=32}return Kn(i,l,r,c,E)});function na(r,i,E){var S,P,C,R,A,T,q=0,M=!1,$=!1,U=!0;if("function"!=typeof r)throw new tl(l);function I(i){var l=S,E=P;return S=P=c,q=i,R=r.apply(E,l)}function y(r){var l=r-T,E=r-q;return T===c||l>=i||l<0||$&&E>=C}function D(){var r,c,l,E=ib();if(y(E))return N(E);A=rZ(D,(r=E-T,c=E-q,l=i-r,$?rl(l,C-c):l))}function N(r){return A=c,U&&S?I(r):(S=P=c,R)}function gn(){var r,l=ib(),E=y(l);if(S=arguments,P=this,T=l,E){if(A===c)return q=r=T,A=rZ(D,i),M?I(r):R;if($)return r$(A),A=rZ(D,i),I(T)}return A===c&&(A=rZ(D,i)),R}return i=xn(i)||0,K(E)&&(M=!!E.leading,C=($="maxWait"in E)?rc(xn(E.maxWait)||0,i):C,U="trailing"in E?!!E.trailing:U),gn.cancel=function(){A!==c&&r$(A),q=0,S=T=P=A=c},gn.flush=function(){return A===c?R:N(ib())},gn}var iE=L(function(r,i){return Gs(r,1,i)}),ix=L(function(r,i,c){return Gs(r,xn(i)||0,c)});function sr(r,i){if("function"!=typeof r||null!=i&&"function"!=typeof i)throw new tl(l);var e=function(){var c=arguments,l=i?i.apply(this,c):c[0],E=e.cache;if(E.has(l))return E.get(l);var S=r.apply(this,c);return e.cache=E.set(l,S)||E,S};return e.cache=new(sr.Cache||Gn),e}function ur(r){if("function"!=typeof r)throw new tl(l);return function(){var i=arguments;switch(i.length){case 0:return!r.call(this);case 1:return!r.call(this,i[0]);case 2:return!r.call(this,i[0],i[1]);case 3:return!r.call(this,i[0],i[1],i[2])}return!r.apply(this,i)}}sr.Cache=Gn;var iS=L(function(r,i){var c=(i=1==i.length&&iN(i[0])?G(i[0],hn(x())):G(j(i,1),hn(x()))).length;return L(function(l){for(var E=-1,S=rl(l.length,c);++E<S;)l[E]=i[E].call(this,l[E]);return cn(r,this,l)})}),iP=L(function(r,i){var l=tt(i,qt(iP));return Kn(r,32,c,i,l)}),iO=L(function(r,i){var l=tt(i,qt(iO));return Kn(r,64,c,i,l)}),iC=Yn(function(r,i){return Kn(r,256,c,c,c,i)});function bn(r,i){return r===i||r!=r&&i!=i}var iR=ke(Qr),iA=ke(function(r,i){return r>=i}),ij=Js(function(){return arguments}())?Js:function(r){return Y(r)&&ty.call(r,"callee")&&!tk.call(r,"callee")},iN=e4.isArray,iL=tF?hn(tF):function(r){return Y(r)&&en(r)==ep};function an(r){return null!=r&&ar(r.length)&&!Jn(r)}function Z(r){return Y(r)&&an(r)}var iT=re||Ni,iz=tJ?hn(tJ):function(r){return Y(r)&&en(r)==M};function Ei(r){if(!Y(r))return!1;var i=en(r);return i==$||"[object DOMException]"==i||"string"==typeof r.message&&"string"==typeof r.name&&!pe(r)}function Jn(r){if(!K(r))return!1;var i=en(r);return i==U||i==F||"[object AsyncFunction]"==i||"[object Proxy]"==i}function ea(r){return"number"==typeof r&&r==b(r)}function ar(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}function K(r){var i=typeof r;return null!=r&&("object"==i||"function"==i)}function Y(r){return null!=r&&"object"==typeof r}var iq=tY?hn(tY):function(r){return Y(r)&&rB(r)==J};function ia(r){return"number"==typeof r||Y(r)&&en(r)==Q}function pe(r){if(!Y(r)||en(r)!=X)return!1;var i=tA(r);if(null===i)return!0;var c=ty.call(i,"constructor")&&i.constructor;return"function"==typeof c&&c instanceof c&&tg.call(c)==tw}var iD=tQ?hn(tQ):function(r){return Y(r)&&en(r)==et},ik=tX?hn(tX):function(r){return Y(r)&&rB(r)==eo};function or(r){return"string"==typeof r||!iN(r)&&Y(r)&&en(r)==ec}function pn(r){return"symbol"==typeof r||Y(r)&&en(r)==el}var iM=t0?hn(t0):function(r){return Y(r)&&ar(r.length)&&!!tq[en(r)]},i$=ke(ni),iH=ke(function(r,i){return r<=i});function ua(r){if(!r)return[];if(an(r))return or(r)?On(r):un(r);if(tV&&r[tV])return function(r){for(var i,c=[];!(i=r.next()).done;)c.push(i.value);return c}(r[tV]());var i=rB(r);return(i==J?qr:i==eo?Se:Gt)(r)}function Xn(r){return r?(r=xn(r))===P||r===-P?(r<0?-1:1)*17976931348623157e292:r==r?r:0:0===r?r:0}function b(r){var i=Xn(r),c=i%1;return i==i?c?i-c:i:0}function aa(r){return r?vt(b(r),0,4294967295):0}function xn(r){if("number"==typeof r)return r;if(pn(r))return C;if(K(r)){var i="function"==typeof r.valueOf?r.valueOf():r;r=K(i)?i+"":i}if("string"!=typeof r)return 0===r?r:+r;r=ys(r);var c=eY.test(r);return c||eX.test(r)?t$(r.slice(2),c?2:8):eJ.test(r)?C:+r}function oa(r){return Un(r,on(r))}function W(r){return null==r?"":ln(r)}var iU=Ft(function(r,i){if(he(i)||an(i)){Un(i,V(i),r);return}for(var c in i)ty.call(i,c)&&se(r,c,i[c])}),iK=Ft(function(r,i){Un(i,on(i),r)}),iV=Ft(function(r,i,c,l){Un(i,on(i),r,l)}
vendor: 8,151 bytes, line 10
10),iB=Ft(function(r,i,c,l){Un(i,V(i),r,l)}),iG=Yn(Zr),iW=L(function(r,i){r=ta(r);var l=-1,E=i.length,S=E>2?i[2]:c;for(S&&rn(i[0],i[1],S)&&(E=1);++l<E;)for(var P=i[l],C=on(P),R=-1,A=C.length;++R<A;){var T=C[R],q=r[T];(q===c||bn(q,tf[T])&&!ty.call(r,T))&&(r[T]=P[T])}return r}),iZ=L(function(r){return r.push(c,yu),cn(iX,c,r)});function Si(r,i,l){var E=null==r?c:_t(r,i);return E===c?l:E}function Oi(r,i){return null!=r&&Ru(r,i,Ac)}var iF=Au(function(r,i,c){null!=i&&"function"!=typeof i.toString&&(i=tb.call(i)),r[i]=c},bi(fn)),iJ=Au(function(r,i,c){null!=i&&"function"!=typeof i.toString&&(i=tb.call(i)),ty.call(r,i)?r[i].push(c):r[i]=[c]},x),iY=L(ae);function V(r){return an(r)?Fs(r):jr(r)}function on(r){return an(r)?Fs(r,!0):function(r){if(!K(r))return function(r){var i=[];if(null!=r)for(var c in ta(r))i.push(c);return i}(r);var i=he(r),c=[];for(var l in r)"constructor"==l&&(i||!ty.call(r,l))||c.push(l);return c}(r)}var iQ=Ft(function(r,i,c){Ke(r,i,c)}),iX=Ft(function(r,i,c,l){Ke(r,i,c,l)}),i0=Yn(function(r,i){var c={};if(null==r)return c;var l=!1;i=G(i,function(i){return i=st(i,r),l||(l=i.length>1),i}),Un(r,pi(r),c),l&&(c=An(c,7,kc));for(var E=i.length;E--;)si(c,i[E]);return c}),i1=Yn(function(r,i){return null==r?{}:eu(r,i,function(i,c){return Oi(r,c)})});function ha(r,i){if(null==r)return{};var c=G(pi(r),function(r){return[r]});return i=x(i),eu(r,c,function(r,c){return i(r,c[0])})}var i5=xu(V),i6=xu(on);function Gt(r){return null==r?[]:Mr(r,V(r))}var i2=Mt(function(r,i,c){return i=i.toLowerCase(),r+(c?da(i):i)});function da(r){return nn(W(r).toLowerCase())}function ga(r){return(r=W(r))&&r.replace(e1,t5).replace(tR,"")}var i3=Mt(function(r,i,c){return r+(c?"-":"")+i.toLowerCase()}),i4=Mt(function(r,i,c){return r+(c?" ":"")+i.toLowerCase()}),i7=mu("toLowerCase"),i8=Mt(function(r,i,c){return r+(c?"_":"")+i.toLowerCase()}),i9=Mt(function(r,i,c){return r+(c?" ":"")+nn(i)}),ne=Mt(function(r,i,c){return r+(c?" ":"")+i.toUpperCase()}),nn=mu("toUpperCase");function va(r,i,l){var E;return r=W(r),(i=l?c:i)===c?(E=r,tL.test(E))?r.match(tj)||[]:r.match(eB)||[]:r.match(i)||[]}var ns=L(function(r,i){try{return cn(r,c,i)}catch(r){return Ei(r)?r:new e8(r)}}),no=Yn(function(r,i){return mn(i,function(i){zn(r,i=Wn(i),iw(r[i],r))}),r});function bi(r){return function(){return r}}var nc=Pu(),nl=Pu(!0);function fn(r){return r}function Ti(r){return Qs("function"==typeof r?r:An(r,1))}var nh=L(function(r,i){return function(c){return ae(c,r,i)}}),np=L(function(r,i){return function(c){return ae(r,c,i)}});function Li(r,i,c){var l=V(i),E=ze(i,l);null!=c||K(i)&&(E.length||!l.length)||(c=i,i=r,r=this,E=ze(i,V(i)));var S=!(K(c)&&"chain"in c)||!!c.chain,P=Jn(r);return mn(E,function(c){var l=i[c];r[c]=l,P&&(r.prototype[c]=function(){var i=this.__chain__;if(S||i){var c=r(this.__wrapped__);return(c.__actions__=un(this.__actions__)).push({func:l,args:arguments,thisArg:r}),c.__chain__=i,c}return l.apply(r,nt([this.value()],arguments))})}),r}function Di(){}var nf=ci(G),nd=ci(As),ng=ci(Nr);function ma(r){return _i(r)?$r(Wn(r)):function(i){return _t(i,r)}}var ny=Cu(),n_=Cu(!0);function Hi(){return[]}function Ni(){return!1}var nm=Qe(function(r,i){return r+i},0),nb=hi("ceil"),nw=Qe(function(r,i){return r/i},1),nI=hi("floor"),nE=Qe(function(r,i){return r*i},1),nx=hi("round"),nS=Qe(function(r,i){return r-i},0);return a.after=function(r,i){if("function"!=typeof i)throw new tl(l);return r=b(r),function(){if(--r<1)return i.apply(this,arguments)}},a.ary=Xu,a.assign=iU,a.assignIn=iK,a.assignInWith=iV,a.assignWith=iB,a.at=iG,a.before=Qu,a.bind=iw,a.bindAll=no,a.bindKey=iI,a.castArray=function(){if(!arguments.length)return[];var r=arguments[0];return iN(r)?r:[r]},a.chain=Yu,a.chunk=function(r,i,l){i=(l?rn(r,i,l):i===c)?1:rc(b(i),0);var E=null==r?0:r.length;if(!E||i<1)return[];for(var S=0,P=0,C=e4(t7(E/i));S<E;)C[P++]=Cn(r,S,S+=i);return C},a.compact=function(r){for(var i=-1,c=null==r?0:r.length,l=0,E=[];++i<c;){var S=r[i];S&&(E[l++]=S)}return E},a.concat=function(){var r=arguments.length;if(!r)return[];for(var i=e4(r-1),c=arguments[0],l=r;l--;)i[l-1]=arguments[l];return nt(iN(c)?un(c):[c],j(i,1))},a.cond=function(r){var i=null==r?0:r.length,c=x();return r=i?G(r,function(r){if("function"!=typeof r[1])throw new tl(l);return[c(r[0]),r[1]]}):[],L(function(c){for(var l=-1;++l<i;){var E=r[l];if(cn(E[0],this,c))return cn(E[1],this,c)}})},a.conforms=function(r){var i,c;return c=V(i=An(r,1)),function(r){return Bs(r,i,c)}},a.constant=bi,a.countBy=il,a.create=function(r,i){var c=rL(r);return null==i?c:qs(c,i)},a.curry=function ku(r,i,l){i=l?c:i;var E=Kn(r,8,c,c,c,c,c,i);return E.placeholder=ku.placeholder,E},a.curryRight=function ju(r,i,l){i=l?c:i;var E=Kn(r,16,c,c,c,c,c,i);return E.placeholder=ju.placeholder,E},a.debounce=na,a.defaults=iW,a.defaultsDeep=iZ,a.defer=iE,a.delay=ix,a.difference=rY,a.differenceBy=rQ,a.differenceWith=rX,a.drop=function(r,i,l){var E=null==r?0:r.length;return E?Cn(r,(i=l||i===c?1:b(i))<0?0:i,E):[]},a.dropRight=function(r,i,l){var E=null==r?0:r.length;return E?Cn(r,0,(i=E-(i=l||i===c?1:b(i)))<0?0:i):[]},a.dropRightWhile=function(r,i){return r&&r.length?Ze(r,x(i,3),!0,!0):[]},a.dropWhile=function(r,i){return r&&r.length?Ze(r,x(i,3),!0):[]},a.fill=function(r,i,l,E){var S=null==r?0:r.length;return S?(l&&"number"!=typeof l&&rn(r,i,l)&&(l=0,E=S),function(r,i,l,E){var S=r.length;for((l=b(l))<0&&(l=-l>S?0:S+l),(E=E===c||E>S?S:b(E))<0&&(E+=S),E=l>E?0:aa(E);l<E;)r[l++]=i;return r}(r,i,l,E)):[]},a.filter=function(r,i){return(iN(r)?jn:Ks)(r,x(i,3))},a.flatMap=function(r,i){return j(rr(r,i),1)},a.flatMapDeep=function(r,i){return j(rr(r,i),P)},a.flatMapDepth=function(r,i,l){return l=l===c?1:b(l),j(rr(r,i),l)},a.flatten=Bu,a.flattenDeep=function(r){return(null==r?0:r.length)?j(r,P):[]},a.flattenDepth=function(r,i){return(null==r?0:r.length)?j(r,i=i===c?1:b(i)):[]},a.flip=function(r){return Kn(r,512)},a.flow=nc,a.flowRight=nl,a.fromPairs=function(r){for(var i=-1,c=null==r?0:r.length,l={};++i<c;){var E=r[i];l[E[0]]=E[1]}return l},a.functions=function(r){return null==r?[]:ze(r,V(r))},a.functionsIn=function(r){return null==r?[]:ze(r,on(r))},a.groupBy=id,a.initial=function(r){return(null==r?0:r.length)?Cn(r,0,-1):[]},a.intersection=r0,a.intersectionBy=r1,a.intersectionWith=r5,a.invert=iF,a.invertBy=iJ,a.invokeMap=ig,a.iteratee=Ti,a.keyBy=iy,a.keys=V,a.keysIn=on,a.map=rr,a.mapKeys=function(r,i){var c={};return i=x(i,3),$n(r,function(r,l,E){zn(c,i(r,l,E),r)}),c},a.mapValues=function(r,i){var c={};return i=x(i,3),$n(r,function(r,l,E){zn(c,l,i(r,l,E))}),c},a.matches=function(r){return ks(An(r,1))},a.matchesProperty=function(r,i){return js(r,An(i,1))},a.memoize=sr,a.merge=iQ,a.mergeWith=iX,a.method=nh,a.methodOf=np,a.mixin=Li,a.negate=ur,a.nthArg=function(r){return r=b(r),L(function(i){return nu(i,r)})},a.omit=i0,a.omitBy=function(r,i){return ha(r,ur(x(i)))},a.once=function(r){return Qu(2,r)},a.orderBy=function(r,i,l,E){return null==r?[]:(iN(i)||(i=null==i?[]:[i]),iN(l=E?c:l)||(l=null==l?[]:[l]),tu(r,i,l))},a.over=nf,a.overArgs=iS,a.overEvery=nd,a.overSome=ng,a.partial=iP,a.partialRight=iO,a.partition=i_,a.pick=i1,a.pickBy=ha,a.property=ma,a.propertyOf=function(r){return function(i){return null==r?c:_t(r,i)}},a.pull=r6,a.pullAll=zu,a.pullAllBy=function(r,i,c){return r&&r.length&&i&&i.length?ti(r,i,x(c,2)):r},a.pullAllWith=function(r,i,l){return r&&r.length&&i&&i.length?ti(r,i,c,l):r},a.pullAt=r2,a.range=ny,a.rangeRight=n_,a.rearg=iC,a.reject=function(r,i){return(iN(r)?jn:Ks)(r,ur(x(i,3)))},a.remove=function(r,i){var c=[];if(!(r&&r.length))return c;var l=-1,E=[],S=r.length;for(i=x(i,3);++l<S;){var P=r[l];i(P,l,r)&&(c.push(P),E.push(l))}return ru(r,E),c},a.rest=function(r,i){if("function"!=typeof r)throw new tl(l);return L(r,i=i===c?i:b(i))},a.reverse=Ai,a.sampleSize=function(r,i,l){return i=(l?rn(r,i,l):i===c)?1:b(i),(iN(r)?function(r,i){return tr(un(r),vt(i,0,r.length))}:function(r,i){var c=Gt(r);return tr(c,vt(i,0,c.length))})(r,i)},a.set=function(r,i,c){return null==r?r:fe(r,i,c)},a.setWith=function(r,i,l,E){return E="function"==typeof E?E:c,null==r?r:fe(r,i,l,E)},a.shuffle=function(r){return(iN(r)?function(r){return tr(un(r))}:function(r){return tr(Gt(r))})(r)}
vendor: 4,547 bytes, line 10
10,a.slice=function(r,i,l){var E=null==r?0:r.length;return E?(l&&"number"!=typeof l&&rn(r,i,l)?(i=0,l=E):(i=null==i?0:b(i),l=l===c?E:b(l)),Cn(r,i,l)):[]},a.sortBy=im,a.sortedUniq=function(r){return r&&r.length?su(r):[]},a.sortedUniqBy=function(r,i){return r&&r.length?su(r,x(i,2)):[]},a.split=function(r,i,l){return l&&"number"!=typeof l&&rn(r,i,l)&&(i=l=c),(l=l===c?4294967295:l>>>0)?(r=W(r))&&("string"==typeof i||null!=i&&!iD(i))&&!(i=ln(i))&&Lt(r)?ut(On(r),0,l):r.split(i,l):[]},a.spread=function(r,i){if("function"!=typeof r)throw new tl(l);return i=null==i?0:rc(b(i),0),L(function(c){var l=c[i],E=ut(c,0,i);return l&&nt(E,l),cn(r,this,E)})},a.tail=function(r){var i=null==r?0:r.length;return i?Cn(r,1,i):[]},a.take=function(r,i,l){return r&&r.length?Cn(r,0,(i=l||i===c?1:b(i))<0?0:i):[]},a.takeRight=function(r,i,l){var E=null==r?0:r.length;return E?Cn(r,(i=E-(i=l||i===c?1:b(i)))<0?0:i,E):[]},a.takeRightWhile=function(r,i){return r&&r.length?Ze(r,x(i,3),!1,!0):[]},a.takeWhile=function(r,i){return r&&r.length?Ze(r,x(i,3)):[]},a.tap=function(r,i){return i(r),r},a.throttle=function(r,i,c){var E=!0,S=!0;if("function"!=typeof r)throw new tl(l);return K(c)&&(E="leading"in c?!!c.leading:E,S="trailing"in c?!!c.trailing:S),na(r,i,{leading:E,maxWait:i,trailing:S})},a.thru=er,a.toArray=ua,a.toPairs=i5,a.toPairsIn=i6,a.toPath=function(r){return iN(r)?G(r,Wn):pn(r)?[r]:un(rJ(W(r)))},a.toPlainObject=oa,a.transform=function(r,i,c){var l=iN(r),E=l||iT(r)||iM(r);if(i=x(i,4),null==c){var S=r&&r.constructor;c=E?l?new S:[]:K(r)&&Jn(S)?rL(tA(r)):{}}return(E?mn:$n)(r,function(r,l,E){return i(c,r,l,E)}),c},a.unary=function(r){return Xu(r,1)},a.union=r3,a.unionBy=r4,a.unionWith=r7,a.uniq=function(r){return r&&r.length?it(r):[]},a.uniqBy=function(r,i){return r&&r.length?it(r,x(i,2)):[]},a.uniqWith=function(r,i){return i="function"==typeof i?i:c,r&&r.length?it(r,c,i):[]},a.unset=function(r,i){return null==r||si(r,i)},a.unzip=Ci,a.unzipWith=Ku,a.update=function(r,i,c){return null==r?r:au(r,i,oi(c))},a.updateWith=function(r,i,l,E){return E="function"==typeof E?E:c,null==r?r:au(r,i,oi(l),E)},a.values=Gt,a.valuesIn=function(r){return null==r?[]:Mr(r,on(r))},a.without=r8,a.words=va,a.wrap=function(r,i){return iP(oi(i),r)},a.xor=r9,a.xorBy=ie,a.xorWith=ir,a.zip=io,a.zipObject=function(r,i){return fu(r||[],i||[],se)},a.zipObjectDeep=function(r,i){return fu(r||[],i||[],fe)},a.zipWith=ic,a.entries=i5,a.entriesIn=i6,a.extend=iK,a.extendWith=iV,Li(a,a),a.add=nm,a.attempt=ns,a.camelCase=i2,a.capitalize=da,a.ceil=nb,a.clamp=function(r,i,l){return l===c&&(l=i,i=c),l!==c&&(l=(l=xn(l))==l?l:0),i!==c&&(i=(i=xn(i))==i?i:0),vt(xn(r),i,l)},a.clone=function(r){return An(r,4)},a.cloneDeep=function(r){return An(r,5)},a.cloneDeepWith=function(r,i){return An(r,5,i="function"==typeof i?i:c)},a.cloneWith=function(r,i){return An(r,4,i="function"==typeof i?i:c)},a.conformsTo=function(r,i){return null==i||Bs(r,i,V(i))},a.deburr=ga,a.defaultTo=function(r,i){return null==r||r!=r?i:r},a.divide=nw,a.endsWith=function(r,i,l){r=W(r),i=ln(i);var E=r.length,S=l=l===c?E:vt(b(l),0,E);return(l-=i.length)>=0&&r.slice(l,S)==i},a.eq=bn,a.escape=function(r){return(r=W(r))&&eA.test(r)?r.replace(eC,t6):r},a.escapeRegExp=function(r){return(r=W(r))&&eM.test(r)?r.replace(ek,"\\$&"):r},a.every=function(r,i,l){var E=iN(r)?As:mc;return l&&rn(r,i,l)&&(i=c),E(r,x(i,3))},a.find=ih,a.findIndex=Mu,a.findKey=function(r,i){return Cs(r,x(i,3),$n)},a.findLast=ip,a.findLastIndex=qu,a.findLastKey=function(r,i){return Cs(r,x(i,3),Xr)},a.floor=nI,a.forEach=Zu,a.forEachRight=Ju,a.forIn=function(r,i){return null==r?r:rq(r,x(i,3),on)},a.forInRight=function(r,i){return null==r?r:rD(r,x(i,3),on)},a.forOwn=function(r,i){return r&&$n(r,x(i,3))},a.forOwnRight=function(r,i){return r&&Xr(r,x(i,3))},a.get=Si,a.gt=iR,a.gte=iA,a.has=function(r,i){return null!=r&&Ru(r,i,Pc)},a.hasIn=Oi,a.head=Gu,a.identity=fn,a.includes=function(r,i,c,l){r=an(r)?r:Gt(r),c=c&&!l?b(c):0;var E=r.length;return c<0&&(c=rc(E+c,0)),or(r)?c<=E&&r.indexOf(i,c)>-1:!!E&&Tt(r,i,c)>-1},a.indexOf=function(r,i,c){var l=null==r?0:r.length;if(!l)return -1;var E=null==c?0:b(c);return E<0&&(E=rc(l+E,0)),Tt(r,i,E)},a.inRange=function(r,i,l){var E,S,P;return i=Xn(i),l===c?(l=i,i=0):l=Xn(l),(E=r=xn(r))>=rl(S=i,P=l)&&E<rc(S,P)},a.invoke=iY,a.isArguments=ij,a.isArray=iN,a.isArrayBuffer=iL,a.isArrayLike=an,a.isArrayLikeObject=Z,a.isBoolean=function(r){return!0===r||!1===r||Y(r)&&en(r)==q},a.isBuffer=iT,a.isDate=iz,a.isElement=function(r){return Y(r)&&1===r.nodeType&&!pe(r)},a.isEmpty=function(r){if(null==r)return!0;
vendor: 4,770 bytes, lines 10-11
10if(an(r)&&(iN(r)||"string"==typeof r||"function"==typeof r.splice||iT(r)||iM(r)||ij(r)))return!r.length;var i=rB(r);if(i==J||i==eo)return!r.size;if(he(r))return!jr(r).length;for(var c in r)if(ty.call(r,c))return!1;return!0},a.isEqual=function(r,i){return oe(r,i)},a.isEqualWith=function(r,i,l){var E=(l="function"==typeof l?l:c)?l(r,i):c;return E===c?oe(r,i,c,l):!!E},a.isError=Ei,a.isFinite=function(r){return"number"==typeof r&&rt(r)},a.isFunction=Jn,a.isInteger=ea,a.isLength=ar,a.isMap=iq,a.isMatch=function(r,i){return r===i||kr(r,i,gi(i))},a.isMatchWith=function(r,i,l){return l="function"==typeof l?l:c,kr(r,i,gi(i),l)},a.isNaN=function(r){return ia(r)&&r!=+r},a.isNative=function(r){if(rG(r))throw new e8("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Xs(r)},a.isNil=function(r){return null==r},a.isNull=function(r){return null===r},a.isNumber=ia,a.isObject=K,a.isObjectLike=Y,a.isPlainObject=pe,a.isRegExp=iD,a.isSafeInteger=function(r){return ea(r)&&r>=-9007199254740991&&r<=9007199254740991},a.isSet=ik,a.isString=or,a.isSymbol=pn,a.isTypedArray=iM,a.isUndefined=function(r){return r===c},a.isWeakMap=function(r){return Y(r)&&rB(r)==eh},a.isWeakSet=function(r){return Y(r)&&"[object WeakSet]"==en(r)},a.join=function(r,i){return null==r?"":ra.call(r,i)},a.kebabCase=i3,a.last=In,a.lastIndexOf=function(r,i,l){var E=null==r?0:r.length;if(!E)return -1;var S=E;return l!==c&&(S=(S=b(l))<0?rc(E+S,0):rl(S,E-1)),i==i?function(r,i,c){for(var l=c+1;l--&&r[l]!==i;);return l}(r,i,S):ye(r,Is,S,!0)},a.lowerCase=i4,a.lowerFirst=i7,a.lt=i$,a.lte=iH,a.max=function(r){return r&&r.length?Ge(r,fn,Qr):c},a.maxBy=function(r,i){return r&&r.length?Ge(r,x(i,2),Qr):c},a.mean=function(r){return xs(r,fn)},a.meanBy=function(r,i){return xs(r,x(i,2))},a.min=function(r){return r&&r.length?Ge(r,fn,ni):c},a.minBy=function(r,i){return r&&r.length?Ge(r,x(i,2),ni):c},a.stubArray=Hi,a.stubFalse=Ni,a.stubObject=function(){return{}},a.stubString=function(){return""},a.stubTrue=function(){return!0},a.multiply=nE,a.nth=function(r,i){return r&&r.length?nu(r,b(i)):c},a.noConflict=function(){return tK._===this&&(tK._=tI),this},a.noop=Di,a.now=ib,a.pad=function(r,i,c){r=W(r);var l=(i=b(i))?Dt(r):0;if(!i||l>=i)return r;var E=(i-l)/2;return Ve(t8(E),c)+r+Ve(t7(E),c)},a.padEnd=function(r,i,c){r=W(r);var l=(i=b(i))?Dt(r):0;return i&&l<i?r+Ve(i-l,c):r},a.padStart=function(r,i,c){r=W(r);var l=(i=b(i))?Dt(r):0;return i&&l<i?Ve(i-l,c)+r:r},a.parseInt=function(r,i,c){return c||null==i?i=0:i&&(i=+i),rp(W(r).replace(e$,""),i||0)},a.random=function(r,i,l){if(l&&"boolean"!=typeof l&&rn(r,i,l)&&(i=l=c),l===c&&("boolean"==typeof i?(l=i,i=c):"boolean"==typeof r&&(l=r,r=c)),r===c&&i===c?(r=0,i=1):(r=Xn(r),i===c?(i=r,r=0):i=Xn(i)),r>i){var E=r;r=i,i=E}if(l||r%1||i%1){var S=rd();return rl(r+S*(i-r+tM("1e-"+((S+"").length-1))),i)}return ei(r,i)},a.reduce=function(r,i,c){var l=iN(r)?Hr:Es,E=arguments.length<3;return l(r,x(i,4),c,E,rT)},a.reduceRight=function(r,i,c){var l=iN(r)?jo:Es,E=arguments.length<3;return l(r,x(i,4),c,E,rz)},a.repeat=function(r,i,l){return i=(l?rn(r,i,l):i===c)?1:b(i),ri(W(r),i)},a.replace=function(){var r=arguments,i=W(r[0]);return r.length<3?i:i.replace(r[1],r[2])},a.result=function(r,i,l){i=st(i,r);var E=-1,S=i.length;for(S||(S=1,r=c);++E<S;){var P=null==r?c:r[Wn(i[E])];P===c&&(E=S,P=l),r=Jn(P)?P.call(r):P}return r},a.round=nx,a.runInContext=h,a.sample=function(r){return(iN(r)?Ms:function(r){return Ms(Gt(r))})(r)},a.size=function(r){if(null==r)return 0;if(an(r))return or(r)?Dt(r):r.length;var i=rB(r);return i==J||i==eo?r.size:jr(r).length},a.snakeCase=i8,a.some=function(r,i,l){var E=iN(r)?Nr:Mc;return l&&rn(r,i,l)&&(i=c),E(r,x(i,3))},a.sortedIndex=function(r,i){return Ye(r,i)},a.sortedIndexBy=function(r,i,c){return ii(r,i,x(c,2))},a.sortedIndexOf=function(r,i){var c=null==r?0:r.length;if(c){var l=Ye(r,i);if(l<c&&bn(r[l],i))return l}return -1},a.sortedLastIndex=function(r,i){return Ye(r,i,!0)},a.sortedLastIndexBy=function(r,i,c){return ii(r,i,x(c,2),!0)},a.sortedLastIndexOf=function(r,i){if(null==r?0:r.length){var c=Ye(r,i,!0)-1;if(bn(r[c],i))return c}return -1},a.startCase=i9,a.startsWith=function(r,i,c){return r=W(r),c=null==c?0:vt(b(c),0,r.length),i=ln(i),r.slice(c,c+i.length)==i},a.subtract=nS,a.sum=function(r){return r&&r.length?Wr(r,fn):0},a.sumBy=function(r,i){return r&&r.length?Wr(r,x(i,2)):0},a.template=function(r,i,l){var E=a.templateSettings;l&&rn(r,i,l)&&(i=c),r=W(r),i=iV({},i,E,Eu);var S,P,C=iV({},i.imports,E.imports,Eu),R=V(C),A=Mr(C,R),T=0,q=i.interpolate||e5,M="__p += '",$=to((i.escape||e5).source+"|"+q.source+"|"+(q===eL?eZ:e5).source+"|"+(i.evaluate||e5).source+"|$","g"),U="//# sourceURL="+(ty.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tz+"]")+` 11`;
vendor: 4,761 bytes, lines 11-27
11r.replace($,function(i,c,l,E,C,R){return l||(l=E),M+=r.slice(T,R).replace(e6,cf),c&&(S=!0,M+=`' + 12__e(`+c+`) + 13'`),C&&(P=!0,M+=`'; 14`+C+`; 15__p += '`),l&&(M+=`' + 16((__t = (`+l+`)) == null ? '' : __t) + 17'`),T=R+i.length,i}),M+=`'; 18`;var F=ty.call(i,"variable")&&i.variable;if(F){if(eG.test(F))throw new e8("Invalid `variable` option passed into `_.template`")}else M=`with (obj) { 19`+M+` 20} 21`;M=(P?M.replace(ex,""):M).replace(eS,"$1").replace(eP,"$1;"),M="function("+(F||"obj")+`) { 22`+(F?"":`obj || (obj = {}); 23`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(P?`, __j = Array.prototype.join; 24function print() { __p += __j.call(arguments, '') } 25`:`; 26`)+M+`return __p 27}`;var J=ns(function(){return e9(R,U+"return "+M).apply(c,A)});if(J.source=M,Ei(J))throw J;return J},a.times=function(r,i){if((r=b(r))<1||r>9007199254740991)return[];var c=4294967295,l=rl(r,4294967295);i=x(i),r-=4294967295;for(var E=Fr(l,i);++c<r;)i(c);return E},a.toFinite=Xn,a.toInteger=b,a.toLength=aa,a.toLower=function(r){return W(r).toLowerCase()},a.toNumber=xn,a.toSafeInteger=function(r){return r?vt(b(r),-9007199254740991,9007199254740991):0===r?r:0},a.toString=W,a.toUpper=function(r){return W(r).toUpperCase()},a.trim=function(r,i,l){if((r=W(r))&&(l||i===c))return ys(r);if(!r||!(i=ln(i)))return r;var E=On(r),S=On(i),P=Ss(E,S),C=Os(E,S)+1;return ut(E,P,C).join("")},a.trimEnd=function(r,i,l){if((r=W(r))&&(l||i===c))return r.slice(0,bs(r)+1);if(!r||!(i=ln(i)))return r;var E=On(r),S=Os(E,On(i))+1;return ut(E,0,S).join("")},a.trimStart=function(r,i,l){if((r=W(r))&&(l||i===c))return r.replace(e$,"");if(!r||!(i=ln(i)))return r;var E=On(r),S=Ss(E,On(i));return ut(E,S).join("")},a.truncate=function(r,i){var l=30,E="...";if(K(i)){var S="separator"in i?i.separator:S;l="length"in i?b(i.length):l,E="omission"in i?ln(i.omission):E}var P=(r=W(r)).length;if(Lt(r)){var C=On(r);P=C.length}if(l>=P)return r;var R=l-Dt(E);if(R<1)return E;var A=C?ut(C,0,R).join(""):r.slice(0,R);if(S===c)return A+E;if(C&&(R+=A.length-R),iD(S)){if(r.slice(R).search(S)){var T,q=A;for(S.global||(S=to(S.source,W(eF.exec(S))+"g")),S.lastIndex=0;T=S.exec(q);)var M=T.index;A=A.slice(0,M===c?R:M)}}else if(r.indexOf(ln(S),R)!=R){var $=A.lastIndexOf(S);$>-1&&(A=A.slice(0,$))}return A+E},a.unescape=function(r){return(r=W(r))&&eR.test(r)?r.replace(eO,t2):r},a.uniqueId=function(r){var i=++t_;return W(r)+i},a.upperCase=ne,a.upperFirst=nn,a.each=Zu,a.eachRight=Ju,a.first=Gu,Li(a,(e3={},$n(a,function(r,i){ty.call(a.prototype,i)||(e3[i]=r)}),e3),{chain:!1}),a.VERSION="4.17.21",mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){a[r].placeholder=a}),mn(["drop","take"],function(r,i){H.prototype[r]=function(l){l=l===c?1:rc(b(l),0);var E=this.__filtered__&&!i?new H(this):this.clone();return E.__filtered__?E.__takeCount__=rl(l,E.__takeCount__):E.__views__.push({size:rl(l,4294967295),type:r+(E.__dir__<0?"Right":"")}),E},H.prototype[r+"Right"]=function(i){return this.reverse()[r](i).reverse()}}),mn(["filter","map","takeWhile"],function(r,i){var c=i+1,l=1==c||3==c;H.prototype[r]=function(r){var i=this.clone();return i.__iteratees__.push({iteratee:x(r,3),type:c}),i.__filtered__=i.__filtered__||l,i}}),mn(["head","last"],function(r,i){var c="take"+(i?"Right":"");H.prototype[r]=function(){return this[c](1).value()[0]}}),mn(["initial","tail"],function(r,i){var c="drop"+(i?"":"Right");H.prototype[r]=function(){return this.__filtered__?new H(this):this[c](1)}}),H.prototype.compact=function(){return this.filter(fn)},H.prototype.find=function(r){return this.filter(r).head()},H.prototype.findLast=function(r){return this.reverse().find(r)},H.prototype.invokeMap=L(function(r,i){return"function"==typeof r?new H(this):this.map(function(c){return ae(c,r,i)})}),H.prototype.reject=function(r){return this.filter(ur(x(r)))},H.prototype.slice=function(r,i){r=b(r);var l=this;return l.__filtered__&&(r>0||i<0)?new H(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),i!==c&&(l=(i=b(i))<0?l.dropRight(-i):l.take(i-r)),l)},H.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},H.prototype.toArray=function(){return this.take(4294967295)},$n(H.prototype,function(r,i){var l=/^(?:filter|find|map|reject)|While$/.test(i),E=/^(?:head|last)$/.test(i),S=a[E?"take"+("last"==i?"Right":""):i],P=E||/^find/.test(i);S&&(a.prototype[i]=function(){var i=this.__wrapped__,C=E?[1]:arguments,R=i instanceof H,A=C[0],T=R||iN(i),m=function(r){var i=S.apply(a,nt([r],C));return E&&q?i[0]:i};T&&l&&"function"==typeof A&&1!=A.length&&(R=T=!1);var q=this.__chain__,M=!!this.__actions__.length,$=P&&!q,U=R&&!M;if(!P&&T){i=U?i:new H(this);var F=r.apply(i,C);return F.__actions__.push({func:er,args:[m],thisArg:c}),new Pn(F,q)}return $&&U?r.apply(this,C):(F=this.thru(m),$?E?F.value()[0]:F.value(
27):F)})}),mn(["pop","push","shift","sort","splice","unshift"],function(r){var i=th[r],c=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",l=/^(?:pop|shift)$/.test(r);a.prototype[r]=function(){var r=arguments;if(l&&!this.__chain__){var E=this.value();return i.apply(iN(E)?E:[],r)}return this[c](function(c){return i.apply(iN(c)?c:[],r)})}}),$n(H.prototype,function(r,i){var c=a[i];if(c){var l=c.name+"";ty.call(rx,l)||(rx[l]=[]),rx[l].push({name:i,func:c})}}),rx[Xe(c,2).name]=[{name:"wrapper",func:c}],H.prototype.clone=function(){var r=new H(this.__wrapped__);return r.__actions__=un(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=un(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=un(this.__views__),r},H.prototype.reverse=function(){if(this.__filtered__){var r=new H(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r},H.prototype.value=function(){var r=this.__wrapped__.value(),i=this.__dir__,c=iN(r),l=i<0,E=c?r.length:0,S=function(r,i,c){for(var l=-1,E=c.length;++l<E;){var S=c[l],P=S.size;switch(S.type){case"drop":r+=P;break;case"dropRight":i-=P;break;case"take":i=rl(i,r+P);break;case"takeRight":r=rc(r,i-P)}}return{start:r,end:i}}(0,E,this.__views__),P=S.start,C=S.end,R=C-P,A=l?C:P-1,T=this.__iteratees__,q=T.length,M=0,$=rl(R,this.__takeCount__);if(!c||!l&&E==R&&$==R)return ou(r,this.__actions__);var U=[];e:for(;R--&&M<$;){A+=i;for(var F=-1,J=r[A];++F<q;){var Q=T[F],X=Q.iteratee,ee=Q.type,et=X(J);if(2==ee)J=et;else if(!et){if(1==ee)continue e;break e}}U[M++]=J}return U},a.prototype.at=iu,a.prototype.chain=function(){return Yu(this)},a.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},a.prototype.next=function(){this.__values__===c&&(this.__values__=ua(this.value()));var r=this.__index__>=this.__values__.length,i=r?c:this.__values__[this.__index__++];return{done:r,value:i}},a.prototype.plant=function(r){for(var i,l=this;l instanceof qe;){var E=Fu(l);E.__index__=0,E.__values__=c,i?S.__wrapped__=E:i=E;var S=E;l=l.__wrapped__}return S.__wrapped__=r,i},a.prototype.reverse=function(){var r=this.__wrapped__;if(r instanceof H){var i=r;return this.__actions__.length&&(i=new H(this)),(i=i.reverse()).__actions__.push({func:er,args:[Ai],thisArg:c}),new Pn(i,this.__chain__)}return this.thru(Ai)},a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return ou(this.__wrapped__,this.__actions__)},a.prototype.first=a.prototype.head,tV&&(a.prototype[tV]=function(){return this}),a}();tB?((tB.exports=t3)._=t3,tV._=t3):tK._=t3}).call(rg)}(ry,ry.exports);var r_=Object.defineProperty,rm=Object.defineProperties,rb=Object.getOwnPropertyDescriptors,rw=Object.getOwnPropertySymbols,rI=Object.prototype.hasOwnProperty,rE=Object.prototype.propertyIsEnumerable,ya=(r,i,c)=>i in r?r_(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,index_es_cr=(r,i)=>{for(var c in i||(i={}))rI.call(i,c)&&ya(r,c,i[c]);if(rw)for(var c of rw(i))rE.call(i,c)&&ya(r,c,i[c]);return r}
27,Zg=(r,i)=>rm(r,rb(i));function index_es_ft(r,i,c){var l;let E=(0,P.DQ)(r);return(null==(l=i.rpcMap)?void 0:l[E.reference])||`https://rpc.walletconnect.com/v1/?chainId=${E.namespace}:${E.reference}&projectId=${c}`}function index_es_Ct(r){return r.includes(":")?r.split(":")[1]:r}function Sa(r){return r.map(r=>`${r.split(":")[0]}:${r.split(":")[1]}`)}function Oa(r){var i,c,l,E;let S={};if(!(0,P.L5)(r))return S;for(let[C,R]of Object.entries(r)){let r=(0,P.gp)(C)?[C]:R.chains,A=R.methods||[],T=R.events||[],q=R.rpcMap||{},M=(0,P.M)(C);S[M]=Zg(index_es_cr(index_es_cr({},S[M]),R),{chains:(0,P.eG)(r,null==(i=S[M])?void 0:i.chains),methods:(0,P.eG)(A,null==(c=S[M])?void 0:c.methods),events:(0,P.eG)(T,null==(l=S[M])?void 0:l.events),rpcMap:index_es_cr(index_es_cr({},q),null==(E=S[M])?void 0:E.rpcMap)})}return S}function Qg(r){return r.includes(":")?r.split(":")[2]:r}function index_es_Wi(r){return"number"==typeof r?r:r.includes("0x")?parseInt(r,16):r.includes(":")?Number(r.split(":")[1]):Number(r)}let rx={},index_es_z=r=>rx[r],Fi=(r,i)=>{rx[r]=i};let kg=class kg{constructor(r){this.name="polkadot",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){this.httpProviders[r]||this.setHttpProvider(r,i),this.chainId=r,this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${r}`)}getAccounts(){let r=this.namespace.accounts;return r&&r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>{var c;let l=index_es_Ct(i);r[l]=this.createHttpProvider(l,null==(c=this.namespace.rpcMap)?void 0:c[i])}),r}getHttpProvider(){let r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProvider(r,i){let c=i||index_es_ft(r,this.namespace,this.client.core.projectId);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);return new ed.r(new rl.Z(c,index_es_z("disableProviderPing")))}};let jg=class jg{constructor(r){this.name="eip155",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(r){switch(r.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(r);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(r.request.method)?await this.client.request(r):this.getHttpProvider().request(r.request)}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}setDefaultChain(r,i){this.httpProviders[r]||this.setHttpProvider(parseInt(r),i),this.chainId=parseInt(r),this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${r}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}createHttpProvider(r,i){let c=i||index_es_ft(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);return new ed.r(new rl.k(c,index_es_z("disableProviderPing")))}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>
27{var c;let l=parseInt(index_es_Ct(i));r[l]=this.createHttpProvider(l,null==(c=this.namespace.rpcMap)?void 0:c[i])}),r}getAccounts(){let r=this.namespace.accounts;return r?[...new Set(r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){let r=this.chainId,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}async handleSwitchChain(r){var i,c;let l=r.request.params?null==(i=r.request.params[0])?void 0:i.chainId:"0x0";l=l.startsWith("0x")?l:`0x${l}`;let E=parseInt(l,16);if(this.isChainApproved(E))this.setDefaultChain(`${E}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:r.topic,request:{method:r.request.method,params:[{chainId:l}]},chainId:null==(c=this.namespace.chains)?void 0:c[0]}),this.setDefaultChain(`${E}`);else throw Error(`Failed to switch to chain 'eip155:${E}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(r){return this.namespace.chains.includes(`${this.name}:${r}`)}};let nv=class nv{constructor(r){this.name="solana",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){this.httpProviders[r]||this.setHttpProvider(r,i),this.chainId=r,this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${r}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}getAccounts(){let r=this.namespace.accounts;return r?[...new Set(r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>{var c;let l=index_es_Ct(i);r[l]=this.createHttpProvider(l,null==(c=this.namespace.rpcMap)?void 0:c[i])}),r}getHttpProvider(){let r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProvider(r,i){let c=i||index_es_ft(r,this.namespace,this.client.core.projectId);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);return new ed.r(new rl.Z(c,index_es_z("disableProviderPing")))}};let tv=class tv{constructor(r){this.name="cosmos",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){this.httpProviders[r]||this.setHttpProvider(r,i),this.chainId=r,this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let r=this.namespace.accounts;return r?[...new Set(r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>{var c;let l=index_es_Ct(i);r[l]=this.createHttpProvider(l,null==(c=this.namespace.rpcMap)?void 0:c[i])}),r}getHttpProvider(){let r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProvider(r,i){let c=i||index_es_ft(r,this.namespace,this.client.core.projectId);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);return new ed.r(new rl.Z(c,index_es_z("disableProviderPing")))}};let ev=class ev{constructor(r){this.name="cip34",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){this.httpProviders[r]||this.setHttpProvider(r,i),this.chainId=r,this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let r=this.namespace.accounts;return r?[...new Set(r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>
27{let c=this.getCardanoRPCUrl(i),l=index_es_Ct(i);r[l]=this.createHttpProvider(l,c)}),r}getHttpProvider(){let r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}getCardanoRPCUrl(r){let i=this.namespace.rpcMap;if(i)return i[r]}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProvider(r,i){let c=i||this.getCardanoRPCUrl(r);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);return new ed.r(new rl.Z(c,index_es_z("disableProviderPing")))}};let rv=class rv{constructor(r){this.name="elrond",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){this.httpProviders[r]||this.setHttpProvider(r,i),this.chainId=r,this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${r}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}getAccounts(){let r=this.namespace.accounts;return r?[...new Set(r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>{var c;let l=index_es_Ct(i);r[l]=this.createHttpProvider(l,null==(c=this.namespace.rpcMap)?void 0:c[i])}),r}getHttpProvider(){let r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProvider(r,i){let c=i||index_es_ft(r,this.namespace,this.client.core.projectId);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);return new ed.r(new rl.Z(c,index_es_z("disableProviderPing")))}};let iv=class iv{constructor(r){this.name="multiversx",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){this.httpProviders[r]||this.setHttpProvider(r,i),this.chainId=r,this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${r}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}getAccounts(){let r=this.namespace.accounts;return r?[...new Set(r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>{var c;let l=index_es_Ct(i);r[l]=this.createHttpProvider(l,null==(c=this.namespace.rpcMap)?void 0:c[i])}),r}getHttpProvider(){let r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProvider(r,i){let c=i||index_es_ft(r,this.namespace,this.client.core.projectId);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);return new ed.r(new rl.Z(c,index_es_z("disableProviderPing")))}};let sv=class sv{constructor(r){this.name="near",this.namespace=r.namespace,this.events=index_es_z("events"),this.client=index_es_z("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let r=this.namespace.chains[0];if(!r)throw Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){let c=i||index_es_ft(`${this.name}:${r}`,this.namespace);if(!c)throw Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,c)}this.events.emit(rd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let r=this.namespace.accounts;return r&&r.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]}createHttpProviders(){let r={};return this.namespace.chains.forEach(i=>
27{var c;r[i]=this.createHttpProvider(i,null==(c=this.namespace.rpcMap)?void 0:c[i])}),r}getHttpProvider(){let r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){let c=this.createHttpProvider(r,i);c&&(this.httpProviders[r]=c)}createHttpProvider(r,i){let c=i||index_es_ft(r,this.namespace);return typeof c>"u"?void 0:new ed.r(new rl.Z(c,index_es_z("disableProviderPing")))}};var rS=Object.defineProperty,rP=Object.defineProperties,rO=Object.getOwnPropertyDescriptors,rC=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,rA=Object.prototype.propertyIsEnumerable,Ta=(r,i,c)=>i in r?rS(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,index_es_hr=(r,i)=>{for(var c in i||(i={}))rR.call(i,c)&&Ta(r,c,i[c]);if(rC)for(var c of rC(i))rA.call(i,c)&&Ta(r,c,i[c]);return r},Mi=(r,i)=>rP(r,rO(i));let index_es_lr=class index_es_lr{constructor(r){this.events=new(S()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=r,this.logger="u">typeof r?.logger&&"string"!=typeof r?.logger?r.logger:(0,J.pino)((0,J.getDefaultLoggerOptions)({level:r?.logger||rh})),this.disableProviderPing=r?.disableProviderPing||!1}static async init(r){let i=new index_es_lr(r);return await i.initialize(),i}async request(r,i){let[c,l]=this.validateChain(i);if(!this.session)throw Error("Please call connect() before request()");return await this.getProvider(c).request({request:index_es_hr({},r),chainId:`${c}:${l}`,topic:this.session.topic})}sendAsync(r,i,c){let l=new Date().getTime();this.request(r,c).then(r=>i(null,(0,eg.formatJsonRpcResult)(l,r))).catch(r=>i(r,void 0))}async enable(){if(!this.client)throw 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 r;if(!this.session)throw Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(r=this.session)?void 0:r.topic,reason:(0,P.D6)("USER_DISCONNECTED")}),await this.cleanup()}async connect(r){if(!this.client)throw Error("Sign Client not initialized");if(this.setNamespaces(r),await this.cleanupPendingPairings(),!r.skipPairing)return await this.pair(r.pairingTopic)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}removeListener(r,i){this.events.removeListener(r,i)}off(r,i){this.events.off(r,i)}get isWalletConnect(){return!0}async pair(r){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw Error("Pairing aborted");if(i>=this.maxPairingAttempts)throw Error("Max auto pairing attempts reached");let{uri:c,approval:l}=await this.client.connect({pairingTopic:r,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});c&&(this.uri=c,this.events.emit("display_uri",c)),await l().then(r=>{this.session=r,this.namespaces||(this.namespaces=function(r){let i={};for(let[c,l]of Object.entries(r)){let r=l.methods||[],E=l.events||[],S=l.accounts||[],C=(0,P.gp)(c)?[c]:l.chains?l.chains:Sa(l.accounts);i[c]={chains:C,methods:r,events:E,accounts:S}}return i}(r.namespaces),this.persist("namespaces",this.namespaces))}).catch(r=>{if(r.message!==t6)throw r;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(r,i){try{if(!this.session)return;let[c,l]=this.validateChain(r);this.getProvider(c).setDefaultChain(l,i)}catch(r){if(!/Please call connect/.test(r.message))throw r}}async cleanupPendingPairings(r={}){this.logger.info("Cleaning up inactive pairings...");let i=this.client.pairing.getAll();if((0,P.qt)(i)){for(let c of i)r.deletePairings?this.client.core.expirer.set(c.topic,0):await this.client.core.relayer.subscriber.unsubscribe(c.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){let r=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[r]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await index_es_Q.init({logger:this.providerOpts.logger||rh,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 Error("Sign Client not initialized");if(!this.session)throw Error("Session not initialized. Please call connect() before enable()");let r=[...new Set(Object.keys(this.session.namespaces).map(r=>(0,P.M)(r)))];Fi("client",this.client),Fi("events",this.events),Fi("disableProviderPing",this.disableProviderPing),r.forEach(r=>{if(!this.session)return;let i=function(r,i){let c=Object.keys(i.namespaces).filter(i=>i.includes(r));if(!c.length)return[];let l=[];
27return c.forEach(r=>{let c=i.namespaces[r].accounts;l.push(...c)}),l}(r,this.session),c=Sa(i),l=function(r={},i={}){let c=Oa(r),l=Oa(i);return ry.exports.merge(c,l)}(this.namespaces,this.optionalNamespaces),E=Mi(index_es_hr({},l[r]),{accounts:i,chains:c});switch(r){case"eip155":this.rpcProviders[r]=new jg({namespace:E});break;case"solana":this.rpcProviders[r]=new nv({namespace:E});break;case"cosmos":this.rpcProviders[r]=new tv({namespace:E});break;case"polkadot":this.rpcProviders[r]=new kg({namespace:E});break;case"cip34":this.rpcProviders[r]=new ev({namespace:E});break;case"elrond":this.rpcProviders[r]=new rv({namespace:E});break;case"multiversx":this.rpcProviders[r]=new iv({namespace:E});break;case"near":this.rpcProviders[r]=new sv({namespace:E})}})}registerEventListeners(){if(typeof this.client>"u")throw Error("Sign Client is not initialized");this.client.on("session_ping",r=>{this.events.emit("session_ping",r)}),this.client.on("session_event",r=>{let{params:i}=r,{event:c}=i;if("accountsChanged"===c.name){let r=c.data;r&&(0,P.qt)(r)&&this.events.emit("accountsChanged",r.map(Qg))}else if("chainChanged"===c.name){let r=i.chainId,c=i.event.data,l=(0,P.M)(r),E=index_es_Wi(r)!==index_es_Wi(c)?`${l}:${index_es_Wi(c)}`:r;this.onChainChanged(E)}else this.events.emit(c.name,c.data);this.events.emit("session_event",r)}),this.client.on("session_update",({topic:r,params:i})=>{var c;let{namespaces:l}=i,E=null==(c=this.client)?void 0:c.session.get(r);this.session=Mi(index_es_hr({},E),{namespaces:l}),this.onSessionUpdate(),this.events.emit("session_update",{topic:r,params:i})}),this.client.on("session_delete",async r=>{await this.cleanup(),this.events.emit("session_delete",r),this.events.emit("disconnect",Mi(index_es_hr({},(0,P.D6)("USER_DISCONNECTED")),{data:r.topic}))}),this.on(rd.DEFAULT_CHAIN_CHANGED,r=>{this.onChainChanged(r,!0)})}getProvider(r){if(!this.rpcProviders[r])throw Error(`Provider not found: ${r}`);return this.rpcProviders[r]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(r=>{var i;this.getProvider(r).updateNamespace(null==(i=this.session)?void 0:i.namespaces[r])})}setNamespaces(r){let{namespaces:i,optionalNamespaces:c,sessionProperties:l}=r;i&&Object.keys(i).length&&(this.namespaces=i),c&&Object.keys(c).length&&(this.optionalNamespaces=c),this.sessionProperties=l,this.persist("namespaces",i),this.persist("optionalNamespaces",c)}validateChain(r){let[i,c]=r?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,c];if(i&&!Object.keys(this.namespaces||{}).map(r=>(0,P.M)(r)).includes(i))throw Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&c)return[i,c];let l=(0,P.M)(Object.keys(this.namespaces)[0]),E=this.rpcProviders[l].getDefaultChain();return[l,E]}async requestAccounts(){let[r]=this.validateChain();return await this.getProvider(r).requestAccounts()}onChainChanged(r,i=!1){var c;if(!this.namespaces)return;let[l,E]=this.validateChain(r);i||this.getProvider(l).setDefaultChain(E),(null!=(c=this.namespaces[l])?c:this.namespaces[`${l}:${E}`]).defaultChain=E,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",E)}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(r,i){this.client.core.storage.setItem(`${rp}/${r}`,i)}async getFromStore(r){return await this.client.core.storage.getItem(`${rp}/${r}`)}};let rj=["eth_sendTransaction","personal_sign"],rN=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],rL=["chainChanged","accountsChanged"],rT=["chainChanged","accountsChanged","message","disconnect","connect"];var rz=Object.defineProperty,rq=Object.defineProperties,rD=Object.getOwnPropertyDescriptors,rk=Object.getOwnPropertySymbols,rM=Object.prototype.hasOwnProperty,r$=Object.prototype.propertyIsEnumerable,dist_index_es_O=(r,i,c)=>i in r?rz(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,index_es_p=(r,i)=>{for(var c in i||(i={}))rM.call(i,c)&&dist_index_es_O(r,c,i[c]);if(rk)for(var c of rk(i))r$.call(i,c)&&dist_index_es_O(r,c,i[c]);return r},index_es_M=(r,i)=>rq(r,rD(i));function ethereum_provider_dist_index_es_g(r){return Number(r[0].split(":")[1])}function index_es_f(r){return`0x${r.toString(16)}`}let dist_index_es_v=class dist_index_es_v{constructor(){this.events=new E.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(r,i)=>(this.events.on(r,i),this),this.once=(r,i)=>(this.events.once(r,i),this),this.removeListener=(r,i)=>(this.events.removeListener(r,i),this),this.off=(r,i)=>(this.events.off(r,i),this),this.parseAccount=r=>this.isCompatibleChainId(r)?this.parseAccountId(r).address:r,this.signer={},this.rpc={}}static async init(r){let i=new dist_index_es_v;return await i.initialize(r),i}async request(r){return await this.signer.request(r,this.formatChainId(this.chainId))}sendAsync(r,i){this.signer.sendAsync(r,i,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(r){if(!this.signer.client)throw Error("Provider not initialized. Call init() first");this.loadConnectOpts(r);let{required:i,optional:c}=function(r){let{chains:i,optionalChains:c,methods:l,optionalMethods:E,events:S,optionalEvents:C,rpcMap:R}=r;if(!(0,P.qt)(i))throw Error("Invalid chains");let A={chains:i,methods:l||rj,events:S||rL,rpcMap:index_es_p({},i.length?{[ethereum_provider_dist_index_es_g(i)]:R[ethereum_provider_dist_index_es_g(i)]}:{})},T=S?.filter(r=>!rL.includes(r)),q=l?.filter(r=>!rj.includes(r));if(!c&&!C&&!E&&!(null!=T&&T.length)&&!(null!=q&&q.length))return{required:i.length?A:void 0};let M=T?.length&&q?.length||!c,$={chains:[...new Set(M?A.chains.concat(c||[]):c)],methods:[...new Set(A.methods.concat(null!=E&&E.length?E:rN))],events:[...new Set(A.events.concat(null!=C&&C.length?C:rT))],rpcMap:R};return{required:i.length?A:void 0,optional:c.length?$:void 0}}(this.rpc);try{let l=await new Promise(async(l,E)=>{var S;this.rpc.showQrModal&&(null==(S=this.modal)||S.subscribeModal(r=>{r.open||this.signer.session||(this.signer.abortPairingAttempt(),E(Error("Connection request reset. Please try again.")))})),await this.signer.connect(index_es_M(index_es_p({namespaces:index_es_p({},i&&{[this.namespace]:i})},c&&{optionalNamespaces:{[this.namespace]:c}}),{pairingTopic:r?.pairingTopic})).then(r=>{l(r)}
27).catch(r=>{E(Error(r.message))})});if(!l)return;let E=(0,P.gu)(l.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:E),this.setAccounts(E),this.events.emit("connect",{chainId:index_es_f(this.chainId)})}catch(r){throw this.signer.logger.error(r),r}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",r=>{let{params:i}=r,{event:c}=i;"accountsChanged"===c.name?(this.accounts=this.parseAccounts(c.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===c.name?this.setChainId(this.formatChainId(c.data)):this.events.emit(c.name,c.data),this.events.emit("session_event",r)}),this.signer.on("chainChanged",r=>{let i=parseInt(r);this.chainId=i,this.events.emit("chainChanged",index_es_f(this.chainId)),this.persist()}),this.signer.on("session_update",r=>{this.events.emit("session_update",r)}),this.signer.on("session_delete",r=>{this.reset(),this.events.emit("session_delete",r),this.events.emit("disconnect",index_es_M(index_es_p({},(0,P.D6)("USER_DISCONNECTED")),{data:r.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",r=>{var i,c;this.rpc.showQrModal&&(null==(i=this.modal)||i.closeModal(),null==(c=this.modal)||c.openModal({uri:r})),this.events.emit("display_uri",r)})}switchEthereumChain(r){this.request({method:"wallet_switchEthereumChain",params:[{chainId:r.toString(16)}]})}isCompatibleChainId(r){return"string"==typeof r&&r.startsWith(`${this.namespace}:`)}formatChainId(r){return`${this.namespace}:${r}`}parseChainId(r){return Number(r.split(":")[1])}setChainIds(r){let i=r.filter(r=>this.isCompatibleChainId(r)).map(r=>this.parseChainId(r));i.length&&(this.chainId=i[0],this.events.emit("chainChanged",index_es_f(this.chainId)),this.persist())}setChainId(r){if(this.isCompatibleChainId(r)){let i=this.parseChainId(r);this.chainId=i,this.switchEthereumChain(i)}}parseAccountId(r){let[i,c,l]=r.split(":");return{chainId:`${i}:${c}`,address:l}}setAccounts(r){this.accounts=r.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(r){var i,c;let l=null!=(i=r?.chains)?i:[],E=null!=(c=r?.optionalChains)?c:[],S=l.concat(E);if(!S.length)throw Error("No chains specified in either `chains` or `optionalChains`");let P=l.length?r?.methods||rj:[],C=l.length?r?.events||rL:[],R=r?.optionalMethods||[],A=r?.optionalEvents||[],T=r?.rpcMap||this.buildRpcMap(S,r.projectId),q=r?.qrModalOptions||void 0;return{chains:l?.map(r=>this.formatChainId(r)),optionalChains:E.map(r=>this.formatChainId(r)),methods:P,events:C,optionalMethods:R,optionalEvents:A,rpcMap:T,showQrModal:!!(null!=r&&r.showQrModal),qrModalOptions:q,projectId:r.projectId,metadata:r.metadata}}buildRpcMap(r,i){let c={};return r.forEach(r=>{c[r]=this.getRpcUrl(r,i)}),c}async initialize(r){if(this.rpc=this.getRpcConfig(r),this.chainId=this.rpc.chains.length?ethereum_provider_dist_index_es_g(this.rpc.chains):ethereum_provider_dist_index_es_g(this.rpc.optionalChains),this.signer=await index_es_lr.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:r.disableProviderPing,relayUrl:r.relayUrl,storageOptions:r.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{let{WalletConnectModal:i}=await c.e(9343).then(c.bind(c,59343));r=i}catch{throw Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(index_es_p({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(r){throw this.signer.logger.error(r),Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(r){if(!r)return;let{chains:i,optionalChains:c,rpcMap:l}=r;i&&(0,P.qt)(i)&&(this.rpc.chains=i.map(r=>this.formatChainId(r)),i.forEach(r=>{this.rpc.rpcMap[r]=l?.[r]||this.getRpcUrl(r)})),c&&(0,P.qt)(c)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=c?.map(r=>
27this.formatChainId(r)),c.forEach(r=>{this.rpc.rpcMap[r]=l?.[r]||this.getRpcUrl(r)}))}getRpcUrl(r,i){var c;return(null==(c=this.rpc.rpcMap)?void 0:c[r])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${r}&projectId=${i||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;let r=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),i=this.session.namespaces[`${this.namespace}:${r}`]?this.session.namespaces[`${this.namespace}:${r}`]:this.session.namespaces[this.namespace];this.setChainIds(r?[this.formatChainId(r)]:i?.accounts),this.setAccounts(i?.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(r){return"string"==typeof r||r instanceof String?[this.parseAccount(r)]:r.map(r=>this.parseAccount(r))}};let rH=dist_index_es_v},38200:function(r,i,c){"use strict";c.d(i,{q:function(){return IEvents}});let IEvents=class IEvents{}},30997:function(r,i,c){"use strict";c.r(i),c.d(i,{IEvents:function(){return l.q}});var l=c(38200)},32568:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.HEARTBEAT_EVENTS=i.HEARTBEAT_INTERVAL=void 0;let l=c(66736);i.HEARTBEAT_INTERVAL=l.FIVE_SECONDS,i.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},53401:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0});let l=c(39653);l.__exportStar(c(32568),i)},38969:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.HeartBeat=void 0;let l=c(39653),E=c(17187),S=c(66736),P=c(1614),C=c(53401);let HeartBeat=class HeartBeat extends P.IHeartBeat{constructor(r){super(r),this.events=new E.EventEmitter,this.interval=C.HEARTBEAT_INTERVAL,this.interval=(null==r?void 0:r.interval)||C.HEARTBEAT_INTERVAL}static init(r){return l.__awaiter(this,void 0,void 0,function*(){let i=new HeartBeat(r);return yield i.init(),i})}init(){return l.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}initialize(){return l.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),S.toMiliseconds(this.interval))})}pulse(){this.events.emit(C.HEARTBEAT_EVENTS.pulse)}};i.HeartBeat=HeartBeat},90772:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0});let l=c(39653);l.__exportStar(c(38969),i),l.__exportStar(c(1614),i),l.__exportStar(c(53401),i)},44174:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.IHeartBeat=void 0;let l=c(30997);let IHeartBeat=class IHeartBeat extends l.IEvents{constructor(r){super()}};i.IHeartBeat=IHeartBeat},1614:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0});let l=c(39653);l.__exportStar(c(44174),i)},39653:function(r,i,c){"use strict";c.r(i),c.d(i,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar}
vendor: 6,502 bytes, lines 27-40
27,__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** 28Copyright (c) Microsoft Corporation. 29 30Permission to use, copy, modify, and/or distribute this software for any 31purpose with or without fee is hereby granted. 32 33THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 34REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 35AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 36INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 37LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 38OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 39PERFORMANCE OF THIS SOFTWARE. 40***************************************************************************** */var extendStatics=function(r,i){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)i.hasOwnProperty(c)&&(r[c]=i[c])})(r,i)};function __extends(r,i){function __(){this.constructor=r}extendStatics(r,i),r.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(r){for(var i,c=1,l=arguments.length;c<l;c++)for(var E in i=arguments[c])Object.prototype.hasOwnProperty.call(i,E)&&(r[E]=i[E]);return r}).apply(this,arguments)};function __rest(r,i){var c={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&0>i.indexOf(l)&&(c[l]=r[l]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols)for(var E=0,l=Object.getOwnPropertySymbols(r);E<l.length;E++)0>i.indexOf(l[E])&&Object.prototype.propertyIsEnumerable.call(r,l[E])&&(c[l[E]]=r[l[E]]);return c}function __decorate(r,i,c,l){var E,S=arguments.length,P=S<3?i:null===l?l=Object.getOwnPropertyDescriptor(i,c):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)P=Reflect.decorate(r,i,c,l);else for(var C=r.length-1;C>=0;C--)(E=r[C])&&(P=(S<3?E(P):S>3?E(i,c,P):E(i,c))||P);return S>3&&P&&Object.defineProperty(i,c,P),P}function __param(r,i){return function(c,l){i(c,l,r)}}function __metadata(r,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(r,i)}function __awaiter(r,i,c,l){return new(c||(c=Promise))(function(E,S){function fulfilled(r){try{step(l.next(r))}catch(r){S(r)}}function rejected(r){try{step(l.throw(r))}catch(r){S(r)}}function step(r){var i;r.done?E(r.value):((i=r.value)instanceof c?i:new c(function(r){r(i)})).then(fulfilled,rejected)}step((l=l.apply(r,i||[])).next())})}function __generator(r,i){var c,l,E,S,P={label:0,sent:function(){if(1&E[0])throw E[1];return E[1]},trys:[],ops:[]};return S={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(S[Symbol.iterator]=function(){return this}),S;function verb(S){return function(C){return function(S){if(c)throw TypeError("Generator is already executing.");for(;P;)try{if(c=1,l&&(E=2&S[0]?l.return:S[0]?l.throw||((E=l.return)&&E.call(l),0):l.next)&&!(E=E.call(l,S[1])).done)return E;switch(l=0,E&&(S=[2&S[0],E.value]),S[0]){case 0:case 1:E=S;break;case 4:return P.label++,{value:S[1],done:!1};case 5:P.label++,l=S[1],S=[0];continue;case 7:S=P.ops.pop(),P.trys.pop();continue;default:if(!(E=(E=P.trys).length>0&&E[E.length-1])&&(6===S[0]||2===S[0])){P=0;continue}if(3===S[0]&&(!E||S[1]>E[0]&&S[1]<E[3])){P.label=S[1];break}if(6===S[0]&&P.label<E[1]){P.label=E[1],E=S;break}if(E&&P.label<E[2]){P.label=E[2],P.ops.push(S);break}E[2]&&P.ops.pop(),P.trys.pop();continue}S=i.call(r,P)}catch(r){S=[6,r],l=0}finally{c=E=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([S,C])}}}function __createBinding(r,i,c,l){void 0===l&&(l=c),r[l]=i[c]}function __exportStar(r,i){for(var c in r)"default"===c||i.hasOwnProperty(c)||(i[c]=r[c])}function __values(r){var i="function"==typeof Symbol&&Symbol.iterator,c=i&&r[i],l=0;if(c)return c.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&l>=r.length&&(r=void 0),{value:r&&r[l++],done:!r}}};throw TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(r,i){var c="function"==typeof Symbol&&r[Symbol.iterator];if(!c)return r;var l,E,S=c.call(r),P=[];try{for(;(void 0===i||i-- >0)&&!(l=S.next()).done;)P.push(l.value)}catch(r){E={error:r}}finally{try{l&&!l.done&&(c=S.return)&&c.call(S)}finally{if(E)throw E.error}}return P}function __spread(){for(var r=[],i=0;i<arguments.length;i++)r=r.concat(__read(arguments[i]));return r}function __spreadArrays(){for(var r=0,i=0,c=arguments.length;i<c;i++)r+=arguments[i].length;for(var l=Array(r),E=0,i=0;i<c;i++)for(var S=arguments[i],P=0,C=S.length;P<C;P++,E++)l[E]=S[P];return l}function __await(r){return this instanceof __await?(this.v=r,this):new __await(r)}function __asyncGenerator(r,i,c){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var l,E=c.apply(r,i||[]),S=[];return l={},verb("next"),verb("throw"),verb("return"),l[Symbol.asyncIterator]=function(){return this},l;function verb(r){E[r]&&(l[r]=function(i){return new Promise(function(c,l){S.push([r,i,c,l])>1||resume(r,i)})})}function resume(r,i){try{var c;(c=E[r](i)).value instanceof __await?Promise.resolve(c.value.v).then(fulfill,reject):settle(S[0][2],c)}catch(r){settle(S[0][3],r)}}function fulfill(r){resume("next",r)}function reject(r){resume("throw",r)}function settle(r,i){r(i),S.shift(),S.length&&resume(S[0][0],S[0][1])}}function __asyncDelegator(r){var i,c;return i={},verb("next"),verb("throw",function(r){throw r}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(l,E){i[l]=r[l]?function(i){return(c=!c)?{value:__await(r[l](i)),done:"return"===l}:E?E(i):i}:E}}function __asyncValues(r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var i,c=r[Symbol.asyncIterator];return c?c.call(r):(r=__values(r),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(c){i[c]=r[c]&&function(i){return new Promise(function(l,E){!function(r,i,c,l){Promise.resolve(l).then(function(i){r({value:i,done:c})},i)}(l,E,(i=r[c](i)).done,i.value)})}}}
40function __makeTemplateObject(r,i){return Object.defineProperty?Object.defineProperty(r,"raw",{value:i}):r.raw=i,r}function __importStar(r){if(r&&r.__esModule)return r;var i={};if(null!=r)for(var c in r)Object.hasOwnProperty.call(r,c)&&(i[c]=r[c]);return i.default=r,i}function __importDefault(r){return r&&r.__esModule?r:{default:r}}function __classPrivateFieldGet(r,i){if(!i.has(r))throw TypeError("attempted to get private field on non-instance");return i.get(r)}function __classPrivateFieldSet(r,i,c){if(!i.has(r))throw TypeError("attempted to set private field on non-instance");return i.set(r,c),c}},72030:function(r){"use strict";r.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},65727:function(r,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.PINO_CUSTOM_CONTEXT_KEY=i.PINO_LOGGER_DEFAULTS=void 0,i.PINO_LOGGER_DEFAULTS={level:"info"},i.PINO_CUSTOM_CONTEXT_KEY="custom_context"},9107:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.pino=void 0;let l=c(57121),E=l.__importDefault(c(36559));Object.defineProperty(i,"pino",{enumerable:!0,get:function(){return E.default}}),l.__exportStar(c(65727),i),l.__exportStar(c(58048),i)},58048:function(r,i,c){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.generateChildLogger=i.formatChildLoggerContext=i.getLoggerContext=i.setBrowserLoggerContext=i.getBrowserLoggerContext=i.getDefaultLoggerOptions=void 0;let l=c(65727);function getBrowserLoggerContext(r,i=l.PINO_CUSTOM_CONTEXT_KEY){return r[i]||""}function setBrowserLoggerContext(r,i,c=l.PINO_CUSTOM_CONTEXT_KEY){return r[c]=i,r}function getLoggerContext(r,i=l.PINO_CUSTOM_CONTEXT_KEY){return void 0===r.bindings?getBrowserLoggerContext(r,i):r.bindings().context||""}function formatChildLoggerContext(r,i,c=l.PINO_CUSTOM_CONTEXT_KEY){let E=getLoggerContext(r,c),S=E.trim()?`${E}/${i}`:i;return S}i.getDefaultLoggerOptions=function(r){return Object.assign(Object.assign({},r),{level:(null==r?void 0:r.level)||l.PINO_LOGGER_DEFAULTS.level})},i.getBrowserLoggerContext=getBrowserLoggerContext,i.setBrowserLoggerContext=setBrowserLoggerContext,i.getLoggerContext=getLoggerContext,i.formatChildLoggerContext=formatChildLoggerContext,i.generateChildLogger=function(r,i,c=l.PINO_CUSTOM_CONTEXT_KEY){let E=formatChildLoggerContext(r,i,c),S=r.child({context:E});return setBrowserLoggerContext(S,E,c)}},57121:function(r,i,c){"use strict";c.r(i),c.d(i,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar}
vendor: 6,502 bytes, lines 40-53
40,__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** 41Copyright (c) Microsoft Corporation. 42 43Permission to use, copy, modify, and/or distribute this software for any 44purpose with or without fee is hereby granted. 45 46THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 47REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 48AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 49INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 50LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 51OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 52PERFORMANCE OF THIS SOFTWARE. 53***************************************************************************** */var extendStatics=function(r,i){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)i.hasOwnProperty(c)&&(r[c]=i[c])})(r,i)};function __extends(r,i){function __(){this.constructor=r}extendStatics(r,i),r.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(r){for(var i,c=1,l=arguments.length;c<l;c++)for(var E in i=arguments[c])Object.prototype.hasOwnProperty.call(i,E)&&(r[E]=i[E]);return r}).apply(this,arguments)};function __rest(r,i){var c={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&0>i.indexOf(l)&&(c[l]=r[l]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols)for(var E=0,l=Object.getOwnPropertySymbols(r);E<l.length;E++)0>i.indexOf(l[E])&&Object.prototype.propertyIsEnumerable.call(r,l[E])&&(c[l[E]]=r[l[E]]);return c}function __decorate(r,i,c,l){var E,S=arguments.length,P=S<3?i:null===l?l=Object.getOwnPropertyDescriptor(i,c):l;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)P=Reflect.decorate(r,i,c,l);else for(var C=r.length-1;C>=0;C--)(E=r[C])&&(P=(S<3?E(P):S>3?E(i,c,P):E(i,c))||P);return S>3&&P&&Object.defineProperty(i,c,P),P}function __param(r,i){return function(c,l){i(c,l,r)}}function __metadata(r,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(r,i)}function __awaiter(r,i,c,l){return new(c||(c=Promise))(function(E,S){function fulfilled(r){try{step(l.next(r))}catch(r){S(r)}}function rejected(r){try{step(l.throw(r))}catch(r){S(r)}}function step(r){var i;r.done?E(r.value):((i=r.value)instanceof c?i:new c(function(r){r(i)})).then(fulfilled,rejected)}step((l=l.apply(r,i||[])).next())})}function __generator(r,i){var c,l,E,S,P={label:0,sent:function(){if(1&E[0])throw E[1];return E[1]},trys:[],ops:[]};return S={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(S[Symbol.iterator]=function(){return this}),S;function verb(S){return function(C){return function(S){if(c)throw TypeError("Generator is already executing.");for(;P;)try{if(c=1,l&&(E=2&S[0]?l.return:S[0]?l.throw||((E=l.return)&&E.call(l),0):l.next)&&!(E=E.call(l,S[1])).done)return E;switch(l=0,E&&(S=[2&S[0],E.value]),S[0]){case 0:case 1:E=S;break;case 4:return P.label++,{value:S[1],done:!1};case 5:P.label++,l=S[1],S=[0];continue;case 7:S=P.ops.pop(),P.trys.pop();continue;default:if(!(E=(E=P.trys).length>0&&E[E.length-1])&&(6===S[0]||2===S[0])){P=0;continue}if(3===S[0]&&(!E||S[1]>E[0]&&S[1]<E[3])){P.label=S[1];break}if(6===S[0]&&P.label<E[1]){P.label=E[1],E=S;break}if(E&&P.label<E[2]){P.label=E[2],P.ops.push(S);break}E[2]&&P.ops.pop(),P.trys.pop();continue}S=i.call(r,P)}catch(r){S=[6,r],l=0}finally{c=E=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([S,C])}}}function __createBinding(r,i,c,l){void 0===l&&(l=c),r[l]=i[c]}function __exportStar(r,i){for(var c in r)"default"===c||i.hasOwnProperty(c)||(i[c]=r[c])}function __values(r){var i="function"==typeof Symbol&&Symbol.iterator,c=i&&r[i],l=0;if(c)return c.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&l>=r.length&&(r=void 0),{value:r&&r[l++],done:!r}}};throw TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(r,i){var c="function"==typeof Symbol&&r[Symbol.iterator];if(!c)return r;var l,E,S=c.call(r),P=[];try{for(;(void 0===i||i-- >0)&&!(l=S.next()).done;)P.push(l.value)}catch(r){E={error:r}}finally{try{l&&!l.done&&(c=S.return)&&c.call(S)}finally{if(E)throw E.error}}return P}function __spread(){for(var r=[],i=0;i<arguments.length;i++)r=r.concat(__read(arguments[i]));return r}function __spreadArrays(){for(var r=0,i=0,c=arguments.length;i<c;i++)r+=arguments[i].length;for(var l=Array(r),E=0,i=0;i<c;i++)for(var S=arguments[i],P=0,C=S.length;P<C;P++,E++)l[E]=S[P];return l}function __await(r){return this instanceof __await?(this.v=r,this):new __await(r)}function __asyncGenerator(r,i,c){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var l,E=c.apply(r,i||[]),S=[];return l={},verb("next"),verb("throw"),verb("return"),l[Symbol.asyncIterator]=function(){return this},l;function verb(r){E[r]&&(l[r]=function(i){return new Promise(function(c,l){S.push([r,i,c,l])>1||resume(r,i)})})}function resume(r,i){try{var c;(c=E[r](i)).value instanceof __await?Promise.resolve(c.value.v).then(fulfill,reject):settle(S[0][2],c)}catch(r){settle(S[0][3],r)}}function fulfill(r){resume("next",r)}function reject(r){resume("throw",r)}function settle(r,i){r(i),S.shift(),S.length&&resume(S[0][0],S[0][1])}}function __asyncDelegator(r){var i,c;return i={},verb("next"),verb("throw",function(r){throw r}),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(l,E){i[l]=r[l]?function(i){return(c=!c)?{value:__await(r[l](i)),done:"return"===l}:E?E(i):i}:E}}function __asyncValues(r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var i,c=r[Symbol.asyncIterator];return c?c.call(r):(r=__values(r),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(c){i[c]=r[c]&&function(i){return new Promise(function(l,E){!function(r,i,c,l){Promise.resolve(l).then(function(i){r({value:i,done:c})},i)}(l,E,(i=r[c](i)).done,i.value)})}}}
53function __makeTemplateObject(r,i){return Object.defineProperty?Object.defineProperty(r,"raw",{value:i}):r.raw=i,r}function __importStar(r){if(r&&r.__esModule)return r;var i={};if(null!=r)for(var c in r)Object.hasOwnProperty.call(r,c)&&(i[c]=r[c]);return i.default=r,i}function __importDefault(r){return r&&r.__esModule?r:{default:r}}function __classPrivateFieldGet(r,i){if(!i.has(r))throw TypeError("attempted to get private field on non-instance");return i.get(r)}function __classPrivateFieldSet(r,i,c){if(!i.has(r))throw TypeError("attempted to set private field on non-instance");return i.set(r,c),c}},43014:function(){},72307:function(r,i,c){r=c.nmd(r);var l,E,S,P="__lodash_hash_undefined__",C="[object Arguments]",R="[object Array]",A="[object Boolean]",T="[object Date]",q="[object Error]",M="[object Function]",$="[object Map]",U="[object Number]",F="[object Object]",J="[object Promise]",Q="[object RegExp]",X="[object Set]",ee="[object String]",et="[object WeakMap]",eo="[object ArrayBuffer]",ec="[object DataView]",el=/^\[object .+?Constructor\]$/,eh=/^(?:0|[1-9]\d*)$/,ep={};ep["[object Float32Array]"]=ep["[object Float64Array]"]=ep["[object Int8Array]"]=ep["[object Int16Array]"]=ep["[object Int32Array]"]=ep["[object Uint8Array]"]=ep["[object Uint8ClampedArray]"]=ep["[object Uint16Array]"]=ep["[object Uint32Array]"]=!0,ep[C]=ep[R]=ep[eo]=ep[A]=ep[ec]=ep[T]=ep[q]=ep[M]=ep[$]=ep[U]=ep[F]=ep[Q]=ep[X]=ep[ee]=ep[et]=!1;var ef="object"==typeof c.g&&c.g&&c.g.Object===Object&&c.g,ed="object"==typeof self&&self&&self.Object===Object&&self,eg=ef||ed||Function("return this")(),ey=i&&!i.nodeType&&i,e_=ey&&r&&!r.nodeType&&r,em=e_&&e_.exports===ey,eb=em&&ef.process,ew=function(){try{return eb&&eb.binding&&eb.binding("util")}catch(r){}}(),eI=ew&&ew.isTypedArray;function mapToArray(r){var i=-1,c=Array(r.size);return r.forEach(function(r,l){c[++i]=[l,r]}),c}function setToArray(r){var i=-1,c=Array(r.size);return r.forEach(function(r){c[++i]=r}),c}var eE=Array.prototype,ex=Function.prototype,eS=Object.prototype,eP=eg["__core-js_shared__"],eO=ex.toString,eC=eS.hasOwnProperty,eR=(l=/[^.]+$/.exec(eP&&eP.keys&&eP.keys.IE_PROTO||""))?"Symbol(src)_1."+l:"",eA=eS.toString,ej=RegExp("^"+eO.call(eC).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eN=em?eg.Buffer:void 0,eL=eg.Symbol,eT=eg.Uint8Array,ez=eS.propertyIsEnumerable,eD=eE.splice,ek=eL?eL.toStringTag:void 0,eM=Object.getOwnPropertySymbols,e$=eN?eN.isBuffer:void 0,eH=(E=Object.keys,S=Object,function(r){return E(S(r))}),eU=getNative(eg,"DataView"),eK=getNative(eg,"Map"),eV=getNative(eg,"Promise"),eB=getNative(eg,"Set"),eG=getNative(eg,"WeakMap"),eW=getNative(Object,"create"),eZ=toSource(eU),eF=toSource(eK),eJ=toSource(eV),eY=toSource(eB),eQ=toSource(eG),eX=eL?eL.prototype:void 0,e0=eX?eX.valueOf:void 0;function Hash(r){var i=-1,c=null==r?0:r.length;for(this.clear();++i<c;){var l=r[i];this.set(l[0],l[1])}}function ListCache(r){var i=-1,c=null==r?0:r.length;for(this.clear();++i<c;){var l=r[i];this.set(l[0],l[1])}}function MapCache(r){var i=-1,c=null==r?0:r.length;for(this.clear();++i<c;){var l=r[i];this.set(l[0],l[1])}}function SetCache(r){var i=-1,c=null==r?0:r.length;for(this.__data__=new MapCache;++i<c;)this.add(r[i])}function Stack(r){var i=this.__data__=new ListCache(r);this.size=i.size}function assocIndexOf(r,i){for(var c=r.length;c--;)if(eq(r[c][0],i))return c;return -1}function baseGetTag(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":ek&&ek in Object(r)?function(r){var i=eC.call(r,ek),c=r[ek];try{r[ek]=void 0;var l=!0}catch(r){}var E=eA.call(r);return l&&(i?r[ek]=c:delete r[ek]),E}(r):eA.call(r)}function baseIsArguments(r){return isObjectLike(r)&&baseGetTag(r)==C}function equalArrays(r,i,c,l,E,S){var P=1&c,C=r.length,R=i.length;if(C!=R&&!(P&&R>C))return!1;var A=S.get(r);if(A&&S.get(i))return A==i;var T=-1,q=!0,M=2&c?new SetCache:void 0;for(S.set(r,i),S.set(i,r);++T<C;){var $=r[T],U=i[T];if(l)var F=P?l(U,$,T,i,r,S):l($,U,T,r,i,S);if(void 0!==F){if(F)continue;q=!1;break}if(M){if(!function(r,i){for(var c=-1,l=null==r?0:r.length;++c<l;)if(i(r[c],c,r))return!0;return!1}(i,function(r,i){if(!M.has(i)&&($===r||E($,r,c,l,S)))return M.push(i)})){q=!1;break}}else if(!($===U||E($,U,c,l,S))){q=!1;break}}return S.delete(r),S.delete(i),q}function getAllKeys(r){var i;return i=function(r){return null!=r&&isLength(r.length)&&!isFunction(r)?function(r,i){var c,l=e2(r),E=!l&&e6(r),S=!l&&!E&&e3(r),P=!l&&!E&&!S&&e4(r),C=l||E||S||P,R=C?function(r,i){for(var c=-1,l=Array(r);++c<r;)l[c]=i(c);return l}(r.length,String):[],A=R.length;for(var T in r)eC.call(r,T)&&!(C&&("length"==T||S&&("offset"==T||"parent"==T)||P&&("buffer"==T||"byteLength"==T||"byteOffset"==T)||(c=null==(c=A)?9007199254740991:c)&&("number"==typeof T||eh.test(T))&&T>-1&&T%1==0&&T<c))&&R.push(T);return R}(r):function(r){if(i=r&&r.constructor,r!==("function"==typeof i&&i.prototype||eS))return eH(r);var i,c=[];for(var l in Object(r))eC.call(r,l)&&"constructor"!=l&&c.push(l);return c}(r)}(r),e2(r)?i:function(r,i){for(var c=-1,l=i.length,E=r.length;++c<l;)r[E+c]=i[c];return r}(i,e1(r))}function getMapData(r,i){var c,l=r.__data__;return("string"==(c=typeof i)||"number"==c||"symbol"==c||"boolean"==c?"__proto__"!==i:null===i)?l["string"==typeof i?"string":"hash"]:l.map}function getNative(r,i){var c=null==r?void 0:r[i];
53return!(!isObject(c)||eR&&eR in c)&&(isFunction(c)?ej:el).test(toSource(c))?c:void 0}Hash.prototype.clear=function(){this.__data__=eW?eW(null):{},this.size=0},Hash.prototype.delete=function(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i},Hash.prototype.get=function(r){var i=this.__data__;if(eW){var c=i[r];return c===P?void 0:c}return eC.call(i,r)?i[r]:void 0},Hash.prototype.has=function(r){var i=this.__data__;return eW?void 0!==i[r]:eC.call(i,r)},Hash.prototype.set=function(r,i){var c=this.__data__;return this.size+=this.has(r)?0:1,c[r]=eW&&void 0===i?P:i,this},ListCache.prototype.clear=function(){this.__data__=[],this.size=0},ListCache.prototype.delete=function(r){var i=this.__data__,c=assocIndexOf(i,r);return!(c<0)&&(c==i.length-1?i.pop():eD.call(i,c,1),--this.size,!0)},ListCache.prototype.get=function(r){var i=this.__data__,c=assocIndexOf(i,r);return c<0?void 0:i[c][1]},ListCache.prototype.has=function(r){return assocIndexOf(this.__data__,r)>-1},ListCache.prototype.set=function(r,i){var c=this.__data__,l=assocIndexOf(c,r);return l<0?(++this.size,c.push([r,i])):c[l][1]=i,this},MapCache.prototype.clear=function(){this.size=0,this.__data__={hash:new Hash,map:new(eK||ListCache),string:new Hash}},MapCache.prototype.delete=function(r){var i=getMapData(this,r).delete(r);return this.size-=i?1:0,i},MapCache.prototype.get=function(r){return getMapData(this,r).get(r)},MapCache.prototype.has=function(r){return getMapData(this,r).has(r)},MapCache.prototype.set=function(r,i){var c=getMapData(this,r),l=c.size;return c.set(r,i),this.size+=c.size==l?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function(r){return this.__data__.set(r,P),this},SetCache.prototype.has=function(r){return this.__data__.has(r)},Stack.prototype.clear=function(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function(r){var i=this.__data__,c=i.delete(r);return this.size=i.size,c},Stack.prototype.get=function(r){return this.__data__.get(r)},Stack.prototype.has=function(r){return this.__data__.has(r)},Stack.prototype.set=function(r,i){var c=this.__data__;if(c instanceof ListCache){var l=c.__data__;if(!eK||l.length<199)return l.push([r,i]),this.size=++c.size,this;c=this.__data__=new MapCache(l)}return c.set(r,i),this.size=c.size,this};var e1=eM?function(r){return null==r?[]:function(r,i){for(var c=-1,l=null==r?0:r.length,E=0,S=[];++c<l;){var P=r[c];i(P,c,r)&&(S[E++]=P)}return S}(eM(r=Object(r)),function(i){return ez.call(r,i)})}:function(){return[]},e5=baseGetTag;function toSource(r){if(null!=r){try{return eO.call(r)}catch(r){}try{return r+""}catch(r){}}return""}function eq(r,i){return r===i||r!=r&&i!=i}(eU&&e5(new eU(new ArrayBuffer(1)))!=ec||eK&&e5(new eK)!=$||eV&&e5(eV.resolve())!=J||eB&&e5(new eB)!=X||eG&&e5(new eG)!=et)&&(e5=function(r){var i=baseGetTag(r),c=i==F?r.constructor:void 0,l=c?toSource(c):"";if(l)switch(l){case eZ:return ec;case eF:return $;case eJ:return J;case eY:return X;case eQ:return et}return i});var e6=baseIsArguments(function(){return arguments}())?baseIsArguments:function(r){return isObjectLike(r)&&eC.call(r,"callee")&&!ez.call(r,"callee")},e2=Array.isArray,e3=e$||function(){return!1};function isFunction(r){if(!isObject(r))return!1;var i=baseGetTag(r);return i==M||"[object GeneratorFunction]"==i||"[object AsyncFunction]"==i||"[object Proxy]"==i}function isLength(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}function isObject(r){var i=typeof r;return null!=r&&("object"==i||"function"==i)}function isObjectLike(r){return null!=r&&"object"==typeof r}var e4=eI?function(r){return eI(r)}:function(r){return isObjectLike(r)&&isLength(r.length)&&!!ep[baseGetTag(r)]};r.exports=function(r,i){return function baseIsEqual(r,i,c,l,E){return r===i||(null!=r&&null!=i&&(isObjectLike(r)||isObjectLike(i))?function(r,i,c,l,E,S){var P=e2(r),M=e2(i),J=P?R:e5(r),et=M?R:e5(i);J=J==C?F:J,et=et==C?F:et;var el=J==F,eh=et==F,ep=J==et;if(ep&&e3(r)){if(!e3(i))return!1;P=!0,el=!1}if(ep&&!el)return S||(S=new Stack),P||e4(r)?equalArrays(r,i,c,l,E,S):function(r,i,c,l,E,S,P){switch(c){case ec:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)break;r=r.buffer,i=i.buffer;case eo:if(r.byteLength!=i.byteLength||!S(new eT(r),new eT(i)))break;return!0;case A:case T:case U:return eq(+r,+i);case q:return r.name==i.name&&r.message==i.message;case Q:case ee:return r==i+"";case $:var C=mapToArray;case X:var R=1&l;if(C||(C=setToArray),r.size!=i.size&&!R)break;var M=P.get(r);
53if(M)return M==i;l|=2,P.set(r,i);var F=equalArrays(C(r),C(i),l,E,S,P);return P.delete(r),F;case"[object Symbol]":if(e0)return e0.call(r)==e0.call(i)}return!1}(r,i,J,c,l,E,S);if(!(1&c)){var ef=el&&eC.call(r,"__wrapped__"),ed=eh&&eC.call(i,"__wrapped__");if(ef||ed){var eg=ef?r.value():r,ey=ed?i.value():i;return S||(S=new Stack),E(eg,ey,c,l,S)}}return!!ep&&(S||(S=new Stack),function(r,i,c,l,E,S){var P=1&c,C=getAllKeys(r),R=C.length;if(R!=getAllKeys(i).length&&!P)return!1;for(var A=R;A--;){var T=C[A];if(!(P?T in i:eC.call(i,T)))return!1}var q=S.get(r);if(q&&S.get(i))return q==i;var M=!0;S.set(r,i),S.set(i,r);for(var $=P;++A<R;){var U=r[T=C[A]],F=i[T];if(l)var J=P?l(F,U,T,i,r,S):l(U,F,T,r,i,S);if(!(void 0===J?U===F||E(U,F,c,l,S):J)){M=!1;break}$||($="constructor"==T)}if(M&&!$){var Q=r.constructor,X=i.constructor;Q!=X&&"constructor"in r&&"constructor"in i&&!("function"==typeof Q&&Q instanceof Q&&"function"==typeof X&&X instanceof X)&&(M=!1)}return S.delete(r),S.delete(i),M}(r,i,c,l,E,S))}(r,i,c,l,baseIsEqual,E):r!=r&&i!=i)}(r,i)}},63144:function(r){"use strict";let i=self.fetch.bind(self);r.exports=i,r.exports.default=r.exports},85346:function(r){"use strict";function tryStringify(r){try{return JSON.stringify(r)}catch(r){return'"[Circular]"'}}r.exports=function(r,i,c){var l=c&&c.stringify||tryStringify;if("object"==typeof r&&null!==r){var E=i.length+1;if(1===E)return r;var S=Array(E);S[0]=l(r);for(var P=1;P<E;P++)S[P]=l(i[P]);return S.join(" ")}if("string"!=typeof r)return r;var C=i.length;if(0===C)return r;for(var R="",A=0,T=-1,q=r&&r.length||0,M=0;M<q;){if(37===r.charCodeAt(M)&&M+1<q){switch(T=T>-1?T:0,r.charCodeAt(M+1)){case 100:case 102:if(A>=C||null==i[A])break;T<M&&(R+=r.slice(T,M)),R+=Number(i[A]),T=M+2,M++;break;case 105:if(A>=C||null==i[A])break;T<M&&(R+=r.slice(T,M)),R+=Math.floor(Number(i[A])),T=M+2,M++;break;case 79:case 111:case 106:if(A>=C||void 0===i[A])break;T<M&&(R+=r.slice(T,M));var $=typeof i[A];if("string"===$){R+="'"+i[A]+"'",T=M+2,M++;break}if("function"===$){R+=i[A].name||"<anonymous>",T=M+2,M++;break}R+=l(i[A]),T=M+2,M++;break;case 115:if(A>=C)break;T<M&&(R+=r.slice(T,M)),R+=String(i[A]),T=M+2,M++;break;case 37:T<M&&(R+=r.slice(T,M)),R+="%",T=M+2,M++,A--}++A}++M}return -1===T?r:(T<q&&(R+=r.slice(T)),R)}},36559:function(r,i,c){"use strict";let l=c(85346);r.exports=pino;let E=function(){function defd(r){return void 0!==r&&r}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(r){return defd(self)||defd(window)||defd(this)||{}}}().console||{};function pino(r){var i;(r=r||{}).browser=r.browser||{};let c=r.browser.transmit;if(c&&"function"!=typeof c.send)throw Error("pino: transmit option must have a send function");let l=r.browser.write||E;r.browser.write&&(r.browser.asObject=!0);let S=r.serializers||{},P=function(r,i){if(Array.isArray(r)){let i=r.filter(function(r){return"!stdSerializers.err"!==r});return i}return!0===r&&Object.keys(i)}(r.browser.serialize,S),C=r.browser.serialize;Array.isArray(r.browser.serialize)&&r.browser.serialize.indexOf("!stdSerializers.err")>-1&&(C=!1),"function"==typeof l&&(l.error=l.fatal=l.warn=l.info=l.debug=l.trace=l),!1===r.enabled&&(r.level="silent");let R=r.level||"info",A=Object.create(l);A.log||(A.log=noop),Object.defineProperty(A,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(A,"level",{get:function(){return this._level},set:function(r){if("silent"!==r&&!this.levels.values[r])throw Error("unknown level "+r);this._level=r,set(T,A,"error","log"),set(T,A,"fatal","error"),set(T,A,"warn","error"),set(T,A,"info","log"),set(T,A,"debug","log"),set(T,A,"trace","log")}});let T={transmit:c,serialize:P,asObject:r.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:"function"==typeof(i=r).timestamp?i.timestamp:!1===i.timestamp?nullTime:epochTime};return A.levels=pino.levels,A.level=R,A.setMaxListeners=A.getMaxListeners=A.emit=A.addListener=A.on=A.prependListener=A.once=A.prependOnceListener=A.removeListener=A.removeAllListeners=A.listeners=A.listenerCount=A.eventNames=A.write=A.flush=noop,A.serializers=S,A._serialize=P,A._stdErrSerialize=C,A.child=function(i,l){if(!i)throw Error("missing bindings for child Pino");l=l||{},P&&i.serializers&&(l.serializers=i.serializers);let E=l.serializers;if(P&&E){var C=Object.assign({},S,E),R=!0===r.browser.serialize?Object.keys(C):P;delete i.serializers,applySerializers([i],R,C,this._stdErrSerialize)}function Child(r){this._childLevel=(0|r._childLevel)+1,this.error=bind(r,i,"error"),this.fatal=bind(r,i,"fatal"),this.warn=bind(r,i,"warn"),this.info=bind(r,i,"info"),this.debug=bind(r,i,"debug"),this.trace=bind(r,i,"trace"),C&&(this.serializers=C,this._serialize=R),c&&(this._logEvent=createLogEventShape([].concat(r._logEvent.bindings,i)))}return Child.prototype=this,new Child(this)},c&&(A._logEvent=createLogEventShape()),A}function set(r,i,c,S){let P=Object.getPrototypeOf(i);i[c]=i.levelVal>i.levels.values[c]?noop:P[c]?P[c]:E[c]||E[S]||noop,function(r,i,c){if(r.transmit||i[c]!==noop){var S;i[c]=(S=i[c],function(){let P=r.timestamp(),C=Array(arguments.length),R=Object.getPrototypeOf&&Object.getPrototypeOf(this)===E?E:this;for(var A=0;A<C.length;A++)C[A]=arguments[A];if(r.serialize&&!r.asObject&&applySerializers(C,this._serialize,this.serializers,this._stdErrSerialize),r.asObject?S.call(R,function(r,i,c,E){r._serialize&&applySerializers(c,r._serialize,r.serializers,r._stdErrSerialize);let S=c.slice(),P=S[0],C={};E&&(C.time=E),C.level=pino.levels.values[i];let R=(0|r._childLevel)+1;if(R<1&&(R=1),null!==P&&"object"==typeof P){for(;R--&&"object"==typeof S[0];)Object.assign(C,S.shift());P=S.length?l(S.shift(),S):void 0}else"string"==typeof P&&(P=l(S.shift(),S));return void 0!==P&&(C.msg=P),C}
53(this,c,C,P)):S.apply(R,C),r.transmit){let l=r.transmit.level||i.level,E=pino.levels.values[l],S=pino.levels.values[c];if(S<E)return;(function(r,i,c){let l=i.send,E=i.ts,S=i.methodLevel,P=i.methodValue,C=i.val,R=r._logEvent.bindings;applySerializers(c,r._serialize||Object.keys(r.serializers),r.serializers,void 0===r._stdErrSerialize||r._stdErrSerialize),r._logEvent.ts=E,r._logEvent.messages=c.filter(function(r){return -1===R.indexOf(r)}),r._logEvent.level.label=S,r._logEvent.level.value=P,l(S,r._logEvent,C),r._logEvent=createLogEventShape(R)})(this,{ts:P,methodLevel:c,methodValue:S,transmitLevel:l,transmitValue:pino.levels.values[r.transmit.level||i.level],send:r.transmit.send,val:i.levelVal},C)}})}}(r,i,c)}function applySerializers(r,i,c,l){for(let E in r)if(l&&r[E]instanceof Error)r[E]=pino.stdSerializers.err(r[E]);else if("object"==typeof r[E]&&!Array.isArray(r[E]))for(let l in r[E])i&&i.indexOf(l)>-1&&l in c&&(r[E][l]=c[l](r[E][l]))}function bind(r,i,c){return function(){let l=Array(1+arguments.length);l[0]=i;for(var E=1;E<l.length;E++)l[E]=arguments[E-1];return r[c].apply(this,l)}}function createLogEventShape(r){return{ts:0,messages:[],bindings:r||[],level:{label:"",value:0}}}function mock(){return{}}function passthrough(r){return r}function noop(){}function nullTime(){return!1}function epochTime(){return Date.now()}pino.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"}},pino.stdSerializers={mapHttpRequest:mock,mapHttpResponse:mock,wrapRequestSerializer:passthrough,wrapResponseSerializer:passthrough,wrapErrorSerializer:passthrough,req:mock,res:mock,err:function(r){let i={type:r.constructor.name,msg:r.message,stack:r.stack};for(let c in r)void 0===i[c]&&(i[c]=r[c]);return i}},pino.stdTimeFunctions=Object.assign({},{nullTime,epochTime,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.